]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / 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/notation/relations/predtystrong_3.ma".
16 include "static_2/syntax/teqx.ma".
17 include "basic_2/rt_transition/cpx.ma".
18
19 (* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
20
21 definition csx (G) (L): predicate term ≝
22            SN … (cpx G L) teqx.
23
24 interpretation
25   "strong normalization for extended context-sensitive parallel rt-transition (term)"
26   'PRedTyStrong G L T = (csx G L T).
27
28 (* Basic eliminators ********************************************************)
29
30 lemma csx_ind (G) (L) (Q:predicate …):
31       (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
32         (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → Q T2) →
33         Q T1
34       ) →
35       ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T →  Q T.
36 #G #L #Q #H0 #T1 #H elim H -T1
37 /5 width=1 by SN_intro/
38 qed-.
39
40 (* Basic properties *********************************************************)
41
42 (* Basic_1: was just: sn3_pr2_intro *)
43 lemma csx_intro (G) (L):
44       ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → (T1 ≛ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) →
45       ❪G,L❫ ⊢ ⬈*𝐒 T1.
46 /4 width=1 by SN_intro/ qed.
47
48 (* Basic forward lemmas *****************************************************)
49
50 fact csx_fwd_pair_sn_aux (G) (L):
51      ∀U. ❪G,L❫ ⊢ ⬈*𝐒 U →
52      ∀I,V,T. U = ②[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 V.
53 #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
54 @csx_intro #V2 #HLV2 #HV2
55 @(IH (②[I]V2.T)) -IH /2 width=3 by cpx_pair_sn/ -HLV2 #H
56 elim (teqx_inv_pair … H) -H /2 width=1 by/
57 qed-.
58
59 (* Basic_1: was just: sn3_gen_head *)
60 lemma csx_fwd_pair_sn (G) (L):
61       ∀I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ②[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 V.
62 /2 width=5 by csx_fwd_pair_sn_aux/ qed-.
63
64 fact csx_fwd_bind_dx_aux (G) (L):
65      ∀U. ❪G,L❫ ⊢ ⬈*𝐒 U →
66      ∀p,I,V,T. U = ⓑ[p,I]V.T → ❪G,L.ⓑ[I]V❫ ⊢ ⬈*𝐒 T.
67 #G #L #U #H elim H -H #U0 #_ #IH #p #I #V #T #H destruct
68 @csx_intro #T2 #HLT2 #HT2
69 @(IH (ⓑ[p, I]V.T2)) -IH /2 width=3 by cpx_bind/ -HLT2 #H
70 elim (teqx_inv_pair … H) -H /2 width=1 by/
71 qed-.
72
73 (* Basic_1: was just: sn3_gen_bind *)
74 lemma csx_fwd_bind_dx (G) (L):
75       ∀p,I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓑ[p,I]V.T → ❪G,L.ⓑ[I]V❫ ⊢ ⬈*𝐒 T.
76 /2 width=4 by csx_fwd_bind_dx_aux/ qed-.
77
78 fact csx_fwd_flat_dx_aux (G) (L):
79      ∀U. ❪G,L❫ ⊢ ⬈*𝐒 U →
80      ∀I,V,T. U = ⓕ[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 T.
81 #G #L #U #H elim H -H #U0 #_ #IH #I #V #T #H destruct
82 @csx_intro #T2 #HLT2 #HT2
83 @(IH (ⓕ[I]V.T2)) -IH /2 width=3 by cpx_flat/ -HLT2 #H
84 elim (teqx_inv_pair … H) -H /2 width=1 by/
85 qed-.
86
87 (* Basic_1: was just: sn3_gen_flat *)
88 lemma csx_fwd_flat_dx (G) (L):
89       ∀I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓕ[I]V.T → ❪G,L❫ ⊢ ⬈*𝐒 T.
90 /2 width=5 by csx_fwd_flat_dx_aux/ qed-.
91
92 lemma csx_fwd_bind (G) (L):
93       ∀p,I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓑ[p,I]V.T →
94       ∧∧ ❪G,L❫ ⊢ ⬈*𝐒 V & ❪G,L.ⓑ[I]V❫ ⊢ ⬈*𝐒 T.
95 /3 width=3 by csx_fwd_pair_sn, csx_fwd_bind_dx, conj/ qed-.
96
97 lemma csx_fwd_flat (G) (L):
98       ∀I,V,T. ❪G,L❫ ⊢ ⬈*𝐒 ⓕ[I]V.T →
99       ∧∧ ❪G,L❫ ⊢ ⬈*𝐒 V & ❪G,L❫ ⊢ ⬈*𝐒 T.
100 /3 width=3 by csx_fwd_pair_sn, csx_fwd_flat_dx, conj/ qed-.
101
102 (* Basic_1: removed theorems 14:
103             sn3_cdelta
104             sn3_gen_cflat sn3_cflat sn3_cpr3_trans sn3_shift sn3_change
105             sn3_appl_cast sn3_appl_beta sn3_appl_lref sn3_appl_abbr
106             sn3_appl_appls sn3_bind sn3_appl_bind sn3_appls_bind
107 *)
108 (* Basic_2A1: removed theorems 6:
109               csxa_ind csxa_intro csxa_cpxs_trans csxa_intro_cpx
110               csx_csxa csxa_csx
111 *)