1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
17 set "baseuri" "cic:/matita/LAMBDA-TYPES/LambdaDelta-1/tlt/defs".
22 ((nat \to nat)) \to (nat \to (nat \to nat))
24 \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n
25 with [O \Rightarrow w | (S m) \Rightarrow (f m)]))).
27 definition weight_map:
28 ((nat \to nat)) \to (T \to nat)
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.
42 weight_map (\lambda (_: nat).O).
47 \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))).