]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_etc.ma
advances on cpxs and cnx (cnxa removed) ,,,
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cpxs_etc.ma
1
2 include "basic_2/reduction/lpx_drop.ma".
3 include "basic_2/computation/cpxs_lift.ma".
4 include "basic_2/rt_computation/cpxs_cpxs.ma".
5
6 (* Properties on sn extended parallel reduction for local environments ******)
7
8 lemma lpx_cpx_trans: ∀h,G. b_c_transitive … (cpx h G) (λ_.lpx h G).
9 #h #G #L2 #T1 #T2 #HT12 elim HT12 -G -L2 -T1 -T2
10 [ /2 width=3 by/
11 | /3 width=2 by cpx_cpxs, cpx_st/
12 | #I #G #L2 #K2 #V0 #V2 #W2 #i #HLK2 #_ #HVW2 #IHV02 #L1 #HL12
13   elim (lpx_drop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
14   elim (lpx_inv_pair2 … H) -H #K1 #V1 #HK12 #HV10 #H destruct
15   /4 width=7 by cpxs_delta, cpxs_strap2/
16 |4,9: /4 width=1 by cpxs_beta, cpxs_bind, lpx_pair/
17 |5,7,8: /3 width=1 by cpxs_flat, cpxs_ct, cpxs_eps/
18 | /4 width=3 by cpxs_zeta, lpx_pair/
19 | /4 width=3 by cpxs_theta, cpxs_strap1, lpx_pair/
20 ]
21 qed-.
22
23 lemma cpx_bind2: ∀h,o,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h, o] V2 →
24                  ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬈[h, o] T2 →
25                  ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ⬈*[h, o] ⓑ{a,I}V2.T2.
26 /4 width=5 by lpx_cpx_trans, cpxs_bind_dx, lpx_pair/ qed.
27
28 (* Advanced properties ******************************************************)
29
30 lemma lpx_cpxs_trans: ∀h,o,G. b_rs_transitive … (cpx h o G) (λ_.lpx h o G).
31 #h #o #G @b_c_trans_LTC1 /2 width=3 by lpx_cpx_trans/ (**) (* full auto fails *)
32 qed-.
33
34 lemma cpxs_bind2_dx: ∀h,o,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈[h, o] V2 →
35                      ∀I,T1,T2. ⦃G, L.ⓑ{I}V2⦄ ⊢ T1 ⬈*[h, o] T2 →
36                      ∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ⬈*[h, o] ⓑ{a,I}V2.T2.
37 /4 width=5 by lpx_cpxs_trans, cpxs_bind_dx, lpx_pair/ qed.
38
39 (* Properties on supclosure *************************************************)
40
41 lemma fqu_cpxs_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ →
42                           ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → (T2 = U2 → ⊥) →
43                           ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐ ⦃G2, L2, U2⦄.
44 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
45 [ #I #G #L #V1 #V2 #HV12 #_ elim (lift_total V2 0 1)
46   #U2 #HVU2 @(ex3_intro … U2)
47   [1,3: /3 width=7 by fqu_drop, cpxs_delta, drop_pair, drop_drop/
48   | #H destruct 
49     lapply (lift_inv_lref2_be … HVU2 ? ?) -HVU2 //
50   ]
51 | #I #G #L #V1 #T #V2 #HV12 #H @(ex3_intro … (②{I}V2.T))
52   [1,3: /2 width=4 by fqu_pair_sn, cpxs_pair_sn/
53   | #H0 destruct /2 width=1 by/
54   ]
55 | #a #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓑ{a,I}V.T2))
56   [1,3: /2 width=4 by fqu_bind_dx, cpxs_bind/
57   | #H0 destruct /2 width=1 by/
58   ]
59 | #I #G #L #V #T1 #T2 #HT12 #H @(ex3_intro … (ⓕ{I}V.T2))
60   [1,3: /2 width=4 by fqu_flat_dx, cpxs_flat/
61   | #H0 destruct /2 width=1 by/
62   ]
63 | #G #L #K #T1 #U1 #k #HLK #HTU1 #T2 #HT12 #H elim (lift_total T2 0 (k+1))
64   #U2 #HTU2 @(ex3_intro … U2)
65   [1,3: /2 width=10 by cpxs_lift, fqu_drop/
66   | #H0 destruct /3 width=5 by lift_inj/
67 ]
68 qed-.
69
70 lemma fquq_cpxs_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
71                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → (T2 = U2 → ⊥) →
72                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
73 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fquq_inv_gen … H12) -H12
74 [ #H12 elim (fqu_cpxs_trans_neq … H12 … HTU2 H) -T2
75   /3 width=4 by fqu_fquq, ex3_intro/
76 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
77 ]
78 qed-.
79
80 lemma fqup_cpxs_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄ →
81                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → (T2 = U2 → ⊥) →
82                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐+ ⦃G2, L2, U2⦄.
83 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
84 [ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_neq … H12 … HTU2 H) -T2
85   /3 width=4 by fqu_fqup, ex3_intro/
86 | #G #G1 #L #L1 #T #T1 #H1 #_ #IH12 #U2 #HTU2 #H elim (IH12 … HTU2 H) -T2
87   #U1 #HTU1 #H #H12 elim (fqu_cpxs_trans_neq … H1 … HTU1 H) -T1
88   /3 width=8 by fqup_strap2, ex3_intro/
89 ]
90 qed-.
91
92 lemma fqus_cpxs_trans_neq: ∀h,o,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
93                            ∀U2. ⦃G2, L2⦄ ⊢ T2 ⬈*[h, o] U2 → (T2 = U2 → ⊥) →
94                            ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ⬈*[h, o] U1 & T1 = U1 → ⊥ & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
95 #h #o #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_gen … H12) -H12
96 [ #H12 elim (fqup_cpxs_trans_neq … H12 … HTU2 H) -T2
97   /3 width=4 by fqup_fqus, ex3_intro/
98 | * #HG #HL #HT destruct /3 width=4 by ex3_intro/
99 ]
100 qed-.