Lemma
spec_Qquadratic_Qpositive_to_Q_spec_Qquadratic_Qpositive_to_Qpositive2_pos :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qsgn (spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2) = 1%Z ->
spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2 =
Qpos (spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h p1 p2).
(** We use this when (Z.sgn a+b+c+d)<0 *)
Lemma
spec_Qquadratic_Qpositive_to_Q_spec_Qquadratic_Qpositive_to_Qpositive2_neg_1
:
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qsgn (spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2) = (-1)%Z ->
spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2 =
Qneg
(spec_Qquadratic_Qpositive_to_Qpositive2 (- a) (- b)
(- c) (- d) e f g h p1 p2).
(** We use this when 0<=(Z.sgn a+b+c+d) *)
Lemma
spec_Qquadratic_Qpositive_to_Q_spec_Qquadratic_Qpositive_to_Qpositive2_neg_2
:
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qsgn (spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2) = (-1)%Z ->
spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2 =
Qneg
(spec_Qquadratic_Qpositive_to_Qpositive2 a b c d
(- e) (- f) (- g) (- h) p1 p2).

Lemma Qquadratic_sg_denom_nonzero_correct_2 :
forall (e f g h : Z) (p1 p2 : Qpositive),
Qplus
(Qplus (Qplus (Qmult (Qmult e (Qpos p1)) (Qpos p2)) (Qmult f (Qpos p1)))
(Qmult g (Qpos p2))) h <> Zero ->
Qquadratic_sg_denom_nonzero e f g h p1 p2.