(** Another approach : using Qcompare for defining order relations. *)

Definition Qcompare (p q : Q) := (Qnum p * QDen q ?= Qnum q * QDen p)%Z.Notation "p ?= q" := (Qcompare p q) : Q_scope.

Lemma Qle_alt p q : (p<=q) <-> (p?=q <> Gt).