X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Flib%2Flist.ma;h=0ea6ae2856d4f3c128a59af277b3674002280315;hb=3c8da07d7a5d7cf0432a83732a6d103f527afaef;hp=baa9179e911dfd49ebd32ec57c2a638068c23369;hpb=5832735b721c0bd8567c8f0be761a9136363a2a6;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma index baa9179e9..0ea6ae285 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/list.ma @@ -12,8 +12,8 @@ (* *) (**************************************************************************) -include "ground_2/notation/constructors/nil_0.ma". -include "ground_2/notation/constructors/cons_2.ma". +include "ground_2/notation/constructors/circledE_1.ma". +include "ground_2/notation/constructors/oplusright_3.ma". include "ground_2/lib/arith.ma". (* LISTS ********************************************************************) @@ -22,13 +22,13 @@ inductive list (A:Type[0]) : Type[0] := | nil : list A | cons: A → list A → list A. -interpretation "nil (list)" 'Nil = (nil ?). +interpretation "nil (list)" 'CircledE A = (nil A). -interpretation "cons (list)" 'Cons hd tl = (cons ? hd tl). +interpretation "cons (list)" 'OPlusRight A hd tl = (cons A hd tl). -rec definition 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 ⇒ ⫯(length A l) +| cons _ l ⇒ ↑(length A l) ]. interpretation "length (list)" @@ -45,24 +45,24 @@ rec definition 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 *****************************************) -lemma length_inv_zero_dx (A:Type[0]) (l:list A): |l| = 0 → l = ◊. +lemma length_inv_zero_dx (A:Type[0]) (l:list A): |l| = 0 → l = Ⓔ. #A * // #a #l >length_cons #H destruct qed-. -lemma length_inv_zero_sn (A:Type[0]) (l:list A): 0 = |l| → l = ◊. +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| = ↑x → + ∃∃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): ↑x = |l| → + ∃∃tl,a. x = |tl| & l = a ⨮ tl. /2 width=1 by length_inv_succ_dx/ qed.