]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_fqus.ma
- some commutations between the rt-steps and the s-steps proved
[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 (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *************)
16
17 include "basic_2/relocation/lifts_tdeq.ma".
18 include "basic_2/s_computation/fqus_fqup.ma".
19 include "basic_2/rt_transition/cpx_drops.ma".
20
21 (* Properties on supclosure *************************************************)
22
23 lemma fqu_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
24                      ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
25                      ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
26 #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
27 /3 width=3 by fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, cpx_pair_sn, cpx_bind, cpx_flat, ex2_intro/
28 [ #I #G #L2 #V2 #X2 #HVX2
29   elim (lifts_total X2 (𝐔❴1❵))
30   /3 width=3 by fqu_drop, cpx_delta, ex2_intro/
31 | #I #G #L2 #V #T2 #X2 #HTX2 #U2 #HTU2
32   elim (cpx_lifts … HTU2 (Ⓣ) … (L2.ⓑ{I}V) … HTX2)
33   /3 width=3 by fqu_drop, drops_refl, drops_drop, ex2_intro/
34 ]
35 qed-.
36
37 lemma fquq_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
38                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
39                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
40 #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H
41 [ #HT12 #U2 #HTU2 elim (fqu_cpx_trans … HT12 … HTU2) /3 width=3 by fqu_fquq, ex2_intro/
42 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
43 ]
44 qed-.
45
46 lemma fqup_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
47                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
48                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
49 #h #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
50 [ #G2 #L2 #T2 #H12 #U2 #HTU2 elim (fqu_cpx_trans … H12 … HTU2) -T2
51   /3 width=3 by fqu_fqup, ex2_intro/
52 | #G #G2 #L #L2 #T #T2 #_ #HT2 #IHT1 #U2 #HTU2
53   elim (fqu_cpx_trans … HT2 … HTU2) -T2 #T2 #HT2 #HTU2
54   elim (IHT1 … HT2) -T /3 width=7 by fqup_strap1, ex2_intro/
55 ]
56 qed-.
57
58 lemma fqus_cpx_trans: ∀h,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
59                       ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 →
60                       ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
61 #h #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fqus_inv_fqup … H) -H
62 [ #HT12 #U2 #HTU2 elim (fqup_cpx_trans … HT12 … HTU2) /3 width=3 by fqup_fqus, ex2_intro/
63 | * #H1 #H2 #H3 destruct /2 width=3 by ex2_intro/
64 ]
65 qed-.
66
67 lemma fqu_cpx_trans_ntdeq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
68                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≡[h, o] U2 → ⊥) →
69                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≡[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
70 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
71 [ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❴1❵)
72   #U2 #HVU2 @(ex3_intro … U2)
73   [1,3: /3 width=7 by cpx_delta, fqu_drop/
74   | #H lapply (tdeq_inv_lref1 … H) -H
75     #H destruct /2 width=5 by lifts_inv_lref2_uni_lt/
76   ]
77 | #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②{I}V2.T))
78   [1,3: /2 width=4 by fqu_pair_sn, cpx_pair_sn/
79   | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
80   ]
81 | #p #I #G #L #V #T1 #T2 #HT12 #H0 @(ex3_intro … (ⓑ{p,I}V.T2))
82   [1,3: /2 width=4 by fqu_bind_dx, cpx_bind/
83   | #H elim (tdeq_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, cpx_flat/
87   | #H elim (tdeq_inv_pair … H) -H /2 width=1 by/
88   ]
89 | #I #G #L #V #T1 #U1 #HTU1 #T2 #HT12 #H0
90   elim (cpx_lifts … HT12 (Ⓣ) … (L.ⓑ{I}V) … HTU1) -HT12 /3 width=1 by drops_refl, drops_drop/
91   #U2 #HTU2 #HU12 @(ex3_intro … U2)
92   [1,3: /3 width=1 by fqu_drop/
93   | #H elim (tdeq_inv_lifts … H … HTU1) -U1
94     #X2 #H <(lifts_inj … HTU2 … H) -U2 /2 width=1 by/
95   ]
96 ]
97 qed-.
98
99 lemma fquq_cpx_trans_ntdeq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
100                             ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≡[h, o] U2 → ⊥) →
101                             ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≡[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
102 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12 
103 [ #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_ntdeq … H12 … HTU2 H) -T2
104   /3 width=4 by fqu_fquq, ex3_intro/
105 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
106 ]
107 qed-.
108
109 lemma fqup_cpx_trans_ntdeq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
110                             ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≡[h, o] U2 → ⊥) →
111                             ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≡[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
112 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
113 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_ntdeq … 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_cpx_trans_ntdeq … H1 … HTU1 H) -T1
117   /3 width=8 by fqup_strap2, ex3_intro/
118 ]
119 qed-.
120
121 lemma fqus_cpx_trans_ntdeq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
122                             ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈[h] U2 → (T2 ≡[h, o] U2 → ⊥) →
123                             ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈[h] U1 & T1 ≡[h, o] U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
124 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
125 [ #H12 elim (fqup_cpx_trans_ntdeq … H12 … HTU2 H) -T2
126   /3 width=4 by fqup_fqus, ex3_intro/
127 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
128 ]
129 qed-.