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 "Ground_2/arith.ma".
16 include "Ground_2/notation.ma".
18 (* LISTS ********************************************************************)
20 inductive list (A:Type[0]) : Type[0] :=
22 | cons: A -> list A -> list A.
24 interpretation "nil (list)" 'Nil = (nil ?).
26 interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl).
28 let rec append A (l1: list A) l2 on l1 ≝
31 | cons hd tl ⇒ hd :: append A tl l2
34 interpretation "append (list)" 'Append l1 l2 = (append ? l1 l2).