]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/lpr_fquq.ma
syntactic components detached from basic_2 become static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / lpr_fquq.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 "static_2/s_transition/fquq.ma".
16 include "basic_2/rt_transition/cpm_drops.ma".
17 include "basic_2/rt_transition/cpm_lsubr.ma".
18 include "basic_2/rt_transition/cpr.ma".
19 include "basic_2/rt_transition/lpr.ma".
20
21 (* PARALLEL R-TRANSITION FOR FULL LOCAL ENVIRONMENTS ************************)
22
23 (* Properties with extended structural successor for closures ***************)
24
25 lemma fqu_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
26                                 ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
27                                 ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L1⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
28 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
29 [ /3 width=5 by lpr_pair, fqu_lref_O, ex3_2_intro/
30 | /3 width=5 by cpr_pair_sn, fqu_pair_sn, ex3_2_intro/
31 | /3 width=5 by cpm_bind, fqu_bind_dx, ex3_2_intro/
32 | /3 width=5 by cpm_bind_unit, fqu_clear, ex3_2_intro/
33 | /3 width=5 by cpr_flat, fqu_flat_dx, ex3_2_intro/
34 | #I #G #K #U #T #HUT #U2 #HU2
35   elim (cpm_lifts_sn … HU2 (Ⓣ) … (K.ⓘ{I}) … HUT) -U
36   /3 width=5 by lpr_bind_refl_dx, fqu_drop, drops_refl, drops_drop, ex3_2_intro/
37 ]
38 qed-.
39
40 lemma fqu_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
41                                 ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
42                                 ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐[b] ⦃G2, L2, U2⦄.
43 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
44 [ /3 width=5 by lpr_pair, fqu_lref_O, ex3_2_intro/
45 | /3 width=5 by cpr_pair_sn, fqu_pair_sn, ex3_2_intro/
46 | /3 width=5 by cpm_bind, fqu_bind_dx, ex3_2_intro/
47 | /3 width=5 by cpm_bind_unit, fqu_clear, ex3_2_intro/
48 | /3 width=5 by cpr_flat, fqu_flat_dx, ex3_2_intro/
49 | #I #G #K #U #T #HUT #U2 #HU2
50   elim (cpm_lifts_sn … HU2 (Ⓣ) … (K.ⓘ{I}) … HUT) -U
51   /3 width=5 by lpr_bind_refl_dx, fqu_drop, drops_refl, drops_drop, ex3_2_intro/
52 ]
53 qed-.
54
55 lemma fqu_lpr_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
56                              ∀K2. ⦃G2, L2⦄ ⊢ ➡[h] K2 →
57                              ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h] T & ⦃G1, K1, T⦄ ⊐[b] ⦃G2, K2, T2⦄.
58 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
59 [ /3 width=5 by lpr_bind_refl_dx, fqu_lref_O, ex3_2_intro/
60 | /3 width=5 by cpr_pair_sn, fqu_pair_sn, ex3_2_intro/
61 | #p #I #G2 #L2 #V2 #T2 #X #H
62   elim (lpr_inv_pair_sn … H) -H #K2 #W2 #HLK2 #HVW2 #H destruct
63   /3 width=5 by cpr_pair_sn, fqu_bind_dx, ex3_2_intro/
64 | #p #I #G2 #L2 #V2 #T2 #Hb #X #H
65   elim (lpr_inv_unit_sn … H) -H #K2 #HLK2 #H destruct
66   /3 width=5 by cpr_pair_sn, fqu_clear, ex3_2_intro/
67 | /3 width=5 by cpr_pair_sn, fqu_flat_dx, ex3_2_intro/
68 | /3 width=5 by lpr_bind_refl_dx, fqu_drop, ex3_2_intro/
69 ]
70 qed-.
71
72 (* Note: does not hold in Basic_2A1 because it requires cpm *)
73 (* Note: L1 = K0.ⓛV0 and T1 = #0 require n = 1 *)
74 lemma lpr_fqu_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
75                              ∀K1. ⦃G1, K1⦄ ⊢ ➡[h] L1 →
76                              ∃∃n,K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[n, h] T & ⦃G1, K1, T⦄ ⊐[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h] L2 & n ≤ 1.
77 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
78 [ * #G #K #V #K1 #H
79   elim (lpr_inv_pair_dx … H) -H #K0 #V0 #HK0 #HV0 #H destruct
80   elim (lifts_total V (𝐔❴1❵)) #T #HVT
81   /3 width=7 by cpm_ell, cpm_delta, fqu_drop, ex4_3_intro/
82 | /3 width=7 by cpr_pair_sn, fqu_pair_sn, ex4_3_intro/
83 | /3 width=7 by lpr_bind_refl_dx, cpr_pair_sn, fqu_bind_dx, ex4_3_intro/
84 | /3 width=7 by lpr_bind_refl_dx, cpr_pair_sn, fqu_clear, ex4_3_intro/
85 | /3 width=7 by cpr_pair_sn, fqu_flat_dx, ex4_3_intro/
86 | #I #G #K #T #U #HTU #K1 #H
87   elim (lpr_inv_bind_dx … H) -H #I0 #K0 #HK0 #HI0 #H destruct
88   /3 width=7 by fqu_drop, ex4_3_intro/
89 ]
90 qed-.
91
92 (* Properties with extended optional structural successor for closures ******)
93
94 lemma fquq_cpr_trans_sn (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
95                                  ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
96                                  ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L1⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
97 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 cases H -H
98 [ #HT12 elim (fqu_cpr_trans_sn … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
99 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
100 ]
101 qed-.
102
103 lemma fquq_cpr_trans_dx (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
104                                  ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡[h] U2 →
105                                  ∃∃L,U1. ⦃G1, L1⦄ ⊢ ➡[h] L & ⦃G1, L⦄ ⊢ T1 ➡[h] U1 & ⦃G1, L, U1⦄ ⊐⸮[b] ⦃G2, L2, U2⦄.
106 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 cases H -H
107 [ #HT12 elim (fqu_cpr_trans_dx … HT12 … HTU2) /3 width=5 by fqu_fquq, ex3_2_intro/
108 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
109 ]
110 qed-.
111
112 lemma fquq_lpr_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
113                               ∀K2. ⦃G2, L2⦄ ⊢ ➡[h] K2 →
114                               ∃∃K1,T. ⦃G1, L1⦄ ⊢ ➡[h] K1 & ⦃G1, L1⦄ ⊢ T1 ➡[h] T & ⦃G1, K1, T⦄ ⊐⸮[b] ⦃G2, K2, T2⦄.
115 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K2 #HLK2 cases H -H
116 [ #H12 elim (fqu_lpr_trans … H12 … HLK2) /3 width=5 by fqu_fquq, ex3_2_intro/
117 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
118 ]
119 qed-.
120
121 lemma lpr_fquq_trans (h) (b): ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮[b] ⦃G2, L2, T2⦄ →
122                               ∀K1. ⦃G1, K1⦄ ⊢ ➡[h] L1 →
123                               ∃∃n,K2,T. ⦃G1, K1⦄ ⊢ T1 ➡[n, h] T & ⦃G1, K1, T⦄ ⊐⸮[b] ⦃G2, K2, T2⦄ & ⦃G2, K2⦄ ⊢ ➡[h] L2 & n ≤ 1.
124 #h #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 cases H -H
125 [ #H12 elim (lpr_fqu_trans … H12 … HKL1) -L1 /3 width=7 by fqu_fquq, ex4_3_intro/
126 | * #H1 #H2 #H3 destruct /2 width=7 by ex4_3_intro/
127 ]
128 qed-.