f1
sage: A(x).superalgebra_element()
e0 + e1 + e2 + e3 + e4 + e5
+ sage: y = sum(A.gens())
+ sage: y
+ f0 + f1
+ sage: B = y.subalgebra_generated_by()
+ sage: B(y)
+ g1
+ sage: B(y).superalgebra_element()
+ f0 + f1
TESTS:
True
"""
- return self.parent().superalgebra().linear_combination(
- zip(self.parent()._superalgebra_basis, self.to_vector()) )
+ W = self.parent().vector_space()
+ V = self.parent().superalgebra().vector_space()
+ A = W.basis_matrix().transpose()
+ W_coords = A*self.to_vector()
+ V_coords = V.coordinate_vector(W_coords)
+ return self.parent().superalgebra().from_vector(V_coords)
1
"""
- def __init__(self, superalgebra, basis, category=None):
+ def __init__(self, superalgebra, basis, category=None, check_axioms=True):
self._superalgebra = superalgebra
V = self._superalgebra.vector_space()
field = self._superalgebra.base_ring()
superalgebra_basis = [ self._superalgebra.from_vector(b)
for b in basis_vectors ]
+ # If our superalgebra is a subalgebra of something else, then
+ # these vectors won't have the right coordinates for
+ # V.span_of_basis() unless we use V.from_vector() on them.
W = V.span_of_basis( V.from_vector(v) for v in basis_vectors )
+
n = len(superalgebra_basis)
mult_table = [[W.zero() for i in range(n)] for j in range(n)]
for i in range(n):
self._vector_space = W
- self._superalgebra_basis = superalgebra_basis
-
fdeja = super(FiniteDimensionalEuclideanJordanSubalgebra, self)
fdeja.__init__(field,
mult_table,
prefix=prefix,
category=category,
- natural_basis=natural_basis)
+ natural_basis=natural_basis,
+ check_field=False,
+ check_axioms=check_axioms)