]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/lib/lambda-delta/substitution/lift.ma
a550123b51486976e28605fe25ed9b831b17696b
[helm.git] / matita / matita / lib / lambda-delta / substitution / lift.ma
1 (*
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.
5     ||I||
6     ||T||
7     ||A||  This file is distributed under the terms of the
8     \   /  GNU General Public License Version 2
9      \ /
10       V_______________________________________________________________ *)
11
12 include "lambda-delta/language/term.ma".
13
14 (* RELOCATION ***************************************************************)
15
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)
23 .
24
25 interpretation "relocation" 'RLift T1 d e T2 = (lift T1 d e T2).
26
27 (* The basic inversion lemmas ***********************************************)
28
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 *)
32
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/
35 qed.