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/notation/functions/downspoonstar_3.ma".
16 include "ground/lib/stream_hdtl.ma".
17 include "ground/arith/nat_succ_iter.ma".
19 (* ITERATED TAIL FOR STREAMS ************************************************)
21 definition stream_tls (A) (n): stream A → stream A ≝
25 "iterated tail (strams)"
26 'DownSpoonStar A n f = (stream_tls A n f).
28 (* Basic constructions ******************************************************)
30 lemma stream_tls_zero (A) (t):
34 lemma stream_tls_tl (A) (n) (t):
35 (⫰⫰*[n]t) = ⫰*{A}[n]⫰t.
37 @(niter_appl … (stream_tl …))
40 lemma stream_tls_succ (A) (n) (t):
41 (⫰⫰*[n]t) = ⫰*{A}[↑n]t.
43 @(niter_succ … (stream_tl …))
46 lemma stream_tls_swap (A) (n) (t):
47 (⫰*[n]⫰t) = ⫰*{A}[↑n]t.
50 lemma stream_tls_eq_repl (A) (n):
51 stream_eq_repl A (λt1,t2. ⫰*[n] t1 ≗ ⫰*[n] t2).
52 #A #n @(nat_ind_succ … n) -n //
53 #n #IH * #n1 #t1 * #n2 #t2 #H elim (stream_eq_inv_cons … H) /2 width=7 by/