proposition: Lemma stream_diagonal_nth : forall A (u:nat->stream A) n k, nth n (diagonal u k) = nth ((n+k)%nat) (u (n+k)%nat).
proof: Proof. Proof using. intros. gen k. induction n; intros. simple~. math_rewrite ((S n + k)%nat = (n + (S k))%nat). rewrite~ <- IHn. Qed.
imports: TLC(LibTactics LibLogic LibInt LibList LibRelation LibWf)