(* This file was originally generated by why.
   It can be modified; only the generated parts will be overwritten. *)

Require Export caduceus_why.
Require Export LinkedLists.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma search_impl_po_1 : 
  forall (l: ((pointer) global)),
  forall (alloc: alloc_table),
  forall (tl_global: ((memory) ((pointer) global) global)),
  forall (HW_1: (* File "search.c", line 4, characters 14-24 *)
                (is_list tl_global alloc l)),
  forall (HW_2: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc l)),
  forall (p: ((pointer) global)),
  forall (HW_3: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc p)),
  forall (HW_4: ~(p = null)),
  (valid alloc p).
Proof.
intuition.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma search_impl_po_2 : 
  forall (l: ((pointer) global)),
  forall (v: Z),
  forall (alloc: alloc_table),
  forall (hd_global: ((memory) Z global)),
  forall (tl_global: ((memory) ((pointer) global) global)),
  forall (HW_1: (* File "search.c", line 4, characters 14-24 *)
                (is_list tl_global alloc l)),
  forall (HW_2: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc l)),
  forall (p: ((pointer) global)),
  forall (HW_3: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc p)),
  forall (HW_4: ~(p = null)),
  forall (HW_5: (valid alloc p)),
  forall (result: Z),
  forall (HW_6: result = (acc hd_global p)),
  forall (HW_7: result <> v),
  forall (HW_8: (valid alloc p)),
  forall (result0: ((pointer) global)),
  forall (HW_9: result0 = (acc tl_global p)),
  forall (p0: ((pointer) global)),
  forall (HW_10: p0 = result0),
  (is_list tl_global alloc p0).
Proof.
intuition.
inversion Pre7; intuition.
absurd (p1 = null); auto.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma search_impl_po_3 : 
  forall (l: ((pointer) global)),
  forall (v: Z),
  forall (alloc: alloc_table),
  forall (hd_global: ((memory) Z global)),
  forall (tl_global: ((memory) ((pointer) global) global)),
  forall (HW_1: (* File "search.c", line 4, characters 14-24 *)
                (is_list tl_global alloc l)),
  forall (HW_2: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc l)),
  forall (p: ((pointer) global)),
  forall (HW_3: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc p)),
  forall (HW_4: ~(p = null)),
  forall (HW_5: (valid alloc p)),
  forall (result: Z),
  forall (HW_6: result = (acc hd_global p)),
  forall (HW_11: result = v),
  forall (HW_12: ~(p = null)),
  (acc hd_global p) = v.
Proof.
destruct result1; intuition; subst; auto.
inversion Pre7; intuition.
absurd (p1 = null); auto.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma search_impl_po_4 : 
  forall (l: ((pointer) global)),
  forall (v: Z),
  forall (alloc: alloc_table),
  forall (hd_global: ((memory) Z global)),
  forall (tl_global: ((memory) ((pointer) global) global)),
  forall (HW_1: (* File "search.c", line 4, characters 14-24 *)
                (is_list tl_global alloc l)),
  forall (HW_2: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc l)),
  forall (p: ((pointer) global)),
  forall (HW_3: (* File "search.c", line 9, characters 17-27 *)
                (is_list tl_global alloc p)),
  forall (HW_13: p = null),
  forall (HW_14: ~(p = null)),
  (acc hd_global p) = v.
Proof.
intuition.
Save.

Proof.
intuition.
subst; auto.
Save.

Proof.
intuition.
subst; auto.
Save.

Proof.
intuition.
(* FILL PROOF HERE *)
Save.

