  
  [1X4 [33X[0;0YTwisted conjugacy classes[133X[101X
  
  [33X[0;0YThe  orbits  of  the  [23X(\varphi,\psi)[123X-twisted conjugacy action are called the
  [13X[23X(\varphi,\psi)[123X-twisted  conjugacy  classes[113X  or  the  [13XReidemeister classes of
  [23X(\varphi,\psi)[123X[113X.  We  denote  the  twisted  conjugacy  class  of  [23Xg  \in G[123X by
  [23X[g]_{\varphi,\psi}[123X.[133X
  
  
  [1X4.1 [33X[0;0YCreating a twisted conjugacy class[133X[101X
  
  [1X4.1-1 TwistedConjugacyClass[101X
  
  [33X[1;0Y[29X[2XTwistedConjugacyClass[102X( [3Xhom1[103X[, [3Xhom2[103X], [3Xg[103X ) [32X function[133X
  [33X[1;0Y[29X[2XReidemeisterClass[102X( [3Xhom1[103X[, [3Xhom2[103X], [3Xg[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ythe [10X([3Xhom1[103X[10X,[3Xhom2[103X[10X)[110X-twisted conjugacy class of [3Xg[103X.[133X
  
  
  [1X4.2 [33X[0;0YOperations on twisted conjugacy classes[133X[101X
  
  
  [1X4.2-1 [33X[0;0YRepresentative[133X[101X
  
  [33X[1;0Y[29X[2XRepresentative[102X( [3Xtcc[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe group element that was used to construct [3Xtcc[103X.[133X
  
  
  [1X4.2-2 [33X[0;0YActingDomain[133X[101X
  
  [33X[1;0Y[29X[2XActingDomain[102X( [3Xtcc[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe group whose twisted conjugacy action [3Xtcc[103X is an orbit of.[133X
  
  
  [1X4.2-3 [33X[0;0YFunctionAction[133X[101X
  
  [33X[1;0Y[29X[2XFunctionAction[102X( [3Xtcc[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe twisted conjugacy action that [3Xtcc[103X is an orbit of.[133X
  
  
  [1X4.2-4 [33X[0;0Y\in[133X[101X
  
  [33X[1;0Y[29X[2X\in[102X( [3Xg[103X, [3Xtcc[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X if [3Xg[103X is an element of [3Xtcc[103X, otherwise [9Xfalse[109X.[133X
  
  
  [1X4.2-5 [33X[0;0YSize[133X[101X
  
  [33X[1;0Y[29X[2XSize[102X( [3Xtcc[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe number of elements in [3Xtcc[103X.[133X
  
  [33X[0;0YThis is calculated using the orbit-stabiliser theorem.[133X
  
  
  [1X4.2-6 [33X[0;0YStabiliserOfExternalSet[133X[101X
  
  [33X[1;0Y[29X[2XStabiliserOfExternalSet[102X( [3Xtcc[103X ) [32X attribute[133X
  [6XReturns:[106X  [33X[0;10Ythe   stabiliser   of   [10XRepresentative([3Xtcc[103X[10X)[110X   under   the   action
            [10XFunctionAction([3Xtcc[103X[10X)[110X.[133X
  
  
  [1X4.2-7 [33X[0;0YList[133X[101X
  
  [33X[1;0Y[29X[2XList[102X( [3Xtcc[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya list containing the elements of [3Xtcc[103X.[133X
  
  [33X[0;0YIf  [3Xtcc[103X  is infinite, this will run forever. It is recommended to first test
  the finiteness of [3Xtcc[103X using [2XSize[102X ([14X4.2-5[114X).[133X
  
  
  [1X4.2-8 [33X[0;0YRandom[133X[101X
  
  [33X[1;0Y[29X[2XRandom[102X( [3Xtcc[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya random element in [3Xtcc[103X.[133X
  
  
  [1X4.2-9 [33X[0;0Y\=[133X[101X
  
  [33X[1;0Y[29X[2X\=[102X( [3Xtcc1[103X, [3Xtcc2[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X if [3Xtcc1[103X is equal to [3Xtcc2[103X, otherwise [9Xfalse[109X.[133X
  
  
  [1X4.3 [33X[0;0YCalculating all twisted conjugacy classes[133X[101X
  
  [1X4.3-1 TwistedConjugacyClasses[101X
  
  [33X[1;0Y[29X[2XTwistedConjugacyClasses[102X( [3Xhom1[103X[, [3Xhom2[103X][, [3XN[103X] ) [32X function[133X
  [33X[1;0Y[29X[2XReidemeisterClasses[102X( [3Xhom1[103X[, [3Xhom2[103X][, [3XN[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya  list  containing  the ([3Xhom1[103X, [3Xhom2[103X)-twisted conjugacy classes if
            there are finitely many, or [9Xfail[109X otherwise.[133X
  
  [33X[0;0YIf  the argument [3XN[103X is provided, it must be a normal subgroup of [10XRange([3Xhom1[103X[10X)[110X;
  the function will then only return the Reidemeister classes that intersect [3XN[103X
  non-trivially.  It is guaranteed that the Reidemeister class of the identity
  is in the first position, and that the representatives of the classes belong
  to [3XN[103X if this argument is provided.[133X
  
  [33X[0;0YIf  [23XG[123X  and  [23XH[123X  are  finite,  this  function  relies  on  an orbit-stabiliser
  algorithm. Otherwise, it relies on the algorithms in [DT21] and [Ter25].[133X
  
  [1X4.3-2 RepresentativesTwistedConjugacyClasses[101X
  
  [33X[1;0Y[29X[2XRepresentativesTwistedConjugacyClasses[102X( [3Xhom1[103X[, [3Xhom2[103X][, [3XN[103X] ) [32X function[133X
  [33X[1;0Y[29X[2XRepresentativesReidemeisterClasses[102X( [3Xhom1[103X[, [3Xhom2[103X][, [3XN[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya  list  containing  representatives  of  the ([3Xhom1[103X, [3Xhom2[103X)-twisted
            conjugacy classes if there are finitely many, or [9Xfail[109X otherwise.[133X
  
  [33X[0;0YIf  the argument [3XN[103X is provided, it must be a normal subgroup of [10XRange([3Xhom1[103X[10X)[110X;
  the  function  will  then  only  return  the  representatives of the twisted
  conjugacy  classes that intersect [3XN[103X non-trivially. It is guaranteed that the
  identity is in the first position, and that all elements belong to [3XN[103X if this
  argument is provided.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xtcc := TwistedConjugacyClass( phi, psi, g1 );[127X[104X
    [4X[28X(4,6,5)^G[128X[104X
    [4X[25Xgap>[125X [27XRepresentative( tcc );[127X[104X
    [4X[28X(4,6,5)[128X[104X
    [4X[25Xgap>[125X [27XActingDomain( tcc ) = H;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XFunctionAction( tcc )( g1, h );[127X[104X
    [4X[28X(1,6,4,2)(3,5)[128X[104X
    [4X[25Xgap>[125X [27XList( tcc );[127X[104X
    [4X[28X[ (4,6,5), (1,6,4,2)(3,5) ][128X[104X
    [4X[25Xgap>[125X [27XSize( tcc );[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XStabiliserOfExternalSet( tcc );[127X[104X
    [4X[28XGroup([ (1,2,3,4,5), (1,3,4,5,2) ])[128X[104X
    [4X[25Xgap>[125X [27XTwistedConjugacyClasses( phi, psi ){[1..7]};[127X[104X
    [4X[28X[ ()^G, (4,5,6)^G, (4,6,5)^G, (3,4)(5,6)^G, (3,4,5)^G, (3,4,6)^G, (3,5,4)^G ][128X[104X
    [4X[25Xgap>[125X [27XRepresentativesTwistedConjugacyClasses( phi, psi ){[1..7]};[127X[104X
    [4X[28X[ (), (4,5,6), (4,6,5), (3,4)(5,6), (3,4,5), (3,4,6), (3,5,4) ][128X[104X
    [4X[25Xgap>[125X [27XNrTwistedConjugacyClasses( phi, psi );[127X[104X
    [4X[28X184[128X[104X
  [4X[32X[104X
  
