Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 Bib Ind
[Top of Book] [Contents] [Next Chapter]

[MathJax off]

# utils

## Utility functions in GAP

0.95

18 May 2026

Thomas Breuer
Email: sam@math.rwth-aachen.de
Homepage: https://www.math.rwth-aachen.de/~Thomas.Breuer

Sebastian Gutsche
Email: gutsche@mathematik.uni-siegen.de
Homepage: https://sebasguts.github.io/

Max Horn
Email: mhorn@rptu.de
Homepage: https://github.com/mhorn

Alexander Hulpke
Email: hulpke@math.colostate.edu
Homepage: https://www.math.colostate.edu/~hulpke

Pedro García-Sánchez
Email: pedro@ugr.es
Homepage: http://www.ugr.es/local/pedro

Christopher Jefferson
Email: caj21@st-andrews.ac.uk
Homepage: https://caj.host.cs.st-andrews.ac.uk/

Stefan Kohl
Email: stefan@mcs.st-and.ac.uk
Homepage: https://www.gap-system.org/DevelopersPages/StefanKohl/

Frank Lübeck
Email: Frank.Luebeck@Math.RWTH-Aachen.De
Homepage: https://www.math.rwth-aachen.de/~Frank.Luebeck

Chris Wensley
Email: cdwensley.maths@btinternet.com
Homepage: https://github.com/cdwensley

### Abstract

The Utils package provides a space for utility functions in a variety of GAP packages to be collected together into a single package. In this way it is hoped that they will become more visible to package authors.

Any package author who transfers a function to Utils will become an author of Utils.

If deemed appropriate, functions may also be transferred from the main library.

Bug reports, suggestions and comments are, of course, welcome. Please contact the last author at cdwensley.maths@btinternet.com or submit an issue at the GitHub repository https://github.com/gap-packages/utils/issues/.

### Copyright

© 2015-2026, The GAP Group.

The Utils package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

### Acknowledgements

This documentation was prepared using the GAPDoc [LN17] and AutoDoc [GH16] packages.

The procedure used to produce new releases uses the package GitHubPagesForGAP [Hor17] and the package ReleaseTools.

### Contents

1 Introduction
1.1 Information for package authors
2 Printing Lists and Iterators
2.1 Printing selected items
2.1-1 PrintSelection
3 Lists, Sets and Strings
3.1 Functions for lists
3.1-1 DifferencesList
3.1-2 QuotientsList
3.1-3 SearchCycle
3.1-4 RandomCombination
3.2 Distinct and Common Representatives
3.2-1 DistinctRepresentatives
3.3 Functions for strings
3.3-1 BlankFreeString
4 Number-theoretic functions
4.1 Functions for integers
4.1-1 AllSmoothIntegers
4.1-2 AllProducts
4.1-3 RestrictedPartitionsWithoutRepetitions
4.1-4 NextProbablyPrimeInt
4.1-5 PrimeNumbersIterator
5 Groups and homomorphisms
5.1 Functions for groups
5.1-1 Comm
5.1-2 IsCommuting
5.1-3 ListOfPowers
5.1-4 GeneratorsAndInverses
5.1-5 UpperFittingSeries
5.2 Left Cosets for Groups
5.2-1 LeftCoset
5.2-2 Inverse
5.3 Functions for group homomorphisms
5.3-1 EpimorphismByGenerators
5.3-2 Pullback
5.3-3 CentralProduct
5.3-4 IdempotentEndomorphisms
5.3-5 DirectProductOfFunctions
5.3-6 DirectProductOfAutomorphismGroups
6 Matrices
6.1 Some operations for matrices
6.1-1 DirectSumDecompositionMatrices
7 Iterators
7.1 Some iterators for groups and their isomorphisms
7.1-1 AllIsomorphismsIterator
7.1-2 AllSubgroupsIterator
7.2 Operations on iterators
7.2-1 CartesianIterator
7.2-2 UnorderedPairsIterator
8 Records
8.1 Functions for records
8.1-1 AssignGlobals
8.2 Option records for functions
8.2-1 OptionRecordWithDefaults
9 Web Downloads
9.1 Functions for downloading files from the web
9.1-1 Download
9.1-2 User preference `DownloadVerifyCertificate`
9.1-3 User preference `DownloadMaxTime`
10 Generalized Straight Line Programs
10.1 Functions for Generalized Straight Line Programs
10.1-1 IsGeneralizedStraightLineProgram
10.1-2 GeneralizedStraightLineProgram
10.1-3 DataOfGeneralizedStraightLineProgram
10.1-4 NrInputsOfGeneralizedStraightLineProgram
10.1-5 NrOutputsOfGeneralizedStraightLineProgram
10.1-6 ResultOfGeneralizedStraightLineProgram
10.1-7 EquivalentStraightLineProgram
10.1-8 IsInternallyConsistent
11 Various other functions
11.1 File operations
11.1-1 Log2HTML
11.2 LaTeX strings
11.2-1 IntOrInfinityToLaTeX
11.2-2 LaTeXStringFactorsInt
11.3 Conversion to \({\sf Magma}\) strings
11.3-1 ConvertToMagmaInputString
12 Obsolete functions
12.1 Operations from AutoDoc
12.2 Functions for printing
12.3 Other obsolete functions
12.3-1 Applicable Methods
12.3-2 ExponentOfPrime
13 The transfer procedure
References
Index
[Top of Book] [Contents] [Next Chapter]
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 Bib Ind

generated by GAPDoc2HTML