]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/multiple/lifts_vector.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / multiple / lifts_vector.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2A/substitution/lift_vector.ma".
16 include "basic_2A/multiple/lifts.ma".
17
18 (* GENERIC TERM VECTOR RELOCATION *******************************************)
19
20 inductive liftsv (cs:list2 nat nat) : relation (list term) ≝
21 | liftsv_nil : liftsv cs (◊) (◊)
22 | liftsv_cons: ∀T1s,T2s,T1,T2.
23                ⬆*[cs] T1 ≡ T2 → liftsv cs T1s T2s →
24                liftsv cs (T1 @ T1s) (T2 @ T2s)
25 .
26
27 interpretation "generic relocation (vector)"
28    'RLiftStar cs T1s T2s = (liftsv cs T1s T2s).
29
30 (* Basic inversion lemmas ***************************************************)
31
32 (* Basic_1: was: lifts1_flat (left to right) *)
33 lemma lifts_inv_applv1: ∀V1s,U1,T2,cs. ⬆*[cs] Ⓐ V1s. U1 ≡ T2 →
34                         ∃∃V2s,U2. ⬆*[cs] V1s ≡ V2s & ⬆*[cs] U1 ≡ U2 &
35                                   T2 = Ⓐ V2s. U2.
36 #V1s elim V1s -V1s normalize
37 [ #T1 #T2 #cs #HT12  
38   @ex3_2_intro [3,4: // |1,2: skip | // ] (**) (* explicit constructor *)
39 | #V1 #V1s #IHV1s #T1 #X #cs #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 *)
43 ]
44 qed-.
45
46 (* Basic properties *********************************************************)
47
48 (* Basic_1: was: lifts1_flat (right to left) *)
49 lemma lifts_applv: ∀V1s,V2s,cs. ⬆*[cs] V1s ≡ V2s →
50                    ∀T1,T2. ⬆*[cs] T1 ≡ T2 →
51                    ⬆*[cs] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2.
52 #V1s #V2s #cs #H elim H -V1s -V2s /3 width=1 by lifts_flat/
53 qed.