X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2FLAMBDA-TYPES%2FBasic-1%2FC%2Fdefs.ma;fp=matita%2Fmatita%2Fcontribs%2FLAMBDA-TYPES%2FBasic-1%2FC%2Fdefs.ma;h=cecc082677e494c409001a1d93ced6ff865642f1;hb=2c01ff6094173915e7023076ea48b5804dca7778;hp=0000000000000000000000000000000000000000;hpb=a050e3f80d7ea084ce0184279af98e8251c7d2a6;p=helm.git diff --git a/matita/matita/contribs/LAMBDA-TYPES/Basic-1/C/defs.ma b/matita/matita/contribs/LAMBDA-TYPES/Basic-1/C/defs.ma new file mode 100644 index 000000000..cecc08267 --- /dev/null +++ b/matita/matita/contribs/LAMBDA-TYPES/Basic-1/C/defs.ma @@ -0,0 +1,45 @@ +(**************************************************************************) +(* ___ *) +(* ||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 "Basic-1/T/defs.ma". + +inductive C: Set \def +| CSort: nat \to C +| CHead: C \to (K \to (T \to C)). + +definition cweight: + C \to nat +\def + let rec cweight (c: C) on c: nat \def (match c with [(CSort _) \Rightarrow O +| (CHead c0 _ t) \Rightarrow (plus (cweight c0) (tweight t))]) in cweight. + +definition clt: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(lt (cweight c1) (cweight c2))). + +definition cle: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(le (cweight c1) (cweight c2))). + +definition CTail: + K \to (T \to (C \to C)) +\def + let rec CTail (k: K) (t: T) (c: C) on c: C \def (match c with [(CSort n) +\Rightarrow (CHead (CSort n) k t) | (CHead d h u) \Rightarrow (CHead (CTail k +t d) h u)]) in CTail. +