]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_fqus.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cpxs_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-COMPUTATION FOR TERMS *************)
16
17 include "basic_2/rt_transition/cpx_fqus.ma".
18 include "basic_2/rt_computation/cpxs_drops.ma".
19 include "basic_2/rt_computation/cpxs_lsubr.ma".
20 include "basic_2/rt_computation/cpxs_cpxs.ma".
21
22 (* Properties on supclosure *************************************************)
23
24 lemma fqu_cpxs_trans (b):
25       ∀G1,G2,L1,L2,T2,U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 →
26       ∀T1. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
27       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
28 #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
29 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqu_cpx_trans … HT1 … HT2) -T
30 #T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
31 qed-.
32
33 lemma fquq_cpxs_trans (b):
34       ∀G1,G2,L1,L2,T2,U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 →
35       ∀T1. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ →
36       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
37 #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
38 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fquq_cpx_trans … HT1 … HT2) -T
39 #T #HT1 #HT2 elim (IHTU2 … HT2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
40 qed-.
41
42 lemma fqup_cpxs_trans (b):
43       ∀G1,G2,L1,L2,T2,U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 →
44       ∀T1. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
45       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
46 #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
47 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqup_cpx_trans … HT1 … HT2) -T
48 #U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
49 qed-.
50
51 lemma fqus_cpxs_trans (b):
52       ∀G1,G2,L1,L2,T2,U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 →
53       ∀T1. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
54       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
55 #b #G1 #G2 #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 /2 width=3 by ex2_intro/
56 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1 elim (fqus_cpx_trans … HT1 … HT2) -T
57 #U1 #HTU1 #H2 elim (IHTU2 … H2) -T2 /3 width=3 by cpxs_strap2, ex2_intro/
58 qed-.
59
60 (* Note: a proof based on fqu_cpx_trans_tneqx might exist *)
61 (* Basic_2A1: uses: fqu_cpxs_trans_neq *)
62 lemma fqu_cpxs_trans_tneqx (b):
63       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
64       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) →
65       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
66 #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
67 [ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❨1❩)
68   #U2 #HVU2 @(ex3_intro … U2)
69   [1,3: /3 width=7 by cpxs_delta, fqu_drop/
70   | #H lapply (teqx_inv_lref1 … H) -H
71     #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/
72   ]
73 | #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②[I]V2.T))
74   [1,3: /2 width=4 by fqu_pair_sn, cpxs_pair_sn/
75   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
76   ]
77 | #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ[p,I]V.T2))
78   [1,3: /2 width=4 by fqu_bind_dx, cpxs_bind/
79   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
80   ]
81 | #p #I #G #L #V #T1 #Hb #T2 #HT12 #H0 @(ex3_intro … (ⓑ[p,I]V.T2))
82   [1,3: /4 width=4 by lsubr_cpxs_trans, cpxs_bind, lsubr_unit, fqu_clear/
83   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
84   ]
85 | #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓕ[I]V.T2))
86   [1,3: /2 width=4 by fqu_flat_dx, cpxs_flat/
87   | #H elim (teqx_inv_pair … H) -H /2 width=1 by/
88   ]
89 | #I #G #L #T1 #U1 #HTU1 #T2 #HT12 #H0
90   elim (cpxs_lifts_sn … HT12 (Ⓣ) … (L.ⓘ[I]) … HTU1) -HT12
91   /4 width=6 by fqu_drop, drops_refl, drops_drop, teqx_inv_lifts_bi, ex3_intro/
92 ]
93 qed-.
94
95 (* Basic_2A1: uses: fquq_cpxs_trans_neq *)
96 lemma fquq_cpxs_trans_tneqx (b):
97       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ →
98       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) →
99       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
100 #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
101 [ #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tneqx … H12 … HTU2 H) -T2
102   /3 width=4 by fqu_fquq, ex3_intro/
103 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
104 ]
105 qed-.
106
107 (* Basic_2A1: uses: fqup_cpxs_trans_neq *)
108 lemma fqup_cpxs_trans_tneqx (b):
109       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
110       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) →
111       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
112 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
113 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tneqx … H12 … HTU2 H) -T2
114   /3 width=4 by fqu_fqup, ex3_intro/
115 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
116   #U1 #HTU1 #H #H12 elim (fqu_cpxs_trans_tneqx … H1 … HTU1 H) -T1
117   /3 width=8 by fqup_strap2, ex3_intro/
118 ]
119 qed-.
120
121 (* Basic_2A1: uses: fqus_cpxs_trans_neq *)
122 lemma fqus_cpxs_trans_tneqx (b):
123       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
124       ∀U2. ❪G2,L2❫ ⊢ T2 ⬈* U2 → (T2 ≛ U2 → ⊥) →
125       ∃∃U1. ❪G1,L1❫ ⊢ T1 ⬈* U1 & T1 ≛ U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
126 #b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
127 [ #H12 elim (fqup_cpxs_trans_tneqx … H12 … HTU2 H) -T2
128   /3 width=4 by fqup_fqus, ex3_intro/
129 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
130 ]
131 qed-.