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/reduction/cpx_lift.ma".
16 include "basic_2/reduction/cnx.ma".
18 (* CONTEXT-SENSITIVE EXTENDED NORMAL TERMS **********************************)
20 (* Advanced properties ******************************************************)
22 lemma cnx_lref_atom: ∀h,g,L,i. ⇩[0, i] L ≡ ⋆ → ⦃h, L⦄ ⊢ 𝐍[g]⦃#i⦄.
24 elim (cpx_inv_lref1 … H) -H // *
25 #I #K #V1 #V2 #HLK #_ #_
26 lapply (ldrop_mono … HL … HLK) -L #H destruct
29 (* Relocation properties ****************************************************)
31 lemma cnx_lift: ∀h,g,L0,L,T,T0,d,e. ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄ → ⇩[d, e] L0 ≡ L →
32 ⇧[d, e] T ≡ T0 → ⦃h, L0⦄ ⊢ 𝐍[g]⦃T0⦄.
33 #h #g #L0 #L #T #T0 #d #e #HLT #HL0 #HT0 #X #H
34 elim (cpx_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1
35 <(HLT … HT1) in HT0; -L #HT0
36 >(lift_mono … HT10 … HT0) -T1 -X //
39 lemma cnx_inv_lift: ∀h,g,L0,L,T,T0,d,e. ⦃h, L0⦄ ⊢ 𝐍[g]⦃T0⦄ → ⇩[d, e] L0 ≡ L →
40 ⇧[d, e] T ≡ T0 → ⦃h, L⦄ ⊢ 𝐍[g]⦃T⦄.
41 #h #g #L0 #L #T #T0 #d #e #HLT0 #HL0 #HT0 #X #H
42 elim (lift_total X d e) #X0 #HX0
43 lapply (cpx_lift … H … HL0 … HT0 … HX0) -L #HTX0
44 >(HLT0 … HTX0) in HX0; -L0 -X0 #H
45 >(lift_inj … H … HT0) -T0 -X -d -e //