X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fapps_2%2Ffunctional%2Fflifts.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fapps_2%2Ffunctional%2Fflifts.ma;h=edc607bbc63f58a01b5e8f7837756266bb97ef26;hb=cc6fcb70ca4f3cf01205ed722d75a2fdb2aaf779;hp=0000000000000000000000000000000000000000;hpb=41b61472d2c475e0f69e3dfc85539da3ad2bac1e;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/apps_2/functional/flifts.ma b/matita/matita/contribs/lambdadelta/apps_2/functional/flifts.ma new file mode 100644 index 000000000..edc607bbc --- /dev/null +++ b/matita/matita/contribs/lambdadelta/apps_2/functional/flifts.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||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/notation/functions/uparrowstar_2.ma". +include "apps_2/notation/functional/uparrow_2.ma". +include "static_2/relocation/lifts.ma". + +(* GENERIC FUNCTIONAL RELOCATION ********************************************) + +rec definition flifts f U on U ≝ match U with +[ TAtom I ⇒ match I with + [ Sort _ ⇒ U + | LRef i ⇒ #(f@❴i❵) + | GRef _ ⇒ U + ] +| TPair I V T ⇒ match I with + [ Bind2 p I ⇒ ⓑ{p,I}(flifts f V).(flifts (⫯f) T) + | Flat2 I ⇒ ⓕ{I}(flifts f V).(flifts f T) + ] +]. + +interpretation "generic functional relocation (term)" + 'UpArrowStar f T = (flifts f T). + +interpretation "uniform functional relocation (term)" + 'UpArrow i T = (flifts (uni i) T). + +(* Main properties **********************************************************) + +theorem flifts_lifts: ∀T,f. ⬆*[f]T ≘ ↑*[f]T. +#T elim T -T * +/2 width=1 by lifts_sort, lifts_lref, lifts_gref, lifts_bind, lifts_flat/ +qed. + +(* Main inversion properties ************************************************) + +theorem flifts_inv_lifts: ∀f,T1,T2. ⬆*[f]T1 ≘ T2 → ↑*[f]T1 = T2. +#f #T1 #T2 #H elim H -f -T1 -T2 // +[ #f #i1 #i2 #H <(at_inv_total … H) // +| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT (flift_inv_lift … H) -H // +qed. +*)