X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Flib%2Fstream_hdtl.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Flib%2Fstream_hdtl.ma;h=ff518a243a32a98636cb455cbdfa0328d83da76c;hb=e8fb201bad04ec30867659c2d42ef45a4b6c3393;hp=0000000000000000000000000000000000000000;hpb=bf816f05ddbe0ded4948dd33490619724dc4f7cf;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground_2/lib/stream_hdtl.ma b/matita/matita/contribs/lambdadelta/ground_2/lib/stream_hdtl.ma new file mode 100644 index 000000000..ff518a243 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/ground_2/lib/stream_hdtl.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "ground_2/notation/functions/downspoon_2.ma". +include "ground_2/lib/stream_eq.ma". +include "ground_2/lib/arith.ma". + +(* STREAMS ******************************************************************) + +definition hd (A:Type[0]): stream A → A ≝ + λt. match t with [ seq a _ ⇒ a ]. + +definition tl (A:Type[0]): stream A → stream A ≝ + λt. match t with [ seq _ t ⇒ t ]. + +interpretation "tail (stream)" 'DownSpoon A t = (tl A t). + +(* basic properties *********************************************************) + +lemma hd_rew (A) (a) (t): a = hd A (a⨮t). +// qed. + +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.