From 34a4dc4d4afc309697fe101141ab31b7f6bb06e1 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Sun, 29 Oct 2017 21:46:21 -0400 Subject: [PATCH] Need the computation of IsTrival to rely on less, and do it for Right also. --- gap/constructions.gi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gap/constructions.gi b/gap/constructions.gi index c0ba294..f562ecd 100644 --- a/gap/constructions.gi +++ b/gap/constructions.gi @@ -106,13 +106,19 @@ end); # larger than one are non-trivial. InstallImmediateMethod(IsTrivial, "for a left quasigroup", IsLeftQuasigroup and HasSize, 1, - Q -> ForAll(LeftPerms(Q), p -> p = ()) -); + function(Q) + local gens; + gens := GeneratorsOfLeftQuasigroup(Q); + return ForAll(gens, x -> ForAll(gens, y -> x*y = y)); +end); -InstallMethod(IsTrivial, "for a right quasigroup", - [IsRightQuasigroup], - Q -> ForAll(RightPerms(Q), p -> p = ()) -); +InstallImmediateMethod(IsTrivial, "for a right quasigroup", + IsRightQuasigroup and HasSize, 1, + function(Q) + local gens; + gens := GeneratorsOfRightQuasigroup(Q); + return ForAll(gens, x -> ForAll(gens, y -> y*x = y)); +end); ## Convenience functions