(** The divisibility results are no so complicated when we do not need to show that encode_state is injective ... *)
Local Fact divides_from_eq x y t : x*y = t -> divides x t.
Local Fact prime_div_mult4 p w x y z : prime p -> divides p (w*x*y*z) -> divides p w \/ divides p x \/ divides p y \/ divides p z.
Local Hint Resolve encode_mm_instr_regular'.

Theorem mm_fractran n (P : list (mm_instr (S n))) :
{ l | forall x, (1,P) /MM/ (1,x##vec_zero) ↓ <-> l /F/ ps 1 * qs 1^x ↓ }.