Repository navigation
A limit at the jump of a step function is not answered by substitution - #2268
Merged
Merged
Conversation
floor, ceil and sgn each decline a limit whose argument arrives on one of their jumps, since the value differs on the two sides. But where the node declined, the dispatcher answered the whole expression by substitution, which evaluates through the jump. floor(x) - 1 from the left of 0 is floor(-1/t) - 1 at t = +oo there, and -1/oo evaluates to 0, so the limit came back -1 where it is -2, and the two-sided limit, which does not exist, came back -1 too. SolveBySubstitution now declines when a floor, ceil or round, or a sgn, has an argument that lands on one of its jumps at the destination: an integer, a half-integer, and 0. LimitAtAJumpTest takes seven one-sided limits at a jump, which must be the limit or nothing, four two-sided ones, which must have no value, and four away from a jump, which keep their values. Nine fail on master. A limit on a branch cut answered by substitution, limitright(ln(x^x), x, -1), is left for #2266. Found by work/limitcheck. Part of #2266. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2268 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 310 310
Lines 67830 67846 +16
Branches 19685 19692 +7
=======================================
+ Hits 58820 58836 +16
+ Misses 4893 4892 -1
- Partials 4117 4118 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 31, 2026
…-the-limits Both this branch and #2268 add a header rule after ModulusPhaseTest's; each keeps its own. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 31, 2026
…2283) A limit of floor, ceil or sgn whose argument arrives on a jump was left unevaluated: limitleft(floor(x), x, 0) and limitright(sgn(x), x, 0) among them. The remark gave the reason that which side the argument arrives from is not the side x comes from, floor(2 - x^2) coming to 2 from below as x comes to 0 from the right. That side is the sign the argument less the jump keeps there, which SignNear reads off the limit or off the first derivative that does not vanish. floor gives the jump from above and one less from below, ceil one more from above and the jump from below, and sgn the side itself. A two-sided limit asks each side, and where they differ, as at a jump, it is NaN. StepFunctionAtAJumpTest takes sixteen limits; fifteen fail on master. FloorCeilTest and SignumLimitTest pinned the declines, and now pin the values: NaN for the two-sided limits, which do not exist, and the sign of the side for the one-sided ones, each still bounded in time, which is what they are for. The suite, the trio, F#, AOT and the eight harnesses pass. With #2268, which declines the substitution through a jump, the composed expressions are answered too: limitleft(floor(x) - 1, x, 0) is -2 and limit(floor(x) + x, x, 1) is NaN. Part of #2266. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Rafael-SOWNet
added a commit
that referenced
this pull request
Oct 31, 2026
limitright(ln(x^x), x, -1) was ln(-1), which is i pi, where it is -i pi: x^x comes to -1 from below as x comes down to -1, and the principal logarithm is continuous on its cut from above only. The value on the cut is the limit along the real line and from above, so it was given as the limit from either side. ArrivesOnTheCutOffTheRealLine asks whether a logarithm's argument, or the base of a power to an exponent that is not whole, tends to a negative real and is not known to be real on the approach; a power's base and a logarithm's argument count as positive where their values at the destination are. Which side such an argument comes from is not decided, so a limit there is declined: by substitution, by the logarithm's and the power's descent, by SolveAsLogarithm, by the quotient of logarithms, and by Gruntz, whose series took the principal logarithm of a negative coefficient. A limit from above, whose answer was right, is declined too. LimitOnABranchCutTest takes eight limits from below the cut, three two-sided ones that do not exist, and nine along the real line, which are answered as before; eleven fail on master. The suite, the trio, F#, AOT and the eight harnesses pass. Composed with #2268, #2275 and #2276, work/limitcheck finds none of the 56 limits it found answered with another value on master, of 600 expressions. Part of #2266. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
floor,ceilandsgneach decline a limit whose argument arrives on one of their jumps. But where a node declined, the dispatcher answered the whole expression by substitution, which evaluates straight through the jump.floor(x) - 1from the left of 0 becomesfloor(-1/t) - 1att = +oo, and-1/ooevaluates to 0.SolveBySubstitutionnow declines when afloor,ceil,roundorsgnhas an argument that lands on one of its jumps at the destination.limitleft(floor(x) - 1, x, 0)-1-2limit(floor(x) + x, x, 1)2limitleft(-sgn(x), x, 0)01LimitAtAJumpTest: nine cases fail on master. Six pass on both, four of them away from a jump, where the values are unchanged. A limit on a branch cut answered by substitution,limitright(ln(x^x), x, -1), is still open on #2266. Suite 18236 passed. The F# wrapper suite, the Mcp, Terminal and InteractiveWrapper suites and the AOT smoke test pass. BoundCheck, RootCheck, CasBench, PropCheck, SimpSweep, RuleCheck, CanonCheck and Confluence are unchanged. Found by a new workspace harness,work/limitcheck.Part of #2266.
🤖 Generated with Claude Code