aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-15 18:31:00 +0100
committerNao Pross <np@0hm.ch>2024-03-15 18:31:14 +0100
commit2d7706088ea22435a6deda72eda1d1a14efe53c8 (patch)
treec717dc569e2c12e98f3b45b2b5a37bb2d8bd6694
parentAdd util.showtree to print internals of expressions (diff)
downloadmdpoly-2d7706088ea22435a6deda72eda1d1a14efe53c8.tar.gz
mdpoly-2d7706088ea22435a6deda72eda1d1a14efe53c8.zip
Abandon support for rational functions
-rw-r--r--mdpoly/abc.py7
-rw-r--r--mdpoly/algebra.py11
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 """
-
-
-
# ┏┳┓┏━┓╺┳╸┏━┓╻╻ ╻ ┏━┓╻ ┏━╸┏━╸┏┓ ┏━┓┏━┓
# ┃┃┃┣━┫ ┃ ┣┳┛┃┏╋┛ ┣━┫┃ ┃╺┓┣╸ ┣┻┓┣┳┛┣━┫
# ╹ ╹╹ ╹ ╹ ╹┗╸╹╹ ╹ ╹ ╹┗━╸┗━┛┗━╸┗━┛╹┗╸╹ ╹