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/rt_computation/csx_lsubr.ma".
16 include "basic_2/rt_computation/csx_cpxs.ma".
17 include "basic_2/rt_computation/lsubsx_rdsx.ma".
19 (* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
21 (* Advanced properties ******************************************************)
23 (* Basic_2A1: uses: lsx_lref_be_lpxs *)
24 lemma rdsx_pair_lpxs (h) (o) (G):
25 ∀K1,V. ⦃G, K1⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ →
26 ∀K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ → ⦃G, K1⦄ ⊢ ⬈*[h] K2 →
27 ∀I. G ⊢ ⬈*[h, o, #0] 𝐒⦃K2.ⓑ{I}V⦄.
29 @(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
30 @(rdsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
31 @rdsx_intro #Y #HY #HnY
32 elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
33 elim (tdeq_dec h o V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
34 [ /5 width=5 by rdsx_rdeq_trans, lpxs_step_dx, rdeq_pair/
35 | @(IHV0 … HnV02) -IHV0 -HnV02
36 [ /2 width=3 by lpxs_cpx_trans/
37 | /3 width=3 by rdsx_lpx_trans, rdsx_cpx_trans/
38 | /2 width=3 by lpxs_step_dx/
43 (* Basic_2A1: uses: lsx_lref_be *)
44 lemma rdsx_lref_pair_drops (h) (o) (G):
45 ∀K,V. ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄ →
46 ∀I,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄.
47 #h #o #G #K #V #HV #HK #I #i elim i -i
48 [ #L #H >(drops_fwd_isid … H) -H /2 width=3 by rdsx_pair_lpxs/
50 elim (drops_inv_bind2_isuni_next … H) -H // #J #Y #HY #H destruct
51 @(rdsx_lifts … (𝐔❴1❵)) /3 width=6 by drops_refl, drops_drop/ (**) (* full auto fails *)
55 (* Main properties **********************************************************)
57 (* Basic_2A1: uses: csx_lsx *)
58 theorem csx_rdsx (h) (o): ∀G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
59 #h #o #G #L #T @(fqup_wf_ind_eq (Ⓕ) … G L T) -G -L -T
60 #Z #Y #X #IH #G #L * * //
61 [ #i #HG #HL #HT #H destruct
62 elim (csx_inv_lref … H) -H [ |*: * ]
63 [ /2 width=1 by rdsx_lref_atom/
64 | /2 width=3 by rdsx_lref_unit/
65 | /4 width=6 by rdsx_lref_pair_drops, fqup_lref/
67 | #p #I #V #T #HG #HL #HT #H destruct
68 elim (csx_fwd_bind_unit … H Void) -H /3 width=1 by rdsx_bind_void/
69 | #I #V #T #HG #HL #HT #H destruct
70 elim (csx_fwd_flat … H) -H /3 width=1 by rdsx_flat/