Skip to content

fix: implement value resolution from equality assumptions (#18)#279

Merged
arnog merged 1 commit into
mainfrom
claude/complete-task-18-NewVw
Jan 31, 2026
Merged

fix: implement value resolution from equality assumptions (#18)#279
arnog merged 1 commit into
mainfrom
claude/complete-task-18-NewVw

Conversation

@arnog
Copy link
Copy Markdown
Member

@arnog arnog commented Jan 31, 2026

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

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
@arnog arnog merged commit eb634db into main Jan 31, 2026
1 check passed
@arnog arnog deleted the claude/complete-task-18-NewVw branch January 31, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants