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 spec_Qquadratic_Qpositive_to_Q_Zopp_3 :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
spec_Qquadratic_Qpositive_to_Q a b c d (- e) (- f) (- g) (- h) p1 p2 =
Qopp (spec_Qquadratic_Qpositive_to_Q a b c d e f g h p1 p2).