(** 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 Qlt_alt p q : (p<q) <-> (p?=q = Lt).