import proveit
from proveit import defaults
from proveit import a, b, c, d, x
from proveit.logic import InSet
from proveit.numbers import zero, one, Neg, Mult, Add, subtract
from proveit.numbers.number_sets import (
Natural, NaturalPos,
Integer, IntegerNonZero, IntegerNeg, IntegerNonPos,
Rational, RationalNonZero, RationalPos, RationalNeg,
RationalNonNeg, RationalNonPos,
Real, RealNonZero, RealPos, RealNeg, RealNonNeg, RealNonPos,
Complex, ComplexNonZero)
%begin demonstrations
defaults.assumptions = [InSet(a, Complex), InSet(b, Complex),
InSet(c, Complex), InSet(d, Complex)]
Neg(zero).evaluation()
Neg(Neg(one)).evaluation()
Neg(Neg(c)).simplification()
Neg(a).factorization(a, auto_simplify=False)
Neg(Mult(a, b, c, d)).factorization(b, auto_simplify=False)
Neg(Add(a, b, c)).distribution()
Neg(Add(Neg(a), b, Neg(c))).distribution()
Neg(Add(Neg(a), c)).distribution()
Neg(subtract(d, c)).distribution()
InSet(Neg(x), Natural).prove(assumptions=[InSet(x, IntegerNonPos)])
InSet(Neg(x), NaturalPos).prove(assumptions=[InSet(x, IntegerNeg)])
InSet(Neg(x), Integer).prove(assumptions=[InSet(x, Integer)])
InSet(Neg(x), IntegerNonZero).prove(assumptions=[InSet(x, IntegerNonZero)])
InSet(Neg(x), IntegerNeg).prove(assumptions=[InSet(x, NaturalPos)])
InSet(Neg(x), IntegerNonPos).prove(assumptions=[InSet(x, Natural)])
InSet(Neg(x), Rational).prove(assumptions=[InSet(x, Rational)])
InSet(Neg(x), RationalNonZero).prove(assumptions=[InSet(x, RationalNonZero)])
InSet(Neg(x), RationalPos).prove(assumptions=[InSet(x, RationalNeg)])
InSet(Neg(x), RationalNeg).prove(assumptions=[InSet(x, RationalPos)])
InSet(Neg(x), RationalNonNeg).prove(assumptions=[InSet(x, RationalNonPos)])
InSet(Neg(x), RationalNonPos).prove(assumptions=[InSet(x, RationalNonNeg)])
InSet(Neg(x), Real).prove(assumptions=[InSet(x, Real)])
InSet(Neg(x), RealNonZero).prove(assumptions=[InSet(x, RealNonZero)])
InSet(Neg(x), RealPos).prove(assumptions=[InSet(x, RealNeg)])
InSet(Neg(x), RealNeg).prove(assumptions=[InSet(x, RealPos)])
InSet(Neg(x), RealNonNeg).prove(assumptions=[InSet(x, RealNonPos)])
InSet(Neg(x), RealNonPos).prove(assumptions=[InSet(x, RealNonNeg)])
import sys
from proveit import a, b, c, d, x, y
from proveit.numbers import greater, greater_eq, Less, LessEq
defaults.assumptions = [InSet(a, Real), InSet(b, Real), InSet(c, Real), InSet(d, Real),
greater(a, b), LessEq(c, d)]
Neg(a).bound_via_operand_bound(greater(a, b))
Neg(c).bound_via_operand_bound(LessEq(c, d))
%end demonstrations