]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx_vector.ma
milestone in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / csx_csx_vector.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 "basic_2/rt_computation/cpxs_theq_vector.ma".
16 include "basic_2/rt_computation/csx_simple_theq.ma".
17 include "basic_2/rt_computation/csx_lsubr.ma".
18 include "basic_2/rt_computation/csx_lpx.ma".
19 include "basic_2/rt_computation/csx_vector.ma".
20
21 (* STRONGLY NORMALIZING TERM VECTORS FOR UNBOUND PARALLEL RT-TRANSITION *****)
22
23 (* Advanced properties ************************************* ****************)
24
25 (* Basic_1: was just: sn3_appls_beta *)
26 lemma csx_applv_beta: ∀h,p,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.ⓓ{p}ⓝW.V.T⦄ →
27                       ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.ⓐV.ⓛ{p}W.T⦄.
28 #h #p #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/
29 #V0 #Vs #IHV #V #W #T #H1T
30 lapply (csx_fwd_pair_sn … H1T) #HV0
31 lapply (csx_fwd_flat_dx … H1T) #H2T
32 @csx_appl_simple_theq /2 width=1 by applv_simple, simple_flat/ -IHV -HV0 -H2T
33 #X #H #H0
34 elim (cpxs_fwd_beta_vector … H) -H #H
35 [ -H1T elim H0 -H0 //
36 | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
37 ]
38 qed.
39
40 lemma csx_applv_delta: ∀h,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
41                        ∀V2. ⬆*[↑i] V1 ≘ V2 →
42                        ∀Vs. ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.V2⦄ → ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.#i⦄.
43 #h #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
44 [ /4 width=11 by csx_inv_lifts, csx_lref_pair, drops_isuni_fwd_drop2/
45 | #V #Vs #IHV #H1T
46   lapply (csx_fwd_pair_sn … H1T) #HV
47   lapply (csx_fwd_flat_dx … H1T) #H2T
48   @csx_appl_simple_theq /2 width=1 by applv_simple, simple_atom/ -IHV -HV  -H2T
49   #X #H #H0
50   elim (cpxs_fwd_delta_drops_vector … HLK … HV12 … H) -HLK -HV12 -H #H
51   [ -H1T elim H0 -H0 //
52   | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
53   ]
54 ]
55 qed.
56
57 (* Basic_1: was just: sn3_appls_abbr *)
58 lemma csx_applv_theta: ∀h,p,G,L,V1b,V2b. ⬆*[1] V1b ≘ V2b →
59                        ∀V,T. ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⓓ{p}V.ⒶV2b.T⦄ →
60                        ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶV1b.ⓓ{p}V.T⦄.
61 #h #p #G #L #V1b #V2b * -V1b -V2b /2 width=1 by/
62 #V1b #V2b #V1 #V2 #HV12 #H
63 generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1
64 elim H -V1b -V2b /2 width=3 by csx_appl_theta/
65 #V1b #V2b #V1 #V2 #HV12 #HV12b #IHV12b #W1 #W2 #HW12 #V #T #H
66 lapply (csx_appl_theta … H … HW12) -H -HW12 #H
67 lapply (csx_fwd_pair_sn … H) #HW1
68 lapply (csx_fwd_flat_dx … H) #H1
69 @csx_appl_simple_theq /2 width=3 by simple_flat/ -IHV12b -HW1 -H1 #X #H1 #H2
70 elim (cpxs_fwd_theta_vector … (V2⨮V2b) … H1) -H1 /2 width=1 by liftsv_cons/ -HV12b -HV12
71 [ -H #H elim H2 -H2 //
72 | -H2 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
73 ]
74 qed.
75
76 (* Basic_1: was just: sn3_appls_cast *)
77 lemma csx_applv_cast: ∀h,G,L,Vs,U. ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.U⦄ →
78                       ∀T. ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.T⦄ → ⦃G, L⦄ ⊢ ⬈*[h] 𝐒⦃ⒶVs.ⓝU.T⦄.
79 #h #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/
80 #V #Vs #IHV #U #H1U #T #H1T
81 lapply (csx_fwd_pair_sn … H1U) #HV
82 lapply (csx_fwd_flat_dx … H1U) #H2U
83 lapply (csx_fwd_flat_dx … H1T) #H2T
84 @csx_appl_simple_theq /2 width=1 by applv_simple, simple_flat/ -IHV -HV -H2U -H2T
85 #X #H #H0
86 elim (cpxs_fwd_cast_vector … H) -H #H
87 [ -H1U -H1T elim H0 -H0 //
88 | -H1U -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
89 | -H1T -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
90 ]
91 qed.