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 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 }.
19 include "basic_2/relocation/lsubr.ma".
21 (* LOCAL ENVIRONMENT REFINEMENT FOR SUBSTITUTION ****************************)
23 (* bottom element of the refinement *)
24 definition lbotr: nat → nat → predicate lenv ≝
25 λd,e. NF_sn … (lsubr d e) (lsubr d e …).
28 "local environment full refinement (substitution)"
29 'SubEqBottom d e L = (lbotr d e L).
31 (* Basic properties *********************************************************)
33 lemma lbotr_atom: ∀d,e. ⊒[d, e] ⋆.
35 elim (lsubr_inv_atom2 … H) -H
37 | * #H1 #H2 destruct //
41 lemma lbotr_OO: ∀L. ⊒[0, 0] L.
44 lemma lbotr_abbr: ∀L,V,e. ⊒[0, e] L → ⊒[0, e + 1] L.ⓓV.
46 elim (lsubr_inv_abbr2 … H ?) -H // <minus_plus_m_m #X #HLX #H destruct
47 lapply (HL … HLX) -HL -HLX /2 width=1/
50 lemma lbotr_abbr_O: ∀L,V. ⊒[0,1] L.ⓓV.
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/
61 (* Basic inversion lemmas ***************************************************)
63 lemma lbotr_inv_bind: ∀I,L,V,e. ⊒[0, e] L.ⓑ{I}V → 0 < e →
64 ⊒[0, e - 1] L ∧ I = Abbr.
66 lapply (HL (L.ⓓV) ?) /2 width=1/ #H
67 elim (lsubr_inv_abbr2 … H ?) -H // #K #_ #H destruct
69 lapply (HL (L.ⓓV) ?) -HL /2 width=1/ -HKL #H
70 elim (lsubr_inv_abbr2 … H ?) -H // -He #X #HLX #H destruct //
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 //