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/downspoon_2.ma".
16 include "ground/lib/stream_eq.ma".
18 (* HEAD AND TAIL FOR STREAMS ************************************************)
20 definition stream_hd (A:Type[0]): stream A → A ≝
21 λt. match t with [ stream_cons a _ ⇒ a ].
23 definition stream_tl (A:Type[0]): stream A → stream A ≝
24 λt. match t with [ stream_cons _ t ⇒ t ].
28 'DownSpoon A t = (stream_tl A t).
30 (* Basic constructions ******************************************************)
32 lemma stream_hd_cons (A) (a) (t):
33 a = stream_hd A (a⨮t).
36 lemma stream_tl_cons (A) (a) (t):
40 lemma eq_stream_split_hd_tl (A) (t):
41 stream_hd … t ⨮ ⫰t ≗{A} t.