Skip to content

Commit dc3ce8c

Browse files
committed
fix in Jordan
1 parent 2ab900f commit dc3ce8c

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/sage/algebras/jordan_algebra.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
Jordan algebra
1010
"""
1111

12-
#*****************************************************************************
12+
# ***************************************************************************
1313
# Copyright (C) 2014, 2023 Travis Scrimshaw <tscrim at ucdavis.edu>
1414
#
1515
# Distributed under the terms of the GNU General Public License (GPL)
1616
# https://www.gnu.org/licenses/
17-
#*****************************************************************************
17+
# ***************************************************************************
1818

1919
from sage.structure.parent import Parent
2020
from sage.structure.unique_representation import UniqueRepresentation
@@ -209,7 +209,7 @@ def __classcall_private__(self, arg0, arg1=None, names=None):
209209
if not arg1.is_symmetric():
210210
raise ValueError("the bilinear form is not symmetric")
211211

212-
arg1 = arg1.change_ring(arg0) # This makes a copy
212+
arg1 = arg1.change_ring(arg0) # This makes a copy
213213
arg1.set_immutable()
214214
return JordanAlgebraSymmetricBilinear(arg0, arg1, names=names)
215215

@@ -344,8 +344,6 @@ def gens(self) -> Family:
344344
sage: F.<x,y,z> = FreeAlgebra(QQ)
345345
sage: J = JordanAlgebra(F)
346346
sage: J.gens()
347-
Traceback (most recent call last):
348-
...
349347
Lazy family (Term map(i))_{i in Free monoid on 3 generators (x, y, z)}
350348
"""
351349
return self.algebra_generators()
@@ -975,7 +973,7 @@ def _mul_(self, other):
975973
P = self.parent()
976974
return self.__class__(P,
977975
self._s * other._s
978-
+ (self._v * P._form * other._v.column())[0],
976+
+ (self._v * P._form * other._v.column())[0],
979977
other._s * self._v + self._s * other._v)
980978

981979
def _lmul_(self, other):
@@ -1024,8 +1022,8 @@ def monomial_coefficients(self, copy=True):
10241022
{0: 1, 1: 2, 2: -1}
10251023
"""
10261024
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
10291027
return d
10301028

10311029
def trace(self):
@@ -1259,8 +1257,8 @@ def _test_multiplication_self_adjoint(self, **options):
12591257
[SD[3].conjugate(), SD[1], SD[5]],
12601258
[SD[4].conjugate(), SD[5].conjugate(), SD[2]]]
12611259
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]]]
12641262
for r, c in data_pairs:
12651263
if r != c:
12661264
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):
16851683
[SD[3].conjugate(), SD[1], SD[5]],
16861684
[SD[4].conjugate(), SD[5].conjugate(), SD[2]]]
16871685
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]]]
16901688
# we do a simplified multiplication for the diagonal entries since
16911689
# we have, e.g., \alpha * \alpha' + (x (x')^* + x' x^* + y (y')^* + y' y^*) / 2
16921690
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

Comments
 (0)