]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_1/tlt/defs.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_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 include "basic_1/T/defs.ma".
18
19 definition wadd:
20  ((nat \to nat)) \to (nat \to (nat \to nat))
21 \def
22  \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n 
23 with [O \Rightarrow w | (S m) \Rightarrow (f m)]))).
24
25 rec definition weight_map (f: (nat \to nat)) (t: T) on t: nat \def match t 
26 with [(TSort _) \Rightarrow O | (TLRef n) \Rightarrow (f n) | (THead k u t0) 
27 \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr 
28 \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f (S (weight_map f 
29 u))) t0))) | Abst \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f 
30 O) t0))) | Void \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f O) 
31 t0)))]) | (Flat _) \Rightarrow (S (plus (weight_map f u) (weight_map f 
32 t0)))])].
33
34 definition weight:
35  T \to nat
36 \def
37  weight_map (\lambda (_: nat).O).
38
39 definition tlt:
40  T \to (T \to Prop)
41 \def
42  \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))).
43