Module Labeled.
Reserved Notation "s --> t" (at level 80, no associativity).
Reserved Notation "s ! b --> t" (at level 80, b at next level, no associativity).
Reserved Notation "s ? b --> t" (at level 80, b at next level, no associativity).
Variant label := tau | bit (b : bool).
Inductive step : label -> relation com :=
| step_loop_stop c :
loop c ! true --> skip
| step_loop_go c :
loop c ! false --> (c ;; loop c)
| step_choose_l c1 c2 :
choose c1 c2 ! true --> c1
| step_choose_r c1 c2 :
choose c1 c2 ! false --> c2
| step_seq_go b c1 c1' c2 :
c1 ? b --> c2 ->
(c1 ;; c2) ? b --> (c1' ;; c2)
| step_seq_next c2 :
(skip ;; c2) --> c2
where "x --> y" := (step tau x y)
and  "x ! b --> y" := (step (bit b) x y)
and  "x ? b --> y" := (step b x y).
CoInductive infinite_steps (c : com) : Type :=
| more b c' : step b c c' -> infinite_steps c' -> infinite_steps c.

Lemma infinite_simple_loop : infinite_steps one_loop.