EXAMPLES::
- sage: J = RealSymmetricSimpleEJA(2)
+ sage: J = RealSymmetricEJA(2)
sage: J.basis()
Family (e0, e1, e2)
sage: J.natural_basis()
The identity in `S^n` is converted to the identity in the EJA::
- sage: J = RealSymmetricSimpleEJA(3)
+ sage: J = RealSymmetricEJA(3)
sage: I = identity_matrix(QQ,3)
sage: J(I) == J.one()
True
This skew-symmetric matrix can't be represented in the EJA::
- sage: J = RealSymmetricSimpleEJA(3)
+ sage: J = RealSymmetricEJA(3)
sage: A = matrix(QQ,3, lambda i,j: i-j)
sage: J(A)
Traceback (most recent call last):
so the inner product of the identity matrix with itself
should be the `n`::
- sage: J = RealSymmetricSimpleEJA(3)
+ sage: J = RealSymmetricEJA(3)
sage: J.one().inner_product(J.one())
3
part because the product of Hermitian matrices may not be
Hermitian::
- sage: J = ComplexHermitianSimpleEJA(3)
+ sage: J = ComplexHermitianEJA(3)
sage: J.one().inner_product(J.one())
3
Ditto for the quaternions::
- sage: J = QuaternionHermitianSimpleEJA(3)
+ sage: J = QuaternionHermitianEJA(3)
sage: J.one().inner_product(J.one())
3
EXAMPLES::
- sage: J = ComplexHermitianSimpleEJA(3)
+ sage: J = ComplexHermitianEJA(3)
sage: J.one()
e0 + e5 + e8
sage: J.one().natural_representation()
::
- sage: J = QuaternionHermitianSimpleEJA(3)
+ sage: J = QuaternionHermitianEJA(3)
sage: J.one()
e0 + e9 + e14
sage: J.one().natural_representation()
n = ZZ.random_element(1,5)
constructor = choice([eja_rn,
JordanSpinEJA,
- RealSymmetricSimpleEJA,
- ComplexHermitianSimpleEJA,
- QuaternionHermitianSimpleEJA])
+ RealSymmetricEJA,
+ ComplexHermitianEJA,
+ QuaternionHermitianEJA])
return constructor(n, field=QQ)
return (X_mat*Y_mat).trace()
-def RealSymmetricSimpleEJA(n, field=QQ):
+class RealSymmetricEJA(FiniteDimensionalEuclideanJordanAlgebra):
"""
The rank-n simple EJA consisting of real symmetric n-by-n
matrices, the usual symmetric Jordan product, and the trace inner
EXAMPLES::
- sage: J = RealSymmetricSimpleEJA(2)
+ sage: J = RealSymmetricEJA(2)
sage: e0, e1, e2 = J.gens()
sage: e0*e0
e0
sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: J = RealSymmetricSimpleEJA(n)
+ sage: J = RealSymmetricEJA(n)
sage: J.degree() == (n^2 + n)/2
True
sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: J = RealSymmetricSimpleEJA(n)
+ sage: J = RealSymmetricEJA(n)
sage: x = J.random_element()
sage: y = J.random_element()
sage: actual = (x*y).natural_representation()
True
"""
- S = _real_symmetric_basis(n, field=field)
- (Qs, T) = _multiplication_table_from_matrix_basis(S)
+ @staticmethod
+ def __classcall_private__(cls, n, field=QQ):
+ S = _real_symmetric_basis(n, field=field)
+ (Qs, T) = _multiplication_table_from_matrix_basis(S)
- return FiniteDimensionalEuclideanJordanAlgebra(field,
- Qs,
- rank=n,
- natural_basis=T,
- inner_product=_matrix_ip)
+ fdeja = super(RealSymmetricEJA, cls)
+ return fdeja.__classcall_private__(cls,
+ field,
+ Qs,
+ rank=n,
+ natural_basis=T)
+
+ def inner_product(self, x, y):
+ return _matrix_ip(x,y)
-def ComplexHermitianSimpleEJA(n, field=QQ):
+class ComplexHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra):
"""
The rank-n simple EJA consisting of complex Hermitian n-by-n
matrices over the real numbers, the usual symmetric Jordan product,
sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: J = ComplexHermitianSimpleEJA(n)
+ sage: J = ComplexHermitianEJA(n)
sage: J.degree() == n^2
True
sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: J = ComplexHermitianSimpleEJA(n)
+ sage: J = ComplexHermitianEJA(n)
sage: x = J.random_element()
sage: y = J.random_element()
sage: actual = (x*y).natural_representation()
True
"""
- S = _complex_hermitian_basis(n)
- (Qs, T) = _multiplication_table_from_matrix_basis(S)
+ @staticmethod
+ def __classcall_private__(cls, n, field=QQ):
+ S = _complex_hermitian_basis(n)
+ (Qs, T) = _multiplication_table_from_matrix_basis(S)
- # Since a+bi on the diagonal is represented as
- #
- # a + bi = [ a b ]
- # [ -b a ],
- #
- # we'll double-count the "a" entries if we take the trace of
- # the embedding.
- ip = lambda X,Y: _matrix_ip(X,Y)/2
+ fdeja = super(ComplexHermitianEJA, cls)
+ return fdeja.__classcall_private__(cls,
+ field,
+ Qs,
+ rank=n,
+ natural_basis=T)
- return FiniteDimensionalEuclideanJordanAlgebra(field,
- Qs,
- rank=n,
- natural_basis=T,
- inner_product=ip)
+ def inner_product(self, x, y):
+ # Since a+bi on the diagonal is represented as
+ #
+ # a + bi = [ a b ]
+ # [ -b a ],
+ #
+ # we'll double-count the "a" entries if we take the trace of
+ # the embedding.
+ return _matrix_ip(x,y)/2
-def QuaternionHermitianSimpleEJA(n, field=QQ):
+class QuaternionHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra):
"""
The rank-n simple EJA consisting of self-adjoint n-by-n quaternion
matrices, the usual symmetric Jordan product, and the
sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: J = QuaternionHermitianSimpleEJA(n)
+ sage: J = QuaternionHermitianEJA(n)
sage: J.degree() == 2*(n^2) - n
True
sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: J = QuaternionHermitianSimpleEJA(n)
+ sage: J = QuaternionHermitianEJA(n)
sage: x = J.random_element()
sage: y = J.random_element()
sage: actual = (x*y).natural_representation()
True
"""
- S = _quaternion_hermitian_basis(n)
- (Qs, T) = _multiplication_table_from_matrix_basis(S)
+ @staticmethod
+ def __classcall_private__(cls, n, field=QQ):
+ S = _quaternion_hermitian_basis(n)
+ (Qs, T) = _multiplication_table_from_matrix_basis(S)
- # Since a+bi+cj+dk on the diagonal is represented as
- #
- # a + bi +cj + dk = [ a b c d]
- # [ -b a -d c]
- # [ -c d a -b]
- # [ -d -c b a],
- #
- # we'll quadruple-count the "a" entries if we take the trace of
- # the embedding.
- ip = lambda X,Y: _matrix_ip(X,Y)/4
-
- return FiniteDimensionalEuclideanJordanAlgebra(field,
- Qs,
- rank=n,
- natural_basis=T,
- inner_product=ip)
+ fdeja = super(QuaternionHermitianEJA, cls)
+ return fdeja.__classcall_private__(cls,
+ field,
+ Qs,
+ rank=n,
+ natural_basis=T)
+ def inner_product(self, x, y):
+ # Since a+bi+cj+dk on the diagonal is represented as
+ #
+ # a + bi +cj + dk = [ a b c d]
+ # [ -b a -d c]
+ # [ -c d a -b]
+ # [ -d -c b a],
+ #
+ # we'll quadruple-count the "a" entries if we take the trace of
+ # the embedding.
+ return _matrix_ip(x,y)/4
-def OctonionHermitianSimpleEJA(n):
- """
- This shit be crazy. It has dimension 27 over the reals.
- """
- n = 3
- pass
class JordanSpinEJA(FiniteDimensionalEuclideanJordanAlgebra):
"""