(************************************************************)
(** * Resolution of [a*X^2+b*X+c=0]                         *)
(************************************************************)
Definition Delta (a:nonzeroreal) (b c:R) : R := Rsqr b - 4 * a * c.
Definition Delta_is_pos (a:nonzeroreal) (b c:R) : Prop := 0 <= Delta a b c.
Definition sol_x1 (a:nonzeroreal) (b c:R) : R :=
(- b + sqrt (Delta a b c)) / (2 * a).
Definition sol_x2 (a:nonzeroreal) (b c:R) : R :=
(- b - sqrt (Delta a b c)) / (2 * a).

Lemma Rsqr_sol_eq_0_0 :
forall (a:nonzeroreal) (b c x:R),
Delta_is_pos a b c ->
a * Rsqr x + b * x + c = 0 -> x = sol_x1 a b c \/ x = sol_x2 a b c.