]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/lib/list.ma
syntactic components detached from basic_2 become static_2
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / lib / list.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 include "ground_2/notation/functions/circledE_1.ma".
16 include "ground_2/notation/functions/oplusright_3.ma".
17 include "ground_2/lib/relations.ma".
18
19 (* LISTS ********************************************************************)
20
21 inductive list (A:Type[0]) : Type[0] :=
22   | nil : list A
23   | cons: A → list A → list A.
24
25 interpretation "nil (list)" 'CircledE A = (nil A).
26
27 interpretation "cons (list)" 'OPlusRight A hd tl = (cons A hd tl).
28
29 rec definition all A (R:predicate A) (l:list A) on l ≝
30   match l with
31   [ nil        ⇒ ⊤
32   | cons hd tl ⇒ ∧∧ R hd & all A R tl
33   ].