Skip to content

Fix edge case in canonical_comparison#1014

Merged
IgnaceBleukx merged 2 commits into
masterfrom
fix_empty_sum_canonical
Jun 12, 2026
Merged

Fix edge case in canonical_comparison#1014
IgnaceBleukx merged 2 commits into
masterfrom
fix_empty_sum_canonical

Conversation

@IgnaceBleukx

Copy link
Copy Markdown
Collaborator

In some weird cases, the left hand side of a sum can contain only constants after previous transformations, which was not handled properly.

Fixes #620 and #827

@IgnaceBleukx

Copy link
Copy Markdown
Collaborator Author

Also small change to canonical comparison: it now expects a list of Expressions and returns one too. This saves us a shotgun call to toplevel_list. Needed to make some small tweaks to the callers, and pumpkin

@tias tias left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, also to have this function now typed

@IgnaceBleukx IgnaceBleukx merged commit 9b4d1dd into master Jun 12, 2026
12 checks passed
@IgnaceBleukx IgnaceBleukx deleted the fix_empty_sum_canonical branch June 12, 2026 06:31
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.

Boolean constants not handled in Global constraints

2 participants