]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/lib/streams_hdtl.ma
- ng_kernel: catched Invalid_argument "List.nth" in typeof of Rel i (raied when i...
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / lib / streams_hdtl.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/lib/streams.ma".
16 include "ground_2/lib/arith.ma".
17
18 (* STREAMS ******************************************************************)
19
20 definition hd (A:Type[0]): stream A → A ≝
21               λt. match t with [ seq a _ ⇒ a ].
22
23 definition tl (A:Type[0]): stream A → stream A ≝
24               λt. match t with [ seq _ t ⇒ t ].
25
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) ]
28 qed.
29
30 (* basic properties *********************************************************)
31
32 lemma eq_stream_split (A) (t): (hd … t) @ (tl … t) ≐⦋A⦌ t.
33 #A * //
34 qed.