]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma
- first results on cpx (dericed from those on cpg)
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cpx_fqus.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 (* Properties on supclosure *************************************************)
16
17 lemma fqu_cpx_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
18                      ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 →
19                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
20 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 
21 /3 width=3 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, cpx_pair_sn, cpx_bind, cpx_flat, ex2_intro/
22 [ #I #G #L #V2 #U2 #HVU2
23   elim (lift_total U2 0 1)
24   /4 width=7 by fqu_drop, cpx_delta, drop_pair, drop_drop, ex2_intro/
25 | #G #L #K #T1 #U1 #k #HLK1 #HTU1 #T2 #HTU2
26   elim (lift_total T2 0 (k+1))
27   /3 width=11 by cpx_lift, fqu_drop, ex2_intro/
28 ]
29 qed-.
30
31 lemma fquq_cpx_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
32                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 →
33                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
34 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fquq_inv_gen … H) -H
35 [ #HT12 elim (fqu_cpx_trans … HT12 … HTU2) /3 width=3 by fqu_fquq, ex2_intro/
36 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
37 ]
38 qed-.
39
40 lemma fqup_cpx_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
41                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 →
42                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
43 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
44 [ #G2 #L2 #T2 #H12 #U2 #HTU2 elim (fqu_cpx_trans … H12 … HTU2) -T2
45   /3 width=3 by fqu_fqup, ex2_intro/
46 | #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #U2 #HTU2
47   elim (fqu_cpx_trans … HT2 … HTU2) -T2 #T2 #HT2 #HTU2
48   elim (IHT1 … HT2) -T /3 width=7 by fqup_strap1, ex2_intro/
49 ]
50 qed-.
51
52 lemma fqus_cpx_trans: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
53                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 →
54                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
55 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 elim (fqus_inv_gen … H) -H
56 [ #HT12 elim (fqup_cpx_trans … HT12 … HTU2) /3 width=3 by fqup_fqus, ex2_intro/
57 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
58 ]
59 qed-.
60
61 lemma fqu_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
62                          ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 → (T2 = U2 → ⊥) →
63                          ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
64 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
65 [ #I #G #L #V1 #V2 #HV12 #_ elim (lift_total V2 0 1)
66   #U2 #HVU2 @(ex3_intro … U2)
67   [1,3: /3 width=7 by fqu_drop, cpx_delta, drop_pair, drop_drop/
68   | #H destruct
69     lapply (lift_inv_lref2_be … HVU2 ? ?) -HVU2 //
70   ]
71 | #I #G #L #V1 #T #V2 #HV12 #H @(ex3_intro … (②{I}V2.T))
72   [1,3: /2 width=4 by fqu_pair_sn, cpx_pair_sn/
73   | #H0 destruct /2 width=1 by/
74   ]
75 | #a #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓑ{a,I}V.T2))
76   [1,3: /2 width=4 by fqu_bind_dx, cpx_bind/
77   | #H0 destruct /2 width=1 by/
78   ]
79 | #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓕ{I}V.T2))
80   [1,3: /2 width=4 by fqu_flat_dx, cpx_flat/
81   | #H0 destruct /2 width=1 by/
82   ]
83 | #G #L #K #T1 #U1 #k #HLK #HTU1 #T2 #HT12 #H elim (lift_total T2 0 (k+1))
84   #U2 #HTU2 @(ex3_intro … U2)
85   [1,3: /2 width=10 by cpx_lift, fqu_drop/
86   | #H0 destruct /3 width=5 by lift_inj/
87 ]
88 qed-.
89
90 lemma fquq_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
91                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 → (T2 = U2 → ⊥) →
92                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
93 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fquq_inv_gen … H12) -H12
94 [ #H12 elim (fqu_cpx_trans_neq … H12 … HTU2 H) -T2
95   /3 width=4 by fqu_fquq, ex3_intro/
96 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
97 ]
98 qed-.
99
100 lemma fqup_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
101                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 → (T2 = U2 → ⊥) →
102                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
103 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
104 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_neq … H12 … HTU2 H) -T2
105   /3 width=4 by fqu_fqup, ex3_intro/
106 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
107   #U1 #HTU1 #H #H12 elim (fqu_cpx_trans_neq … H1 … HTU1 H) -T1
108   /3 width=8 by fqup_strap2, ex3_intro/
109 ]
110 qed-.
111
112 lemma fqus_cpx_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
113                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h, o] U2 → (T2 = U2 → ⊥) →
114                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
115 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_gen … H12) -H12
116 [ #H12 elim (fqup_cpx_trans_neq … H12 … HTU2 H) -T2
117   /3 width=4 by fqup_fqus, ex3_intro/
118 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
119 ]
120 qed-.