Skip to content

A limit binds the variable it approaches along (#989) - #1091

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
fix/limit-binds-its-variable
Aug 27, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
fix/limit-binds-its-variable

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Closes the last part of #989.

FreeVariables learned about a summation, a product and a definite integral in #1045, and about
limit not at all. That PR's message enumerates the indefinite integral and the derivative as
deliberate exclusions and does not mention a limit — so this was an omission, not a decision.

before now
"limit(t * b, t, 0)".FreeVariables { t, b } { b }
"limit(t, t, b)".FreeVariables { t, b } { b }
"limitleft(t * b, t, 0)".FreeVariables { t, b } { b }
"limit(t, t, 0)".FreeVariables { t } { }

Measured on a build of each side.

Why a limit binds where those two do not

The reason #1045 gives for excluding them is exactly what separates them from this. An
antiderivative of t * b over t is b * t ^ 2 / 2 + C, and d/dt denotes a function of t —
both are still functions of the variable.

A limit never is. lim(t, t, 0) is 0. No limit's value depends on the name it approaches
along, so the variable is consumed exactly as a summation index is — and unlike the integral,
which binds only when it has limits to bind between, this is unconditional. The comment
records that distinction rather than leaving the reader to infer it.

The destination is where a limit's dependence goes, so it is bound over too: lim(t, t, b) is a
function of b alone. A one-sided limit binds the same way — the side is not a variable.

Limitf is a CalculusOperator(Expression, Var), the same shape as Integralf, so this is one
arm next to it.

Vars and VarsAndConsts are untouched, as in #1045 — they mean every name occurring.

Full suite: 8740 passed, 0 failed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bjumi5K7fg8yx6UK1mZTQd

`FreeVariables` learned about a summation, a product and a definite integral in #1045,
and about `limit` not at all. That commit enumerates the indefinite integral and the
derivative as deliberate exclusions and does not mention a limit, so this was an omission
rather than a decision.

And the reason those two are excluded is what makes this one bind. An antiderivative of
`t * b` over `t` is `b * t ^ 2 / 2 + C` and `d/dt` denotes a function of `t` -- both are
still functions of the variable. **A limit never is.** `lim(t, t, 0)` is 0, and no limit's
value depends on the name it approaches along, so the variable is consumed exactly as a
summation index is. The destination is where the dependence goes and is bound over as
well, so `lim(t, t, b)` is a function of `b` alone.

`Limitf` is a `CalculusOperator(Expression, Var)`, the same shape as `Integralf`, so this
is one arm next to it -- unconditional where the integral's is conditional, which is the
distinction the comment now records.

Measured on a build of each side: `limit(t * b, t, 0).FreeVariables` was `{ t, b }` and is
`{ b }`. `Vars` and `VarsAndConsts` untouched.
@Rafael-SOWNet
Rafael-SOWNet merged commit 2a49e7c into master Aug 27, 2026
31 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the fix/limit-binds-its-variable branch August 27, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant