"""
n = self.dimension()
- M = [ [ self.zero() for j in range(n) ]
- for i in range(n) ]
- for i in range(n):
- for j in range(i+1):
- M[i][j] = self._multiplication_table[i][j]
- M[j][i] = M[i][j]
+ # Prepend the header row.
+ M = [["*"] + list(self.gens())]
- for i in range(n):
- # Prepend the left "header" column entry Can't do this in
- # the loop because it messes up the symmetry.
- M[i] = [self.monomial(i)] + M[i]
+ # And to each subsequent row, prepend an entry that belongs to
+ # the left-side "header column."
+ M += [ [self.monomial(i)] + [ self.product_on_basis(i,j)
+ for j in range(n) ]
+ for i in range(n) ]
- # Prepend the header row.
- M = [["*"] + list(self.gens())] + M
return table(M, header_row=True, header_column=True, frame=True)