b.set_immutable()
if not (is_Matrix(b) and b.dimensions() == (n, n)):
raise ValueError("input is not a multiplication table")
- if not (b.is_symmetric()):
- # Euclidean jordan algebras are commutative, so left/right
- # multiplication is the same.
- raise ValueError("multiplication table must be symmetric")
mult_table = tuple(mult_table)
cat = MagmaticAlgebras(field).FiniteDimensional().WithBasis()
Qi[0,0] = Qi[0,0] * ~field(2)
Qs.append(Qi)
- return FiniteDimensionalEuclideanJordanAlgebra(field,Qs,rank=2)
+ # The rank of the spin factor algebra is two, UNLESS we're in a
+ # one-dimensional ambient space (the rank is bounded by the
+ # ambient dimension).
+ rank = min(dimension,2)
+ return FiniteDimensionalEuclideanJordanAlgebra(field,Qs,rank=rank)