]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_theq_vector.ma
- csx_cnx_vector.ma completed
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / csx_theq_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/computation/gcp_cr.ma".
16 *)
17 include "basic_2/rt_computation/cpxs_theq_vector.ma".
18 include "basic_2/rt_computation/csx_vector.ma".
19 include "basic_2/rt_computation/csx_theq.ma".
20 include "basic_2/rt_computation/csx_lfpx.ma".
21
22 (* STRONGLY NORMALIZING TERMS FOR UNCOUNTED PARALLEL RT-TRANSITION **********)
23
24 (* Vector form of properties with head equivalence for terms ****************)
25 (*
26 *)
27 (*
28 *)
29
30 (* Basic_1: was just: sn3_appls_beta *)
31 lemma csx_applv_beta: ∀h,o,p,G,L,Vs,V,W,T. ⦃G, L⦄ ⊢ ⬈*[h, o] ⒶVs.ⓓ{p}ⓝW.V.T →
32                       ⦃G, L⦄ ⊢ ⬈*[h, o] ⒶVs. ⓐV.ⓛ{p}W.T.
33 #h #o #a #G #L #Vs elim Vs -Vs /2 width=1 by csx_appl_beta/
34 #V0 #Vs #IHV #V #W #T #H1T
35 lapply (csx_fwd_pair_sn … H1T) #HV0
36 lapply (csx_fwd_flat_dx … H1T) #H2T
37 @csx_appl_simple_theq /2 width=1 by applv_simple, simple_flat/ -IHV -HV0 -H2T
38 #X #H #H0
39 elim (cpxs_fwd_beta_vector … H) -H #H
40 [ -H1T elim H0 -H0 //
41 | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
42 ]
43 qed.
44
45 lemma csx_applv_delta: ∀h,o,I,G,L,K,V1,i. ⬇[i] L ≡ K.ⓑ{I}V1 →
46                        ∀V2. ⬆[0, i + 1] V1 ≡ V2 →
47                        ∀Vs. ⦃G, L⦄ ⊢ ⬈*[h, o] (ⒶVs.V2) → ⦃G, L⦄ ⊢ ⬈*[h, o] (ⒶVs.#i).
48 #h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
49 [ /4 width=12 by csx_inv_lift, csx_lref_bind, drop_fwd_drop2/
50 | #V #Vs #IHV #H1T
51   lapply (csx_fwd_pair_sn … H1T) #HV
52   lapply (csx_fwd_flat_dx … H1T) #H2T
53   @csx_appl_simple_theq /2 width=1 by applv_simple, simple_atom/ -IHV -HV  -H2T
54   #X #H #H0
55   elim (cpxs_fwd_delta_vector … HLK … HV12 … H) -HLK -HV12 -H #H
56   [ -H1T elim H0 -H0 //
57   | -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
58   ]
59 ]
60 qed.
61
62 (* Basic_1: was just: sn3_appls_abbr *)
63 lemma csx_applv_theta: ∀h,o,a,G,L,V1b,V2b. ⬆[0, 1] V1b ≡ V2b →
64                        ∀V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] ⓓ{a}V.ⒶV2b.T →
65                        ⦃G, L⦄ ⊢ ⬈*[h, o] ⒶV1b.ⓓ{a}V.T.
66 #h #o #a #G #L #V1b #V2b * -V1b -V2b /2 width=1 by/
67 #V1b #V2b #V1 #V2 #HV12 #H
68 generalize in match HV12; -HV12 generalize in match V2; -V2 generalize in match V1; -V1
69 elim H -V1b -V2b /2 width=3 by csx_appl_theta/
70 #V1b #V2b #V1 #V2 #HV12 #HV12b #IHV12b #W1 #W2 #HW12 #V #T #H
71 lapply (csx_appl_theta … HW12 … H) -H -HW12 #H
72 lapply (csx_fwd_pair_sn … H) #HW1
73 lapply (csx_fwd_flat_dx … H) #H1
74 @csx_appl_simple_theq /2 width=3 by simple_flat/ -IHV12b -HW1 -H1 #X #H1 #H2
75 elim (cpxs_fwd_theta_vector … (V2@V2b) … H1) -H1 /2 width=1 by liftv_cons/ -HV12b -HV12
76 [ -H #H elim H2 -H2 //
77 | -H2 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
78 ]
79 qed.
80
81 (* Basic_1: was just: sn3_appls_cast *)
82 lemma csx_applv_cast: ∀h,o,G,L,Vs,W,T. ⦃G, L⦄ ⊢ ⬈*[h, o] ⒶVs.W → ⦃G, L⦄ ⊢ ⬈*[h, o] ⒶVs.T →
83                       ⦃G, L⦄ ⊢ ⬈*[h, o] ⒶVs.ⓝW.T.
84 #h #o #G #L #Vs elim Vs -Vs /2 width=1 by csx_cast/
85 #V #Vs #IHV #W #T #H1W #H1T
86 lapply (csx_fwd_pair_sn … H1W) #HV
87 lapply (csx_fwd_flat_dx … H1W) #H2W
88 lapply (csx_fwd_flat_dx … H1T) #H2T
89 @csx_appl_simple_theq /2 width=1 by applv_simple, simple_flat/ -IHV -HV -H2W -H2T
90 #X #H #H0
91 elim (cpxs_fwd_cast_vector … H) -H #H
92 [ -H1W -H1T elim H0 -H0 //
93 | -H1W -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
94 | -H1T -H0 /3 width=5 by csx_cpxs_trans, cpxs_flat_dx/
95 ]
96 qed.
97
98 theorem csx_gcr: ∀h,o. gcr (cpx h o) (eq …) (csx h o) (csx h o).
99 #h #o @mk_gcr //
100 [ /3 width=1 by csx_applv_cnx/
101 |2,3,6: /2 width=1 by csx_applv_beta, csx_applv_sort, csx_applv_cast/
102 | /2 width=7 by csx_applv_delta/
103 | #G #L #V1b #V2b #HV12b #a #V #T #H #HV
104   @(csx_applv_theta … HV12b) -HV12b
105   @csx_abbr //
106 ]
107 qed.