Skip to content

A condition on a bound variable escapes its binder #1632

Closed

Description

@Rafael-SOWNet

What you ran:

"2 * sum(ln(x - w), w in { w : w^3 + w + 1 = 0 })".ToEntity().Differentiate("x");

What it did: … provided not x - w = 0, in which w is free: the name the sum binds escaped it, and EvalNumerical on the derivative throws, since that condition cannot be decided. The product rule leaves 0 * sum(...), and 0 * f keeps f.DomainCondition, which conjoins every child's condition, a binder's body included: sum(1/(k - x), k, 1, 3).DomainCondition is not k - x = 0, and integral(1/(t - x), t, 0, 1).DomainCondition is not t - x = 0. Those two are expanded before it shows.

What it should have done: No condition mentions a bound name outside its binder. A binder's domain condition leaves out what its body says about the name it binds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions