]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambda_delta/Basic_2/grammar/term.ma
- update in Basic_2
[helm.git] / matita / matita / contribs / lambda_delta / Basic_2 / grammar / term.ma
index d66a9c520860e59448c1e4c6089cdb57c0bfb5e3..6e8370d497251de2cfd69bfba097e5418823bb77 100644 (file)
@@ -55,6 +55,11 @@ interpretation "application (term)"
 interpretation "native type annotation (term)"
    'SnCast T1 T2 = (TPair (Flat2 Cast) T1 T2).
 
+(* Basic properties *********************************************************)
+
+(* Basic_1: was: term_dec *)
+axiom term_eq_dec: ∀T1,T2:term. Decidable (T1 = T2).
+
 (* Basic inversion lemmas ***************************************************)
 
 lemma discr_tpair_xy_x: ∀I,T,V. ②{I} V. T = V → False.
@@ -76,10 +81,36 @@ lemma discr_tpair_xy_y: ∀I,V,T. ②{I} V. T = T → False.
 ]
 qed-.
 
-(* Basic properties *********************************************************)
+lemma eq_false_inv_tpair_sn: ∀I,V1,T1,V2,T2.
+                             (②{I} V1. T1 = ②{I} V2. T2 → False) →
+                             (V1 = V2 → False) ∨ (V1 = V2 ∧ (T1 = T2 → False)).
+#I #V1 #T1 #V2 #T2 #H
+elim (term_eq_dec V1 V2) /3 width=1/ #HV12 destruct
+@or_intror @conj // #HT12 destruct /2 width=1/ 
+qed-.
 
-(* Basic_1: was: term_dec *)
-axiom term_eq_dec: ∀T1,T2:term. Decidable (T1 = T2).
+lemma eq_false_inv_tpair_dx: ∀I,V1,T1,V2,T2.
+                             (②{I} V1. T1 = ②{I} V2. T2 → False) →
+                             (T1 = T2 → False) ∨ (T1 = T2 ∧ (V1 = V2 → False)).
+#I #V1 #T1 #V2 #T2 #H
+elim (term_eq_dec T1 T2) /3 width=1/ #HT12 destruct
+@or_intror @conj // #HT12 destruct /2 width=1/
+qed-.
+
+lemma eq_false_inv_beta: ∀V1,V2,W1,W2,T1,T2.
+                         (ⓐV1. ⓛW1. T1 = ⓐV2. ⓛW2 .T2 →False) →
+                         (W1 = W2 → False) ∨
+                         (W1 = W2 ∧ (ⓓV1. T1 = ⓓV2. T2 → False)).
+#V1 #V2 #W1 #W2 #T1 #T2 #H
+elim (eq_false_inv_tpair_sn … H) -H
+[ #HV12 elim (term_eq_dec W1 W2) /3 width=1/
+  #H destruct @or_intror @conj // #H destruct /2 width=1/
+| * #H1 #H2 destruct
+  elim (eq_false_inv_tpair_sn … H2) -H2 /3 width=1/
+  * #H #HT12 destruct
+  @or_intror @conj // #H destruct /2 width=1/
+]
+qed.
 
 (* Basic_1: removed theorems 3:
             not_void_abst not_abbr_void not_abst_void