]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/lib/list.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / 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/notation/functions/circled_element_e_1.ma".
16 include "ground/notation/functions/oplusright_3.ma".
17 include "ground/lib/relations.ma".
18
19 (* LISTS ********************************************************************)
20
21 inductive list (A:Type[0]): Type[0] :=
22 | list_empty: list A
23 | list_lcons: A → list A → list A
24 .
25
26 interpretation
27   "empty (lists)"
28   'CircledElementE A = (list_empty A).
29
30 interpretation
31   "left cons (lists)"
32   'OPlusRight A hd tl = (list_lcons A hd tl).
33
34 rec definition list_all A (R:predicate A) (l:list A) on l ≝ match l with
35 [ list_empty       ⇒ ⊤
36 | list_lcons hd tl ⇒ ∧∧ R hd & list_all A R tl
37 ].