From: Michael Orlitzky Date: Fri, 19 Jul 2019 21:20:49 +0000 (-0400) Subject: eja: make the complex embedding agree with the docs. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5537f4534193ad0bc3f8f0da1087d4cf5eaba6b3;p=sage.d.git eja: make the complex embedding agree with the docs. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 3cec4fa..8f21db7 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1182,13 +1182,13 @@ def _embed_complex_matrix(M): sage: x2 = F(1 + 2*i) sage: x3 = F(-i) sage: x4 = F(6) - sage: M = matrix(F,2,[x1,x2,x3,x4]) + sage: M = matrix(F,2,[[x1,x2],[x3,x4]]) sage: _embed_complex_matrix(M) - [ 4 2| 1 -2] - [-2 4| 2 1] + [ 4 -2| 1 2] + [ 2 4|-2 1] [-----+-----] - [ 0 1| 6 0] - [-1 0| 0 6] + [ 0 -1| 6 0] + [ 1 0| 0 6] """ n = M.nrows() @@ -1199,7 +1199,7 @@ def _embed_complex_matrix(M): for z in M.list(): a = z.real() b = z.imag() - blocks.append(matrix(field, 2, [[a,-b],[b,a]])) + blocks.append(matrix(field, 2, [[a,b],[-b,a]])) # We can drop the imaginaries here. return block_matrix(field.base_ring(), n, blocks)