Skip to content
Symi Docs
WASM / JavaScript

Signatures in the WASM / JavaScript view are TypeScript. Where the JavaScript facade wraps an operation its form is listed first; the other calling forms are the raw wasm-bindgen exports.

Zero equivalence

zero_equivalent#

Raw WebAssembly: Default context

zeroEquivalent(
    input_expression: Expression,
    constraint?: Expression | null,
): string
Calling forms

Explicit context: Context.zeroEquivalent

zeroEquivalent(value: ExpressionLike, constraint?: ExpressionLike | null): "true" | "false" | "unknown"

Raw WebAssembly: Explicit context: Context.zeroEquivalent

zeroEquivalent(
    input_expression: Expression,
    constraint?: Expression | null,
): string

SymiFacade method: SymiFacade.zeroEquivalent

zeroEquivalent(value: ExpressionLike, constraint?: ExpressionLike | null): "true" | "false" | "unknown"

Expression method: Expression.zeroEquivalent

zeroEquivalent(constraint?: ExpressionLike | null): "true" | "false" | "unknown"

Raw WebAssembly: Expression method: Expression.zeroEquivalent

zeroEquivalent(constraint?: Expression | null): string

Proves whether an expression is zero at every point where the input expression is defined within the declared region. "true" is an exact theorem replay, "false" has an exact counterexample, and "unknown" is an honest decline. Floating-point evaluation is never proof evidence.

The optional logical constraint is combined with existing symbol assumptions without changing them. A "true" result does not mean simplify(expression) may replace the expression by the literal 0: that stricter transformation also needs the expression to be defined everywhere in the declared region.

The admitted routes are the principal-branch Gudermannian identity for a real variable on -pi/2 < x < pi/2, the Riemann zeta reflection relation, and an exact decision for closed algebraic constants. The zeta relation remains a nonzero-shaped expression under ordinary simplification because its written factors have exceptional points.

The closed-constant decision covers every constant built from rationals, the imaginary unit, exp(i*pi*r), sin, cos, tan, cot, sec and csc at rational multiples r*pi, and certified algebraic roots (polynomial_root), by sums, products, integer powers and principal rational powers, nested to any depth. Such a constant is reduced in a tower over the cyclotomic field of order N, the least common multiple of the denominators of its angles, with each principal radical and each algebraic root adjoined by its defining relation. A radicand whose value lies exactly on the negative real axis takes the principal root |w|^(1/L)*exp(i*pi/L) once its realness is proved from the certified roots of its minimal polynomial. The minimal polynomial of the reduced element over the rationals then decides it: a nonzero constant term proves the constant nonzero, and otherwise a certified enclosure with exact rational bounds either excludes zero or lies inside the root-separation bound of that polynomial, which proves the constant is zero. The presented roots of the cyclotomic polynomials, and of cubics solved by the triple-angle formula, verify this way. A transcendental argument such as cos(1), a cyclotomic order above 720, a tower of dimension above 64, or an enclosure that does not decide within 4096 bits of working precision returns "unknown".

JavaScript
const relation = context.parse("2^(1-z)*cos(pi*z/2)*gamma(z)*zeta(z) - pi^z*zeta(1-z)");
console.log(context.zeroEquivalent(relation));

Symi documentation · WASM / JavaScript