1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground/notation/functions/oplusright_3.ma".
16 include "ground/lib/relations.ma".
18 (* STREAMS ******************************************************************)
20 coinductive stream (A:Type[0]): Type[0] ≝
21 | stream_cons: A → stream A → stream A
26 'OPlusRight A a u = (stream_cons A a u).
28 (* Basic constructions ******************************************************)
31 lemma stream_unfold (A) (t:stream A):
32 match t with [ stream_cons a u ⇒ a ⨮ u ] = t.
36 (* Basic inversions *********************************************************)
38 lemma eq_inv_stream_cons_bi (A) (a1,a2:A) (u1) (u2):
39 a1 ⨮ u1 = a2 ⨮ u2 → ∧∧ a1 = a2 & u1 = u2.
40 #A #a1 #a2 #u1 #u2 #H destruct