inner_product=inner_product)
- def __init__(self, field,
+ def __init__(self,
+ field,
mult_table,
names='e',
assume_associative=False,
::
- sage: J = JordanSpinSimpleEJA(2)
+ sage: J = JordanSpinAlgebra(2)
sage: J.basis()
Family (e0, e1)
sage: J.natural_basis()
inner product on `R^n` (this example only works because the
basis for the Jordan algebra is the standard basis in `R^n`)::
- sage: J = JordanSpinSimpleEJA(3)
+ sage: J = JordanSpinAlgebra(3)
sage: x = vector(QQ,[1,2,3])
sage: y = vector(QQ,[4,5,6])
sage: x.inner_product(y)
EXAMPLES::
- sage: J = JordanSpinSimpleEJA(2)
+ sage: J = JordanSpinAlgebra(2)
sage: e0,e1 = J.gens()
sage: x = e0 + e1
sage: x.det()
0
- sage: J = JordanSpinSimpleEJA(3)
+ sage: J = JordanSpinAlgebra(3)
sage: e0,e1,e2 = J.gens()
sage: x = e0 + e1 + e2
sage: x.det()
sage: set_random_seed()
sage: n = ZZ.random_element(1,10)
- sage: J = JordanSpinSimpleEJA(n)
+ sage: J = JordanSpinAlgebra(n)
sage: x = J.random_element()
sage: while x.is_zero():
....: x = J.random_element()
The identity element always has degree one, but any element
linearly-independent from it is regular::
- sage: J = JordanSpinSimpleEJA(5)
+ sage: J = JordanSpinAlgebra(5)
sage: J.one().is_regular()
False
sage: e0, e1, e2, e3, e4 = J.gens() # e0 is the identity
EXAMPLES::
- sage: J = JordanSpinSimpleEJA(4)
+ sage: J = JordanSpinAlgebra(4)
sage: J.one().degree()
1
sage: e0,e1,e2,e3 = J.gens()
sage: set_random_seed()
sage: n = ZZ.random_element(1,10)
- sage: J = JordanSpinSimpleEJA(n)
+ sage: J = JordanSpinAlgebra(n)
sage: x = J.random_element()
sage: x == x.coefficient(0)*J.one() or x.degree() == 2
True
sage: set_random_seed()
sage: n = ZZ.random_element(2,10)
- sage: J = JordanSpinSimpleEJA(n)
+ sage: J = JordanSpinAlgebra(n)
sage: y = J.random_element()
sage: while y == y.coefficient(0)*J.one():
....: y = J.random_element()
sage: set_random_seed()
sage: n = ZZ.random_element(1,10)
- sage: J = JordanSpinSimpleEJA(n)
+ sage: J = JordanSpinAlgebra(n)
sage: x = J.random_element()
sage: x_vec = x.vector()
sage: x0 = x_vec[0]
sage: c = J.random_element().subalgebra_idempotent()
sage: c^2 == c
True
- sage: J = JordanSpinSimpleEJA(5)
+ sage: J = JordanSpinAlgebra(5)
sage: c = J.random_element().subalgebra_idempotent()
sage: c^2 == c
True
EXAMPLES::
- sage: J = JordanSpinSimpleEJA(3)
+ sage: J = JordanSpinAlgebra(3)
sage: e0,e1,e2 = J.gens()
sage: x = e0 + e1 + e2
sage: x.trace()
"""
n = ZZ.random_element(1,5)
constructor = choice([eja_rn,
- JordanSpinSimpleEJA,
+ JordanSpinAlgebra,
RealSymmetricSimpleEJA,
ComplexHermitianSimpleEJA,
QuaternionHermitianSimpleEJA])
n = 3
pass
-def JordanSpinSimpleEJA(n, field=QQ):
+class JordanSpinAlgebra(FiniteDimensionalEuclideanJordanAlgebra):
"""
The rank-2 simple EJA consisting of real vectors ``x=(x0, x_bar)``
with the usual inner product and jordan product ``x*y =
This multiplication table can be verified by hand::
- sage: J = JordanSpinSimpleEJA(4)
+ sage: J = JordanSpinAlgebra(4)
sage: e0,e1,e2,e3 = J.gens()
sage: e0*e0
e0
sage: e2*e3
0
- In one dimension, this is the reals under multiplication::
+ """
+ @staticmethod
+ def __classcall_private__(cls, n, field=QQ):
+ Qs = []
+ id_matrix = identity_matrix(field, n)
+ for i in xrange(n):
+ ei = id_matrix.column(i)
+ Qi = zero_matrix(field, n)
+ Qi.set_row(0, ei)
+ Qi.set_column(0, ei)
+ Qi += diagonal_matrix(n, [ei[0]]*n)
+ # The addition of the diagonal matrix adds an extra ei[0] in the
+ # upper-left corner of the matrix.
+ Qi[0,0] = Qi[0,0] * ~field(2)
+ Qs.append(Qi)
+
+ fdeja = super(JordanSpinAlgebra, cls)
+ return fdeja.__classcall_private__(cls, field, Qs)
- sage: J1 = JordanSpinSimpleEJA(1)
- sage: J2 = eja_rn(1)
- sage: J1 == J2
- True
+ def rank(self):
+ """
+ Return the rank of this Jordan Spin Algebra.
- """
- Qs = []
- id_matrix = identity_matrix(field, n)
- for i in xrange(n):
- ei = id_matrix.column(i)
- Qi = zero_matrix(field, n)
- Qi.set_row(0, ei)
- Qi.set_column(0, ei)
- Qi += diagonal_matrix(n, [ei[0]]*n)
- # The addition of the diagonal matrix adds an extra ei[0] in the
- # upper-left corner of the matrix.
- Qi[0,0] = Qi[0,0] * ~field(2)
- Qs.append(Qi)
-
- # 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).
- return FiniteDimensionalEuclideanJordanAlgebra(field,
- Qs,
- rank=min(n,2),
- inner_product=_usual_ip)
+ The rank of the spin algebra is two, unless we're in a
+ one-dimensional ambient space (because the rank is bounded by
+ the ambient dimension).
+ """
+ return min(self.dimension(),2)
+
+ def inner_product(self, x, y):
+ return _usual_ip(x,y)