From 5537f4534193ad0bc3f8f0da1087d4cf5eaba6b3 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 19 Jul 2019 17:20:49 -0400 Subject: [PATCH] eja: make the complex embedding agree with the docs. --- mjo/eja/euclidean_jordan_algebra.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) -- 2.44.2