1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/computation/fpbs_ext.ma".
16 include "basic_2/computation/csx_fpbs.ma".
17 include "basic_2/computation/lsx_csx.ma".
18 include "basic_2/computation/fsb_alt.ma".
20 (* "BIG TREE" STRONGLY NORMALIZING TERMS ************************************)
22 (* Advanced propreties on context-senstive extended bormalizing terms *******)
24 lemma csx_fsb_fpbs: ∀h,g,G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 →
25 ∀G2,L2,T2. ⦃G1, L1, T1⦄ ≥[h, g] ⦃G2, L2, T2⦄ → ⦃G2, L2⦄ ⊢ ⦥[h, g] T2.
26 #h #g #G1 #L1 #T1 #H @(csx_ind_alt … H) -T1
27 #T1 #HT1 #IHc #G2 #L2 #T2 @(fqup_wf_ind … G2 L2 T2) -G2 -L2 -T2
28 #G0 #L0 #T0 #IHu #H10 lapply (csx_fpbs_conf … H10) // -HT1
29 #HT0 generalize in match IHu; -IHu generalize in match H10; -H10
30 @(lsx_ind … (csx_lsx … HT0 0)) -L0
31 #L0 #_ #IHl #H10 #IHu @fsb_intro
32 #G2 #L2 #T2 * -G2 -L2 -T2 [ -IHl -IHc | -IHu -IHl | ]
33 [ /3 width=5 by fpbs_fqup_trans/
34 | #T2 #HT02 #HnT02 elim (fpbs_cpxs_trans_neq … H10 … HT02 HnT02) -T0
36 | #L2 #HL02 #HnL02 @(IHl … HL02 HnL02) -IHl -HnL02 [ -IHu -IHc | ]
37 [ /2 width=3 by fpbs_lpxs_trans/
38 | #G3 #L3 #T3 #H03 #_ elim (lpxs_fqup_trans … H03 … HL02) -L2
39 #L4 #T4 elim (eq_term_dec T0 T4) [ -IHc | -IHu ]
40 [ #H destruct /4 width=5 by fsb_fpbs_trans, lpxs_fpbs, fpbs_fqup_trans/
41 | #HnT04 #HT04 #H04 elim (fpbs_cpxs_trans_neq … H10 … HT04 HnT04) -T0
42 /4 width=8 by fpbs_fqup_trans, fpbs_lpxs_trans/
48 lemma csx_fsb: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → ⦃G, L⦄ ⊢ ⦥[h, g] T.
49 /2 width=5 by csx_fsb_fpbs/ qed.
51 (* Advanced eliminators *****************************************************)
53 lemma csx_ind_fpbu: ∀h,g. ∀R:relation3 genv lenv term.
54 (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 →
55 (∀G2,L2,T2. ⦃G1, L1, T1⦄ ≻[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) →
58 ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T.
59 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_alt/ qed-.
61 lemma csx_ind_fpbg: ∀h,g. ∀R:relation3 genv lenv term.
62 (∀G1,L1,T1. ⦃G1, L1⦄ ⊢ ⬊*[h, g] T1 →
63 (∀G2,L2,T2. ⦃G1, L1, T1⦄ >⋕[h, g] ⦃G2, L2, T2⦄ → R G2 L2 T2) →
66 ∀G,L,T. ⦃G, L⦄ ⊢ ⬊*[h, g] T → R G L T.
67 /4 width=4 by fsb_inv_csx, csx_fsb, fsb_ind_fpbg/ qed-.