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/notation/functions/drop_1.ma".
16 include "ground_2/lib/streams_eq.ma".
17 include "ground_2/lib/arith.ma".
19 (* STREAMS ******************************************************************)
21 definition hd (A:Type[0]): stream A → A ≝
22 λt. match t with [ seq a _ ⇒ a ].
24 definition tl (A:Type[0]): stream A → stream A ≝
25 λt. match t with [ seq _ t ⇒ t ].
27 interpretation "tail (streams)" 'Drop t = (tl ? t).
29 (* basic properties *********************************************************)
31 lemma hd_rew (A) (a) (t): a = hd A (a@t).
34 lemma tl_rew (A) (a) (t): t = tl A (a@t).
37 lemma eq_stream_split (A) (t): (hd … t) @ ↓t ≐⦋A⦌ t.