]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/lib/stream.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / lambdadelta / ground / lib / stream.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "ground/notation/functions/oplusright_3.ma".
16 include "ground/lib/relations.ma".
17
18 (* STREAMS ******************************************************************)
19
20 coinductive stream (A:Type[0]): Type[0] ≝
21 | stream_cons: A → stream A → stream A
22 .
23
24 interpretation
25   "cons (streams)"
26   'OPlusRight A a u = (stream_cons A a u).
27
28 (* Basic constructions ******************************************************)
29
30 lemma stream_rew (A) (t:stream A): match t with [ stream_cons a u ⇒ a ⨮ u ] = t.
31 #A * //
32 qed.