]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/Basic_2/grammar/tstc.ma
initial properies of the "same top term constructor" predicate
[helm.git] / matita / matita / contribs / lambda_delta / Basic_2 / grammar / tstc.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "Basic_2/grammar/term.ma".
16
17 (* SAME TOP TERM CONSTRUCTOR ************************************************)
18
19 inductive tstc: relation term ≝
20    | tstc_atom: ∀I. tstc (⓪{I}) (⓪{I})
21    | tstc_pair: ∀I,V1,V2,T1,T2. tstc (②{I} V1. T1) (②{I} V2. T2)
22 .
23
24 interpretation "same top constructor (term)" 'Iso T1 T2 = (tstc T1 T2).
25
26 (* Basic properties *********************************************************)
27
28 (* Basic_1: was: iso_refl *)
29 lemma tstc_refl: ∀T. T ≃ T.
30 #T elim T -T //
31 qed.
32
33 lemma tstc_sym: ∀T1,T2. T1 ≃ T2 → T2 ≃ T1.
34 #T1 #T2 #H elim H -T1 -T2 //
35 qed.
36
37 (* Basic inversion lemmas ***************************************************)
38
39 fact tstc_inv_atom1_aux: ∀T1,T2. T1 ≃ T2 → ∀I. T1 = ⓪{I} → T2 = ⓪{I}.
40 #T1 #T2 * -T1 -T2 //
41 #J #V1 #V2 #T1 #T2 #I #H destruct
42 qed.
43
44 (* Basic_1: was: iso_gen_sort iso_gen_lref *)
45 lemma tstc_inv_atom1: ∀I,T2. ⓪{I} ≃ T2 → T2 = ⓪{I}.
46 /2 width=3/ qed-.
47
48 fact tstc_inv_pair1_aux: ∀T1,T2. T1 ≃ T2 → ∀I,W1,U1. T1 = ②{I}W1.U1 →
49                          ∃∃W2,U2. T2 = ②{I}W2. U2.
50 #T1 #T2 * -T1 -T2
51 [ #J #I #W1 #U1 #H destruct
52 | #J #V1 #V2 #T1 #T2 #I #W1 #U1 #H destruct /2 width=3/
53 ]
54 qed.
55
56 (* Basic_1: was: iso_gen_head *)
57 lemma tstc_inv_pair1: ∀I,W1,U1,T2. ②{I}W1.U1 ≃ T2 →
58                       ∃∃W2,U2. T2 = ②{I}W2. U2.
59 /2 width=5/ qed-.
60
61 fact tstc_inv_atom2_aux: ∀T1,T2. T1 ≃ T2 → ∀I. T2 = ⓪{I} → T1 = ⓪{I}.
62 #T1 #T2 * -T1 -T2 //
63 #J #V1 #V2 #T1 #T2 #I #H destruct
64 qed.
65
66 lemma tstc_inv_atom2: ∀I,T1. T1 ≃ ⓪{I} → T1 = ⓪{I}.
67 /2 width=3/ qed-.
68
69 fact tstc_inv_pair2_aux: ∀T1,T2. T1 ≃ T2 → ∀I,W2,U2. T2 = ②{I}W2.U2 →
70                          ∃∃W1,U1. T1 = ②{I}W1. U1.
71 #T1 #T2 * -T1 -T2
72 [ #J #I #W2 #U2 #H destruct
73 | #J #V1 #V2 #T1 #T2 #I #W2 #U2 #H destruct /2 width=3/
74 ]
75 qed.
76
77 lemma tstc_inv_pair2: ∀I,T1,W2,U2. T1 ≃ ②{I}W2.U2 →
78                       ∃∃W1,U1. T1 = ②{I}W1. U1.
79 /2 width=5/ qed-.
80
81 (* Basic_1: removed theorems 2:
82             iso_flats_lref_bind_false iso_flats_flat_bind_false
83 *)