Definition Qpositive2 := (Qpositive * Qpositive)%type.
Definition bin2_lt (x y : Qpositive2) :=
let (p1, p2) := x in let (p1', p2) := y in bin_lt p1 p1'.
Definition bin2_eq (x y : Qpositive2) :=
let (p1, p2) := x in let (p1', p2) := y in p1 = p1'.

Lemma bin2_lt_is_well_def_rht : is_well_def_rht Qpositive2 bin2_lt bin2_eq.
Definition Qpositive2_as_well_ordering :=
Build_well_ordering Qpositive2 bin2_lt bin2_eq bin2_lt_is_order
bin2_eq_is_equality bin2_lt_is_wf bin2_lt_is_well_def_rht.