Section Transport.
(* Assume that P reaches a halting configuration from (0, 1) after NP steps, show that M is uniformly bounded. *)
Variable NP : nat. (* number of steps  *)
Variable NP_spec : CM.halting P (Nat.iter NP (CM.step P) cm_start).
Definition cm_end := Nat.iter NP (CM.step P) cm_start. (* final configuration *)
Definition CP : nat := CM.value cm_end. (* final counter value *)
Definition maybe_goto_1_time := (goto_time CP TP + NP * step_time CP TP + 2).

Lemma maybe_goto_1 l r n X Y m :
maybe_reachable maybe_goto_1_time
(l, §0^m ++ [§1] ++ r, goto n X Y)
([§1] ++ r, §0^m ++ l, basic_state (if m mod (n+1) is 0 then X else Y)).