]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/fsb_csx.ma
d40f30a850a60d0864cd9a633260d7a0e397ff7b
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / 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/computation/lsx_csx.ma".
16 include "basic_2/computation/fsb_alt.ma".
17
18 axiom fqup_lpxs_trans_nlleq: ∀h,g,G1,G2,K1,K2,T1,T2. ⦃G1, K1, T1⦄ ⊃+ ⦃G2, K2, T2⦄ →
19                              ∀L2. ⦃G2, K2⦄ ⊢ ➡*[h, g] L2 → (K2 ⋕[T2, 0] L2 →⊥) →
20                              ∃∃L1. ⦃G1, K1⦄ ⊢ ➡*[h, g] L1 &
21                                    K1 ⋕[T1, 0] L1 → ⊥ & ⦃G1, L1, T1⦄ ⊃+ ⦃G2, L2, T2⦄.
22
23 (* "BIG TREE" STRONGLY NORMALIZING TERMS ************************************)
24
25 (* Advanced propreties on context-senstive extended bormalizing terms *******)
26
27 lemma csx_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⦥[h, g] T.
28 #h #g #G1 #L1 #T1 #H @(csx_ind_alt … H) -T1
29 #T1 #HT1 @(csx_ind_lsx … (yinj 0) … HT1) -L1
30 #L1 @(fqup_wf_ind … G1 L1 T1) -G1 -L1 -T1
31 #G1 #L1 #T1 #IHu #H1 #IHl #IHc @fsb_intro
32 #G2 #L2 #T2 * -G2 -L2 -T2
33 [ #G2 #L2 #T2 #H12 @IHu -IHu // /2 width=5 by csx_fqup_conf/ -H1 [| -IHl ]
34   [ #L0 #HL20 #HnL20 #_ elim (fqup_lpxs_trans_nlleq … H12 … HL20 HnL20) -L2
35     /6 width=5 by fsb_fpbs_trans, lpxs_fpbs, fqup_fpbs, lpxs_cpxs_trans/
36   | #T0 #HT20 #HnT20 elim (fqup_cpxs_trans_neq … H12 … HT20 HnT20) -T2
37     /4 width=5 by fsb_fpbs_trans, fqup_fpbs/
38   ]
39 | -H1 -IHu -IHl /3 width=1 by/
40 | -H1 -IHu /5 width=5 by fsb_fpbs_trans, lpxs_fpbs, lpxs_cpxs_trans/
41 ]
42 qed.
43
44 (* Advanced eliminators *****************************************************)
45
46 lemma csx_ind_fpbu: ∀h,g. ∀R:relation3 genv lenv term.
47                     (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 →
48                                 (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) →
49                                 R G1 L1 T1
50                     ) →
51                     ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T.
52 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-.
53
54 lemma csx_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term.
55                     (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 →
56                                 (∀G2,L2,T2. ⦃G1, L1, T1⦄ >⋕[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) →
57                                 R G1 L1 T1
58                     ) →
59                     ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T.
60 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-.