X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Frelocation%2Fmr2_plus.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Frelocation%2Fmr2_plus.ma;h=11ffaa40710a4b7d9b848e07601974aa139c37af;hb=5102e7f780e83c7fef1d3826f81dfd37ee4028bc;hp=0000000000000000000000000000000000000000;hpb=174ee1889b5c91ef5339c718d7657ed0e5da21e8;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2_plus.ma b/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2_plus.ma new file mode 100644 index 000000000..11ffaa407 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/relocation/mr2_plus.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2/relocation/mr2.ma". + +(* MULTIPLE RELOCATION WITH PAIRS *******************************************) + +let rec pluss (cs:mr2) (i:nat) on cs ≝ match cs with +[ nil2 ⇒ ◊ +| cons2 l m cs ⇒ {l + i, m} @ pluss cs i +]. + +interpretation "plus (multiple relocation with pairs)" + 'plus x y = (pluss x y). + +(* Basic properties *********************************************************) + +lemma pluss_SO2: ∀l,m,cs. ({l, m} @ cs) + 1 = {⫯l, m} @ cs + 1. +normalize // qed. + +(* Basic inversion lemmas ***************************************************) + +lemma pluss_inv_nil2: ∀i,cs. cs + i = ◊ → cs = ◊. +#i * // normalize +#l #m #cs #H destruct +qed. + +lemma pluss_inv_cons2: ∀i,l,m,cs2,cs. cs + i = {l, m} @ cs2 → + ∃∃cs1. cs1 + i = cs2 & cs = {l - i, m} @ cs1. +#i #l #m #cs2 * +[ normalize #H destruct +| #l1 #m1 #cs1 whd in ⊢ (??%?→?); #H destruct +