Section While_TerminatesIn_coind.
Variable (T : Rel (tapes sig n) nat).
CoInductive While_T : tRel sig n :=
| While_T_intro tin k k1 :
T tin k1 ->
(forall tmid ymid,
R tin (Some ymid, tmid) -> k1 <= k) ->
(forall tmid,
R tin (None, tmid) ->
exists k2, While_T tmid k2 /\ 1 + k1 + k2 <= k) ->
While_T tin k.

Lemma While_TerminatesIn :
pM ⊨ R ->
projT1 pM ↓ T ->
WhileTM ↓ While_T.