Skip to content

Commit

Permalink
Fixes is_commutative for 1-dim matrix algebras (#1336)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirToby25 authored Dec 23, 2023
1 parent 6aeaa90 commit cf581d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/AlgAss/AlgMat.jl
Original file line number Diff line number Diff line change
@@ -57,6 +57,14 @@ function is_commutative(A::AlgMat)
return A.is_commutative == 1
end
dcr = dim_of_coefficient_ring(A)
if degree(A) == 1
if is_commutative(base_ring(A))
A.is_commutative = 1
return true
end
A.is_commutative = 2
return false
end
if dim(A) == degree(A)^2*dcr
A.is_commutative = 2
return false

0 comments on commit cf581d0

Please sign in to comment.