(** ** Generalized intermediate value theorem *)

(* Specifications: *)
Lemma IVT_gen (f : R -> R) (a b y : R) :
Ranalysis1.continuity f
-> Rmin (f a) (f b) <= y <= Rmax (f a) (f b)
-> { x : R | Rmin a b <= x <= Rmax a b /\ f x = y }.
Lemma IVT_Rbar_incr (f : R -> R) (a b la lb : Rbar) (y : R) :
is_lim f a la -> is_lim f b lb
-> (forall (x : R), Rbar_lt a x -> Rbar_lt x b -> continuity_pt f x)
-> Rbar_lt a b
-> Rbar_lt la y /\ Rbar_lt y lb
-> {x : R | Rbar_lt a x /\ Rbar_lt x b /\ f x = y}.
Lemma IVT_Rbar_decr (f : R -> R) (a b la lb : Rbar) (y : R) :
is_lim f a la -> is_lim f b lb
-> (forall (x : R), Rbar_lt a x -> Rbar_lt x b -> continuity_pt f x)
-> Rbar_lt a b
-> Rbar_lt lb y /\ Rbar_lt y la
-> {x : R | Rbar_lt a x /\ Rbar_lt x b /\ f x = y}.