When building elements from lists/matrices, be sure to construct
them in the clan and not just in the underlying vector space.
if not A[0,0] == B[0,0]:
raise ValueError(f"A and B must agree in the (0,0) position")
- R5 = self._vector_space
- return ( A[0,0]*R5((0,0,1)) +
- A[1,0]*R5((1,0,1)) +
- A[1,1]*R5((1,1,1)) +
- B[1,0]*R5((2,0,1)) +
- B[1,1]*R5((2,2,1)) )
+ return ( A[0,0]*self((0,0,1)) +
+ A[1,0]*self((1,0,1)) +
+ A[1,1]*self((1,1,1)) +
+ B[1,0]*self((2,0,1)) +
+ B[1,1]*self((2,2,1)) )
def from_list(self, l):
r"""
(2, 1, 4, 2, -1)
"""
- V = self._vector_space
- return V.sum_of_terms(zip(V.basis().keys(), l))
+ return self.sum_of_terms(zip(self.basis().keys(), l))
def from_lists(self, l1, l2):
r