You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: implement value resolution from equality assumptions (#18) (#279)
When ce.assume(['Equal', symbol, value]) is called, the symbol now
correctly evaluates to the assumed value. Previously, the symbol would
remain unevaluated even after the assumption was made.
Changes:
- Fixed assumeEquality to set the symbol value when it already has a
definition (which happens when accessed via .unknowns)
- Updated BoxedSymbol.N() to check the evaluation context value for
non-constant symbols, enabling correct comparison evaluation
Examples that now work:
- ce.box('one').evaluate().json → 1 (was: "one")
- ce.box(['Equal', 'one', 1]).evaluate() → True (was: unchanged)
- ce.box(['Equal', 'one', 0]).evaluate() → False
https://claude.ai/code/session_01Xx26gPU9ThyiypRqdLcmZQ
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments