diff options
author | Nao Pross <np@0hm.ch> | 2024-03-15 18:31:00 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-03-15 18:31:14 +0100 |
commit | 2d7706088ea22435a6deda72eda1d1a14efe53c8 (patch) | |
tree | c717dc569e2c12e98f3b45b2b5a37bb2d8bd6694 | |
parent | Add util.showtree to print internals of expressions (diff) | |
download | mdpoly-2d7706088ea22435a6deda72eda1d1a14efe53c8.tar.gz mdpoly-2d7706088ea22435a6deda72eda1d1a14efe53c8.zip |
Abandon support for rational functions
-rw-r--r-- | mdpoly/abc.py | 7 | ||||
-rw-r--r-- | mdpoly/algebra.py | 11 |
2 files changed, 6 insertions, 12 deletions
diff --git a/mdpoly/abc.py b/mdpoly/abc.py index f617436..16b155b 100644 --- a/mdpoly/abc.py +++ b/mdpoly/abc.py @@ -98,7 +98,12 @@ class Expr(ABC): def __eq__(self, other: object) -> bool: if isinstance(other, Expr): - return self.subtree_hash() == other.subtree_hash() + if self.subtree_hash() == other.subtree_hash(): + return True + + # FIXME: theck using tree rotations equality of associative operations + # let + denote any associative operator, then we check for the cases that + # ((x + y) + z) = (x + (y + z)) return False # --- Methods for polynomial expression --- diff --git a/mdpoly/algebra.py b/mdpoly/algebra.py index 4c66765..03a6fd5 100644 --- a/mdpoly/algebra.py +++ b/mdpoly/algebra.py @@ -367,17 +367,6 @@ class PolyPartialDiff(UnaryOp, PolyRingExpr): return cast(Self, Expr.replace(self, old, new)) - -# ┏━┓┏━┓╺┳╸╻┏━┓┏┓╻┏━┓╻ ┏━┓╻ ┏━╸┏━╸┏┓ ┏━┓┏━┓ -# ┣┳┛┣━┫ ┃ ┃┃ ┃┃┗┫┣━┫┃ ┣━┫┃ ┃╺┓┣╸ ┣┻┓┣┳┛┣━┫ -# ╹┗╸╹ ╹ ╹ ╹┗━┛╹ ╹╹ ╹┗━╸ ╹ ╹┗━╸┗━┛┗━╸┗━┛╹┗╸╹ ╹ - - -class RationalFieldExpr(Expr): - """ Endows with the algebraic structure of a field of rational functions """ - - - # ┏┳┓┏━┓╺┳╸┏━┓╻╻ ╻ ┏━┓╻ ┏━╸┏━╸┏┓ ┏━┓┏━┓ # ┃┃┃┣━┫ ┃ ┣┳┛┃┏╋┛ ┣━┫┃ ┃╺┓┣╸ ┣┻┓┣┳┛┣━┫ # ╹ ╹╹ ╹ ╹ ╹┗╸╹╹ ╹ ╹ ╹┗━╸┗━┛┗━╸┗━┛╹┗╸╹ ╹ |