Ensure that it says what we think it says::
sage: JordanSpinEJA(2, field=QQ)
- Euclidean Jordan algebra of degree 2 over Rational Field
+ Euclidean Jordan algebra of dimension 2 over Rational Field
sage: JordanSpinEJA(3, field=RDF)
- Euclidean Jordan algebra of degree 3 over Real Double Field
+ Euclidean Jordan algebra of dimension 3 over Real Double Field
"""
- # TODO: change this to say "dimension" and fix all the tests.
- fmt = "Euclidean Jordan algebra of degree {} over {}"
+ fmt = "Euclidean Jordan algebra of dimension {} over {}"
return fmt.format(self.dimension(), self.base_ring())
def product_on_basis(self, i, j):
TESTS::
sage: random_eja()
- Euclidean Jordan algebra of degree...
+ Euclidean Jordan algebra of dimension...
"""
[2 0 0]
[0 2 0]
[0 0 2]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
If you try to add two identical vector space operators but on
different EJAs, that should blow up::
Linear operator between finite-dimensional Euclidean Jordan
algebras represented by the matrix:
[39 54 69]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 1 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 1 over
+ Rational Field
"""
return FiniteDimensionalEuclideanJordanAlgebraOperator(
[1 0 0]
[0 1 0]
[0 0 1]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
"""
return FiniteDimensionalEuclideanJordanAlgebraOperator(
[ 2 4 0]
[ 2 9 2]
[ 0 4 16]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
sage: x.operator()*(1/2)
Linear operator between finite-dimensional Euclidean Jordan algebras
represented by the matrix:
[ 1 2 0]
[ 1 9/2 1]
[ 0 2 8]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
"""
if other in self.codomain().base_ring():
[-1 0 0]
[ 0 -1 0]
[ 0 0 -1]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
"""
return FiniteDimensionalEuclideanJordanAlgebraOperator(
[3 0 0]
[0 3 0]
[0 0 3]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
"""
if (n == 1):
algebras represented by the matrix:
[1 0]
[0 1]
- Domain: Euclidean Jordan algebra of degree 2 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 2 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 2 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 2 over
+ Rational Field
"""
msg = ("Linear operator between finite-dimensional Euclidean Jordan "
[-1 0 0]
[ 0 -1 0]
[ 0 0 -1]
- Domain: Euclidean Jordan algebra of degree 3 over Rational Field
- Codomain: Euclidean Jordan algebra of degree 3 over Rational Field
+ Domain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
+ Codomain: Euclidean Jordan algebra of dimension 3 over
+ Rational Field
"""
return (self + (-other))