rattac.
unfold ratSubtract in *.
rattac.
match goal with
H: (_ * (?x*_) = _ * (?x*_))%nat |- _
=> eapply (@mult_same_l (x * x)); nia
end.
Qed.

(* Specifications: *)
Lemma ratDistance_le_max : forall r1 r2 r3 v,
r1 <= r2 ->
r2 <= r3 ->
(ratDistance r2 v) <= (maxRat (ratDistance r1 v) (ratDistance r3 v)).