CoFixpoint map (s:Stream A) : Stream B := Cons (f (hd s)) (map (tl s)).

(* Specifications: *)
Lemma Str_nth_tl_map : forall n s, Str_nth_tl n (map s)= map (Str_nth_tl n s).
Lemma Str_nth_map : forall n s, Str_nth n (map s)= f (Str_nth n s).
Lemma ForAll_map : forall (P:Stream B -> Prop) (S:Stream A), ForAll (fun s => P (map s)) S <-> ForAll P (map S).
Lemma Exists_map : forall (P:Stream B -> Prop) (S:Stream A), Exists (fun s => P (map s)) S -> Exists P (map S).