::
- sage: J = JordanSpinAlgebra(2)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(3)
+ sage: J = JordanSpinEJA(3)
sage: x = vector(QQ,[1,2,3])
sage: y = vector(QQ,[4,5,6])
sage: x.inner_product(y)
EXAMPLES::
- sage: J = JordanSpinAlgebra(2)
+ sage: J = JordanSpinEJA(2)
sage: e0,e1 = J.gens()
sage: x = e0 + e1
sage: x.det()
0
- sage: J = JordanSpinAlgebra(3)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(n)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(5)
+ sage: J = JordanSpinEJA(5)
sage: J.one().is_regular()
False
sage: e0, e1, e2, e3, e4 = J.gens() # e0 is the identity
EXAMPLES::
- sage: J = JordanSpinAlgebra(4)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(n)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(n)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(n)
+ sage: J = JordanSpinEJA(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 = JordanSpinAlgebra(5)
+ sage: J = JordanSpinEJA(5)
sage: c = J.random_element().subalgebra_idempotent()
sage: c^2 == c
True
EXAMPLES::
- sage: J = JordanSpinAlgebra(3)
+ sage: J = JordanSpinEJA(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,
- JordanSpinAlgebra,
+ JordanSpinEJA,
RealSymmetricSimpleEJA,
ComplexHermitianSimpleEJA,
QuaternionHermitianSimpleEJA])
n = 3
pass
-class JordanSpinAlgebra(FiniteDimensionalEuclideanJordanAlgebra):
+class JordanSpinEJA(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 = JordanSpinAlgebra(4)
+ sage: J = JordanSpinEJA(4)
sage: e0,e1,e2,e3 = J.gens()
sage: e0*e0
e0
Qi[0,0] = Qi[0,0] * ~field(2)
Qs.append(Qi)
- fdeja = super(JordanSpinAlgebra, cls)
+ fdeja = super(JordanSpinEJA, cls)
return fdeja.__classcall_private__(cls, field, Qs)
def rank(self):