Definition is_n_stream {A: Type} (n: nat) (h: stream A): Prop :=
h n = None /\ forall n', n' < n -> h n' <> None.
Definition is_fin_stream {A: Type} (h: stream A): Prop :=
exists n, h n = None.
Definition is_inf_stream {A: Type} (h: stream A): Prop :=
forall n, h n <> None.
Definition is_at_least_n_stream {A: Type} (n: nat) (h: stream A): Prop :=
forall n', n' < n -> h n' <> None.
Definition is_at_most_n_stream {A: Type} (n: nat) (h: stream A): Prop :=
h n = None.
Definition is_empty_stream {A: Type}: stream A -> Prop :=
is_n_stream 0.

Lemma at_least_n_stream_Sn {A: Type}: forall (h: stream A) (n: nat),
is_at_least_n_stream (S n) h <->
is_at_least_n_stream n h /\ ~ is_n_stream n h.