From 5608416e66323ea37269396b8a614225a9ea5df9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 13 Mar 2026 11:05:14 +0100 Subject: [PATCH] Fix Frank's SL2 in nat.rep. code in even char Also add some Asserts for future debugging --- contrib/frank/sl2/NatSL2q.g | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/contrib/frank/sl2/NatSL2q.g b/contrib/frank/sl2/NatSL2q.g index 3e6ca845..7e5c6504 100644 --- a/contrib/frank/sl2/NatSL2q.g +++ b/contrib/frank/sl2/NatSL2q.g @@ -40,7 +40,7 @@ RecogNaturalSL2 := function(G, q) mat, tm, ym, y, ymat, tr, d, cm, r1, r2, r, log, i, trupm, smm, trlowm, F, a2, bas, e, l, emax, tmp; GM := GroupWithMemory(G); - one := One(G.1[1,1]); + one := OneOfBaseDomain(G.1); zero := Zero(one); # find element x of order q-1 @@ -100,6 +100,8 @@ RecogNaturalSL2 := function(G, q) # now y^(tm * mat) = diag(a, a^-1) tr := tm*mat; + Assert(3, y^(tm * mat) = DiagonalMat([a, a^-1]) ); + # a-eigenvector of x in new basis d := tr^-1 * [mat[1,1],mat[2,1]]; # can be scaled to [1,d] @@ -125,7 +127,7 @@ RecogNaturalSL2 := function(G, q) # this will in most cases be a transvection normalized by x trupm := Comm(xm, ym^i*cm); smm := trupm^mat; - if smm[1,2] = zero then + if smm[1,2] = zero or smm[2,1] <> zero then i := false; else # rescale first column of mat such that trupm^mat = [[1,1],[0,1]] @@ -136,6 +138,8 @@ RecogNaturalSL2 := function(G, q) fi; until IsInt(i); + Assert(3, trupm^mat = [[1,1],[0,1]] * one); + # same for the other eigenvector of x: # 1/a-eigenvector of x in new basis d := tr^-1 * [mat[1,2],mat[2,2]]; @@ -164,7 +168,7 @@ RecogNaturalSL2 := function(G, q) # that the conjugate matrix is [[1,0],[1,1]]). trlowm := Comm(xm, ym^i*cm); smm := trlowm^mat; - if smm[2,1] = zero then + if smm[2,1] = zero or smm[1,2] <> zero then i := false; fi; fi; @@ -201,15 +205,18 @@ RecogNaturalSL2 := function(G, q) od; fi; + Assert(3, trlowm^mat = [[1,0],[1,1]] * one); + # finally power x to change a to 1/Z(q) if a <> 1/Z(q) then log := DLog(a, 1/Z(q), qm1fac); xm := xm^log; fi; + Assert(3, xm^mat = DiagonalMat([Z(q)^-1, Z(q)])); + # return SLPs of elements mapped by mat to # diag(1/Z(q),Z(q))[[1,0],[1,1]], [[1,1],[0,1]], # and mat return [List([xm, trlowm, trupm], SLPOfElm), mat]; end; -