def apply(le, is_continuous, is_differentiable): a, b = le.of(LessEqual) from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import of_differentiable, of_continuous fz, (z, _a, _b) = of_continuous(is_continuous) _fz, (_z, __a, __b) = of_differentiable(is_differentiable, open=False) assert _fz == fz assert _z == z assert _a == a == __a assert _b == b == __b fa = fz._subs(z, a) fb = fz._subs(z, b) return Any[z:Interval(a, b)](Equal(fb - fa, (b - a) * Derivative(fz, z)))
def apply(*given): is_continuous, is_differentiable, equal = given from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import of_continuous, of_differentiable fz, (z, a, b) = of_continuous(is_continuous) _fz, (_z, _a, _b) = of_differentiable(is_differentiable) assert _fz == fz assert _z == z assert _a == a assert _b == b assert a < b fa, fb = equal.of(Equal) assert fz._subs(z, a) == fa assert fz._subs(z, b) == fb return Any[z:Interval(a, b, left_open=True, right_open=True)](Equal( Derivative(fz, z), 0))
def apply(*given): from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import of_differentiable, of_continuous is_continuous, is_differentiable = given fz, (z, a, b) = of_continuous(is_continuous) _fz, (_z, _a, _b) = of_differentiable(is_differentiable) assert _fz == fz assert _z == z assert _a == a assert _b == b assert a < b fa = fz._subs(z, a) fb = fz._subs(z, b) return Any[z:Interval(a, b, left_open=True, right_open=True)](Equal( fb - fa, (b - a) * Derivative(fz, z)))
def apply(lt, is_continuous, is_differentiable): from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import of_differentiable, of_continuous a, b = lt.of(Less) if is_continuous.function.is_Contains: is_continuous, is_differentiable = is_differentiable, is_continuous fz, (z, _a, _b) = of_continuous(is_continuous) _fz, (_z, __a, __b) = of_differentiable(is_differentiable) assert _fz == fz assert _z == z assert _a == a == __a assert _b == b == __b fa = fz._subs(z, a) fb = fz._subs(z, b) return Any[z:Interval(a, b, left_open=True, right_open=True)](Equal(fb - fa, (b - a) * Derivative(fz, z)))