Skip to content

Simplify/generalize Sympy expression to Sympy predicate - #1904

Merged
rocky merged 2 commits into
masterfrom
Assumptions-part2
Aug 24, 2026
Merged

Simplify/generalize Sympy expression to Sympy predicate#1904
rocky merged 2 commits into
masterfrom
Assumptions-part2

Conversation

@rocky

@rocky rocky commented Aug 24, 2026

Copy link
Copy Markdown
Member

Now handles Or, Not and swapped relational expressions

to_sympy() function added for Element.

All System Symbols are now marked Final.

A couple more tests added. (But many more are needed).

Now handles Or, Not and swapped relational expressions

to_sympy() function added for Element.

All System Symbols are now marked Final.

A couple more tests added. (But many more are needed).
@rocky
rocky requested a review from mmatera August 24, 2026 02:42
@rocky

rocky commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

(There will be a couple more iterations of this.)

"""
from typing import TYPE_CHECKING, Dict, List, Optional, Sequence, Tuple, Union, cast

from typing import (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This starts to be quite large. Maybe in another round, we should split this into submodules.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Noted.

@mmatera mmatera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rocky

rocky commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

In the next round, I will split out the SymPy predicate code. And probably more tests.

In the round after that, maybe we'll be able to get to Assume!

@rocky
rocky merged commit a4d2a90 into master Aug 24, 2026
18 checks passed
@rocky
rocky deleted the Assumptions-part2 branch August 24, 2026 11:58
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.

2 participants