X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fcontribs%2FLAMBDA-TYPES%2FLambdaDelta-1%2Flift%2Fdefs.ma;fp=matita%2Fcontribs%2FLAMBDA-TYPES%2FLambdaDelta-1%2Flift%2Fdefs.ma;h=2f61313258b8606f58b702a045d85a8b7b9987f6;hp=0000000000000000000000000000000000000000;hb=f61af501fb4608cc4fb062a0864c774e677f0d76;hpb=58ae1809c352e71e7b5530dc41e2bfc834e1aef1 diff --git a/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/defs.ma b/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/defs.ma new file mode 100644 index 000000000..2f6131325 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/defs.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "LambdaDelta-1/tlist/defs.ma". + +include "LambdaDelta-1/s/defs.ma". + +definition lref_map: + ((nat \to nat)) \to (nat \to (T \to T)) +\def + let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t +with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match +(blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u +t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in +lref_map. + +definition lift: + nat \to (nat \to (T \to T)) +\def + \lambda (h: nat).(\lambda (i: nat).(\lambda (t: T).(lref_map (\lambda (x: +nat).(plus x h)) i t))). + +definition lifts: + nat \to (nat \to (TList \to TList)) +\def + let rec lifts (h: nat) (d: nat) (ts: TList) on ts: TList \def (match ts with +[TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift h d t) (lifts +h d ts0))]) in lifts. +