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_num n d : coprime `|n| `|d| -> numq (n%:~R / d%:~R) = sgr d * n.