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 include "basic_1/T/defs.ma".
20 ((nat \to nat)) \to (nat \to (nat \to nat))
22 \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n
23 with [O \Rightarrow w | (S m) \Rightarrow (f m)]))).
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
37 weight_map (\lambda (_: nat).O).
42 \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))).