import proveit
from proveit import a, b, c, r, theta
from proveit.logic import InSet
from proveit.numbers import zero, one, two, e, pi, i
from proveit.numbers import Real, RealPos, RealNeg, RealNonNeg, RealNonPos
from proveit.numbers import IntervalCC, IntervalOC, IntervalCO, IntervalOO
from proveit.numbers import frac, Less, LessEq, Abs, Neg, Add, subtract, Mult, Div, Exp
from proveit.trigonometry import Sin, Cos
%begin demonstrations
Abs(subtract(Exp(e, Mult(i, zero)), Exp(e, Mult(i, Mult(two, pi, theta))))).shallow_simplification(
assumptions=[InSet(r, RealPos), InSet(theta, Real)])
Abs(subtract(one, Exp(e, Mult(two, pi, i, theta)))).chord_length_simplification(
assumptions=[InSet(r, RealPos), InSet(theta, Real)])
Abs(subtract(one, Exp(e, Mult(two, pi, i, theta)))).chord_length_simplification(
assumptions=[InSet(r, RealPos), InSet(theta, Real)], auto_simplify=False)
Sin(theta).deduce_in_interval(assumptions=[InSet(theta, Real)])
Sin(theta).deduce_in_interval(assumptions=[InSet(theta, IntervalCC(zero, pi))])
Sin(theta).deduce_in_interval(assumptions=[InSet(theta, IntervalOO(zero, pi))])
Sin(theta).deduce_in_interval(assumptions=[InSet(theta, IntervalCC(Neg(pi), zero))])
Sin(theta).deduce_in_interval(assumptions=[InSet(theta, IntervalOO(Neg(pi), zero))])
Sin(Abs(theta)).deduce_linear_bound(assumptions=[InSet(theta, Real), LessEq(Abs(theta), Div(pi, two))])
Sin(theta).deduce_linear_bound(assumptions=[InSet(theta, RealPos), LessEq(theta, Div(pi, two))])
Sin(theta).deduce_linear_bound(assumptions=[InSet(theta, RealNonNeg), LessEq(theta, Div(pi, two))])
Sin(theta).deduce_linear_bound(assumptions=[InSet(theta, RealNeg), Less(Neg(theta), Div(pi, two))])
Sin(theta).deduce_linear_lower_bound(assumptions=[InSet(theta, RealNeg), Less(Neg(theta), Div(pi, two))])
from proveit.numbers import frac
Sin(Abs(theta)).deduce_linear_lower_bound(assumptions=[InSet(theta, Real), InSet(Abs(theta), IntervalCC(zero, frac(pi, two)))],
preserve_expr=Sin(Abs(theta)))
Sin(theta).deduce_linear_lower_bound(assumptions=[InSet(theta, RealPos), Less(theta, frac(pi, two))])
Sin(theta).deduce_linear_lower_bound(assumptions=[InSet(theta, RealNonNeg), LessEq(theta, frac(pi, two))])
Sin(theta).deduce_linear_lower_bound(assumptions=[InSet(theta, RealNeg)])
Sin(theta).deduce_linear_lower_bound(assumptions=[InSet(theta, RealNonPos)])
Sin(theta).deduce_linear_upper_bound(assumptions=[InSet(theta, RealNeg), Less(Neg(theta), Div(pi, two))])
Sin(Abs(theta)).deduce_linear_upper_bound(assumptions=[InSet(theta, RealNeg)],
preserve_expr=Sin(Abs(theta)))
Sin(theta).deduce_linear_upper_bound(assumptions=[InSet(theta, RealPos)])
Sin(theta).deduce_linear_upper_bound(assumptions=[InSet(theta, RealNonNeg)])
Sin(theta).deduce_linear_upper_bound(assumptions=[InSet(theta, IntervalOO(Neg(frac(pi, two)), zero))])
Sin(theta).deduce_linear_upper_bound(assumptions=[InSet(theta, IntervalCC(Neg(frac(pi, two)), zero))])
Using the circle choord length formula
Abs(subtract(Mult(r, Exp(e, Mult(i, a))),
Mult(r, Exp(e, Mult(i, b))))).simplification(
assumptions=[InSet(r, RealPos), InSet(a, Real), InSet(b, Real)])
Abs(subtract(Mult(r, Exp(e, Mult(i, a)), c),
Mult(r, c, Exp(e, Mult(i, b))))).simplification(
assumptions=[InSet(r, RealPos), InSet(c, RealPos), InSet(a, Real), InSet(b, Real)])
Abs(subtract(Exp(e, Mult(i, theta)), one)).chord_length_simplification(assumptions=[InSet(theta, Real)])
Abs(subtract(r, Mult(r, Exp(e, Mult(i, theta))))).chord_length_simplification(
assumptions=[InSet(r, RealPos), InSet(theta, Real)])
Abs(subtract(one, Exp(e, Mult(two, pi, i, theta)))).chord_length_simplification(
assumptions=[InSet(r, RealPos), InSet(theta, Real)])
Abs(Add(Neg(Exp(e, Mult(two, pi, i, theta))), one)).chord_length_simplification(
assumptions=[InSet(r, RealPos), InSet(theta, Real)])
%end demonstrations