]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/ground_2/lib/list.ma
notational update in lambdadelta completed
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / lib / list.ma
index 9e8d1ff4136e27778c44778e6e44b27bc2586562..ffce3128641951c7429d9aaeef7ae488dd000305 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "ground_2/notation/constructors/nil_0.ma".
-include "ground_2/notation/constructors/cons_2.ma".
+include "ground_2/notation/constructors/oplusright_3.ma".
 include "ground_2/lib/arith.ma".
 
 (* LISTS ********************************************************************)
@@ -24,17 +24,17 @@ inductive list (A:Type[0]) : Type[0] :=
 
 interpretation "nil (list)" 'Nil = (nil ?).
 
-interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl).
+interpretation "cons (list)" 'OPlusRight A hd tl = (cons A hd tl).
 
-let rec length (A:Type[0]) (l:list A) on l ≝ match l with
+rec definition length A (l:list A) on l ≝ match l with
 [ nil      ⇒ 0
-| cons _ l â\87\92 â«¯(length A l)
+| cons _ l â\87\92 â\86\91(length A l)
 ].
 
 interpretation "length (list)"
    'card l = (length ? l).
 
-let rec all A (R:predicate A) (l:list A) on l ≝
+rec definition all A (R:predicate A) (l:list A) on l ≝
   match l with
   [ nil        ⇒ ⊤
   | cons hd tl ⇒ R hd ∧ all A R tl
@@ -45,7 +45,7 @@ let rec all A (R:predicate A) (l:list A) on l ≝
 lemma length_nil (A:Type[0]): |nil A| = 0.
 // qed.
 
-lemma length_cons (A:Type[0]) (l:list A) (a:A): |a@l| = ⫯|l|.
+lemma length_cons (A:Type[0]) (l:list A) (a:A): |a⨮l| = ↑|l|.
 // qed.
 
 (* Basic inversion lemmas on length *****************************************)
@@ -57,12 +57,12 @@ qed-.
 lemma length_inv_zero_sn (A:Type[0]) (l:list A): 0 = |l| → l = ◊.
 /2 width=1 by length_inv_zero_dx/ qed-.
 
-lemma length_inv_succ_dx (A:Type[0]) (l:list A) (x): |l| = â«¯x →
-                         ∃∃tl,a. x = |tl| & l = a @ tl.
+lemma length_inv_succ_dx (A:Type[0]) (l:list A) (x): |l| = â\86\91x →
+                         ∃∃tl,a. x = |tl| & l = a  tl.
 #A * /2 width=4 by ex2_2_intro/
 >length_nil #x #H destruct
 qed-.
 
-lemma length_inv_succ_sn (A:Type[0]) (l:list A) (x): â«¯x = |l| →
-                         ∃∃tl,a. x = |tl| & l = a @ tl.
+lemma length_inv_succ_sn (A:Type[0]) (l:list A) (x): â\86\91x = |l| →
+                         ∃∃tl,a. x = |tl| & l = a  tl.
 /2 width=1 by length_inv_succ_dx/ qed.