]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/lib/stream_hdtl.ma
update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / ground / lib / stream_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/notation/functions/downdashedarrow_2.ma".
16 include "ground/lib/stream.ma".
17
18 (* HEAD AND TAIL FOR STREAMS ************************************************)
19
20 definition stream_hd (A:Type[0]): stream A → A.
21 #A * #a #_ @a
22 defined.
23
24 definition stream_tl (A:Type[0]): stream A → stream A.
25 #A * #_ #t @t
26 defined.
27
28 interpretation
29   "tail (streams)"
30   'DownDashedArrow A t = (stream_tl A t).
31
32 (* Basic constructions ******************************************************)
33
34 lemma stream_hd_cons (A) (a) (t):
35       a = stream_hd A (a⨮t).
36 // qed.
37
38 lemma stream_tl_cons (A) (a) (t):
39       t = ⇣{A}(a⨮t).
40 // qed.
41
42 lemma stream_split_tl (A) (t):
43       stream_hd A t ⨮ ⇣t = t.
44 #A * //
45 qed.