Repository navigation
Milestone
Description
DomainCondition is where an expression has a value, and Simplify relies on it: a rewrite that hides a singularity adds a provided from it. A new workspace harness, work/domaincheck, compares the condition at exact points with the value there. Each function is checked alone, and then in random compositions. Five nodes disagree. Each one lets Simplify give a value where there is none, or none where there is one. 2.6.0 and master are the same:
- The factorial and the gamma function require a real argument:
"x!".ToEntity().DomainConditionisx in RR and (x >= 0 or not x in ZZ).i!is0.498 - 0.155i, and the only poles are the negative integers."x!/x!".ToEntity().Simplify()is1 provided x in RR and (x >= 0 or not x in ZZ), which has no value ati. -
maxandminhold everywhere, but they have no value at a complex argument.max(i, i)isNaN, as the node is read over the reals."max(x, x)".ToEntity().Simplify()isx, which has a value ati. -
arctanandarccothold at their poles:arctan(i)is+oo i."arctan(x) - arctan(x)".ToEntity().Simplify()is0there. The tangent's condition excludes its poles, and the logarithm's excludes 0, where it is-oo. -
lambertwhas the same condition over the reals as over the complex numbers."lambertw(0, x)".ToEntity().DomainConditionIn(Domain.Real)isTrue, butW_0is real only forx >= -1/e, andW_(-1)only on[-1/e, 0). -
DomainConditionInof apiecewiseasks every case to be defined.DomainConditionasks only the case that applies (A piecewise's domain condition asks every case's predicate to be defined #1817).tan(piecewise(pi / x provided x > 0, x / 2))is0at0, but its condition over the reals,piecewise((not cos(pi / x) = 0 and not x = 0 and x in RR) provided (x > 0), (not cos(x / 2) = 0 and not x = 0 and x in RR) provided True), fails there.
Two disagreements are evaluation's, not the conditions': #2253 (Im(1/0) is 0) and #2255 (log(0, 2) is 0). The power's condition is left permissive for a symbolic exponent on purpose, which Powf explains, so x^x at -1/2 over the reals is not listed.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Rafael-SOWNet commentedon Oct 30, 2026
The factorial is #2260 and
max/minis #2261.arctanandarccotare measured and held. The conditionnot 1 + x^2 = 0(ornot x^2 = -1) is right, and thearctan(x) - arctan(x)case passes with it. But ten integration tests change. An integrator that buildsp ln(...) + q arctan(...)and findsq = 0leaves0 * arctan(...), and the zero product keepsarctan's condition. Sointegral(x/(x^2 + 1), x)comes out as(1/2 ln(x^2 + 1) provided not 1 + (2 x / 2)^2 = 0) + C, which is redundant, sinceln(x^2 + 1)excludes the same two points. Five answers in the trigonometric-substitution tests gain aprovided, and one passes its size bound. 48 places build anarctan.The fix that costs nothing is #1019's engine, which carries conditions beside a candidate and drops whatever the input's own domain already implies. Patching the integrators one by one is the wrong layer. I'll leave this box unchecked until then.
🤖 Generated with Claude Code
A piecewise's condition under a reading asks only the case it takes
The factorial and the gamma function are defined off the real line (#…
max and min are defined where their arguments are real (#2261)
A piecewise's condition under a reading asks only the case it takes (#…
LambertW over the reals is defined where its branch is real (#2263)
arctan and arccot are undefined at their poles (ASC-Community#2304)