]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_lsubr.ma
04a1b278b1fb2eadd4a52f93c5193f58fa9622cf
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / csx_lsubr.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/cpx_lsubr.ma".
16 include "basic_2/rt_computation/csx_csx.ma".
17
18 (* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
19
20 (* Advanced properties ******************************************************)
21
22 fact csx_appl_beta_aux (G) (L):
23      ∀p,U1. ❨G,L❩ ⊢ ⬈*𝐒 U1 →
24      ∀V,W,T1. U1 = ⓓ[p]ⓝW.V.T1 → ❨G,L❩ ⊢ ⬈*𝐒 ⓐV.ⓛ[p]W.T1.
25 #G #L #p #X #H @(csx_ind … H) -X
26 #X #HT1 #IHT1 #V #W #T1 #H1 destruct
27 @csx_intro #X #H1 #H2
28 elim (cpx_inv_appl1 … H1) -H1 *
29 [ -HT1 #V0 #Y #HLV0 #H #H0 destruct
30   elim (cpx_inv_abst1 … H) -H #W0 #T0 #HLW0 #HLT0 #H destruct
31   @IHT1 -IHT1 [4: // | skip ]
32   [ lapply (lsubr_cpx_trans … HLT0 (L.ⓓⓝW.V) ?) -HLT0 -H2
33     /3 width=1 by cpx_bind, cpx_flat, lsubr_beta/
34   | #H elim (teqx_inv_pair … H) -H
35     #_ #H elim (teqx_inv_pair … H) -H
36     #_ /4 width=1 by teqx_pair/
37   ]
38 | -IHT1 -H2 #q #V0 #W0 #W2 #T0 #T2 #HLV0 #HLW02 #HLT02 #H1 #H3 destruct
39   lapply (lsubr_cpx_trans … HLT02 (L.ⓓⓝW0.V) ?) -HLT02
40   /4 width=5 by csx_cpx_trans, cpx_bind, cpx_flat, lsubr_beta/
41 | -HT1 -IHT1 -H2 #q #V0 #V1 #W0 #W1 #T0 #T3 #_ #_ #_ #_ #H destruct
42 ]
43 qed-.
44
45 (* Basic_1: was just: sn3_beta *)
46 lemma csx_appl_beta (G) (L):
47       ∀p,V,W,T. ❨G,L❩ ⊢ ⬈*𝐒 ⓓ[p]ⓝW.V.T → ❨G,L❩ ⊢ ⬈*𝐒 ⓐV.ⓛ[p]W.T.
48 /2 width=3 by csx_appl_beta_aux/ qed.
49
50 (* Advanced forward lemmas **************************************************)
51
52 fact csx_fwd_bind_dx_unit_aux (G) (L):
53      ∀U. ❨G,L❩ ⊢ ⬈*𝐒 U →
54      ∀p,I,J,V,T. U = ⓑ[p,I]V.T → ❨G,L.ⓤ[J]❩ ⊢ ⬈*𝐒 T.
55 #G #L #U #H elim H -H #U0 #_ #IH #p #I #J #V #T #H destruct
56 @csx_intro #T2 #HLT2 #HT2
57 @(IH (ⓑ[p, I]V.T2)) -IH /2 width=4 by cpx_bind_unit/ -HLT2 #H
58 elim (teqx_inv_pair … H) -H /2 width=1 by/
59 qed-.
60
61 lemma csx_fwd_bind_dx_unit (G) (L):
62       ∀p,I,V,T. ❨G,L❩ ⊢ ⬈*𝐒 ⓑ[p,I]V.T →
63       ∀J. ❨G,L.ⓤ[J]❩ ⊢ ⬈*𝐒 T.
64 /2 width=6 by csx_fwd_bind_dx_unit_aux/ qed-.
65
66 lemma csx_fwd_bind_unit (G) (L):
67       ∀p,I,V,T. ❨G,L❩ ⊢ ⬈*𝐒 ⓑ[p,I]V.T →
68       ∀J. ∧∧ ❨G,L❩ ⊢ ⬈*𝐒 V & ❨G,L.ⓤ[J]❩ ⊢ ⬈*𝐒 T.
69 /3 width=4 by csx_fwd_pair_sn, csx_fwd_bind_dx_unit, conj/ qed-.
70
71 (* Properties with restricted refinement for local environments *************)
72
73 lemma csx_lsubr_conf (G) (L1):
74       ∀T. ❨G,L1❩ ⊢ ⬈*𝐒 T → ∀L2. L1 ⫃ L2 → ❨G,L2❩ ⊢ ⬈*𝐒 T.
75 #G #L1 #T #H
76 @(csx_ind … H) -T #T1 #_ #IH #L2 #HL12
77 @csx_intro #T2 #HT12 #HnT12
78 /3 width=3 by lsubr_cpx_trans/
79 qed-.