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/syntax/tdeq_tdeq.ma".
16 include "basic_2/rt_transition/lfpx_lfdeq.ma".
17 include "basic_2/rt_computation/csx_drops.ma".
19 (* STRONGLY NORMALIZING TERMS FOR UNCOUNTED PARALLEL RT-TRANSITION **********)
21 (* Advanced properties ******************************************************)
23 lemma csx_tdeq_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
24 ∀T2. T1 ≛[h, o] T2 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
25 #h #o #G #L #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2
26 @csx_intro #T1 #HT21 #HnT21 elim (tdeq_cpx_trans … HT2 … HT21) -HT21
27 /4 width=5 by tdeq_repl/
30 lemma csx_cpx_trans: ∀h,o,G,L,T1. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T1⦄ →
31 ∀T2. ⦃G, L⦄ ⊢ T1 ⬈[h] T2 → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T2⦄.
32 #h #o #G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12
33 elim (tdeq_dec h o T1 T2) /3 width=4 by csx_tdeq_trans/
36 (* Basic_1: was just: sn3_cast *)
37 lemma csx_cast: ∀h,o,G,L,W. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃W⦄ →
38 ∀T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⓝW.T⦄.
39 #h #o #G #L #W #HW @(csx_ind … HW) -W
40 #W #HW #IHW #T #HT @(csx_ind … HT) -T
41 #T #HT #IHT @csx_intro
42 #X #H1 #H2 elim (cpx_inv_cast1 … H1) -H1
43 [ * #W0 #T0 #HLW0 #HLT0 #H destruct
44 elim (tdneq_inv_pair … H2) -H2
45 [ -W -T #H elim H -H //
46 | -HW -IHT /3 width=3 by csx_cpx_trans/
47 | -HW -HT -IHW /4 width=3 by csx_cpx_trans, cpx_pair_sn/
49 |*: /3 width=3 by csx_cpx_trans/
53 (* Basic_1: was just: sn3_abbr *)
54 (* Basic_2A1: was: csx_lref_bind *)
55 lemma csx_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≡ K.ⓑ{I}V →
56 ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄.
57 #h #o #I #G #L #K #V #i #HLK #HV
58 @csx_intro #X #H #Hi elim (cpx_inv_lref1_drops … H) -H
59 [ #H destruct elim Hi //
60 | -Hi * #I0 #K0 #V0 #V1 #HLK0 #HV01 #HV1
61 lapply (drops_mono … HLK0 … HLK) -HLK #H destruct
62 /3 width=8 by csx_lifts, csx_cpx_trans, drops_isuni_fwd_drop2/
66 (* Advanced inversion lemmas ************************************************)
68 (* Basic_1: was: sn3_gen_def *)
69 (* Basic_2A1: was: csx_inv_lref_bind *)
70 lemma csx_inv_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≡ K.ⓑ{I}V →
71 ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄ → ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
72 #h #o #I #G #L #K #V #i #HLK #Hi
73 elim (lifts_total V (𝐔❴⫯i❵))
74 /4 width=9 by csx_inv_lifts, csx_cpx_trans, cpx_delta_drops, drops_isuni_fwd_drop2/
77 lemma csx_inv_lref: ∀h,o,G,L,i. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄ →
79 | ∃∃I,K. ⬇*[i] L ≡ K.ⓤ{I}
80 | ∃∃I,K,V. ⬇*[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
81 #h #o #G #L #i #H elim (drops_F_uni L i) /2 width=1 by or3_intro0/
82 * * /4 width=9 by csx_inv_lref_pair, ex2_3_intro, ex1_2_intro, or3_intro2, or3_intro1/