From 7128e8afe6b4c2736bd883b1b07b4564ed5f5512 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Legat?= <benoit.legat@gmail.com>
Date: Mon, 27 May 2024 17:05:24 +0200
Subject: [PATCH] Needed fixes

---
 src/arithmetic.jl | 4 ++--
 src/types.jl      | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/arithmetic.jl b/src/arithmetic.jl
index 0ae8e1b..1b783d2 100644
--- a/src/arithmetic.jl
+++ b/src/arithmetic.jl
@@ -91,7 +91,7 @@ function MA.operate_to!(
     X::AlgebraElement,
     Y::AlgebraElement,
 )
-    @assert parent(res) === parent(X) === parent(Y)
+    @assert parent(res) == parent(X) == parent(Y)
     MA.operate_to!(coeffs(res), -, coeffs(X), coeffs(Y))
     return res
 end
@@ -102,7 +102,7 @@ function MA.operate_to!(
     X::AlgebraElement,
     Y::AlgebraElement,
 )
-    @assert parent(res) === parent(X) === parent(Y)
+    @assert parent(res) == parent(X) == parent(Y)
     mstr = mstructure(basis(parent(res)))
     MA.operate_to!(coeffs(res), mstr, coeffs(X), coeffs(Y))
     return res
diff --git a/src/types.jl b/src/types.jl
index 11a37d5..16718d3 100644
--- a/src/types.jl
+++ b/src/types.jl
@@ -26,6 +26,9 @@ end
 
 basis(A::StarAlgebra) = A.basis
 object(A::StarAlgebra) = A.object
+function Base.:(==)(a::StarAlgebra, b::StarAlgebra)
+    return a.basis == b.basis
+end
 
 struct AlgebraElement{A,T,V} <: MA.AbstractMutable
     coeffs::V