]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/reduction/cnr_lift.ma
update in binararies for λδ
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / reduction / cnr_lift.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_2A/reduction/cpr_lift.ma".
16 include "basic_2A/reduction/cnr.ma".
17
18 (* NORMAL TERMS FOR CONTEXT-SENSITIVE REDUCTION *****************************)
19
20 (* Advanced properties ******************************************************)
21
22 lemma cnr_lref_abst: ∀G,L,K,V,i. ⬇[i] L ≡ K. ⓛV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
23 #G #L #K #V #i #HLK #X #H
24 elim (cpr_inv_lref1 … H) -H // *
25 #K0 #V1 #V2 #HLK0 #_ #_
26 lapply (drop_mono … HLK … HLK0) -L #H destruct
27 qed.
28
29 (* Relocation properties ****************************************************)
30
31 lemma cnr_lift: ∀G,L0,L,T,T0,s,l,m. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ →
32                 ⬇[s, l, m] L0 ≡ L → ⬆[l, m] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄.
33 #G #L0 #L #T #T0 #s #l #m #HLT #HL0 #HT0 #X #H
34 elim (cpr_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1
35 >(HLT … HT1) in HT0; -L #HT0
36 >(lift_mono … HT10 … HT0) -T1 -X //
37 qed.
38
39 lemma cnr_inv_lift: ∀G,L0,L,T,T0,s,l,m. ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄ →
40                     ⬇[s, l, m] L0 ≡ L → ⬆[l, m] T ≡ T0 → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄.
41 #G #L0 #L #T #T0 #s #l #m #HLT0 #HL0 #HT0 #X #H
42 elim (lift_total X l m) #X0 #HX0
43 lapply (cpr_lift … H … HL0 … HT0 … HX0) -L #HTX0
44 <(HLT0 … HTX0) in HX0; -L0 -X0 #H
45 >(lift_inj … H … HT0) -T0 -X -s -l -m //
46 qed-.