Пример #1
0
def prove(Eq):
    from axiom import calculus, algebra

    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    from axiom.calculus.integral.intermediate_value_theorem import is_continuous
    a = Symbol.a(real=True)
    b = Symbol.b(real=True)
    f = Function.f(shape=(), real=True)
    Eq << apply(a <= b, is_continuous(f, a, b),
                is_differentiable(f, a, b, open=False))

    Eq << algebra.cond.given.suffice.split.apply(Eq[-1], cond=b > a)

    Eq << Suffice(b <= a, Equal(a, b), plausible=True)

    Eq << algebra.suffice.given.ou.apply(Eq[-1]).reversed

    Eq <<= Eq[-2] & Eq[-1]

    Eq << Eq[-1].this.rhs.apply(algebra.et.given.et.subs.eq)

    Eq << algebra.all.imply.all.limits.restrict.apply(
        Eq[2], Interval(a, b, left_open=True, right_open=True))

    Eq << algebra.cond.imply.suffice.apply(Eq[1] & Eq[-1], cond=b > a)

    Eq << algebra.suffice.imply.suffice.et.apply(Eq[-1])

    Eq << Eq[-1].this.rhs.args[0].reversed

    Eq << Eq[-1].this.rhs.apply(calculus.lt.is_continuous.is_differentiable.
                                imply.any_eq.mean_value_theorem.Lagrange)

    Eq << Eq[-1].this.rhs.apply(algebra.any.imply.any.limits.relax,
                                domain=Interval(a, b))
Пример #2
0
def prove(Eq):
    from axiom import calculus, algebra

    a = Symbol.a(real=True)
    b = Symbol.b(real=True)
    x = Symbol.x(real=True)
    f = Function.f(real=True)
    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    Eq << apply(is_differentiable(f, a, b, open=False))

    xi = Symbol.xi(domain=Interval(a, b))
    Eq << Contains(Subs(Eq[0].function.lhs, x, xi), Eq[0].function.rhs, plausible=True)

    Eq << Eq[-1].this.lhs.simplify()

    Eq << algebra.cond.given.all.apply(Eq[-1], xi)

    Eq << Eq[-2].this.lhs.apply(calculus.subs.to.limit)

    Eq << Contains(Limit[x:xi](x - xi), Reals, plausible=True)

    Eq << Eq[-1].this.lhs.simplify()

    Eq << calculus.is_limited.is_limited.imply.eq.algebraic_limit_theorem.mul.apply(Eq[-1], Eq[-2])

    Eq << Eq[-1].this.rhs.args[1].simplify()

    Eq << Eq[-1].this.lhs.simplify().reversed

    Eq << algebra.cond.imply.all.apply(Eq[-1], xi)
Пример #3
0
def apply(is_positive, x0, x1, x=None):
    fx, (x_, d) = is_positive.of(Derivative > 0)
    assert d == 2
    domain = x_.domain
    assert x0.domain == domain == x1.domain
    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    f = lambda x: fx._subs(x_, x)
    return is_differentiable(f, x0, x1, open=False, x=x)
Пример #4
0
def apply(all_is_positive):
    (fx, (x, d)), (x_, domain) = all_is_positive.of(All[Derivative > 0])
    assert x == x_
    assert d == 2
    assert domain.left_open and domain.right_open
    a, b = domain.of(Interval)
    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    f = lambda x: fx._subs(x_, x)
    return is_differentiable(f, a, b)
Пример #5
0
def apply(contains0, contains1, all_is_positive):
    x0, _domain = contains0.of(Contains)
    x1, __domain = contains1.of(Contains)
    (fx, (x, d)), (x_, domain) = all_is_positive.of(All[Derivative > 0])
    assert x == x_
    assert d == 2
    assert domain == _domain == __domain
    assert domain.left_open and domain.right_open
    a, b = domain.of(Interval)
    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    f = lambda x: fx._subs(x_, x)
    return is_differentiable(f, x0, x1, open=False)
Пример #6
0
def prove(Eq):
    from axiom import calculus

    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    from axiom.calculus.integral.intermediate_value_theorem import is_continuous
    a = Symbol.a(real=True)
    b = Symbol.b(domain=Interval(a, oo))
    f = Function.f(shape=(), real=True)
    Eq << apply(is_continuous(f, a, b), is_differentiable(f, a, b, open=False))

    Eq << LessEqual(a, b, plausible=True)

    Eq << calculus.le.is_continuous.is_differentiable.imply.any_eq.mean_value_theorem.Lagrange.close.apply(Eq[-1], Eq[0], Eq[1])
Пример #7
0
def prove(Eq):
    from axiom import calculus, algebra, sets

    from axiom.calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle import is_differentiable
    from axiom.calculus.integral.intermediate_value_theorem import is_continuous
    a = Symbol.a(real=True, given=True)
    b = Symbol.b(real=True, given=True)
    f = Function.f(shape=(), real=True)
    Eq << apply(a < b, is_continuous(f, a, b), is_differentiable(f, a, b))

    def g(x):
        return (b - a) * f(x) - (f(b) - f(a)) * x
    g = Function.g(eval=g)
    x = Symbol.x(real=True)
    Eq.g_definition = g(x).this.defun()

    Eq << Eq.g_definition.subs(x, a)

    Eq << Eq.g_definition.subs(x, b)

    Eq << Eq[-1] - Eq[-2]

    Eq.equal = Eq[-1].this.rhs.expand()

    Eq.is_continuous = Eq[1]._subs(f, g).copy(plausible=True)

    Eq << Eq.is_continuous.this.function.lhs.expr.defun()

    Eq << Eq[-1].this.function.rhs.defun()

    Eq << Eq[-1].this.function.lhs.apply(calculus.limit.to.add)

    Eq << Eq[-1].this.function.lhs.args[0].apply(calculus.limit.to.mul)

    Eq << Eq[-1].this.find(Limit).apply(calculus.limit.to.mul)

    Eq <<= Eq[1] & Eq[-1]

    Eq <<= Eq[-1].this.function.apply(algebra.et.given.et.subs.eq)

    Eq << algebra.all_et.given.all.apply(Eq[-1])
    Eq << Eq[-1].this.function.simplify()

    Eq << Eq[-1].this.function.rhs.apply(algebra.mul.distribute)

    Eq.is_differentiable = Eq[2]._subs(f, g).copy(plausible=True)

    Eq << Eq.is_differentiable.this.function.lhs.expr.defun()

    Eq << Eq[-1].this.function.lhs.apply(calculus.derivative.to.add)

    Eq << Eq[-1].this.function.apply(sets.contains.given.contains.add, f(b) - f(a))

    Eq << sets.all.imply.all_et.apply(Eq[2], simplify=None)

    Eq << Eq[-1].this.find(Unequal).apply(sets.interval_is_nonemptyset.imply.is_positive, simplify=None)

    Eq << Eq[-1].this.function.apply(sets.is_positive.contains.imply.contains.mul)

    Eq << calculus.lt.is_continuous.is_differentiable.eq.imply.any_eq.Rolle.apply(Eq[0], Eq.is_continuous, Eq.is_differentiable, Eq.equal)

    Eq << Eq[-1].this.function.lhs.expr.defun()

    Eq << Eq[-1].this.function.lhs.apply(calculus.derivative.to.add)

    Eq << Eq[-1].this.function - f(a)