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