(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
Local Open Scope R_scope.

(* The Mean Value Theorem *)
Theorem MVT :
forall (f g:R -> R) (a b:R) (pr1:forall c:R, a < c < b -> derivable_pt f c)
(pr2:forall c:R, a < c < b -> derivable_pt g c),
a < b ->
(forall c:R, a <= c <= b -> continuity_pt f c) ->
(forall c:R, a <= c <= b -> continuity_pt g c) ->
exists c : R,
(exists P : a < c < b,
(g b - g a) * derive_pt f c (pr1 c P) =
(f b - f a) * derive_pt g c (pr2 c P)).