|  | 
| 9 | 9 |   Jordan algebra | 
| 10 | 10 | """ | 
| 11 | 11 | 
 | 
| 12 |  | -#***************************************************************************** | 
|  | 12 | +# *************************************************************************** | 
| 13 | 13 | #  Copyright (C) 2014, 2023 Travis Scrimshaw <tscrim at ucdavis.edu> | 
| 14 | 14 | # | 
| 15 | 15 | #  Distributed under the terms of the GNU General Public License (GPL) | 
| 16 | 16 | #                  https://www.gnu.org/licenses/ | 
| 17 |  | -#***************************************************************************** | 
|  | 17 | +# *************************************************************************** | 
| 18 | 18 | 
 | 
| 19 | 19 | from sage.structure.parent import Parent | 
| 20 | 20 | from sage.structure.unique_representation import UniqueRepresentation | 
| @@ -209,7 +209,7 @@ def __classcall_private__(self, arg0, arg1=None, names=None): | 
| 209 | 209 |         if not arg1.is_symmetric(): | 
| 210 | 210 |             raise ValueError("the bilinear form is not symmetric") | 
| 211 | 211 | 
 | 
| 212 |  | -        arg1 = arg1.change_ring(arg0) # This makes a copy | 
|  | 212 | +        arg1 = arg1.change_ring(arg0)  # This makes a copy | 
| 213 | 213 |         arg1.set_immutable() | 
| 214 | 214 |         return JordanAlgebraSymmetricBilinear(arg0, arg1, names=names) | 
| 215 | 215 | 
 | 
| @@ -344,8 +344,6 @@ def gens(self) -> Family: | 
| 344 | 344 |             sage: F.<x,y,z> = FreeAlgebra(QQ) | 
| 345 | 345 |             sage: J = JordanAlgebra(F) | 
| 346 | 346 |             sage: J.gens() | 
| 347 |  | -            Traceback (most recent call last): | 
| 348 |  | -            ... | 
| 349 | 347 |             Lazy family (Term map(i))_{i in Free monoid on 3 generators (x, y, z)} | 
| 350 | 348 |         """ | 
| 351 | 349 |         return self.algebra_generators() | 
| @@ -975,7 +973,7 @@ def _mul_(self, other): | 
| 975 | 973 |             P = self.parent() | 
| 976 | 974 |             return self.__class__(P, | 
| 977 | 975 |                                   self._s * other._s | 
| 978 |  | -                                   + (self._v * P._form * other._v.column())[0], | 
|  | 976 | +                                  + (self._v * P._form * other._v.column())[0], | 
| 979 | 977 |                                   other._s * self._v + self._s * other._v) | 
| 980 | 978 | 
 | 
| 981 | 979 |         def _lmul_(self, other): | 
| @@ -1024,8 +1022,8 @@ def monomial_coefficients(self, copy=True): | 
| 1024 | 1022 |                 {0: 1, 1: 2, 2: -1} | 
| 1025 | 1023 |             """ | 
| 1026 | 1024 |             d = {0: self._s} | 
| 1027 |  | -            for i,c in enumerate(self._v): | 
| 1028 |  | -                d[i+1] = c | 
|  | 1025 | +            for i, c in enumerate(self._v): | 
|  | 1026 | +                d[i + 1] = c | 
| 1029 | 1027 |             return d | 
| 1030 | 1028 | 
 | 
| 1031 | 1029 |         def trace(self): | 
| @@ -1259,8 +1257,8 @@ def _test_multiplication_self_adjoint(self, **options): | 
| 1259 | 1257 |                  [SD[3].conjugate(), SD[1], SD[5]], | 
| 1260 | 1258 |                  [SD[4].conjugate(), SD[5].conjugate(), SD[2]]] | 
| 1261 | 1259 |             Y = [[OD[0], OD[3], OD[4]], | 
| 1262 |  | -                  [OD[3].conjugate(), OD[1], OD[5]], | 
| 1263 |  | -                  [OD[4].conjugate(), OD[5].conjugate(), OD[2]]] | 
|  | 1260 | +                 [OD[3].conjugate(), OD[1], OD[5]], | 
|  | 1261 | +                 [OD[4].conjugate(), OD[5].conjugate(), OD[2]]] | 
| 1264 | 1262 |             for r, c in data_pairs: | 
| 1265 | 1263 |                 if r != c: | 
| 1266 | 1264 |                     val = sum(X[r][i] * Y[i][c] + Y[r][i] * X[i][c] for i in range(3)) * self._half | 
| @@ -1685,8 +1683,8 @@ def _mul_(self, other): | 
| 1685 | 1683 |                  [SD[3].conjugate(), SD[1], SD[5]], | 
| 1686 | 1684 |                  [SD[4].conjugate(), SD[5].conjugate(), SD[2]]] | 
| 1687 | 1685 |             Y = [[OD[0], OD[3], OD[4]], | 
| 1688 |  | -                  [OD[3].conjugate(), OD[1], OD[5]], | 
| 1689 |  | -                  [OD[4].conjugate(), OD[5].conjugate(), OD[2]]] | 
|  | 1686 | +                 [OD[3].conjugate(), OD[1], OD[5]], | 
|  | 1687 | +                 [OD[4].conjugate(), OD[5].conjugate(), OD[2]]] | 
| 1690 | 1688 |             # we do a simplified multiplication for the diagonal entries since | 
| 1691 | 1689 |             # we have, e.g., \alpha * \alpha' + (x (x')^* + x' x^* + y (y')^* + y' y^*) / 2 | 
| 1692 | 1690 |             ret = [X[0][0] * Y[0][0] + (X[0][1] * Y[1][0]).real_part() + (X[0][2] * Y[2][0]).real_part(), | 
|  | 
0 commit comments