]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_lfpx.ma
- advances towards strong normalization
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / csx_lfpx.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_lfpx.ma".
16 include "basic_2/rt_computation/csx_drops.ma".
17 include "basic_2/rt_computation/csx_cpxs.ma".
18
19 (* STRONGLY NORMALIZING TERMS FOR UNCOUNTED PARALLEL RT-TRANSITION **********)
20
21 (* Advanced properties ******************************************************)
22
23 (* Basic_2A1: was just: csx_lpx_conf *)
24 lemma csx_lfpx_conf: ∀h,o,G,L1,T. ⦃G, L1⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ →
25                      ∀L2. ⦃G, L1⦄ ⊢ ⬈[h, T] L2 → ⦃G, L2⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄.
26 #h #o #G #L1 #T #H @(csx_ind_cpxs … H) -T
27 /5 width=3 by csx_intro, lfpx_cpx_trans, lfpx_cpxs_conf/
28 qed-.
29
30 lemma csx_abst: ∀h,o,p,G,L,W. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃W⦄ →
31                 ∀T. ⦃G, L.ⓛW⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓛ{p}W.T⦄.
32 #h #o #p #G #L #W #HW @(csx_ind … HW) -W
33 #W #_ #IHW #T #HT @(csx_ind … HT) -T #T #HT #IHT
34 @csx_intro #X #H1 #H2
35 elim (cpx_inv_abst1 … H1) -H1
36 #W0 #T0 #HLW0 #HLT0 #H destruct
37 elim (tdneq_inv_pair … H2) -H2
38 [ #H elim H -H //
39 | -IHT #H lapply (csx_cpx_trans … o … HLT0) // -HT
40   #HT0 lapply (csx_lfpx_conf … HT0 … (L.ⓛW0)) -HT0 /4 width=1 by lfpx_pair/
41 | -IHW -HT /4 width=3 by csx_cpx_trans, cpx_pair_sn/
42 ]
43 qed.
44
45 lemma csx_abbr: ∀h,o,p,G,L,V. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ →
46                 ∀T. ⦃G, L.ⓓV⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓓ{p}V.T⦄.
47 #h #o #p #G #L #V #HV @(csx_ind … HV) -V
48 #V #_ #IHV #T #HT @(csx_ind_cpxs … HT) -T #T #HT #IHT
49 @csx_intro #X #H1 #H2
50 elim (cpx_inv_abbr1 … H1) -H1 *
51 [ #V1 #T1 #HLV1 #HLT1 #H destruct
52   elim (tdneq_inv_pair … H2) -H2
53   [ #H elim H -H //
54   | /4 width=3 by csx_cpx_trans, csx_lfpx_conf, lfpx_pair/
55   | -IHV /4 width=3 by csx_cpx_trans, cpx_cpxs, cpx_pair_sn/
56   ]
57 | -IHV -IHT -H2
58   /4 width=7 by csx_cpx_trans, csx_inv_lifts, drops_drop, drops_refl/
59 ]
60 qed.
61
62 fact csx_appl_theta_aux: ∀h,o,p,G,L,U. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃U⦄ → ∀V1,V2. ⬆*[1] V1 ≡ V2 →
63                          ∀V,T. U = ⓓ{p}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓐV1.ⓓ{p}V.T⦄.
64 #h #o #p #G #L #X #H @(csx_ind_cpxs … H) -X
65 #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
66 lapply (csx_fwd_pair_sn … HVT) #HV
67 lapply (csx_fwd_bind_dx … HVT) -HVT #HVT
68 @csx_intro #X #HL #H
69 elim (cpx_inv_appl1 … HL) -HL *
70 [ -HV #V0 #Y #HLV10 #HL #H0 destruct
71   elim (cpx_inv_abbr1 … HL) -HL *
72   [ #V3 #T3 #HV3 #HLT3 #H0 destruct
73     elim (lift_total V0 0 1) #V4 #HV04
74     elim (eq_term_dec (ⓓ{a}V.ⓐV2.T) (ⓓ{a}V3.ⓐV4.T3))
75     [ -IHVT #H0 destruct
76       elim (eq_false_inv_tpair_sn … H) -H
77       [ -HLV10 -HV3 -HLT3 -HVT
78         >(lift_inj … HV12 … HV04) -V4
79         #H elim H //
80       | * #_ #H elim H //
81       ]
82     | -H -HVT #H
83       lapply (cpx_lift … HLV10 (L.ⓓV) (Ⓕ) … HV12 … HV04) -HLV10 -HV12 /2 width=1 by drop_drop/ #HV24
84       @(IHVT … H … HV04) -IHVT /4 width=1 by cpx_cpxs, cpx_bind, cpx_flat/
85     ]
86   | -H -IHVT #T0 #HLT0 #HT0 #H0 destruct
87     lapply (csx_cpx_trans … HVT (ⓐV2.T0) ?) /2 width=1 by cpx_flat/ -T #HVT0
88     lapply (csx_inv_lift … L … (Ⓕ) … 1 HVT0 ? ? ?) -HVT0
89     /3 width=5 by csx_cpx_trans, cpx_pair_sn, drop_drop, lift_flat/
90   ]
91 | -HV -HV12 -HVT -IHVT -H #b #V0 #W0 #W1 #T0 #T1 #_ #_ #_ #H destruct
92 | -IHVT -H #b #V0 #V3 #W0 #W1 #T0 #T1 #HLV10 #HV03 #HLW01 #HLT01 #H1 #H2 destruct
93   lapply (cpx_lift … HLV10 (L. ⓓW0) … HV12 … HV03) -HLV10 -HV12 -HV03 /2 width=2 by drop_drop/ #HLV23
94   @csx_abbr /2 width=3 by csx_cpx_trans/ -HV
95   @(csx_lpx_conf … (L.ⓓW0)) /2 width=1 by lpx_pair/ -W1
96   /4 width=5 by csx_cpxs_trans, cpx_cpxs, cpx_flat/
97 ]
98 qed-.
99
100 lemma csx_appl_theta: ∀h,o,a,V1,V2. ⬆[0, 1] V1 ≡ V2 →
101                       ∀G,L,V,T. ⦃G, L⦄ ⊢ ⬈*[h, o] ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬈*[h, o] ⓐV1.ⓓ{a}V.T.
102 /2 width=5 by csx_appl_theta_aux/ qed.