]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/grammar/tstc.ma
- ldrop is now drop as in basic_1
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / grammar / tstc.ma
index defc91ed95e244b5040bc87b939e6d1104373986..a861d18a6f55f5a25d42be2cc001ea21fd3bb7fa 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/iso_2.ma".
+include "basic_2/notation/relations/topiso_2.ma".
 include "basic_2/grammar/term_simple.ma".
 
 (* SAME TOP TERM CONSTRUCTOR ************************************************)
 
 inductive tstc: relation term ≝
    | tstc_atom: ∀I. tstc (⓪{I}) (⓪{I})
-   | tstc_pair: ∀I,V1,V2,T1,T2. tstc (②{I} V1. T1) (②{I} V2. T2)
+   | tstc_pair: ∀I,V1,V2,T1,T2. tstc (②{I}V1.T1) (②{I}V2.T2)
 .
 
-interpretation "same top constructor (term)" 'Iso T1 T2 = (tstc T1 T2).
+interpretation "same top constructor (term)" 'TopIso T1 T2 = (tstc T1 T2).
 
 (* Basic inversion lemmas ***************************************************)
 
-fact tstc_inv_atom1_aux: â\88\80T1,T2. T1 â\89\83 T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}.
+fact tstc_inv_atom1_aux: â\88\80T1,T2. T1 â\89\82 T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}.
 #T1 #T2 * -T1 -T2 //
 #J #V1 #V2 #T1 #T2 #I #H destruct
-qed.
+qed-.
 
 (* Basic_1: was: iso_gen_sort iso_gen_lref *)
-lemma tstc_inv_atom1: â\88\80I,T2. â\93ª{I} â\89\83 T2 → T2 = ⓪{I}.
-/2 width=3/ qed-.
+lemma tstc_inv_atom1: â\88\80I,T2. â\93ª{I} â\89\82 T2 → T2 = ⓪{I}.
+/2 width=3 by tstc_inv_atom1_aux/ qed-.
 
-fact tstc_inv_pair1_aux: â\88\80T1,T2. T1 â\89\83 T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 →
+fact tstc_inv_pair1_aux: â\88\80T1,T2. T1 â\89\82 T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 →
                          ∃∃W2,U2. T2 = ②{I}W2. U2.
 #T1 #T2 * -T1 -T2
 [ #J #I #W1 #U1 #H destruct
-| #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3/
+| #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/
 ]
-qed.
+qed-.
 
 (* Basic_1: was: iso_gen_head *)
-lemma tstc_inv_pair1: â\88\80I,W1,U1,T2. â\91¡{I}W1.U1 â\89\83 T2 →
+lemma tstc_inv_pair1: â\88\80I,W1,U1,T2. â\91¡{I}W1.U1 â\89\82 T2 →
                       ∃∃W2,U2. T2 = ②{I}W2. U2.
-/2 width=5/ qed-.
+/2 width=5 by tstc_inv_pair1_aux/ qed-.
 
-fact tstc_inv_atom2_aux: â\88\80T1,T2. T1 â\89\83 T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}.
+fact tstc_inv_atom2_aux: â\88\80T1,T2. T1 â\89\82 T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}.
 #T1 #T2 * -T1 -T2 //
 #J #V1 #V2 #T1 #T2 #I #H destruct
-qed.
+qed-.
 
-lemma tstc_inv_atom2: â\88\80I,T1. T1 â\89\83 ⓪{I} → T1 = ⓪{I}.
-/2 width=3/ qed-.
+lemma tstc_inv_atom2: â\88\80I,T1. T1 â\89\82 ⓪{I} → T1 = ⓪{I}.
+/2 width=3 by tstc_inv_atom2_aux/ qed-.
 
-fact tstc_inv_pair2_aux: â\88\80T1,T2. T1 â\89\83 T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 →
-                         ∃∃W1,U1. T1 = ②{I}W1. U1.
+fact tstc_inv_pair2_aux: â\88\80T1,T2. T1 â\89\82 T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 →
+                         ∃∃W1,U1. T1 = ②{I}W1.U1.
 #T1 #T2 * -T1 -T2
 [ #J #I #W2 #U2 #H destruct
-| #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3/
+| #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3 by ex1_2_intro/
 ]
-qed.
+qed-.
 
-lemma tstc_inv_pair2: â\88\80I,T1,W2,U2. T1 â\89\83 ②{I}W2.U2 →
-                      ∃∃W1,U1. T1 = ②{I}W1. U1.
-/2 width=5/ qed-.
+lemma tstc_inv_pair2: â\88\80I,T1,W2,U2. T1 â\89\82 ②{I}W2.U2 →
+                      ∃∃W1,U1. T1 = ②{I}W1.U1.
+/2 width=5 by tstc_inv_pair2_aux/ qed-.
 
 (* Basic properties *********************************************************)
 
 (* Basic_1: was: iso_refl *)
-lemma tstc_refl: ∀T. T ≃ T.
+lemma tstc_refl: reflexive … tstc.
 #T elim T -T //
 qed.
 
-lemma tstc_sym: ∀T1,T2. T1 ≃ T2 → T2 ≃ T1.
+lemma tstc_sym: symmetric … tstc.
 #T1 #T2 #H elim H -T1 -T2 //
-qed.
+qed-.
 
-lemma tstc_dec: â\88\80T1,T2. Decidable (T1 â\89\83 T2).
+lemma tstc_dec: â\88\80T1,T2. Decidable (T1 â\89\82 T2).
 * #I1 [2: #V1 #T1 ] * #I2 [2,4: #V2 #T2 ]
 [ elim (eq_item2_dec I1 I2) #HI12
-  [ destruct /2 width=1/
+  [ destruct /2 width=1 by tstc_pair, or_introl/
   | @or_intror #H
-    elim (tstc_inv_pair1 … H) -H #V #T #H destruct /2 width=1/
+    elim (tstc_inv_pair1 … H) -H #V #T #H destruct /2 width=1 by/
   ]
 | @or_intror #H
   lapply (tstc_inv_atom1 … H) -H #H destruct
 | @or_intror #H
   lapply (tstc_inv_atom2 … H) -H #H destruct
 | elim (eq_item0_dec I1 I2) #HI12
-  [ destruct /2 width=1/
+  [ destruct /2 width=1 by or_introl/
   | @or_intror #H
-    lapply (tstc_inv_atom2 … H) -H #H destruct /2 width=1/
+    lapply (tstc_inv_atom2 … H) -H #H destruct /2 width=1 by/
   ]
 ]
 qed.
 
-lemma simple_tstc_repl_dx: â\88\80T1,T2. T1 â\89\83 T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+lemma simple_tstc_repl_dx: â\88\80T1,T2. T1 â\89\82 T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
 #T1 #T2 * -T1 -T2 //
 #I #V1 #V2 #T1 #T2 #H
 elim (simple_inv_pair … H) -H #J #H destruct //
-qed. (**) (* remove from index *)
+qed-.
 
-lemma simple_tstc_repl_sn: â\88\80T1,T2. T1 â\89\83 T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
-/3 width=3/ qed-.
+lemma simple_tstc_repl_sn: â\88\80T1,T2. T1 â\89\82 T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+/3 width=3 by simple_tstc_repl_dx, tstc_sym/ qed-.