sage: J0.multiplication_table() == J0.multiplication_table()
True
+ An error is raised if the matrix `B` does not correspond to a
+ positive-definite bilinear form::
+
+ sage: B = matrix.random(QQ,2,3)
+ sage: J = BilinearFormEJA(B)
+ Traceback (most recent call last):
+ ...
+ ValueError: bilinear form is not positive-definite
+ sage: B = matrix.zero(QQ,3)
+ sage: J = BilinearFormEJA(B)
+ Traceback (most recent call last):
+ ...
+ ValueError: bilinear form is not positive-definite
+
TESTS:
We can create a zero-dimensional algebra::
n = B.nrows()
if not B.is_positive_definite():
- raise TypeError("matrix B is not positive-definite")
+ raise ValueError("bilinear form is not positive-definite")
V = VectorSpace(field, n)
mult_table = [[V.zero() for j in range(n)] for i in range(n)]