<commit_before>LoadPackage("grpconst");
LoadPackage("sglppow");
LoadPackage("cubefree");



IsSquareFree:= n -> ForAll( Collected( Factors(n) ), x -> x[2] = 1 );

IsCubeFree:= n -> ForAll( Collected( Factors(n) ), x -> x[2] <= 2 );

GnuWithExplanation:=function(n)
local res;
if not IsPosInt(n) then
  Error("The argument of Gnu(n) must be a positive integer");
fi;

if IsCubeFree( n ) then
  res := NumberCFGroups( n );
  return [ res, "using NumberCFGroups from the CubeFree package" ];
else
  res := CALL_WITH_CATCH( NrSmallGroups, [ n ] );
  if res[1] then
    return [ res[2], "using the GAP Small Groups Library + sglppow package" ];
  else
    return [ false, Concatenation( List( res[2], String ) ) ];
  fi;
fi;

end;

Gnu:=function(n)
return GnuWithExplanation(n)[1];
end;<commit_msg>Separate explanation when SglPPow is used<commit_after>LoadPackage("grpconst");
LoadPackage("sglppow");
LoadPackage("cubefree");



IsSquareFree:= n -> ForAll( Collected( Factors(n) ), x -> x[2] = 1 );

IsCubeFree:= n -> ForAll( Collected( Factors(n) ), x -> x[2] <= 2 );

GnuWithExplanation:=function(n)
local res;
if not IsPosInt(n) then
  Error("The argument of Gnu(n) must be a positive integer");
fi;

if IsCubeFree( n ) then
  res := NumberCFGroups( n );
  return [ res, "using NumberCFGroups from the CubeFree package" ];
else
  res := CALL_WITH_CATCH( NrSmallGroups, [ n ] );
  if res[1] then
    if n = 3^8 or IsPrimePowerInt(n) and Length(Factors(n))=7 then
      return [ res[2], "using NrSmallGroups and SglPPow package" ];
    else
      return [ res[2], "using NrSmallGroups and GAP Small Groups Library" ];
    fi;
  else
    return [ false, Concatenation( List( res[2], String ) ) ];
  fi;
fi;

end;

Gnu:=function(n)
return GnuWithExplanation(n)[1];
end;
{'fraction_non_alphanumeric': 0.15022675736961452, 'fraction_numerical': 0.011337868480725623, 'mean_word_length': 4.3810975609756095, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4561927', 'n_tokens_mistral': 675, 'n_tokens_neox': 643, 'n_words': 186}