X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground%2Frelocation%2Ffr2_plus.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground%2Frelocation%2Ffr2_plus.ma;h=0297be7bd4cdf8896dba5268c15ef0d6548d7594;hb=55c768d7e45babb300b5010463ba3196a68f1bbe;hp=0000000000000000000000000000000000000000;hpb=15212e44902f25536f6e2de4bec4cedcd9a9804d;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground/relocation/fr2_plus.ma b/matita/matita/contribs/lambdadelta/ground/relocation/fr2_plus.ma new file mode 100644 index 000000000..0297be7bd --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground/relocation/fr2_plus.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||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/arith/nat_minus_plus.ma". +include "ground/relocation/fr2_map.ma". + +(* ADDITION FOR FINITE RELOCATION MAPS WITH PAIRS ******************************) + +(* Note: this is pushs *) +(*** pluss *) +rec definition fr2_plus (f:fr2_map) (n:nat) on f ≝ match f with +[ fr2_nil ⇒ ◊ +| fr2_cons d h f ⇒ ❨d+n,h❩;fr2_plus f n +]. + +interpretation + "plus (finite relocation maps with pairs)" + 'plus f n = (fr2_plus f n). + +(* Basic properties *********************************************************) + +(*** pluss_SO2 *) +lemma fr2_plus_cons_unit (d) (h) (f): + ((❨d,h❩;f)+𝟏) = ❨↑d,h❩;f+𝟏. +normalize // qed. + +(* Basic inversion lemmas ***************************************************) + +(*** pluss_inv_nil2 *) +lemma fr2_plus_inv_nil_dx (n) (f): + f+n = ◊ → f = ◊. +#n * // normalize +#d #h #f #H destruct +qed. + +(*** pluss_inv_cons2 *) +lemma fr2_plus_inv_cons_dx (n) (d) (h) (f2) (f): + f + n = ❨d,h❩;f2 → + ∃∃f1. f1+n = f2 & f = ❨d-n,h❩;f1. +#n #d #h #f2 * +[ normalize #H destruct +| #d1 #h1 #f1 whd in ⊢ (??%?→?); #H destruct +