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 include "basic_2/grammar/lenv_append.ma".
17 (* SHIFT OF A CLOSURE *******************************************************)
19 let rec shift L T on L ≝ match L with
21 | LPair L I V ⇒ shift L (-ⓑ{I} V. T)
24 interpretation "shift (closure)" 'Append L T = (shift L T).
26 (* Basic properties *********************************************************)
28 lemma shift_append_assoc: ∀L,K. ∀T:term. (L @@ K) @@ T = L @@ K @@ T.
29 #L #K elim K -K // normalize //
32 (* Basic inversion lemmas ***************************************************)
34 lemma shift_inj: ∀L1,L2. ∀T1,T2:term. L1 @@ T1 = L2 @@ T2 → |L1| = |L2| →
37 [ * normalize /2 width=1/
38 #L2 #I2 #V2 #T1 #T2 #_ <plus_n_Sm #H destruct
39 | #L1 #H1 #V1 #IH * normalize
40 [ #T1 #T2 #_ <plus_n_Sm #H destruct
41 | #L2 #I2 #V2 #T1 #T2 #H1 #H2
42 elim (IH … H1) -IH -H1 /2 width=1/ -H2 #H1 #H2 destruct /2 width=1/