Skip to content

Enable matching and substitution for operator evaluations - #49

Open
Chessing234 wants to merge 1 commit into
teorth:masterfrom
Chessing234:fix/operator-evaluation-match
Open

Enable matching and substitution for operator evaluations#49
Chessing234 wants to merge 1 commit into
teorth:masterfrom
Chessing234:fix/operator-evaluation-match

Conversation

@Chessing234

@Chessing234 Chessing234 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • matchWithGivenSentence previously refused operator evaluation terms.
  • Recursively match operator + args (same idea as equality predicates).
  • subsSentence rebuilds matched operators via operatorTerm.

Test plan

  • In the interactive text, try a law that templates over an operator evaluation (e.g. cancellation-style exercises)
  • Confirm equality matching still works

Previously matchWithGivenSentence and subsSentence refused operator
evaluation terms, which blocked interactive laws that quantify over
operators. Mirror the equality-predicate path: compare operators and
recurse on arguments, then rebuild via operatorTerm on substitution.
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