(* Regular FRACTRAN programs define a deterministic step relation *)

(* Regular FRACTRAN programs deefine a linearly bounded step relation The bound computed in the following proofs is very lazy. Indeed we choose p1+...+pn whereas ideally, one could choose max(ceil(pi/qi)) where l = [p1/q1;...;pn/qn] *)
Lemma fractran_step_bound l : fractran_regular l -> { k | forall x y, l // x → y -> y <= k*x }.
Definition fractran_stop l x := forall z, ~ l // x → z.