]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/csx_cpxs.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / csx_cpxs.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_teqg.ma".
16 include "basic_2/rt_computation/cpxs_cpxs.ma".
17 include "basic_2/rt_computation/csx_csx.ma".
18
19 (* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
20
21 (* Properties with extended context-sensitive rt-computation for terms ******)
22
23 (* Basic_1: was just: sn3_intro *)
24 lemma csx_intro_cpxs (G) (L):
25       ∀T1. (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) →
26       ❪G,L❫ ⊢ ⬈*𝐒 T1.
27 /4 width=1 by cpx_cpxs, csx_intro/ qed-.
28
29 (* Basic_1: was just: sn3_pr3_trans *)
30 lemma csx_cpxs_trans (G) (L):
31       ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
32       ∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2.
33 #G #L #T1 #HT1 #T2 #H @(cpxs_ind … H) -T2
34 /2 width=3 by csx_cpx_trans/
35 qed-.
36
37 (* Eliminators with extended context-sensitive rt-computation for terms *****)
38
39 fact csx_ind_cpxs_aux (G) (L):
40      ∀Q:predicate term.
41      (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
42        (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1
43      ) →
44      ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
45      ∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → Q T2.
46 #G #L #Q #IH #T1 #H @(csx_ind … H) -T1
47 #T1 #HT1 #IH1 #T2 #HT12
48 @IH -IH /2 width=3 by csx_cpxs_trans/ -HT1 #V2 #HTV2 #HnTV2
49 elim (teqx_dec T1 T2) #H
50 [ lapply (teqg_tneqg_trans … H … HnTV2) // -H -HnTV2 #Hn12
51   lapply (cpxs_trans … HT12 … HTV2) -T2 #H12
52   elim (cpxs_tneqg_fwd_step_sn … H12 …  Hn12) /2 width=1 by sfull_dec/ -H12 -Hn12
53   /3 width=4 by/
54 | elim (cpxs_tneqg_fwd_step_sn … HT12 … H) -HT12 -H
55   /3 width=6 by cpxs_trans, sfull_dec/
56 ]
57 qed-.
58
59 (* Basic_2A1: was: csx_ind_alt *)
60 lemma csx_ind_cpxs (G) (L) (Q:predicate …):
61       (∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
62         (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≅ T2 → ⊥) → Q T2) → Q T1
63       ) →
64       ∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q T.
65 #G #L #Q #IH #T #HT
66 @(csx_ind_cpxs_aux … IH … HT) -IH -HT // (**) (* full auto fails *)
67 qed-.