]> matita.cs.unibo.it Git - helm.git/blob - streams.ma
4ae6c939a511d00f54ed9c4b15376c54e1d3afb2
[helm.git] / streams.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_2/notation/constructors/cons_2.ma".
16 include "ground_2/lib/relations.ma".
17
18 (* STREAMS ******************************************************************)
19
20 coinductive stream (A:Type[0]): Type[0] ≝
21 | seq: A → stream A → stream A
22 .
23
24 interpretation "cons (nstream)" 'Cons b t = (seq ? b t).
25
26 (* Basic properties *********************************************************)
27
28 lemma stream_rew (A) (t:stream A): match t with [ seq a u ⇒ a @ u ] = t.
29 #A * //
30 qed.