X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Flib%2Flist2.ma;h=f9d93b74e92a8aea80964134d15e8b72079c454c;hb=2976c347e18717e691825ebdf73a5ce941c57d1b;hp=b9a7327de68e8173fb2714ffac490c30ee40fccf;hpb=5832735b721c0bd8567c8f0be761a9136363a2a6;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/list2.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/list2.ma index b9a7327de..f9d93b74e 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/list2.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/list2.ma @@ -13,8 +13,7 @@ (**************************************************************************) include "ground_2/notation/constructors/nil_0.ma". -include "ground_2/notation/constructors/cons_3.ma". -include "ground_2/notation/functions/append_2.ma". +include "ground_2/notation/constructors/oplusright_5.ma". include "ground_2/lib/arith.ma". (* LISTS OF PAIRS ***********************************************************) @@ -25,19 +24,12 @@ inductive list2 (A1,A2:Type[0]) : Type[0] := interpretation "nil (list of pairs)" 'Nil = (nil2 ? ?). -interpretation "cons (list of pairs)" 'Cons hd1 hd2 tl = (cons2 ? ? hd1 hd2 tl). +interpretation "cons (list of pairs)" + 'OPlusRight A1 A2 hd1 hd2 tl = (cons2 A1 A2 hd1 hd2 tl). -rec definition append2 (A1,A2:Type[0]) (l1,l2:list2 A1 A2) on l1 ≝ match l1 with -[ nil2 ⇒ l2 -| cons2 a1 a2 tl ⇒ {a1, a2} @ append2 A1 A2 tl l2 -]. - -interpretation "append (list of pairs)" - 'Append l1 l2 = (append2 ? ? l1 l2). - -rec definition length2 (A1,A2:Type[0]) (l:list2 A1 A2) on l ≝ match l with +rec definition length2 A1 A2 (l:list2 A1 A2) on l ≝ match l with [ nil2 ⇒ 0 -| cons2 _ _ l ⇒ ⫯(length2 A1 A2 l) +| cons2 _ _ l ⇒ ↑(length2 A1 A2 l) ]. interpretation "length (list of pairs)"