Section fractran_utils.
Implicit Type l : list (nat*nat).
Fact fractran_step_nil_inv x y : nil /F/ x → y <-> False.
Fact mul_pos_inj_l q x y : q <> 0 -> q*x = q*y -> x = y.

Lemma fractran_step_inv P x y :
P /F/ x → y
-> exists l p q r, P = l++(p,q)::r
/\ (forall u v, In (u,v) l -> ~ divides v (u*x))
/\ q*y=p*x.