Regina Calculation Engine
Classes | Public Member Functions | Protected Attributes | List of all members
regina::GroupPresentation Class Reference

Represents a finite presentation of a group. More...

#include <algebra/grouppresentation.h>

Inheritance diagram for regina::GroupPresentation:
regina::Output< GroupPresentation >

Public Member Functions

 GroupPresentation ()
 Creates a new presentation with no generators and no relations. More...
 
 GroupPresentation (const GroupPresentation &cloneMe)
 Creates a clone of the given group presentation. More...
 
 GroupPresentation (unsigned long nGens, const std::vector< std::string > &rels)
 Constructor that allows you to directly pass an arbitrary number of relators in string format. More...
 
 ~GroupPresentation ()
 Destroys the group presentation. More...
 
GroupPresentationoperator= (const GroupPresentation &cloneMe)
 Assignment operator. More...
 
unsigned long addGenerator (unsigned long numToAdd=1)
 Adds one or more generators to the group presentation. More...
 
void addRelation (GroupExpression *rel)
 Adds the given relation to the group presentation. More...
 
unsigned long countGenerators () const
 Returns the number of generators in this group presentation. More...
 
size_t countRelations () const
 Returns the number of relations in this group presentation. More...
 
const GroupExpressionrelation (size_t index) const
 Returns the relation at the given index in this group presentation. More...
 
bool isValid () const
 Tests whether all of the relations for the group are indeed words in the generators. More...
 
bool intelligentSimplify ()
 Attempts to simplify the group presentation as intelligently as possible without further input. More...
 
std::unique_ptr< HomGroupPresentationintelligentSimplifyDetail ()
 Attempts to simplify the group presentation as intelligently as possible without further input. More...
 
bool smallCancellation ()
 Attempts to simplify the group presentation using only small cancellation theory. More...
 
std::unique_ptr< HomGroupPresentationsmallCancellationDetail ()
 Attempts to simplify the group presentation using small cancellation theory. More...
 
bool simplifyWord (GroupExpression &input) const
 Uses small cancellation theory to reduce the input word, using the current presentation of the group. More...
 
void proliferateRelators (unsigned long depth=1)
 A routine to help escape local wells when simplifying presentations, which may be useful when small cancellation theory can't find the simplest relators. More...
 
std::string recogniseGroup (bool moreUtf8=false) const
 Attempts to recognise the group corresponding to this presentation. More...
 
void writeXMLData (std::ostream &out) const
 Writes a chunk of XML containing this group presentation. More...
 
size_t relatorLength () const
 The sum of the word lengths of the relators. More...
 
std::unique_ptr< AbelianGroupabelianisation () const
 Computes the abelianisation of this group. More...
 
std::unique_ptr< MarkedAbelianGroupmarkedAbelianisation () const
 Computes the abelianisation of this group. More...
 
bool identifyAbelian () const
 Attempts to determine if the group is abelian. More...
 
bool nielsenTransposition (unsigned long i, unsigned long j)
 Switches the generators in the presentation indexed by i and j respectively, and recomputes the appropriate presentation. More...
 
bool nielsenInvert (unsigned long i)
 Replaces a generator in a presentation by its inverse, and recomputes the appropriate presentation. More...
 
bool nielsenCombine (unsigned long i, unsigned long j, long k, bool rightMult=true)
 Replaces a generator gi by either (gi)(gj)^k or (gj)^k(gi) in the presentation. More...
 
bool intelligentNielsen ()
 Looks for Nielsen moves that will simplify the presentation. More...
 
std::unique_ptr< HomGroupPresentationintelligentNielsenDetail ()
 Looks for Nielsen moves that will simplify the presentation. More...
 
bool homologicalAlignment ()
 Rewrites the presentation so that generators of the group map to generators of the abelianisation, with any left-over generators mapping to zero (if possible). More...
 
std::unique_ptr< HomGroupPresentationhomologicalAlignmentDetail ()
 Rewrites the presentation so that generators of the group map to generators of the abelianisation, with any left-over generators mapping to zero (if possible). More...
 
bool prettyRewriting ()
 An entirely cosmetic re-writing of the presentation, which is fast and superficial. More...
 
std::unique_ptr< HomGroupPresentationprettyRewritingDetail ()
 An entirely cosmetic re-writing of the presentation, which is fast and superficial. More...
 
bool identifySimplyIsomorphicTo (const GroupPresentation &other) const
 Attempts to prove that this and the given group presentation are simply isomorphic. More...
 
std::string toTeX () const
 Returns a TeX representation of this group presentation. More...
 
void writeTeX (std::ostream &out) const
 Writes a TeX represesentation of this group presentation to the given output stream. More...
 
std::string compact () const
 Returns a compact one-line representation of this group presentation, including details of all generators and relations. More...
 
void writeTextCompact (std::ostream &out) const
 Writes a compact represesentation of this group to the given output stream. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
FinitelyPresentedGroup sage () const
 A Sage-only routine that returns a copy of this group presentation in a format native to Sage. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Protected Attributes

unsigned long nGenerators
 The number of generators. More...
 
std::vector< GroupExpression * > relations
 The relations between the generators. More...
 

Detailed Description

Represents a finite presentation of a group.

A presentation consists of a number of generators and a set of relations between these generators that together define the group.

If there are g generators, they will be numbered 0, 1, ..., g-1.

Todo:
Let's make intelligent simplify a tad more intelligent, and the GUI call a bit more safe. Perhaps parallelize the GUI call, and give users parameters to ensure it won't crash the computer. Also look at the FPGroup package. We should also have a simple way of creating GroupPresentation objects directly from text strings. We would like to have something like GroupPresentation( numGens, "abAAB", "bccd" ) etc., with arbitrary numbers of relators. Maybe std::tuple. Or "variadic templates"?

Member Function Documentation

◆ detail()

std::string regina::Output< GroupPresentation , false >::detail
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ str()

std::string regina::Output< GroupPresentation , false >::str
inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:\n In addition to str(), this is also used as the
Python "stringification" function __str__().
Returns
a short text representation of this object.

◆ utf8()

std::string regina::Output< GroupPresentation , false >::utf8
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
a short text representation of this object.

The documentation for this class was generated from the following file:

Copyright © 1999-2018, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).