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 include "basics/list.ma".
16 include "arithmetics/nat.ma".
18 nlet rec length (A:Type) (l:list A) on l ≝
21 | cons a tl ⇒ S (length A tl)].
23 notation "|M|" non associative with precedence 60 for @{'norm $M}.
24 interpretation "norm" 'norm l = (length ? l).
26 nlet rec nth n (A:Type) (l:list A) (d:A) ≝
29 |S m ⇒ nth m A (tail A l) d].