]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/cpr/lsubr_lbotr.etc
- basic_2: induction for preservation results now uses supclosure
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / cpr / lsubr_lbotr.etc
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 notation "hvbox( ⊒ [ term 46 d , break term 46 e ] break term 46 L2 )"
16    non associative with precedence 45
17    for @{ 'SubEqBottom $d $e $L2 }.
18
19 include "basic_2/relocation/lsubr.ma".
20
21 (* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
22
23 (* bottom element of the refinement *)
24 definition lbotr: nat → nat → predicate lenv ≝
25    λd,e. NF_sn … (lsubr d e) (lsubr d e …).
26
27 interpretation
28    "local environment full refinement (substitution)"
29    'SubEqBottom d e L = (lbotr d e L).
30
31 (* Basic properties *********************************************************)
32
33 lemma lbotr_atom: ∀d,e. ⊒[d, e] ⋆.
34 #d #e #L #H
35 elim (lsubr_inv_atom2 … H) -H
36 [ #H destruct //
37 | * #H1 #H2 destruct //
38 ]
39 qed.
40
41 lemma lbotr_OO: ∀L. ⊒[0, 0] L.
42 // qed.
43
44 lemma lbotr_abbr: ∀L,V,e. ⊒[0, e] L → ⊒[0, e + 1] L.ⓓV.
45 #L #V #e #HL #K #H
46 elim (lsubr_inv_abbr2 … H ?) -H // <minus_plus_m_m #X #HLX #H destruct
47 lapply (HL … HLX) -HL -HLX /2 width=1/
48 qed.
49
50 lemma lbotr_abbr_O: ∀L,V. ⊒[0,1] L.ⓓV.
51 #L #V
52 @(lbotr_abbr … 0) //
53 qed.
54
55 lemma lbotr_skip: ∀I,L,V,d,e. ⊒[d, e] L → ⊒[d + 1, e] L.ⓑ{I}V.
56 #I #L #V #d #e #HL #K #H
57 elim (lsubr_inv_skip2 … H ?) -H // <minus_plus_m_m #J #X #W #HLX #H destruct
58 lapply (HL … HLX) -HL -HLX /2 width=1/
59 qed.
60
61 (* Basic inversion lemmas ***************************************************)
62
63 lemma lbotr_inv_bind: ∀I,L,V,e. ⊒[0, e] L.ⓑ{I}V → 0 < e →
64                       ⊒[0, e - 1] L ∧ I = Abbr.
65 #I #L #V #e #HL #He
66 lapply (HL (L.ⓓV) ?) /2 width=1/ #H
67 elim (lsubr_inv_abbr2 … H ?) -H // #K #_ #H destruct
68 @conj // #L #HKL
69 lapply (HL (L.ⓓV) ?) -HL /2 width=1/ -HKL #H
70 elim (lsubr_inv_abbr2 … H ?) -H // -He #X #HLX #H destruct //
71 qed-.
72
73 lemma lbotr_inv_skip: ∀I,L,V,d,e. ⊒[d, e] L.ⓑ{I}V → 0 < d → ⊒[d - 1, e] L.
74 #I #L #V #d #e #HL #Hd #K #HLK
75 lapply (HL (K.ⓑ{I}V) ?) -HL /2 width=1/ -HLK #H
76 elim (lsubr_inv_skip2 … H ?) -H // -Hd #J #X #W #HKX #H destruct //
77 qed-.