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

Require Export g4_spec_why.
Require Export G4.
Require Export G4z.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_1 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  (well_founded lex3).
Proof.
intros; apply lex3_well_founded.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_2 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  (* File "g4.c", line 17, characters 17-94 *) ((((0 <= 2 /\ 0 <= 2) /\ 0 <=
  2) /\ 0 <= base) /\ (reachable_ base 2 2 2)).
Proof.
intuition.
subst; apply reachable_0; auto with *.
unfold lex3, lex, prod3, Lex3.prod3.
do 2 apply right_lex.
unfold Zwf; omega.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_3 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  forall (HW_3: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= 2 /\
                0 <= 2) /\ 0 <= 2) /\ 0 <= base) /\ (reachable_ base 2 2 2))),
  forall (base0: Z),
  forall (c0: Z),
  forall (c1: Z),
  forall (c2: Z),
  forall (HW_4: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0 /\
                0 <= c1) /\ 0 <= c2) /\ 0 <= base0) /\
                (reachable_ base0 c2 c1 c0))),
  forall (HW_5: 1 <> 0),
  forall (HW_6: 0 < c0),
  forall (c0_0: Z),
  forall (HW_7: c0_0 = (c0 - 1)),
  forall (base1: Z),
  forall (HW_8: base1 = (base0 + 1)),
  (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0_0 /\ 0 <= c1) /\
  0 <= c2) /\ 0 <= base1) /\ (reachable_ base1 c2 c1 c0_0)) /\
  (lex3 (prod3 c2 c1 c0_0) (prod3 c2 c1 c0)).
Proof.
intuition.
assert (c0_1=0). omega.
subst; apply reachable_1; auto with *.
unfold lex3, lex, prod3, Lex3.prod3.
apply right_lex; apply left_lex.
unfold Zwf; omega.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_4 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  forall (HW_3: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= 2 /\
                0 <= 2) /\ 0 <= 2) /\ 0 <= base) /\ (reachable_ base 2 2 2))),
  forall (base0: Z),
  forall (c0: Z),
  forall (c1: Z),
  forall (c2: Z),
  forall (HW_4: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0 /\
                0 <= c1) /\ 0 <= c2) /\ 0 <= base0) /\
                (reachable_ base0 c2 c1 c0))),
  forall (HW_5: 1 <> 0),
  forall (HW_9: 0 >= c0),
  forall (HW_10: 0 < c1),
  forall (c1_0: Z),
  forall (HW_11: c1_0 = (c1 - 1)),
  forall (c0_0: Z),
  forall (HW_12: c0_0 = base0),
  forall (base1: Z),
  forall (HW_13: base1 = (base0 + 1)),
  (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0_0 /\ 0 <= c1_0) /\
  0 <= c2) /\ 0 <= base1) /\ (reachable_ base1 c2 c1_0 c0_0)) /\
  (lex3 (prod3 c2 c1_0 c0_0) (prod3 c2 c1 c0)).
Proof.
intuition.
assert (c0_1 = 0). omega.
assert (c1_1 = 0). omega.
subst; apply reachable_2; auto with *.
unfold lex3, lex, prod3, Lex3.prod3.
apply left_lex.
unfold Zwf; omega.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_5 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  forall (HW_3: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= 2 /\
                0 <= 2) /\ 0 <= 2) /\ 0 <= base) /\ (reachable_ base 2 2 2))),
  forall (base0: Z),
  forall (c0: Z),
  forall (c1: Z),
  forall (c2: Z),
  forall (HW_4: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0 /\
                0 <= c1) /\ 0 <= c2) /\ 0 <= base0) /\
                (reachable_ base0 c2 c1 c0))),
  forall (HW_5: 1 <> 0),
  forall (HW_9: 0 >= c0),
  forall (HW_14: 0 >= c1),
  forall (HW_15: 0 < c2),
  forall (c2_0: Z),
  forall (HW_16: c2_0 = (c2 - 1)),
  forall (c1_0: Z),
  forall (HW_17: c1_0 = base0),
  forall (c0_0: Z),
  forall (HW_18: c0_0 = c1_0),
  forall (base1: Z),
  forall (HW_19: base1 = (base0 + 1)),
  (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0_0 /\ 0 <= c1_0) /\
  0 <= c2_0) /\ 0 <= base1) /\ (reachable_ base1 c2_0 c1_0 c0_0)) /\
  (lex3 (prod3 c2_0 c1_0 c0_0) (prod3 c2 c1 c0)).
Proof.
intros.
assert (c0_1 = 0). omega.
assert (c1_1 = 0). omega.
assert (c2_1 = 0). omega.
subst.
apply reachable_end_; intuition.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_6 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  forall (HW_3: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= 2 /\
                0 <= 2) /\ 0 <= 2) /\ 0 <= base) /\ (reachable_ base 2 2 2))),
  forall (base0: Z),
  forall (c0: Z),
  forall (c1: Z),
  forall (c2: Z),
  forall (HW_4: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0 /\
                0 <= c1) /\ 0 <= c2) /\ 0 <= base0) /\
                (reachable_ base0 c2 c1 c0))),
  forall (HW_5: 1 <> 0),
  forall (HW_9: 0 >= c0),
  forall (HW_14: 0 >= c1),
  forall (HW_20: 0 >= c2),
  base0 = (3 * (pow 2 (3 * (pow 2 (pow 3 3)) + (pow 3 3))) - 1).
Proof.
intuition; subst; auto.
Save.

(* Why obligation from file "", line 0, characters 0-0: *)
(*Why goal*) Lemma main_impl_po_7 : 
  forall (base: Z),
  forall (HW_2: base = 3),
  forall (HW_3: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= 2 /\
                0 <= 2) /\ 0 <= 2) /\ 0 <= base) /\ (reachable_ base 2 2 2))),
  forall (base0: Z),
  forall (c0: Z),
  forall (c1: Z),
  forall (c2: Z),
  forall (HW_4: (* File "g4.c", line 17, characters 17-94 *) ((((0 <= c0 /\
                0 <= c1) /\ 0 <= c2) /\ 0 <= base0) /\
                (reachable_ base0 c2 c1 c0))),
  forall (HW_21: 1 = 0),
  base0 = (3 * (pow 2 (3 * (pow 2 (pow 3 3)) + (pow 3 3))) - 1).
Proof.
intros.
absurd (1=0); omega.
Save.

Proof.
intuition.
subst; apply reachable_3222.
Save.

