]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/lib/stream_tls.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / lib / stream_tls.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/downharpoonrightstar_3.ma".
16 include "ground/lib/stream_hdtl.ma".
17 include "ground/arith/nat_succ_iter.ma".
18
19 (* ITERATED TAIL FOR STREAMS ************************************************)
20
21 definition stream_tls (A) (n): stream A â†’ stream A â‰
22            (stream_tl A)^n.
23
24 interpretation
25   "iterated tail (strams)"
26   'DownHarpoonRightStar A n f = (stream_tls A n f).
27
28 (* Basic constructions ******************************************************)
29
30 lemma stream_tls_zero (A) (t):
31       t = â‡‚*{A}[𝟎]t.
32 // qed.
33
34 lemma stream_tls_tl (A) (n) (t):
35       (⇂⇂*[n]t) = â‡‚*{A}[n]⇂t.
36 #A #n #t
37 @(niter_appl â€Ķ (stream_tl â€Ķ))
38 qed.
39
40 lemma stream_tls_succ (A) (n) (t):
41       (⇂⇂*[n]t) = â‡‚*{A}[↑n]t.
42 #A #n #t
43 @(niter_succ â€Ķ (stream_tl â€Ķ))
44 qed.
45
46 lemma stream_tls_swap (A) (n) (t):
47       (⇂*[n]⇂t) = â‡‚*{A}[↑n]t.
48 // qed.
49
50 (* Advanced constructions ***************************************************)
51
52 lemma stream_tls_unit (A) (t):
53       â‡‚t = â‡‚*{A}[𝟏]t.
54 // qed.
55
56 lemma stream_tls_succ_lcons (A) (n) (a) (t):
57       â‡‚*[n]t = â‡‚*{A}[↑n](aâĻŪt).
58 // qed.