X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground%2Flib%2Fstream_tls.ma;h=b2f042c1f20faeae78cba32d601ea94e3952b311;hb=8bbe582d87984526f40182c4409cbfd43108cb79;hp=051c58cca7db7011de8029d30c38b376ebb2e4c7;hpb=68b4f2490c12139c03760b39895619e63b0f38c9;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground/lib/stream_tls.ma b/matita/matita/contribs/lambdadelta/ground/lib/stream_tls.ma index 051c58cca..b2f042c1f 100644 --- a/matita/matita/contribs/lambdadelta/ground/lib/stream_tls.ma +++ b/matita/matita/contribs/lambdadelta/ground/lib/stream_tls.ma @@ -12,30 +12,37 @@ (* *) (**************************************************************************) -include "ground/notation/functions/downspoonstar_3.ma". +include "ground/notation/functions/downharpoonrightstar_3.ma". include "ground/lib/stream_hdtl.ma". +include "ground/arith/nat_succ_iter.ma". -(* STREAMS ******************************************************************) +(* ITERATED TAIL FOR STREAMS ************************************************) -rec definition tls (A:Type[0]) (n:nat) on n: stream A → stream A ≝ ?. -cases n -n [ #t @t | #n #t @tl @(tls … n t) ] -defined. +definition stream_tls (A) (n): stream A → stream A ≝ + (stream_tl A)^n. -interpretation "iterated tail (stram)" 'DownSpoonStar A n f = (tls A n f). +interpretation + "iterated tail (strams)" + 'DownHarpoonRightStar A n f = (stream_tls A n f). -(* basic properties *********************************************************) +(* Basic constructions ******************************************************) -lemma tls_rew_O (A) (t): t = tls A 0 t. +lemma stream_tls_zero (A) (t): + t = ⇂*{A}[𝟎]t. // qed. -lemma tls_rew_S (A) (n) (t): ⫰⫰*[n]t = tls A (↑n) t. -// qed. - -lemma tls_S1 (A) (n) (t): ⫰*[n]⫰t = tls A (↑n) t. -#A #n elim n -n // +lemma stream_tls_tl (A) (n) (t): + (⇂⇂*[n]t) = ⇂*{A}[n]⇂t. +#A #n #t +@(niter_appl … (stream_tl …)) qed. -lemma tls_eq_repl (A) (n): eq_stream_repl A (λt1,t2. ⫰*[n] t1 ≗ ⫰*[n] t2). -#A #n elim n -n // -#n #IH * #n1 #t1 * #n2 #t2 #H elim (eq_stream_inv_seq … H) /2 width=7 by/ +lemma stream_tls_succ (A) (n) (t): + (⇂⇂*[n]t) = ⇂*{A}[↑n]t. +#A #n #t +@(niter_succ … (stream_tl …)) qed. + +lemma stream_tls_swap (A) (n) (t): + (⇂*[n]⇂t) = ⇂*{A}[↑n]t. +// qed.