sage: e2*e2
e2
+ TESTS:
+
+ We can change the generator prefix::
+
+ sage: RealCartesianProductEJA(3, prefix='r').gens()
+ (r0, r1, r2)
+
"""
- def __init__(self, n, field=QQ):
+ def __init__(self, n, field=QQ, **kwargs):
V = VectorSpace(field, n)
mult_table = [ [ V.gen(i)*(i == j) for j in range(n) ]
for i in range(n) ]
fdeja = super(RealCartesianProductEJA, self)
- return fdeja.__init__(field, mult_table, rank=n)
+ return fdeja.__init__(field, mult_table, rank=n, **kwargs)
def inner_product(self, x, y):
return _usual_ip(x,y)
sage: J(expected) == x*y
True
+ We can change the generator prefix::
+
+ sage: RealSymmetricEJA(3, prefix='q').gens()
+ (q0, q1, q2, q3, q4, q5)
+
"""
- def __init__(self, n, field=QQ):
+ def __init__(self, n, field=QQ, **kwargs):
S = _real_symmetric_basis(n, field=field)
Qs = _multiplication_table_from_matrix_basis(S)
return fdeja.__init__(field,
Qs,
rank=n,
- natural_basis=S)
+ natural_basis=S,
+ **kwargs)
def inner_product(self, x, y):
return _matrix_ip(x,y)
sage: J(expected) == x*y
True
+ We can change the generator prefix::
+
+ sage: ComplexHermitianEJA(2, prefix='z').gens()
+ (z0, z1, z2, z3)
+
"""
- def __init__(self, n, field=QQ):
+ def __init__(self, n, field=QQ, **kwargs):
S = _complex_hermitian_basis(n)
Qs = _multiplication_table_from_matrix_basis(S)
return fdeja.__init__(field,
Qs,
rank=n,
- natural_basis=S)
+ natural_basis=S,
+ **kwargs)
def inner_product(self, x, y):
sage: J(expected) == x*y
True
+ We can change the generator prefix::
+
+ sage: QuaternionHermitianEJA(2, prefix='a').gens()
+ (a0, a1, a2, a3, a4, a5)
+
"""
- def __init__(self, n, field=QQ):
+ def __init__(self, n, field=QQ, **kwargs):
S = _quaternion_hermitian_basis(n)
Qs = _multiplication_table_from_matrix_basis(S)
return fdeja.__init__(field,
Qs,
rank=n,
- natural_basis=S)
+ natural_basis=S,
+ **kwargs)
def inner_product(self, x, y):
# Since a+bi+cj+dk on the diagonal is represented as
sage: e2*e3
0
+ We can change the generator prefix::
+
+ sage: JordanSpinEJA(2, prefix='B').gens()
+ (B0, B1)
+
"""
- def __init__(self, n, field=QQ):
+ def __init__(self, n, field=QQ, **kwargs):
V = VectorSpace(field, n)
mult_table = [[V.zero() for j in range(n)] for i in range(n)]
for i in range(n):
# one-dimensional ambient space (because the rank is bounded by
# the ambient dimension).
fdeja = super(JordanSpinEJA, self)
- return fdeja.__init__(field, mult_table, rank=min(n,2))
+ return fdeja.__init__(field, mult_table, rank=min(n,2), **kwargs)
def inner_product(self, x, y):
return _usual_ip(x,y)