]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/relocation/lex.ma
- lpx and lpxs restored to prove equivalene between lfpxs and lpxs + lfeq
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / relocation / lex.ma
index 5c8b23e5598009ebe78015d87d2ddb04b0b932b1..3067deb2a536970a2ae68324c4c871e37448571b 100644 (file)
@@ -31,3 +31,45 @@ interpretation "generic extension (local environment)"
 (* Basic_2A1: was: lpx_sn_refl *)
 lemma lex_refl: ∀R. c_reflexive … R → reflexive … (lex R).
 /4 width=3 by lexs_refl, ext2_refl, ex2_intro/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+(* Basic_2A1: was: lpx_sn_inv_atom1: *)
+lemma lex_inv_atom_sn: ∀R,L2. ⋆ ⪤[R] L2 → L2 = ⋆.
+#R #L2 * #f #Hf #H >(lexs_inv_atom1 … H) -L2 //
+qed-.
+
+(* Basic_2A1: was: lpx_sn_inv_pair1 *)
+lemma lex_inv_pair_sn: ∀R,I,L2,K1,V1. K1.ⓑ{I}V1 ⪤[R] L2 →
+                       ∃∃K2,V2. K1 ⪤[R] K2 & R K1 V1 V2 & L2 = K2.ⓑ{I}V2.
+#R #I #L2 #K1 #V1 * #f #Hf #H
+lapply (lexs_eq_repl_fwd … H (↑f) ?) -H /2 width=1 by eq_push_inv_isid/ #H
+elim (lexs_inv_push1 … H) -H #Z2 #K2 #HK12 #HZ2 #H destruct
+elim (ext2_inv_pair_sn … HZ2) -HZ2 #V2 #HV12 #H destruct
+/3 width=5 by ex3_2_intro, ex2_intro/
+qed-.
+
+(* Basic_2A1: was: lpx_sn_inv_atom2 *)
+lemma lex_inv_atom_dx: ∀R,L1. L1 ⪤[R] ⋆ → L1 = ⋆.
+#R #L1 * #f #Hf #H >(lexs_inv_atom2 … H) -L1 //
+qed-.
+
+(* Basic_2A1: was: lpx_sn_inv_pair2 *)
+lemma lex_inv_pair_dx: ∀R,I,L1,K2,V2. L1 ⪤[R] K2.ⓑ{I}V2 →
+                       ∃∃K1,V1. K1 ⪤[R] K2 & R K1 V1 V2 & L1 = K1.ⓑ{I}V1.
+#R #I #L1 #K2 #V2 * #f #Hf #H
+lapply (lexs_eq_repl_fwd … H (↑f) ?) -H /2 width=1 by eq_push_inv_isid/ #H
+elim (lexs_inv_push2 … H) -H #Z1 #K1 #HK12 #HZ1 #H destruct
+elim (ext2_inv_pair_dx … HZ1) -HZ1 #V1 #HV12 #H destruct
+/3 width=5 by ex3_2_intro, ex2_intro/
+qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+(* Basic_2A1: was: lpx_sn_inv_pair *)
+lemma lex_inv_pair: ∀R,I1,I2,L1,L2,V1,V2.
+                    L1.ⓑ{I1}V1 ⪤[R] L2.ⓑ{I2}V2 →
+                    ∧∧ L1 ⪤[R] L2 & R L1 V1 V2 & I1 = I2.
+#R #I1 #I2 #L1 #L2 #V1 #V2 #H elim (lex_inv_pair_sn … H) -H
+#L0 #V0 #HL10 #HV10 #H destruct /2 width=1 by and3_intro/
+qed-.