(** Counted sequences of transitions *)
Inductive starN : nat -> state -> trace -> state -> Prop :=
| starN_refl: forall s,
starN O s E0 s
| starN_step: forall n s t t1 s' t2 s'',
step s t1 s' -> starN n s' t2 s'' -> t = t1 ** t2 ->
starN (S n) s t s''.
Remark starN_star:
forall n s t s', starN n s t s' -> star s t s'.
Remark star_starN:
forall s t s', star s t s' -> exists n, starN n s t s'.
(** Infinitely many transitions *)
CoInductive forever : state -> traceinf -> Prop :=
| forever_intro: forall s1 t s2 T,
step s1 t s2 -> forever s2 T ->
forever s1 (t *** T).

Lemma star_forever:
forall s1 t s2, star s1 t s2 ->
forall T, forever s2 T ->
forever s1 (t *** T).