Variant rat_spec (* (x : rat) *) : rat -> int -> int -> Type :=
Rat_spec (n : int) (d : nat)  & coprime `|n| d.+1
: rat_spec (* x  *) (n%:Q / d.+1%:Q) n d.+1.

Lemma coprimeq_den n d :
coprime `|n| `|d| -> denq (n%:~R / d%:~R) = (if d == 0 then 1 else `|d|).