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 quadraticAcc_wf :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
(0 < a + b + c + d)%Z ->
(0 < e + f + g + h)%Z ->
(0 <= a)%Z ->
(0 <= b)%Z ->
(0 <= c)%Z ->
(0 <= d)%Z ->
(0 <= e)%Z ->
(0 <= f)%Z -> (0 <= g)%Z -> (0 <= h)%Z -> quadraticAcc a b c d e f g h p1 p2.