]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_csx.ma
update in ground_2, static_2, basic_2, apps_2, alpha_1
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / csx_csx.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_transition/lpx_reqx.ma".
16 include "basic_2/rt_computation/csx_drops.ma".
17
18 (* STRONGLY NORMALIZING TERMS FOR UNBOUND PARALLEL RT-TRANSITION ************)
19
20 (* Advanced properties ******************************************************)
21
22 lemma csx_teqx_trans (h) (G):
23       ∀L,T1. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪T1❫ →
24       ∀T2. T1 ≛ T2 → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪T2❫.
25 #h #G #L #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2
26 @csx_intro #T1 #HT21 #HnT21 elim (teqx_cpx_trans … HT2 … HT21) -HT21
27 /4 width=5 by teqx_repl/
28 qed-.
29
30 lemma csx_cpx_trans (h) (G):
31       ∀L,T1. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪T1❫ →
32       ∀T2. ❪G,L❫ ⊢ T1 ⬈[h] T2 → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪T2❫.
33 #h #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12
34 elim (teqx_dec T1 T2) /3 width=4 by csx_teqx_trans/
35 qed-.
36
37 (* Basic_1: was just: sn3_cast *)
38 lemma csx_cast (h) (G):
39       ∀L,W. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪W❫ →
40       ∀T. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪T❫ → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⓝW.T❫.
41 #h #G #L #W #HW @(csx_ind … HW) -W
42 #W #HW #IHW #T #HT @(csx_ind … HT) -T
43 #T #HT #IHT @csx_intro
44 #X #H1 #H2 elim (cpx_inv_cast1 … H1) -H1
45 [ * #W0 #T0 #HLW0 #HLT0 #H destruct
46   elim (tneqx_inv_pair … H2) -H2
47   [ -W -T #H elim H -H //
48   | -HW -IHT /3 width=3 by csx_cpx_trans/
49   | -HW -HT -IHW /4 width=3 by csx_cpx_trans, cpx_pair_sn/
50   ]
51 |*: /3 width=3 by csx_cpx_trans/
52 ]
53 qed.
54
55 (* Basic_1: was just: sn3_abbr *)
56 (* Basic_2A1: was: csx_lref_bind *)
57 lemma csx_lref_pair_drops (h) (G):
58       ∀I,L,K,V,i. ⇩*[i] L ≘ K.ⓑ[I]V →
59       ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫ → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪#i❫.
60 #h #G #I #L #K #V #i #HLK #HV
61 @csx_intro #X #H #Hi elim (cpx_inv_lref1_drops … H) -H
62 [ #H destruct elim Hi //
63 | -Hi * #I0 #K0 #V0 #V1 #HLK0 #HV01 #HV1
64   lapply (drops_mono … HLK0 … HLK) -HLK #H destruct
65   /3 width=8 by csx_lifts, csx_cpx_trans, drops_isuni_fwd_drop2/
66 ]
67 qed.
68
69 (* Advanced inversion lemmas ************************************************)
70
71 (* Basic_1: was: sn3_gen_def *)
72 (* Basic_2A1: was: csx_inv_lref_bind *)
73 lemma csx_inv_lref_pair_drops (h) (G):
74       ∀I,L,K,V,i. ⇩*[i] L ≘ K.ⓑ[I]V →
75       ❪G,L❫ ⊢ ⬈*[h] 𝐒❪#i❫ → ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
76 #h #G #I #L #K #V #i #HLK #Hi
77 elim (lifts_total V (𝐔❨↑i❩))
78 /4 width=9 by csx_inv_lifts, csx_cpx_trans, cpx_delta_drops, drops_isuni_fwd_drop2/
79 qed-.
80
81 lemma csx_inv_lref_drops (h) (G):
82       ∀L,i. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪#i❫ →
83       ∨∨ ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆
84        | ∃∃I,K. ⇩*[i] L ≘ K.ⓤ[I]
85        | ∃∃I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
86 #h #G #L #i #H elim (drops_F_uni L i) /2 width=1 by or3_intro0/
87 * * /4 width=9 by csx_inv_lref_pair_drops, ex2_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
88 qed-.