unfold is_left_consistent in |- *.
unfold weak_left_consistent in |- *.
intros.
elim H0; intros.
elim H3; intros.
elim H5; intros.
elim H7; intros.
elim H9; intros.
generalize (inj_left_syn h H4 H10 H6 H8).
intro.
split.
unfold name_left_name in |- *.
intros.
generalize (le_h_impl_incl_syn g h H1).
intro.
unfold inclusion in H15.
generalize (H15 M N H13).
rewrite H14.
intros.
generalize (nam_left_syn h a N H16).
rewrite <- H14.
intro.
unfold name_left_name in H2.
apply (H2 M N H17 a H14).
split.
unfold injective_left in |- *.
intros.
generalize (le_h_impl_incl_syn g h H1).
unfold inclusion in |- *.
intros.
generalize (H16 M N H13).
generalize (H16 M' N' H14).
intros.
unfold injective_left in H12.
apply (H12 M N H18 M' N' H17 H15).
split.
unfold op_synthesis_left in |- *.
intros.
generalize (le_h_impl_incl_syn g h H1).
unfold inclusion in |- *.
intros.
generalize (H15 M N H13).
rewrite H14.
intros.
inversion H16.
unfold op_synthesis_left in H6.
rewrite <- H14 in H17.
generalize (H6 o M N H17 M' H14).
intros.
red in |- *.
intro.
apply (H20 N').
unfold le_h in H1.
unfold inclusion in H1; auto.
red in |- *.
intros.
unfold le_h in H1.
unfold inclusion in H1.
generalize (H1 M' N' H21).
intro.
cut (N' = N0).
intro.
rewrite <- H23 in H18.
rewrite H14 in H13.
rewrite <- H18 in H13.
generalize (irreducible_op g).
intros.
elim (H24 o o M' N').
intros.
unfold is_irreducible in H.
unfold equal in H.
elim H.
unfold inclusion in |- *.
intros.
generalize (H25 (H27 (Mop o M') (Mop o N') H13)).
intro.
elim H29.
intros.
case H31; try tauto.
intro.
apply H32.
generalize (h_le_h_ana_h g).
unfold le_h in |- *.
unfold inclusion in |- *; auto.
generalize (inj_left_syn h H4 H10 H6 H8).
unfold injective_left in |- *.
intros.
apply (H23 M' N' H22 M' N0 H20); trivial.
split.
unfold pair_free_left in |- *.
intros.
red in |- *.
intro.
generalize (le_h_impl_incl_syn g h H1).
unfold inclusion in |- *.
intros.
generalize (H14 (MPair M1 M2) N H13).
intro.
inversion H15.
unfold pair_free_left in H8.
apply (H8 M1 M2 N); trivial.
rewrite <- H19 in H13.
generalize (irreducible_pair g M1 N1 M2 N2).
intro.
apply H21.
unfold is_irreducible in H.
unfold equal in H.
elim H.
unfold inclusion in |- *.
auto.
split.
unfold enc_synthesis_left in |- *.
intros.
generalize (le_h_impl_incl_syn g h H1).
unfold inclusion in |- *.
intro.
generalize (H15 M N H13).
intro.
rewrite H14 in H16.
inversion H16.
rewrite <- H14 in H17.
unfold enc_synthesis_left in H10.
generalize (H10 M N H17 M' K H14).
intros.
case (H20 N' L).
intro.
left.
red in |- *.
intro.
apply H21.
unfold le_h in H1.
unfold inclusion in H1.
auto.
right.
red in |- *; intro.
apply H21.
unfold le_h in H1.
unfold inclusion in H1; auto.
rewrite H14 in H13.
rewrite <- H20 in H13.
elim (irreducible_enc g M' N0 K L0).
intros.
unfold is_irreducible in H.
unfold equal in H.
elim H.
unfold inclusion in |- *.
intros.
elim (H22 (H24 (MEnc M' K) (MEnc N0 L0) H13)).
intros.
case H27.
intros.
left.
red in |- *.
intro.
cut (N' = N0).
intro.
apply H28.
rewrite <- H30.
generalize (h_le_h_ana_h g).
unfold le_h in |- *.
unfold inclusion in |- *.
auto.
unfold le_h in H1.
unfold inclusion in H1.
generalize (H1 M' N' H29).
intro.
unfold injective_left in H12.
apply (H12 M' N' H30 M' N0 H19); trivial.
right.
red in |- *.
intro.
apply H28.
cut (L = L0).
intro.
rewrite <- H30.
generalize (h_le_h_ana_h g).
unfold le_h in |- *.
unfold inclusion in |- *; auto.
unfold le_h in H1.
unfold inclusion in H1.
generalize (H1 K L H29).
intro.
unfold injective_left in H12.
apply (H12 K L H30 K L0 H21); trivial.
unfold enc_analysis_left in |- *.
intros.
generalize (le_h_impl_incl_syn g h H1).
unfold inclusion in |- *.
intro.
generalize (H16 M N H13).
rewrite H14.
intro.
inversion H17.
unfold le_h in H1.
unfold inclusion in H1.
generalize (H1 (inv K) (inv L) H15).
intro.
elim H11.
intros.
unfold enc_analysis_left in H22.
rewrite <- H14 in H18.
elim (H22 M N H18 M' K H14 L H21).
intro N'.
intro.
exists N'.
elim H24.
intros.
split; trivial.
rewrite H14 in H13.
rewrite H25 in H13.
elim (irreducible_enc g M' N' K L).
intros.
unfold is_irreducible in H.
unfold equal in H.
elim H.
unfold inclusion in |- *.
intros.
elim (H27 (H29 (MEnc M' K) (MEnc N' L) H13)).
intros.
generalize (ana_h_equiv_irr_h g).
unfold equiv_h in |- *.
intro.
elim H33.
intros.
unfold le_h in H34.
unfold inclusion in H34.
fold (inclusion (irreducible g) g) in H30.
generalize (inclusion_impl_le_h (irreducible g) g H30).
unfold le_h in |- *.
unfold inclusion in |- *.
intro.
apply H36.
apply H34.
apply SynInc.
generalize (analysis_is_analysis g).
unfold is_analysis in |- *.
unfold analysis_cond in |- *.
intros.
elim H37.
intros.
elim H38.
unfold stable_analysis in |- *.
unfold inclusion in |- *.
intros.
apply H41.
apply (AnaDec (analysis_def g) M' N' K L).
apply AnaInc; trivial.
generalize (h_le_h_ana_h g).
unfold le_h in |- *.
unfold inclusion in |- *; auto.
exists N0.
split.
cut (L = L0).
intro.
rewrite H23; trivial.
unfold le_h in H1.
unfold inclusion in H1.
generalize (H1 (inv K) (inv L) H15).
intro.
elim H11; intros.
generalize (inj_inv_left_syn h H4 H10 H6 H8 H25).
unfold injective_inv_left in |- *.
intros.
generalize (H26 K L0 H22 (inv K) (inv L) H23).
intros.
cut (inv K = inv K); trivial.
intro.
generalize (H27 H28).
intro.
cut (inv (inv L) = inv (inv L0)).
rewrite inv_invol.
rewrite inv_invol.
trivial.
rewrite H29; trivial.
generalize H.
unfold is_irreducible in |- *.
unfold equal in |- *.
intro.
elim H23.
intros.
rewrite H14 in H13.
rewrite <- H21 in H13.
generalize (irreducible_enc g).
intros.
elim (H26 M' N0 K L0).
intros.
unfold is_irreducible in H.
unfold equal in H.
elim H.
unfold inclusion in |- *.
intros.
elim (H27 (H29 (MEnc M' K) (MEnc N0 L0) H13)).
intros.
fold (inclusion (irreducible g) g) in H30.
generalize (inclusion_impl_le_h (irreducible g) g H30).
unfold le_h in |- *.
unfold inclusion in |- *.
intros.
apply H33.
generalize (h_le_h_ana_h g).
unfold le_h in |- *.
unfold inclusion in |- *.
intros.
generalize (ana_h_equiv_irr_h g).
unfold equiv_h in |- *.
intro.
elim H35.
unfold le_h in |- *.
unfold inclusion in |- *.
intros.
apply H36.
apply SynInc.
generalize (analysis_is_analysis g).
unfold is_analysis in |- *.
unfold analysis_cond in |- *.
intros.
elim H38.
intros.
elim H39.
unfold stable_analysis in |- *.
unfold inclusion in |- *.
intros.
apply H42.
apply (AnaDec (analysis_def g) M' N0 K L0).
apply AnaInc; trivial.
apply H37.
fold (inclusion g (irreducible g)) in H29.
generalize (inclusion_impl_le_h g (irreducible g) H29).
unfold le_h in |- *.
unfold inclusion in |- *.
intros.
apply H43.
cut (L = L0).
intro.
rewrite <- H44.
trivial.
generalize H1.
unfold le_h in |- *.
unfold inclusion in |- *.
intros.
generalize (H44 (inv K) (inv L) H15).
intro.
elim H11.
intros.
generalize (inj_inv_left_syn h H4 H10 H6 H8 H47).
unfold injective_inv_left in |- *.
intros.
generalize (H48 K L0 H22 (inv K) (inv L) H45).
intros.
cut (inv K = inv K); trivial.
intro.
generalize (H49 H50).
intro.
rewrite <- inv_invol.
rewrite <- H51.
symmetry  in |- *.
apply inv_invol.
Qed.

Lemma weak_left_consistent_inj_inv_left_iff_left_consistent :
forall h : hedge,
weak_left_consistent h /\ injective_inv_left h <-> is_left_consistent h.