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/relocation/lift_vector.ma".
16 include "basic_2/substitution/lifts.ma".
18 (* GENERIC TERM VECTOR RELOCATION *******************************************)
20 inductive liftsv (des:list2 nat nat) : relation (list term) ≝
21 | liftsv_nil : liftsv des (◊) (◊)
22 | liftsv_cons: ∀T1s,T2s,T1,T2.
23 ⇧*[des] T1 ≡ T2 → liftsv des T1s T2s →
24 liftsv des (T1 @ T1s) (T2 @ T2s)
27 interpretation "generic relocation (vector)"
28 'RLiftStar des T1s T2s = (liftsv des T1s T2s).
30 (* Basic inversion lemmas ***************************************************)
32 (* Basic_1: was: lifts1_flat (left to right) *)
33 lemma lifts_inv_applv1: ∀V1s,U1,T2,des. ⇧*[des] Ⓐ V1s. U1 ≡ T2 →
34 ∃∃V2s,U2. ⇧*[des] V1s ≡ V2s & ⇧*[des] U1 ≡ U2 &
36 #V1s elim V1s -V1s normalize
38 @ex3_2_intro [3,4: // |1,2: skip | // ] (**) (* explicit constructor *)
39 | #V1 #V1s #IHV1s #T1 #X #des #H
40 elim (lifts_inv_flat1 … H) -H #V2 #Y #HV12 #HY #H destruct
41 elim (IHV1s … HY) -IHV1s -HY #V2s #T2 #HV12s #HT12 #H destruct
42 @(ex3_2_intro) [4: // |3: /2 width=2 by liftsv_cons/ |1,2: skip | // ] (**) (* explicit constructor *)
46 (* Basic properties *********************************************************)
48 (* Basic_1: was: lifts1_flat (right to left) *)
49 lemma lifts_applv: ∀V1s,V2s,des. ⇧*[des] V1s ≡ V2s →
50 ∀T1,T2. ⇧*[des] T1 ≡ T2 →
51 ⇧*[des] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2.
52 #V1s #V2s #des #H elim H -V1s -V2s /3 width=1 by lifts_flat/