- self._multiplication_table = [
- list(map(lambda x: self.from_vector(x), ls))
- for ls in mult_table
- ]
+ self._multiplication_table = [ [ self.vector_space().zero()
+ for i in range(n) ]
+ for j in range(n) ]
+ # take advantage of symmetry
+ for i in range(n):
+ for j in range(i+1):
+ elt = self.from_vector(mult_table[i][j])
+ self._multiplication_table[i][j] = elt
+ self._multiplication_table[j][i] = elt