]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / fsb_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_computation/rsx_csx.ma".
16 include "basic_2/rt_computation/fpbs_cpx.ma".
17 include "basic_2/rt_computation/fpbs_csx.ma".
18 include "basic_2/rt_computation/fsb_fpbg.ma".
19
20 (* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
21
22 (* Inversion lemmas with context-sensitive stringly rt-normalizing terms ****)
23
24 lemma fsb_inv_csx:
25       ∀G,L,T. ≥𝐒 ❪G,L,T❫ → ❪G,L❫ ⊢ ⬈*𝐒 T.
26 #G #L #T #H @(fsb_ind_alt … H) -G -L -T /5 width=1 by csx_intro, fpb_cpx/
27 qed-.
28
29 (* Propreties with context-sensitive stringly rt-normalizing terms **********)
30
31 lemma csx_fsb_fpbs:
32       ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
33       ∀G2,L2,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ → ≥𝐒 ❪G2,L2,T2❫.
34 #G1 #L1 #T1 #H @(csx_ind … H) -T1
35 #T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind (Ⓣ) … G2 L2 T2) -G2 -L2 -T2
36 #G0 #L0 #T0 #IHu #H10
37 lapply (fpbs_csx_conf … H10) // -HT1 #HT0
38 generalize in match IHu; -IHu generalize in match H10; -H10
39 @(rsx_ind … (csx_rsx … HT0)) -L0
40 #L0 #_ #IHd #H10 #IHu @fsb_intro
41 #G2 #L2 #T2 * -G2 -L2 -T2 [ -IHd -IHc | -IHu -IHd |  ]
42 [ /4 width=5 by fpbs_fqup_trans, fqu_fqup/
43 | #T2 #HT02 #HnT02
44   elim (fpbs_cpx_tneqx_trans … H10 … HT02 HnT02) -T0
45   /3 width=4 by/
46 | #L2 #HL02 #HnL02 @(IHd … HL02 HnL02) -IHd -HnL02 [ -IHu -IHc | ]
47   [ /3 width=3 by fpbs_lpxs_trans, lpx_lpxs/
48   | #G3 #L3 #T3 #H03 #_
49     elim (lpx_fqup_trans … H03 … HL02) -L2 #L4 #T4 #HT04 #H43 #HL43
50     elim (teqx_dec T0 T4) [ -IHc -HT04 #HT04 | -IHu #HnT04 ]
51     [ elim (teqx_fqup_trans … H43 … HT04) -T4 #L2 #T4 #H04 #HT43 #HL24
52       /4 width=7 by fsb_fpbs_trans, teqx_reqx_lpx_fpbs, fpbs_fqup_trans/
53     | elim (cpxs_tneqx_fwd_step_sn … HT04 HnT04) -HT04 -HnT04 #T2 #T5 #HT02 #HnT02 #HT25 #HT54
54       elim (fpbs_cpx_tneqx_trans … H10 … HT02 HnT02) -T0 #T0 #HT10 #HnT10 #H02
55       /3 width=14 by fpbs_cpxs_teqx_fqup_lpx_trans/
56     ]
57   ]
58 ]
59 qed.
60
61 lemma csx_fsb:
62       ∀G,L,T. ❪G,L❫ ⊢ ⬈*𝐒 T → ≥𝐒 ❪G,L,T❫.
63 /2 width=5 by csx_fsb_fpbs/ qed.
64
65 (* Advanced eliminators *****************************************************)
66
67 lemma csx_ind_fpb (Q:relation3 …):
68       (∀G1,L1,T1.
69         ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
70         (∀G2,L2,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ → Q G2 L2 T2) →
71         Q G1 L1 T1
72       ) →
73       ∀G,L,T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q G L T.
74 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-.
75
76 lemma csx_ind_fpbg (Q:relation3 …):
77       (∀G1,L1,T1.
78         ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
79         (∀G2,L2,T2. ❪G1,L1,T1❫ > ❪G2,L2,T2❫ → Q G2 L2 T2) →
80         Q G1 L1 T1
81       ) →
82       ∀G,L,T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q G L T.
83 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-.