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_first_goto_1 T l r T' n X Y c Z : T + maybe_goto_1_time <= T' ->
maybe_reachable T ([§1] ++ r, §0^c ++ l, basic_state (if c mod (n+1) is 0 then X else Y)) Z ->
maybe_reachable T' (l, §0^c ++ [§1] ++ r, goto n X Y) Z.