Repository navigation
Conversation
x = y = z parses as And(Eq(x, y), Eq(y, z)) in parse_expression and parse_latex; an empty side is an error. Adds tests/test_relations.py, which also covers the relational operators from the previous commit. From compareExpressions#278. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the parsing half of compareExpressions#276 (inequalities and
!=) and #278 (chained equalities) toexpression_parsing. There is one commit for each. The grading, feedback tags and preview stay in compareExpressions.expression_parsing (#276)
parse_expressionreads<,<=,>,>=and!=as the unevaluated SymPy relations.1 < x <= 5) giveAndof both.≠,≤and≥are normalised to!=,<=and>=.x != 5was read asEq(factorial(x), 5), andx <= 5failed to parse.split_relations(expr, error)(exported, along withRELATIONAL_OPERATORS) splits out the operands and checks the rules. It rejects a chain that points both ways, more than two inequalities,=/!=combined with another relation, and an empty operand.expression_parsing (#278)
x = y = zgivesAnd(Eq(x, y), Eq(y, z))from bothparse_expressionandparse_latex. Before, more than one=raised an error.=still gives a bareEquality.x = = y) is an error, and so is a chain that mixes=with another relation (x = y < z).a=b=cexpected change is updated to record the chain.Downstream (compareExpressions)
check_equality, which handles onlyEquality. The app ports stack on #289 after the pin bump to rc4.Verification
🤖 Generated with Claude Code