simple induction E; intros.
inversion_clear H.
inversion_clear H0.
trivial.
inversion_clear H.
inversion_clear H0.
trivial.
inversion_clear H.
inversion_clear H0.
trivial.
inversion_clear H.
inversion_clear H0.
exact (Access_inject p s C C' H H1).
inversion_clear H1.
inversion_clear H2.
elim (H C1 C0 s H3 H1).
elim (H0 C2 C3 s H4 H5).
trivial.
inversion_clear H1.
inversion_clear H2.
elim (H C1 C0 s H3 H1).
elim (H0 C2 C3 s H4 H5).
trivial.
inversion_clear H0.
inversion_clear H1.
elim (H C0 C1 (cons_squelette p s) H2 H0).
trivial.
inversion_clear H1.
inversion_clear H2.
elim (H C1 C0 s H3 H1).
elim (H0 C2 C3 (cons_squelette p s) H4 H5).
trivial.
inversion_clear H1.
inversion_clear H2.
elim (H C0 C1 (cons_squelette p0 (cons_squelette p s)) H3 H1).
elim (H0 C2 C3 (cons_squelette p s) H4 H5).
trivial.
inversion_clear H2.
inversion_clear H3.
elim (H C1 C0 s H4 H2).
elim (H0 C2 C4 s H5 H7).
elim (H1 C3 C5 s H6 H8).
trivial.
Qed.
(*****************************************************************************)
(*We can now define an equivalence between ML values and CAM values with the *)
(*the help of the predicate Traduction                                       *)
(*****************************************************************************)
Inductive Equiv_val : MLval -> CSem_val -> Prop :=
| Eqbool : forall b : bool, Equiv_val (boolean b) (val (elem b))
| Eqnum : forall n : nat, Equiv_val (num n) (val (int n))
| Eq_op : forall c : OP, Equiv_val (OP_clos c) (val (def_op c))
| Eqpair :
forall (V1 V2 : MLval) (Cval1 Cval2 : CSem_val),
Equiv_val V1 Cval1 ->
Equiv_val V2 Cval2 -> Equiv_val (valpair V1 V2) (Cam_pair Cval1 Cval2)
| Eqclos :
forall (p : Pat) (E : MLexp) (C : Commande) (e : MLenv)
(CV : CSem_val) (s : Squelette),
Equiv_env e CV ->
Habite e s ->
Traduction (cons_squelette p s) E C ->
Equiv_val (Clos p E e) (Cam_clos C CV)
| Eqclos_rec :
forall (p x : Pat) (E : MLexp) (e : MLenv) (C : Commande)
(CV : CSem_val) (s : Squelette),
Equiv_env e CV ->
Habite e s ->
Traduction (cons_squelette x (cons_squelette p s)) E C ->
Equiv_val (Clos_rec x E p e) (Cam_clos_rec C CV)
with Equiv_env : MLenv -> CSem_val -> Prop :=
| Eqenv1 : Equiv_env Enil Cam_nil
| Eqenv2 :
forall (p : Pat) (E : MLenv) (CV0 : CSem_val),
Equiv_env E CV0 ->
forall (V : MLval) (CV : CSem_val),
Equiv_val V CV -> Equiv_env (Econs p V E) (Cam_pair CV0 CV).
(*****************************************************************************)
(*                 We can now give a formulation of the proof                *)
(*****************************************************************************)
Inductive compilation (E : MLexp) : Prop :=
preuve_compilation :
(forall (e : MLenv) (V : MLval),
ML_DS e E V ->
forall (s : Squelette) (C : Commande),
Traduction s E C ->
Habite e s ->
forall CV : CSem_val,
Equiv_env e CV ->
exists CV1 : CSem_val,
Equiv_val V CV1 /\
(forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) ->
compilation E.
(*****************************************************************************)
(*This formulation permits us to make the proof for the different cases      *)
(*       where we don't need induction assumptions.                          *)
(*****************************************************************************)
(*****************************************************************************)
(*                  Case where E is a boolean                                *)
(*****************************************************************************)

Lemma Proof_bool : forall b : bool, compilation (Bool b).
intro b.