]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/fsb_csx.ma
628b3b9df83b12affcd93c27593350c99a0d47ea
[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_transition/fpbc_fqup.ma".
16 include "basic_2/rt_transition/fpbc_lpx.ma".
17 include "basic_2/rt_computation/rsx_csx.ma".
18 include "basic_2/rt_computation/fpbs_cpx.ma".
19 include "basic_2/rt_computation/fpbs_csx.ma".
20 include "basic_2/rt_computation/fsb_fpbg.ma".
21
22 (* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
23
24 (* Inversion lemmas with context-sensitive stringly rt-normalizing terms ****)
25
26 lemma fsb_inv_csx:
27       ∀G,L,T. ≥𝐒 ❪G,L,T❫ → ❪G,L❫ ⊢ ⬈*𝐒 T.
28 #G #L #T #H @(fsb_ind_alt … H) -G -L -T
29 /5 width=1 by csx_intro, cpx_fpbc/
30 qed-.
31
32 (* Propreties with context-sensitive stringly rt-normalizing terms **********)
33
34 lemma csx_fsb_fpbs:
35       ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
36       ∀G2,L2,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ → ≥𝐒 ❪G2,L2,T2❫.
37 #G1 #L1 #T1 #H @(csx_ind … H) -T1
38 #T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind (Ⓣ) … G2 L2 T2) -G2 -L2 -T2
39 #G0 #L0 #T0 #IHu #H10
40 lapply (fpbs_csx_conf … H10) // -HT1 #HT0
41 generalize in match IHu; -IHu generalize in match H10; -H10
42 @(rsx_ind … (csx_rsx … HT0)) -L0 #L0 #_ #IHd #H10 #IHu
43 @fsb_intro #G2 #L2 #T2 #H
44 elim (fpbc_fwd_lpx … H) -H * [ -IHd -IHc | -IHu -IHd |]
45 [ /5 width=5 by fsb_fpb_trans, fpbs_fqup_trans, fqu_fqup/
46 | #T3 #HT03 #HnT03 #H32
47   elim (fpbs_cpx_tneqg_trans … H10 … HT03 HnT03) -T0
48   /4 width=5 by fsb_fpb_trans, sfull_dec/
49 | #L3 #HL03 #HnL03 #HL32
50   @(fsb_fpb_trans … HL32) -L2
51   @(IHd … HL03 HnL03) -IHd -HnL03 [ -IHu -IHc |]
52   [ /3 width=3 by fpbs_lpxs_trans, lpx_lpxs/
53   | #G4 #L4 #T4 #H04 #_
54     elim (lpx_fqup_trans … H04 … HL03) -L3 #L3 #T3 #HT03 #H34 #HL34
55     elim (teqx_dec T0 T3) [ -IHc -HT03 #HT03 | -IHu #HnT03 ]
56     [ elim (teqg_fqup_trans … H34 … HT03) -T3 // #L2 #T3 #H03 #HT34 #HL23
57       /4 width=10 by fsb_fpbs_trans, teqg_reqg_lpx_fpbs, fpbs_fqup_trans/
58     | elim (cpxs_tneqg_fwd_step_sn … HT03 HnT03) -HT03 -HnT03 /2 width=1 by sfull_dec/ #T2 #HT02 #HnT02 #HT23
59       elim (fpbs_cpx_tneqg_trans … H10 … HT02 HnT02) -T0 /2 width=1 by sfull_dec/ #T0 #HT10 #HnT10 #H02
60       /3 width=17 by fpbs_cpxs_teqg_fqup_lpx_trans/
61     ]
62   ]
63 ]
64 qed.
65
66 lemma csx_fsb (G) (L) (T):
67       ❪G,L❫ ⊢ ⬈*𝐒 T → ≥𝐒 ❪G,L,T❫.
68 /2 width=5 by csx_fsb_fpbs/ qed.
69
70 (* Advanced eliminators *****************************************************)
71
72 lemma csx_ind_fpbc (Q:relation3 …):
73       (∀G1,L1,T1.
74         ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
75         (∀G2,L2,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ → Q G2 L2 T2) →
76         Q G1 L1 T1
77       ) →
78       ∀G,L,T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q G L T.
79 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-.
80
81 lemma csx_ind_fpbg (Q:relation3 …):
82       (∀G1,L1,T1.
83         ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
84         (∀G2,L2,T2. ❪G1,L1,T1❫ > ❪G2,L2,T2❫ → Q G2 L2 T2) →
85         Q G1 L1 T1
86       ) →
87       ∀G,L,T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q G L T.
88 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-.