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_2/lib/streams.ma".
16 include "ground_2/lib/arith.ma".
18 (* STREAMS ******************************************************************)
20 definition hd (A:Type[0]): stream A → A ≝
21 λt. match t with [ seq a _ ⇒ a ].
23 definition tl (A:Type[0]): stream A → stream A ≝
24 λt. match t with [ seq _ t ⇒ t ].
26 let rec tln (A:Type[0]) (i:nat) on i: stream A → stream A ≝ ?.
27 cases i -i [ #t @t | #i * #_ #t @(tln … i t) ]
30 (* basic properties *********************************************************)
32 lemma eq_stream_split (A) (t): (hd … t) @ (tl … t) ≐⦋A⦌ t.