]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma
milestone update in basic_2, update in ground and static_2
[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 (* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
16
17 include "static_2/relocation/lifts_teqx.ma".
18 include "static_2/s_computation/fqus_fqup.ma".
19 include "basic_2/rt_transition/cpx_drops.ma".
20 include "basic_2/rt_transition/cpx_lsubr.ma".
21
22 (* Properties on supclosure *************************************************)
23
24 lemma fqu_cpx_trans (b):
25       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
26       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 →
27       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
28 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
29 /3 width=3 by cpx_pair_sn, cpx_bind, cpx_flat, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, ex2_intro/
30 [ #I #G #L2 #V2 #X2 #HVX2
31   elim (lifts_total X2 (𝐔❨1❩))
32   /3 width=3 by fqu_drop, cpx_delta, ex2_intro/
33 | /5 width=4 by lsubr_cpx_trans, cpx_bind, lsubr_unit, fqu_clear, ex2_intro/
34 | #I #G #L2 #T2 #X2 #HTX2 #U2 #HTU2
35   elim (cpx_lifts_sn … HTU2 (Ⓣ) … (L2.ⓘ[I]) … HTX2)
36   /3 width=3 by fqu_drop, drops_refl, drops_drop, ex2_intro/
37 ]
38 qed-.
39
40 lemma fquq_cpx_trans (b):
41       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ →
42       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 →
43       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
44 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H
45 [ #HT12 #U2 #HTU2 elim (fqu_cpx_trans … HT12 … HTU2) /3 width=3 by fqu_fquq, ex2_intro/
46 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
47 ]
48 qed-.
49
50 lemma fqup_cpx_trans (b):
51       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
52       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 →
53       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
54 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
55 [ #G2 #L2 #T2 #H12 #U2 #HTU2 elim (fqu_cpx_trans … H12 … HTU2) -T2
56   /3 width=3 by fqu_fqup, ex2_intro/
57 | #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #U2 #HTU2
58   elim (fqu_cpx_trans … HT2 … HTU2) -T2 #T2 #HT2 #HTU2
59   elim (IHT1 … HT2) -T /3 width=7 by fqup_strap1, ex2_intro/
60 ]
61 qed-.
62
63 lemma fqus_cpx_trans (b):
64       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
65       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 →
66       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
67 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H
68 [ #HT12 #U2 #HTU2 elim (fqup_cpx_trans … HT12 … HTU2) /3 width=3 by fqup_fqus, ex2_intro/
69 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
70 ]
71 qed-.
72
73 lemma fqu_cpx_trans_tneqx (b):
74       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
75       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) →
76       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
77 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
78 [ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❨1❩)
79   #U2 #HVU2 @(ex3_intro … U2)
80   [1,3: /3 width=7 by cpx_delta, fqu_drop/
81   | #H lapply (teqx_inv_lref1 … H) -H
82     #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/
83   ]
84 | #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②[I]V2.T))
85   [1,3: /2 width=4 by fqu_pair_sn, cpx_pair_sn/
86   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
87   ]
88 | #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ[p,I]V.T2))
89   [1,3: /2 width=4 by fqu_bind_dx, cpx_bind/
90   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
91   ]
92 | #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ[p,I]V.T2))
93   [1,3: /4 width=4 by lsubr_cpx_trans, cpx_bind, lsubr_unit, fqu_clear/
94   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
95   ]
96 | #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓕ[I]V.T2))
97   [1,3: /2 width=4 by fqu_flat_dx, cpx_flat/
98   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
99   ]
100 | #I #G #L #T1 #U1 #HTU1 #T2 #HT12 #H0
101   elim (cpx_lifts_sn … HT12 (Ⓣ) … (L.ⓘ[I]) … HTU1) -HT12
102   /4 width=6 by fqu_drop, drops_refl, drops_drop, teqx_inv_lifts_bi, ex3_intro/
103 ]
104 qed-.
105
106 lemma fquq_cpx_trans_tneqx (b):
107       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ →
108       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) →
109       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
110 #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
111 [ #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tneqx … H12 … HTU2 H) -T2
112   /3 width=4 by fqu_fquq, ex3_intro/
113 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
114 ]
115 qed-.
116
117 lemma fqup_cpx_trans_tneqx (b):
118       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
119       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) →
120       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
121 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
122 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tneqx … H12 … HTU2 H) -T2
123   /3 width=4 by fqu_fqup, ex3_intro/
124 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
125   #U1 #HTU1 #H #H12 elim (fqu_cpx_trans_tneqx … H1 … HTU1 H) -T1
126   /3 width=8 by fqup_strap2, ex3_intro/
127 ]
128 qed-.
129
130 lemma fqus_cpx_trans_tneqx (b):
131       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
132       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈ U2 → (T2 ≛ U2 → ⊥) →
133       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈ U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
134 #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
135 [ #H12 elim (fqup_cpx_trans_tneqx … H12 … HTU2 H) -T2
136   /3 width=4 by fqup_fqus, ex3_intro/
137 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
138 ]
139 qed-.