Proof spec_Qquadratic_Qpositive_to_Q_dL_dL.

(* Specifications: *)
Lemma spec_Qquadratic_Qpositive_to_Qpositive2_nR_nR :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h (nR p1) (nR p2) =
spec_Qquadratic_Qpositive_to_Qpositive2 a (a + b)
(a + c) (a + b + c + d) e (e + f) (e + g) (e + f + g + h) p1 p2.
Lemma spec_Qquadratic_Qpositive_to_Qpositive2_nR_dL :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qplus
(Qplus
(Qplus (Qmult (Qmult (Qplus a b) (Qpos p1)) (Qpos p2))
(Qmult b (Qpos p1)))
(Qmult (Qplus (Qplus (Qplus a b) c) d) (Qpos p2)))
(Qplus b d) <> Zero ->
Qplus
(Qplus
(Qplus (Qmult (Qmult (Qplus e f) (Qpos p1)) (Qpos p2))
(Qmult f (Qpos p1)))
(Qmult (Qplus (Qplus (Qplus e f) g) h) (Qpos p2)))
(Qplus f h) <> Zero ->
spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h (nR p1) (dL p2) =
spec_Qquadratic_Qpositive_to_Qpositive2 (a + b) b
(a + b + c + d) (b + d) (e + f) f (e + f + g + h)
(f + h) p1 p2.
Lemma spec_Qquadratic_Qpositive_to_Qpositive2_dL_nR :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qplus
(Qplus
(Qplus (Qmult (Qmult (Qplus a c) (Qpos p1)) (Qpos p2))
(Qmult (Qplus (Qplus (Qplus a b) c) d) (Qpos p1)))
(Qmult c (Qpos p2))) (Qplus c d) <> Zero ->
Qplus
(Qplus
(Qplus (Qmult (Qmult (Qplus e g) (Qpos p1)) (Qpos p2))
(Qmult (Qplus (Qplus (Qplus e f) g) h) (Qpos p1)))
(Qmult g (Qpos p2))) (Qplus g h) <> Zero ->
spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h (dL p1) (nR p2) =
spec_Qquadratic_Qpositive_to_Qpositive2 (a + c) (a + b + c + d) c
(c + d) (e + g) (e + f + g + h) g (g + h) p1 p2.
Lemma spec_Qquadratic_Qpositive_to_Qpositive2_dL_dL :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qplus
(Qplus
(Qplus
(Qmult (Qmult (Qplus (Qplus (Qplus a b) c) d) (Qpos p1)) (Qpos p2))
(Qmult (Qplus b d) (Qpos p1))) (Qmult (Qplus c d) (Qpos p2))) d <>
Zero ->
Qplus
(Qplus
(Qplus
(Qmult (Qmult (Qplus (Qplus (Qplus e f) g) h) (Qpos p1)) (Qpos p2))
(Qmult (Qplus f h) (Qpos p1))) (Qmult (Qplus g h) (Qpos p2))) h <>
Zero ->
spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h (dL p1) (dL p2) =
spec_Qquadratic_Qpositive_to_Qpositive2 (a + b + c + d)
(b + d) (c + d) d (e + f + g + h) (f + h) (g + h) h p1 p2.
Lemma spec_Qquadratic_Qpositive_to_Qpositive2_nR_emission :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult a (Qpos p1)) (Qpos p2)) (Qmult b (Qpos p1)))
(Qmult c (Qpos p2))) d) ->
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult e (Qpos p1)) (Qpos p2)) (Qmult f (Qpos p1)))
(Qmult g (Qpos p2))) h) ->
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult (a - e)%Z (Qpos p1)) (Qpos p2))
(Qmult (b - f)%Z (Qpos p1))) (Qmult (c - g)%Z (Qpos p2)))
(d - h)%Z) ->
nR
(spec_Qquadratic_Qpositive_to_Qpositive2 (a - e)
(b - f) (c - g) (d - h) e f g h p1 p2) =
spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h p1 p2.
Lemma spec_Qquadratic_Qpositive_to_Qpositive2_dL_emission :
forall (a b c d e f g h : Z) (p1 p2 : Qpositive),
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult a (Qpos p1)) (Qpos p2)) (Qmult b (Qpos p1)))
(Qmult c (Qpos p2))) d) ->
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult e (Qpos p1)) (Qpos p2)) (Qmult f (Qpos p1)))
(Qmult g (Qpos p2))) h) ->
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult (e - a)%Z (Qpos p1)) (Qpos p2))
(Qmult (f - b)%Z (Qpos p1))) (Qmult (g - c)%Z (Qpos p2)))
(h - d)%Z) ->
dL
(spec_Qquadratic_Qpositive_to_Qpositive2 a b c d
(e - a) (f - b) (g - c) (h - d) p1 p2) =
spec_Qquadratic_Qpositive_to_Qpositive2 a b c d e f g h p1 p2.
Lemma outside_square_correct_1 :
forall (a b c d : Z) (p1 p2 : Qpositive),
(2 < outside_square a b c d)%Z ->
~ (b = 0%Z /\ c = 0%Z /\ d = 0%Z) ->
Qlt Zero
(Qplus
(Qplus
(Qplus (Qmult (Qmult a (Qpos p1)) (Qpos p2)) (Qmult b (Qpos p1)))
(Qmult c (Qpos p2))) d).
Lemma outside_square_correct_2 :
forall (a b c d : Z) (p1 p2 : Qpositive),
(outside_square a b c d < -2)%Z ->
~ (b = 0%Z /\ c = 0%Z /\ d = 0%Z) ->
Qlt
(Qplus
(Qplus
(Qplus (Qmult (Qmult a (Qpos p1)) (Qpos p2)) (Qmult b (Qpos p1)))
(Qmult c (Qpos p2))) d) Zero.