]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/reducibility/cnf_lift.ma
3aefb3643de2e5f8971c7c9bb18f003b1f569862
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / reducibility / cnf_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_2/reducibility/cpr_lift.ma".
16 include "basic_2/reducibility/cnf.ma".
17
18 (* CONTEXT-SENSITIVE NORMAL TERMS *******************************************)
19
20 (* Advanced inversion lemmas ************************************************)
21
22 (* Basic_1: was only: nf2_csort_lref *)
23 lemma cnf_lref_atom: ∀L,i. ⇩[0, i] L ≡ ⋆ → L  ⊢ 𝐍⦃#i⦄.
24 #L #i #HLK #X #H
25 elim (cpr_inv_lref1 … H) // *
26 #K0 #V0 #V1 #HLK0 #_ #_ #_
27 lapply (ldrop_mono … HLK … HLK0) -L #H destruct
28 qed.
29
30 (* Basic_1: was: nf2_lref_abst *)
31 lemma cnf_lref_abst: ∀L,K,V,i. ⇩[0, i] L ≡ K. ⓛV → L ⊢ 𝐍⦃#i⦄.
32 #L #K #V #i #HLK #X #H
33 elim (cpr_inv_lref1 … H) // *
34 #K0 #V0 #V1 #HLK0 #_ #_ #_
35 lapply (ldrop_mono … HLK … HLK0) -L #H destruct
36 qed.
37
38 (* Basic_1: was: nf2_abst *)
39 lemma cnf_abst: ∀I,L,V,W,T. L ⊢ 𝐍⦃W⦄ → L. ⓑ{I} V ⊢ 𝐍⦃T⦄ → L ⊢ 𝐍⦃ⓛW.T⦄.
40 #I #L #V #W #T #HW #HT #X #H
41 elim (cpr_inv_abst1 … H I V) -H #W0 #T0 #HW0 #HT0 #H destruct
42 >(HW … HW0) -W0 >(HT … HT0) -T0 //
43 qed.
44
45 (* Basic_1: was only: nf2_appl_lref *)
46 lemma cnf_appl_simple: ∀L,V,T. L ⊢ 𝐍⦃V⦄ → L ⊢ 𝐍⦃T⦄ → 𝐒⦃T⦄ → L ⊢ 𝐍⦃ⓐV.T⦄.
47 #L #V #T #HV #HT #HS #X #H
48 elim (cpr_inv_appl1_simple … H ?) -H // #V0 #T0 #HV0 #HT0 #H destruct
49 >(HV … HV0) -V0 >(HT … HT0) -T0 //
50 qed.
51
52 (* Relocation properties ****************************************************)
53
54 (* Basic_1: was: nf2_lift *)
55 lemma cnf_lift: ∀L0,L,T,T0,d,e.
56                 L ⊢ 𝐍⦃T⦄ → ⇩[d, e] L0 ≡ L → ⇧[d, e] T ≡ T0 → L0 ⊢ 𝐍⦃T0⦄.
57 #L0 #L #T #T0 #d #e #HLT #HL0 #HT0 #X #H
58 elim (cpr_inv_lift … HL0 … HT0 … H) -L0 #T1 #HT10 #HT1
59 <(HLT … HT1) in HT0; -L #HT0
60 >(lift_mono … HT10 … HT0) -T1 -X //
61 qed.