]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/relocation/mr2_plus.ma
update in ground_2, static_2, basic_2, apps_2, alpha_1
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / relocation / mr2_plus.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 "ground_2/relocation/mr2.ma".
16
17 (* MULTIPLE RELOCATION WITH PAIRS *******************************************)
18
19 rec definition pluss (cs:mr2) (i:nat) on cs ≝ match cs with
20 [ nil2         ⇒ ◊
21 | cons2 l m cs ⇒ ❨l + i,m❩;pluss cs i
22 ].
23
24 interpretation "plus (multiple relocation with pairs)"
25    'plus x y = (pluss x y).
26
27 (* Basic properties *********************************************************)
28
29 lemma pluss_SO2: ∀l,m,cs. (❨l,m❩;cs) + 1 = ❨↑l,m❩;cs + 1.
30 normalize // qed.
31
32 (* Basic inversion lemmas ***************************************************)
33
34 lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊.
35 #i * // normalize
36 #l #m #cs #H destruct
37 qed.
38
39 lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = ❨l,m❩;cs2 →
40                        ∃∃cs1. cs1 + i = cs2 & cs = ❨l - i,m❩;cs1.
41 #i #l #m #cs2 *
42 [ normalize #H destruct
43 | #l1 #m1 #cs1 whd in ⊢ (??%?→?); #H destruct
44   <minus_plus_m_m /2 width=3 by ex2_intro/
45 ]
46 qed-.