]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/lib/stream_tls.ma
051c58cca7db7011de8029d30c38b376ebb2e4c7
[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/downspoonstar_3.ma".
16 include "ground/lib/stream_hdtl.ma".
17
18 (* STREAMS ******************************************************************)
19
20 rec definition tls (A:Type[0]) (n:nat) on n: stream A → stream A ≝ ?.
21 cases n -n [ #t @t | #n #t @tl @(tls … n t) ]
22 defined.
23
24 interpretation "iterated tail (stram)" 'DownSpoonStar A n f = (tls A n f).
25
26 (* basic properties *********************************************************)
27
28 lemma tls_rew_O (A) (t): t = tls A 0 t.
29 // qed.
30
31 lemma tls_rew_S (A) (n) (t): ⫰⫰*[n]t = tls A (↑n) t.
32 // qed.
33
34 lemma tls_S1 (A) (n) (t): ⫰*[n]⫰t = tls A (↑n) t.
35 #A #n elim n -n //
36 qed.
37
38 lemma tls_eq_repl (A) (n): eq_stream_repl A (λt1,t2. ⫰*[n] t1 ≗ ⫰*[n] t2).
39 #A #n elim n -n //
40 #n #IH * #n1 #t1 * #n2 #t2 #H elim (eq_stream_inv_seq … H) /2 width=7 by/
41 qed.