2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department of the University of Bologna, Italy.
7 ||A|| This file is distributed under the terms of the
8 \ / GNU General Public License Version 2
10 V_______________________________________________________________ *)
12 include "lambda-delta/language/term.ma".
14 (* RELOCATION ***************************************************************)
16 inductive lift: term → nat → nat → term → Prop ≝
17 | lift_sort : ∀k,d,e. lift (⋆k) d e (⋆k)
18 | lift_lref_lt: ∀i,d,e. i < d → lift (#i) d e (#i)
19 | lift_lref_ge: ∀i,d,e. d ≤ i → lift (#i) d e (#(i + e))
20 | lift_con2 : ∀I,V1,V2,T1,T2,d,e.
21 lift V1 d e V2 → lift T1 (d + 1) e T2 →
22 lift (♭I V1. T1) d e (♭I V2. T2)
25 interpretation "relocation" 'RLift T1 d e T2 = (lift T1 d e T2).
27 (* The basic inversion lemmas ***********************************************)
29 lemma lift_inv_sort2_aux: ∀d,e,T1,T2. ↑[d,e] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k.
30 #d #e #T1 #T2 #H elim H -H d e T1 T2 //
31 [ #i #d #e #_ #k #H destruct (***) (* DESTRUCT FAILS *)
33 lemma lift_inv_sort2: ∀d,e,T1,k. ↑[d,e] T1 ≡ ⋆k → T1 = ⋆k.
34 #d #e #T1 #k #H lapply (lift_inv_sort2_aux … H) /2/