Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/files.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#W files.gd GAP4 package `Utils' Sebastian Gutsche
## Max Horn
## Stefan Kohl
#Y Copyright (C) 2015-2018, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## this function has been transferred from RCWA
Expand All @@ -20,7 +20,7 @@
##
## - Adapt the style file rcwa/doc/gaplog.css to your taste.
##
DeclareGlobalFunction( "Log2HTML" );
DeclareGlobalName( "Log2HTML" );

#############################################################################
##
Expand Down
4 changes: 2 additions & 2 deletions lib/files.gi
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
#W files.gi GAP4 package `Utils' Sebastian Gutsche
## Max Horn
## Stefan Kohl
#Y Copyright (C) 2015-2018, The GAP Group,
#Y Copyright (C) 2015-2025, The GAP Group,

#############################################################################
## this function has been transferred from RCWA
##
#F Log2HTML ( logfilename ) . . . . convert GAP logfile to XHTML 1.0 Strict
##
InstallGlobalFunction( Log2HTML,
BindGlobal( "Log2HTML",

function ( logfilename )

Expand Down
6 changes: 3 additions & 3 deletions lib/groups.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W groups.gd GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2016, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## this function has been transferred from ResClasses
Expand Down Expand Up @@ -34,7 +34,7 @@ if not IsBound( FittingLength ) then
##
#F ListOfPowers( <g>, <exp> ) . . . . . . list of powers <g>^1 .. <g>^<exp>
##
DeclareGlobalFunction( "ListOfPowers" );
DeclareGlobalName( "ListOfPowers" );

#############################################################################
## this function has been transferred from RCWA
Expand All @@ -49,7 +49,7 @@ DeclareOperation( "GeneratorsAndInverses", [ IsMagmaWithInverses ] );
##
#O SubdirectProductWithEmbeddings(<G>, <H>, <Ghom>, <Hhom> )
##
DeclareGlobalFunction("SubdirectProductWithEmbeddings");
DeclareGlobalName( "SubdirectProductWithEmbeddings" );
DeclareOperation( "SubdirectProductWithEmbeddingsOp",
[ IsGroup, IsGroup, IsGroupHomomorphism, IsGroupHomomorphism ] );
DeclareAttribute( "SubdirectProductWithEmbeddingsInfo", IsGroup, "mutable" );
Expand Down
7 changes: 4 additions & 3 deletions lib/groups.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W groups.gi GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2022, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## this function has been transferred from ResClasses
Expand Down Expand Up @@ -84,7 +84,7 @@ InstallMethod( FittingLength, "default method", true, [ IsGroup ], 0,
##
#F ListOfPowers( <g>, <exp> ) . . . . . . list of powers <g>^1 .. <g>^<exp>
##
InstallGlobalFunction( ListOfPowers,
BindGlobal( "ListOfPowers",

function ( g, exp )

Expand All @@ -111,7 +111,8 @@ InstallMethod( GeneratorsAndInverses, "for groups", true, [ IsGroup ], 0,
#############################################################################
## temporary methods for SubdirectProductWithEmbeddings
##
InstallGlobalFunction(SubdirectProductWithEmbeddings,function(G,H,ghom,hhom)
BindGlobal( "SubdirectProductWithEmbeddings",
function(G,H,ghom,hhom)
local iso;
if ( Range( ghom, G ) <> Range( hhom, H ) ) or
( Image( ghom, G ) <> Image( hhom, H ) ) then
Expand Down
10 changes: 5 additions & 5 deletions lib/iterator.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W iterator.gd GAP4 package `Utils' Chris Wensley
##
#Y Copyright (C) 2015-2019, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## These functions complement AllHomomorphisms, AllEndomorphisms, and
Expand All @@ -15,7 +15,7 @@
#O AllIsomorphisms( <G>, <H> )
##
DeclareOperation( "AllIsomorphismsIterator", [ IsGroup, IsGroup ] );
DeclareGlobalFunction( "DoAllIsomorphismsIterator" );
DeclareGlobalName( "DoAllIsomorphismsIterator" );
DeclareOperation( "AllIsomorphismsNumber", [ IsGroup, IsGroup ] );
DeclareOperation( "AllIsomorphisms", [ IsGroup, IsGroup ] );

Expand All @@ -26,7 +26,7 @@ DeclareOperation( "AllIsomorphisms", [ IsGroup, IsGroup ] );
#F DoAllSubgroupsIterator
##
DeclareOperation( "AllSubgroupsIterator", [ IsGroup ] );
DeclareGlobalFunction( "DoAllSubgroupsIterator" );
DeclareGlobalName( "DoAllSubgroupsIterator" );

#############################################################################
## These functions provide ways of combining two iterators into one
Expand All @@ -37,6 +37,6 @@ DeclareGlobalFunction( "DoAllSubgroupsIterator" );
#F DoUnorderedPairsIterator
##
DeclareOperation( "CartesianIterator", [ IsIterator, IsIterator ] );
DeclareGlobalFunction( "DoCartesianIterator" );
DeclareGlobalName( "DoCartesianIterator" );
DeclareOperation( "UnorderedPairsIterator", [ IsIterator ] );
DeclareGlobalFunction( "DoUnorderedPairsIterator" );
DeclareGlobalName( "DoUnorderedPairsIterator" );
10 changes: 5 additions & 5 deletions lib/iterator.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W iterator.gi GAP4 package `Utils' Chris Wensley
##
#Y Copyright (C) 2015-2019, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

##############################################################################
##
Expand All @@ -27,7 +27,7 @@ BindGlobal( "ShallowCopy_AllIsomorphisms",
iter -> rec( firstiso := iter!.firstiso,
autoIterator := ShallowCopy( iter!.autoIterator ) ) );

InstallGlobalFunction( "DoAllIsomorphismsIterator",
BindGlobal( "DoAllIsomorphismsIterator",
function( G, H )

local iso, autoiter, iter;
Expand Down Expand Up @@ -117,7 +117,7 @@ BindGlobal( "ShallowCopy_AllSubgroups",
classIterator := ShallowCopy( iter!.classIterator ),
subgpIterator := ShallowCopy( iter!.subgpIterator ) ) );

InstallGlobalFunction( "DoAllSubgroupsIterator",
BindGlobal( "DoAllSubgroupsIterator",
function( G )

local lat, ccs, classIterator, subgpIterator, iter;
Expand Down Expand Up @@ -171,7 +171,7 @@ BindGlobal( "ShallowCopy_CartesianIterator",
Iterator2 := ShallowCopy( iter!.Iterator2 ),
Iterator2Copy := ShallowCopy( iter!.Iterator2Copy ) ) );

InstallGlobalFunction( "DoCartesianIterator",
BindGlobal( "DoCartesianIterator",
function( iter1, iter2 )

local iter;
Expand Down Expand Up @@ -231,7 +231,7 @@ BindGlobal( "ShallowCopy_UnorderedPairs",
Iterator2 := ShallowCopy( iter!.Iterator2 ),
Iterator1Copy := ShallowCopy( iter!.Iterator1Copy ) ) );

InstallGlobalFunction( "DoUnorderedPairsIterator",
BindGlobal( "DoUnorderedPairsIterator",
function( iter0 )

local iter;
Expand Down
6 changes: 3 additions & 3 deletions lib/latex.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
##
#W latex.gd GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2016, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## this function has been transferred from ResClasses
##
#F IntOrInfinityToLaTeX( n ) . LaTeX string representing integer or infinity
##
DeclareGlobalFunction( "IntOrInfinityToLaTeX" );
DeclareGlobalName( "IntOrInfinityToLaTeX" );

#############################################################################
## this function has been transferred from RCWA
Expand All @@ -19,7 +19,7 @@ DeclareGlobalFunction( "IntOrInfinityToLaTeX" );
## Returns the prime factorization of the integer <n> as a string in LaTeX
## format.
##
DeclareGlobalFunction( "LaTeXStringFactorsInt" );
DeclareGlobalName( "LaTeXStringFactorsInt" );

#############################################################################
##
Expand Down
6 changes: 3 additions & 3 deletions lib/latex.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
##
#W latex.gi GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2016, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## this function has been transferred from ResClasses
##
#F IntOrInfinityToLaTeX( n ) . LaTeX string for a given integer or infinity
##
InstallGlobalFunction( IntOrInfinityToLaTeX,
BindGlobal( "IntOrInfinityToLaTeX",

function( n )
if IsInt(n) then return String(n);
Expand All @@ -22,7 +22,7 @@ InstallGlobalFunction( IntOrInfinityToLaTeX,
##
#F LaTeXStringFactorsInt( <n> ) . . . . prime factorization in LaTeX format
##
InstallGlobalFunction( LaTeXStringFactorsInt,
BindGlobal( "LaTeXStringFactorsInt",

function ( n )

Expand Down
4 changes: 2 additions & 2 deletions lib/lcset.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W lcset.gd GAP4 package `Utils' Chris Wensley
##
#Y Copyright (C) 2015-2022, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
##
Expand Down Expand Up @@ -31,5 +31,5 @@ DeclareOperation( "LeftCoset", [ IsObject, IsGroup ] );
#O LeftCosets( <G>, <U> ) . . . . . . . . . . . . . . . cosets gU for g in G
#O LeftCosetsNC( <G>, <U> ) . . . . . . . . . . . . . . cosets gU for g in G
##
DeclareGlobalFunction( "LeftCosets" );
DeclareGlobalName( "LeftCosets" );
DeclareOperation( "LeftCosetsNC", [ IsGroup, IsGroup ] );
5 changes: 3 additions & 2 deletions lib/lcset.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W lcset.gi GAP4 package `Utils' Chris Wensley
##
#Y Copyright (C) 2015-2022, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
##
Expand Down Expand Up @@ -138,7 +138,8 @@ end);
#F LeftCosets( <G> <U> ) . . . . . . . . . . . . left cosets of U by g \in G
#O LeftCosetsNC( <G> <U> ) . . . . . . . . . . . left cosets of U by g \in G
##
InstallGlobalFunction( LeftCosets, function( G, U )
BindGlobal( "LeftCosets",
function( G, U )
if not IsSubset( G, U ) then
Error("not contained");
fi;
Expand Down
10 changes: 5 additions & 5 deletions lib/lists.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W lists.gd GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2018, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## these functions have been transferred from ResClasses
Expand All @@ -11,9 +11,9 @@
#F QuotientsList( <list> ) . . . . . . quotients of consecutive list entries
#F FloatQuotientsList( <list> ) . . . . . . . . . . . . dito, but as floats
##
DeclareGlobalFunction( "DifferencesList" );
DeclareGlobalFunction( "QuotientsList" );
DeclareGlobalFunction( "FloatQuotientsList" );
DeclareGlobalName( "DifferencesList" );
DeclareGlobalName( "QuotientsList" );
DeclareGlobalName( "FloatQuotientsList" );

#############################################################################
## this function has been transferred from ResClasses
Expand All @@ -29,7 +29,7 @@ DeclareOperation( "RandomCombination", [ IsListOrCollection, IsPosInt ] );
##
#F SearchCycle( <l> ) . . . a utility function for detecting cycles in lists
##
DeclareGlobalFunction( "SearchCycle" );
DeclareGlobalName( "SearchCycle" );

#############################################################################
## these functions have been have been transferred from XMod
Expand Down
10 changes: 5 additions & 5 deletions lib/lists.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##
#W lists.gi GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2018, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## these functions have been transferred from ResClasses
Expand All @@ -12,11 +12,11 @@
#F FloatQuotientsList( <list> ) . . . . . . . . . . . . dito, but as floats
##

InstallGlobalFunction( DifferencesList,
BindGlobal( "DifferencesList",
list -> List( [ 2..Length(list) ],
pos -> list[ pos ] - list[ pos-1 ] ) );

InstallGlobalFunction( QuotientsList,
BindGlobal( "QuotientsList",
function( list )
local len, pos, quot;
len := Length( list );
Expand All @@ -31,7 +31,7 @@ InstallGlobalFunction( QuotientsList,
return quot;
end );

InstallGlobalFunction( FloatQuotientsList,
BindGlobal( "FloatQuotientsList",
list -> List( QuotientsList( list ), Float ) );

#############################################################################
Expand Down Expand Up @@ -62,7 +62,7 @@ InstallMethod( RandomCombination, "default method",
##
#F SearchCycle( <list> ) . a utility function for detecting cycles in lists
##
InstallGlobalFunction( SearchCycle,
BindGlobal( "SearchCycle",

function ( list )

Expand Down
4 changes: 2 additions & 2 deletions lib/magma.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#W magma.gd GAP4 package `Utils' Max Horn
## Alexander Hulpke
##
#Y Copyright (C) 2015-2017, The GAP Group
#Y Copyright (C) 2015-2025, The GAP Group

#############################################################################
## this function is new in Utils but calls functions which have been
## transferred from the main library or from private code
##
#F ConvertToMagmaInputString( <arg> ) . . output a string readable by Magma
##
DeclareGlobalFunction( "ConvertToMagmaInputString" );
DeclareGlobalName( "ConvertToMagmaInputString" );

#############################################################################
## this function was originally authored by Alexander Hulpke;
Expand Down
2 changes: 1 addition & 1 deletion lib/magma.gi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
##
#F ConvertToMagmaInputString( <obj> ) . . output a string readable by Magma
##
InstallGlobalFunction( ConvertToMagmaInputString,
BindGlobal( "ConvertToMagmaInputString",

function ( arg )

Expand Down
Loading