X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Flib%2Fstreams_hdtl.ma;h=f128e5f73f8d4754566c0b1b6837c2b9b5835ffe;hb=bf816f05ddbe0ded4948dd33490619724dc4f7cf;hp=e23b7bb2d4d246e5e59a2338337503aaf70b5ac5;hpb=802e118337ebd0f8b732d4939973aae6415b5bec;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma index e23b7bb2d..f128e5f73 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma @@ -12,7 +12,8 @@ (* *) (**************************************************************************) -include "ground_2/lib/streams.ma". +include "ground_2/notation/functions/downspoon_2.ma". +include "ground_2/lib/streams_eq.ma". include "ground_2/lib/arith.ma". (* STREAMS ******************************************************************) @@ -23,18 +24,16 @@ definition hd (A:Type[0]): stream A → A ≝ definition tl (A:Type[0]): stream A → stream A ≝ λt. match t with [ seq _ t ⇒ t ]. -let rec tln (A:Type[0]) (i:nat) on i: stream A → stream A ≝ ?. -cases i -i [ #t @t | #i * #_ #t @(tln … i t) ] -qed. +interpretation "tail (streams)" 'DownSpoon A t = (tl A t). (* basic properties *********************************************************) -lemma eq_stream_split (A) (t): (hd … t) @ (tl … t) ≐⦋A⦌ t. -#A * // -qed. +lemma hd_rew (A) (a) (t): a = hd A (a⨮t). +// qed. -lemma tln_eq_repl (A) (i): eq_stream_repl A (λt1,t2. tln … i t1 ≐ tln … i t2). -#A #i elim i -i // -#i #IH * #n1 #t1 * #n2 #t2 #H elim (eq_stream_inv_seq ????? H) -H -/2 width=1 by/ +lemma tl_rew (A) (a) (t): t = tl A (a⨮t). +// qed. + +lemma eq_stream_split (A) (t): (hd … t) ⨮ ⫰t ≗{A} t. +#A * // qed.