← suite examples

sympy-simplify

suite examples · 2026-10-13 16:39:01 · CAS sympy 1.14.0, mode fork · machine pi5 · dialect sympy · case set 03f5149718d0

By category

old report format (graded with a combined score): its nulls are shown as no verdict, because an old report cannot tell a correct decline on a contingent case from no verdict

categorynsolvedwrongdeclined correctlyno verdicttimeoutunsupported
branch-cuts5400100
conventions2000200
log-exp2200000
parity5400100
primes2000200
radicals6400200
sign5300200
trig2200000
total2919001000

Setup (run once per start, not counted in the per-query times)

measured setup time: 0.451 s

setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
sympysympy.__version__→1.14.0
warm-upsimplify(sin(W)**2 + cos(W)**2)→1

Cases

casecategoryoutcomequery (as sent)answersteps (from the trace)sdetail
demo-atan2-01 truebranch-cutssolvedQ.real(x) ∧ Q.real(y) ∧ Q.positive(x) ⊢ Eq(atan2(y, x), atan((y/x)))truedifference → 0 · simplify → 00.013true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
y = Symbol('y', real=True)
Residual = atan2(y, x) - atan(y / x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceatan2(y, x) - atan(y / x)→0
simplifysimplify(Residual)→0
answertrue
demo-atan2-02 falsebranch-cutssolvedQ.real(x) ∧ Q.real(y) ∧ Q.negative(x) ∧ Q.positive(y) ⊢ Eq(atan2(y, x), atan((y/x)))falsedifference → pi · simplify → pi0.013false
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, negative=True)
y = Symbol('y', real=True, positive=True)
Residual = atan2(y, x) - atan(y / x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceatan2(y, x) - atan(y / x)→pi
simplifysimplify(Residual)→pi
answerfalse
demo-log-01 truebranch-cutssolvedQ.real(x) ∧ Q.real(y) ∧ Q.positive(x) ∧ Q.positive(y) ⊢ Eq(log((x*y)), (log(x) + log(y)))truedifference → -log(x) - log(y) + log(x*y) · simplify → 00.024true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
y = Symbol('y', real=True, positive=True)
Residual = log(x * y) - (log(x) + log(y))
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencelog(x * y) - (log(x) + log(y))→-log(x) - log(y) + log(x*y)
simplifysimplify(Residual)→0
answertrue
demo-log-02 contingentbranch-cutsno verdictQ.complex(z) ∧ Q.complex(w) ∧ (~Q.zero(z)) ∧ (~Q.zero(w)) ⊢ Eq(log((z*w)), (log(z) + log(w)))nulldifference → -log(w) - log(z) + log(w*z) · simplify → -log(w) - log(z) + log(w*z)0.027null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
z = Symbol('z', complex=True, zero=False)
w = Symbol('w', complex=True, zero=False)
Residual = log(z * w) - (log(z) + log(w))
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencelog(z * w) - (log(z) + log(w))→-log(w) - log(z) + log(w*z)
simplifysimplify(Residual)→-log(w) - log(z) + log(w*z)
answernull
demo-log-03 falsebranch-cutssolvedQ.real(x) ∧ Q.negative(x) ⊢ Eq(log(x), log((-x)))falsedifference → -log(-x) + log(x) · simplify → I*pi0.025false
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, negative=True)
Residual = log(x) - log(-x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencelog(x) - log(-x)→-log(-x) + log(x)
simplifysimplify(Residual)→I*pi
answerfalse
demo-acot-01 trueconventionsno verdictQ.real(x) ∧ Q.positive(x) ⊢ Eq(acot(x), atan((1/x)))nulldifference → acot(x) - atan(1/x) · simplify → acot(x) - atan(1/x)0.024null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
Residual = acot(x) - atan(1 / x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceacot(x) - atan(1 / x)→acot(x) - atan(1/x)
simplifysimplify(Residual)→acot(x) - atan(1/x)
answernull
demo-heaviside-01 trueconventionsno verdictQ.real(x) ∧ (~Q.zero(x)) ⊢ Eq((Heaviside(x) + Heaviside((-x))), 1)nulldifference → Heaviside(-x) + Heaviside(x) - 1 · simplify → Heaviside(-x) + Heaviside(x) - 10.021null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, zero=False)
Residual = Heaviside(x) + Heaviside(-x) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceHeaviside(x) + Heaviside(-x) - 1→Heaviside(-x) + Heaviside(x) - 1
simplifysimplify(Residual)→Heaviside(-x) + Heaviside(x) - 1
answernull
demo-eq-log-01 truelog-expsolvedQ.real(x) ∧ Q.positive(x) ⊢ Eq(log(exp(x)), x)truedifference → 0 · simplify → 00.006true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
Residual = log(exp(x)) - x
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencelog(exp(x)) - x→0
simplifysimplify(Residual)→0
answertrue
demo-eq-pow-01 truelog-expsolvedQ.integer(n) ⊢ Eq(Pow((-1), (2*n)), 1)truedifference → 0 · simplify → 00.008true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
n = Symbol('n', integer=True)
Residual = Pow(-1, 2 * n) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, 2 * n) - 1→0
simplifysimplify(Residual)→0
answertrue
demo-parity-01 trueparitysolvedQ.integer(n) ∧ Q.odd(n) ⊢ Eq(Pow((-1), (n + 1)), 1)truedifference → 0 · simplify → 00.007true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
n = Symbol('n', integer=True, odd=True)
Residual = Pow(-1, n + 1) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, n + 1) - 1→0
simplifysimplify(Residual)→0
answertrue
demo-parity-02 falseparitysolvedQ.integer(n) ∧ Q.integer(m) ∧ Q.odd(n) ∧ Q.odd(m) ⊢ Eq(Pow((-1), (n*m)), 1)falsedifference → -2 · simplify → -20.007false
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
n = Symbol('n', integer=True, odd=True)
m = Symbol('m', integer=True, odd=True)
Residual = Pow(-1, n * m) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, n * m) - 1→-2
simplifysimplify(Residual)→-2
answerfalse
demo-parity-03 trueparitysolvedQ.integer(n) ⊢ Eq(Pow((-1), (n*(n + 1))), 1)truedifference → 0 · simplify → 00.01true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
n = Symbol('n', integer=True)
Residual = Pow(-1, n * (n + 1)) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, n * (n + 1)) - 1→0
simplifysimplify(Residual)→0
answertrue
demo-parity-04 contingentparityno verdictQ.integer(n) ∧ Q.even(n) ⊢ Eq(Pow(I, n), 1)nulldifference → I**n - 1 · simplify → I**n - 10.019null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
n = Symbol('n', integer=True, even=True)
Residual = Pow(I, n) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(I, n) - 1→I**n - 1
simplifysimplify(Residual)→I**n - 1
answernull
demo-parity-05 trueparitysolvedQ.integer(n) ∧ Q.integer(m) ∧ Q.odd(n) ∧ Q.odd(m) ⊢ Eq(Pow((-1), (n*m)), (-1))truedifference → 0 · simplify → 00.007true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
n = Symbol('n', integer=True, odd=True)
m = Symbol('m', integer=True, odd=True)
Residual = Pow(-1, n * m) - (-1)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, n * m) - (-1)→0
simplifysimplify(Residual)→0
answertrue
demo-prime-01 trueprimesno verdictQ.integer(p) ∧ Q.prime(p) ∧ (p > 2) ⊢ Eq(Pow((-1), p), (-1))nulldifference → (-1)**p + 1 · simplify → (-1)**p + 10.015null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
p = Symbol('p', integer=True, prime=True)
# dropped (not a unary fact about one symbol): p > 2
Residual = Pow(-1, p) - (-1)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, p) - (-1)→(-1)**p + 1
simplifysimplify(Residual)→(-1)**p + 1
answernull
demo-prime-02 contingentprimesno verdictQ.integer(p) ∧ Q.prime(p) ⊢ Eq(Pow((-1), p), (-1))nulldifference → (-1)**p + 1 · simplify → (-1)**p + 10.015null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
p = Symbol('p', integer=True, prime=True)
Residual = Pow(-1, p) - (-1)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(-1, p) - (-1)→(-1)**p + 1
simplifysimplify(Residual)→(-1)**p + 1
answernull
demo-eq-abs-01 trueradicalssolvedQ.real(x) ∧ Q.negative(x) ⊢ Eq(Abs(x), (-x))truedifference → 0 · simplify → 00.006true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, negative=True)
Residual = Abs(x) - (-x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceAbs(x) - (-x)→0
simplifysimplify(Residual)→0
answertrue
demo-eq-abs-02 falseradicalsno verdictQ.real(x) ∧ Q.negative(x) ⊢ Eq(Abs(x), x)nulldifference → -2*x · simplify → -2*x0.012null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, negative=True)
Residual = Abs(x) - x
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceAbs(x) - x→-2*x
simplifysimplify(Residual)→-2*x
answernull
demo-eq-sqrt-01 trueradicalssolvedQ.real(x) ∧ Q.positive(x) ⊢ Eq(sqrt(Pow(x, 2)), x)truedifference → 0 · simplify → 00.007true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
Residual = sqrt(Pow(x, 2)) - x
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencesqrt(Pow(x, 2)) - x→0
simplifysimplify(Residual)→0
answertrue
demo-eq-sqrt-02 trueradicalssolvedQ.real(x) ⊢ Eq(sqrt(Pow(x, 2)), Abs(x))truedifference → 0 · simplify → 00.007true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True)
Residual = sqrt(Pow(x, 2)) - Abs(x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencesqrt(Pow(x, 2)) - Abs(x)→0
simplifysimplify(Residual)→0
answertrue
demo-eq-sqrt-03 contingentradicalsno verdictQ.real(x) ⊢ Eq(sqrt(Pow(x, 2)), x)nulldifference → -x + Abs(x) · simplify → -x + Abs(x)0.017null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True)
Residual = sqrt(Pow(x, 2)) - x
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencesqrt(Pow(x, 2)) - x→-x + Abs(x)
simplifysimplify(Residual)→-x + Abs(x)
answernull
demo-eq-sqrt-04 falseradicalssolvedQ.real(x) ∧ Q.positive(x) ⊢ Eq((sqrt(Pow(x, 2)) + 1), x)falsedifference → 1 · simplify → 10.007false
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
Residual = sqrt(Pow(x, 2)) + 1 - x
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencesqrt(Pow(x, 2)) + 1 - x→1
simplifysimplify(Residual)→1
answerfalse
demo-nonzero-01 truesignsolvedQ.complex(z) ∧ Q.imaginary(z) ⊢ Eq(Abs(sign(z)), 1)truedifference → 0 · simplify → 00.007true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
z = Symbol('z', complex=True, imaginary=True)
Residual = Abs(sign(z)) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceAbs(sign(z)) - 1→0
simplifysimplify(Residual)→0
answertrue
demo-sign-02 truesignsolvedQ.real(x) ∧ (~Q.zero(x)) ⊢ Eq(sign(Pow(x, 2)), 1)truedifference → 0 · simplify → 00.007true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, zero=False)
Residual = sign(Pow(x, 2)) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencesign(Pow(x, 2)) - 1→0
simplifysimplify(Residual)→0
answertrue
demo-sign-03 contingentsignno verdictQ.complex(x) ∧ (~Q.zero(x)) ⊢ Eq(sign(Pow(x, 2)), 1)nulldifference → sign(x**2) - 1 · simplify → x**2/Abs(x**2) - 10.024null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', complex=True, zero=False)
Residual = sign(Pow(x, 2)) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencesign(Pow(x, 2)) - 1→sign(x**2) - 1
simplifysimplify(Residual)→x**2/Abs(x**2) - 1
answernull
demo-sign-04 truesignno verdictQ.complex(z) ⊢ Eq(Abs((z*conjugate(z))), (z*conjugate(z)))nulldifference → -z*conjugate(z) + Abs(z*conjugate(z)) · simplify → -z*conjugate(z) + Abs(z*conjugate(z))0.023null
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
z = Symbol('z', complex=True)
Residual = Abs(z * conjugate(z)) - (z * conjugate(z))
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceAbs(z * conjugate(z)) - (z * conjugate(z))→-z*conjugate(z) + Abs(z*conjugate(z))
simplifysimplify(Residual)→-z*conjugate(z) + Abs(z*conjugate(z))
answernull
demo-sign-05 truesignsolvedQ.real(x) ∧ Q.real(y) ∧ Q.positive(x) ∧ Q.negative(y) ⊢ Eq(Abs((x - y)), (x - y))truedifference → 0 · simplify → 00.009true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', real=True, positive=True)
y = Symbol('y', real=True, negative=True)
Residual = Abs(x - y) - (x - y)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differenceAbs(x - y) - (x - y)→0
simplifysimplify(Residual)→0
answertrue
demo-eq-trig-01 truetrigsolvedQ.complex(x) ⊢ Eq((Pow(sin(x), 2) + Pow(cos(x), 2)), 1)truedifference → sin(x)**2 + cos(x)**2 - 1 · simplify → 00.035true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', complex=True)
Residual = Pow(sin(x), 2) + Pow(cos(x), 2) - 1
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
differencePow(sin(x), 2) + Pow(cos(x), 2) - 1→sin(x)**2 + cos(x)**2 - 1
simplifysimplify(Residual)→0
answertrue
demo-eq-trig-02 truetrigsolvedQ.complex(x) ⊢ Eq((2*sin(x)*cos(x)), sin((2*x)))truedifference → 2*sin(x)*cos(x) - sin(2*x) · simplify → 00.037true
code
setup — not timed
from sympy import *
import sympy

SympyVersion = sympy.__version__
# warm-up: a fixed generic expression, never case content
W = Symbol('W')
Warmup = simplify(sin(W)**2 + cos(W)**2)
# every query then runs in its own forked process, starting from this state:
# the expression caches are dropped (imported and lazily loaded modules stay)
sympy.core.cache.clear_cache()
x = Symbol('x', complex=True)
Residual = 2 * sin(x) * cos(x) - sin(2 * x)
Result = simplify(Residual)
# true iff the result is 0; false only if it is a definite nonzero number
Answer = True if Result == 0 else False if (Result.is_number and Result.is_finite and Result.is_zero is False) else None
print(Result, Answer, sep='\n')
difference2 * sin(x) * cos(x) - sin(2 * x)→2*sin(x)*cos(x) - sin(2*x)
simplifysimplify(Residual)→0
answertrue