]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/LAMBDA-TYPES/LambdaDelta-1/tlt/defs.ma
contribs should now compile
[helm.git] / matita / contribs / LAMBDA-TYPES / LambdaDelta-1 / tlt / defs.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* This file was automatically generated: do not edit *********************)
16
17
18
19 include "T/defs.ma".
20
21 definition wadd:
22  ((nat \to nat)) \to (nat \to (nat \to nat))
23 \def
24  \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n 
25 with [O \Rightarrow w | (S m) \Rightarrow (f m)]))).
26
27 definition weight_map:
28  ((nat \to nat)) \to (T \to nat)
29 \def
30  let rec weight_map (f: ((nat \to nat))) (t: T) on t: nat \def (match t with 
31 [(TSort _) \Rightarrow O | (TLRef n) \Rightarrow (f n) | (THead k u t0) 
32 \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr 
33 \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f (S (weight_map f 
34 u))) t0))) | Abst \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f 
35 O) t0))) | Void \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f O) 
36 t0)))]) | (Flat _) \Rightarrow (S (plus (weight_map f u) (weight_map f 
37 t0)))])]) in weight_map.
38
39 definition weight:
40  T \to nat
41 \def
42  weight_map (\lambda (_: nat).O).
43
44 definition tlt:
45  T \to (T \to Prop)
46 \def
47  \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))).
48