From d9277203ee05cef78e56f63bbbb4d8961ffe81b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 6 Sep 2024 12:56:59 +0200 Subject: [PATCH] Avoid computing determinants for testing Killing matrices for non-degeneracy --- lib/alglie.gi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/alglie.gi b/lib/alglie.gi index ee1fba099c2..7c4d11976cf 100644 --- a/lib/alglie.gi +++ b/lib/alglie.gi @@ -2163,7 +2163,7 @@ InstallMethod( IsSimpleAlgebra, function( L ) if Characteristic( LeftActingDomain( L ) ) <> 0 then TryNextMethod(); - elif DeterminantMat( KillingMatrix( Basis( L ) ) ) = 0 then + elif RankMat( KillingMatrix( Basis( L ) ) ) = Dimension( L ) then return false; else return Length( DirectSumDecomposition( L ) ) = 1; @@ -2371,8 +2371,7 @@ InstallMethod( SemiSimpleType, # We test whether the Killing form of `L' is nondegenerate. - d:= DeterminantMat( KillingMatrix( Basis( L ) ) ); - if IsZero( d ) then + if RankMat( KillingMatrix( Basis( L ) ) ) <> Dimension( L ) then Info( InfoAlgebra, 1, "The Killing form of is degenerate." ); return fail; @@ -2894,7 +2893,7 @@ InstallMethod( RootSystem, F:= LeftActingDomain( L ); - if DeterminantMat( KillingMatrix( Basis( L ) ) ) = Zero( F ) then + if RankMat( KillingMatrix( Basis( L ) ) ) <> Dimension( L ) then Info( InfoAlgebra, 1, "the Killing form of is degenerate" ); return fail; fi;