The following classes provide basic structures for monoids/groups. All objects below inherit from Str
/ Obj
/ Domain
, and
thus provide pretty printing infrastructure, a Domain.eqv
equality test method, and a Domain.sample
method to generate a random element.
Monoid
: Structure with a binary associative operation, an identity element (property), and test for identity.
Group
: A monoid with inverse elements.
CompactGroup
: A Group
with an associated Haar measure, which enables the construction of representations that can be handled by RepLAB.
AutomorphismGroup
: Describes the automorphism group of a group
Action
: Group can act on objects, and this describes the action of elements of a group on elements of a domain.
Bases: replab.Domain
Describes a monoid
Class members list
Properties
identity
– Monoid identity element
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
Property cache
cache
– Sets the value of the designated property in the cache
cached
– Returns the cached property if it exists, computing it if necessary
cachedOrDefault
– Returns the cached property if it exists, or the provided default value if it is unknown yet
cachedOrEmpty
– Returns the cached property if it exists, or []
if it is unknown yet
inCache
– Returns whether the value of the given property has already been computed
Laws
check
– Checks the consistency of this object
checkAndContinue
– Checks the consistency of this object
laws
– Returns the laws that this object obeys
Unique ID
eq
– Equality test
id
– Returns the unique ID of this object (deprecated)
isequal
– Equality test
ne
– Non-equality test
Test helpers
assertEqv
– Compares two elements for equality
assertNotEqv
– Compares two elements for inequality
Sampling and equality test
Domain construction
lambda
– Constructs a monoid from function handles
Monoid operations
areCommuting
– Returns whether the two given elements commute
compose
– Composes two monoid/group elements
composeAll
– Composes a sequence of monoid elements
composeN
– Computes the power of a given element by repeated squaring
isIdentity
– Tests if the given element is the identity
Inherited elements
Documentation in replab.Str.additionalFields()
Documentation in replab.Domain.assertEqv()
Documentation in replab.Domain.assertNotEqv()
Documentation in replab.Obj.cache()
Documentation in replab.Obj.cached()
Documentation in replab.Obj.cachedOrDefault()
Documentation in replab.Obj.cachedOrEmpty()
Documentation in replab.Obj.check()
Documentation in replab.Obj.checkAndContinue()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Domain.eqv()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Obj.id()
Documentation in replab.Obj.inCache()
Documentation in replab.Obj.isequal()
Documentation in replab.Obj.laws()
Documentation in replab.Str.longStr()
Documentation in replab.Obj.ne()
Documentation in replab.Domain.sample()
Documentation in replab.Str.shortStr()
Monoid identity element
element
Returns whether the two given elements commute
x (element
) – Monoid/Group element
y (element
) – Monoid/Group element
True if x y = y x
, false otherwise
logical
Composes two monoid/group elements
x (element
) – Left hand side of the binary operation
y (element
) – Right hand side of the binary operation
Result of the binary operation x op y
element
Composes a sequence of monoid elements
For self.composeAll({x1 x2 ... xn})
, returns x1*x2*...*xn
(shown here in multiplaticative notation)
elements (cell(1,*) of element
) – Elements to compose
Composition of the given elements
element
Computes the power of a given element by repeated squaring
x (element
) – Monoid/group element
n (integer
) – Power; if this is not a group, we need n >= 0
The element x^n
element
Tests if the given element is the identity
x (element
) – Monoid/Group element
True if x
is the identity, false otherwise
logical
Constructs a monoid from function handles
The constructed monoid
Bases: replab.Monoid
Describes a group
A group is a Monoid
where each element has an inverse.
Class members list
Properties
identity
– Monoid identity element
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
Property cache
cache
– Sets the value of the designated property in the cache
cached
– Returns the cached property if it exists, computing it if necessary
cachedOrDefault
– Returns the cached property if it exists, or the provided default value if it is unknown yet
cachedOrEmpty
– Returns the cached property if it exists, or []
if it is unknown yet
inCache
– Returns whether the value of the given property has already been computed
Laws
check
– Checks the consistency of this object
checkAndContinue
– Checks the consistency of this object
laws
– Returns the laws that this object obeys
Unique ID
eq
– Equality test
id
– Returns the unique ID of this object (deprecated)
isequal
– Equality test
ne
– Non-equality test
Test helpers
assertEqv
– Compares two elements for equality
assertNotEqv
– Compares two elements for inequality
Sampling and equality test
Domain construction
lambda
– Constructs a group from function handles
Monoid operations
areCommuting
– Returns whether the two given elements commute
compose
– Composes two monoid/group elements
composeAll
– Composes a sequence of monoid elements
composeN
– Computes the power of a given element by repeated squaring
isIdentity
– Tests if the given element is the identity
Morphisms
automorphismGroup
– Returns the automorphism group of this group
commutingMorphismsMorphism
– Constructs a morphism from morphisms with commuting images
innerAutomorphism
– Returns the inner automorphism given using conjugation by the given element
isomorphismByFunctions
– Constructs a group isomorphism using preimage/image functions
morphismByFunction
– Constructs a group morphism using an image function
Group methods
commutator
– Returns the commutator of two group elements
composeFlat
– Returns the composition of elements from an array picked according to the given indices/letters
composeWithInverse
– Returns the composition of an element with the inverse of another element
inverse
– Computes the inverse of an element
leftConjugate
– Returns the left conjugate of a group element
Inherited elements
Documentation in replab.Str.additionalFields()
Documentation in replab.Monoid.areCommuting()
Documentation in replab.Domain.assertEqv()
Documentation in replab.Domain.assertNotEqv()
Documentation in replab.Obj.cache()
Documentation in replab.Obj.cached()
Documentation in replab.Obj.cachedOrDefault()
Documentation in replab.Obj.cachedOrEmpty()
Documentation in replab.Obj.check()
Documentation in replab.Obj.checkAndContinue()
Documentation in replab.Monoid.compose()
Documentation in replab.Monoid.composeAll()
Documentation in replab.Monoid.composeN()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Domain.eqv()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Obj.id()
Documentation in replab.Monoid.identity
Documentation in replab.Obj.inCache()
Documentation in replab.Monoid.isIdentity()
Documentation in replab.Obj.isequal()
Documentation in replab.Obj.laws()
Documentation in replab.Str.longStr()
Documentation in replab.Obj.ne()
Documentation in replab.Domain.sample()
Documentation in replab.Str.shortStr()
Returns the automorphism group of this group
Returns the commutator of two group elements
x (element
) – First element
y (element
) – Second element
startWithInverse (logical
) – True if we compute x^-1 y^-1 x y
, false if we compute x y x^-1 y^-1
Commutator
element
Constructs a morphism from morphisms with commuting images
target (Group
) – Target group
morphisms (cell(1,*) of replab.Morphism
) – Morphisms whose images commute in target
The computed morphism
Returns the composition of elements from an array picked according to the given indices/letters
Computes composeAll({array(letters(1)) ... array(letters(n))})
with the convention that
letters (integer(1,*)
) – Letters composing word
array (cell(1,*) of elements
) – Elements to compose
The result of the composition
element
Returns the composition of an element with the inverse of another element
Convenience method that can be overriden for speed optimizations
x (element
) – First element
y (element
) – Second element
the result of x * y^-1
in multiplicative notation
element
Returns the inner automorphism given using conjugation by the given element
by (element
) – Conjugating element
Group automorphism (returns a FiniteMorphism
if this group is finite)
Computes the inverse of an element
Given x
, returns xInv
such that
x xInv = identity
Example
>>> G = replab.S(3);
>>> g = [2 3 1];
>>> ginv = G.inverse(g);
>>> G.isIdentity(G.compose(g, ginv))
1
x (element
) – Group element to compute the inverse of
Inverse of x
element
Constructs a group isomorphism using preimage/image functions
target (replab.Group
) – Target group
preimageElementFun (function_handle
) – Returns the source element for a target element
imageElementFun (function_handle
) – Returns the target element for a source element
torusMap (integer(*,*) or []
, optional) – Torus map used in the Morphism
construction, default: []
Constructed isomorphism (returns a FiniteIsomorphism
if this group is finite)
Constructs a group from function handles
header (char
) – Header display string
eqvFun (function_handle
) – Handle implementing the parent Domain.eqv
method
sampleFun (function_handle
) – Handle implementing the parent Domain.sample
method
composeFun (function_handle
) – Handle implementing the parent Monoid.compose
method
identity (element
) – Identity element of this monoid
inverseFun (function_handle
) – Handle implementing the inverse
method
The constructed group
Returns the left conjugate of a group element
Convenience method that can be overriden for speed optimizations
by (element
) – Element conjugating
on (element
) – Element conjugated
left conjugate, i.e. by * on * by^-1
in multiplicative notation
element
Constructs a group morphism using an image function
target (replab.Group
) – Target group
imageElementFun (function_handle
) – Returns the target element for a source element
torusMap (integer(*,*) or []
, optional) – Torus map used in the Morphism
construction, default: []
Bases: replab.Group
A group equipped with a Haar measure
Class members list
Properties
identity
– Monoid identity element
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
Property cache
cache
– Sets the value of the designated property in the cache
cached
– Returns the cached property if it exists, computing it if necessary
cachedOrDefault
– Returns the cached property if it exists, or the provided default value if it is unknown yet
cachedOrEmpty
– Returns the cached property if it exists, or []
if it is unknown yet
inCache
– Returns whether the value of the given property has already been computed
Laws
check
– Checks the consistency of this object
checkAndContinue
– Checks the consistency of this object
laws
– Returns the laws that this object obeys
Unique ID
eq
– Equality test
id
– Returns the unique ID of this object (deprecated)
isequal
– Equality test
ne
– Non-equality test
Test helpers
assertEqv
– Compares two elements for equality
assertNotEqv
– Compares two elements for inequality
Sampling and equality test
Domain construction
lambda
– Constructs a compact group from function handles
Monoid operations
areCommuting
– Returns whether the two given elements commute
compose
– Composes two monoid/group elements
composeAll
– Composes a sequence of monoid elements
composeN
– Computes the power of a given element by repeated squaring
isIdentity
– Tests if the given element is the identity
Morphisms
automorphismGroup
– Returns the automorphism group of this group
commutingMorphismsMorphism
– Constructs a morphism from morphisms with commuting images
innerAutomorphism
– Returns the inner automorphism given using conjugation by the given element
isomorphismByFunctions
– Constructs a group isomorphism using preimage/image functions
morphismByFunction
– Constructs a group morphism using an image function
Group methods
commutator
– Returns the commutator of two group elements
composeFlat
– Returns the composition of elements from an array picked according to the given indices/letters
composeWithInverse
– Returns the composition of an element with the inverse of another element
inverse
– Computes the inverse of an element
leftConjugate
– Returns the left conjugate of a group element
Representations
commutingRepsRep
– Constructs a representation from commuting representations
directSumRep
– Computes the direct sum of representations on this group
tensorRep
– Computes the tensor product of representations
trivialRep
– Returns the trivial representation of this group on a finite dimensional vector space
Group construction
directPower
– Returns the direct product of this group with itself a number of times
directProduct
– Returns the direct product of groups
semidirectProduct
– Describes an external semidirect product of groups
Group properties
hasReconstruction
– Returns whether the group has a “reconstruction”
maximalTorusDimension
– Returns, if available, the dimension of the maximal torus contained in the connected component of this group
reconstruction
– Returns a reconstruction of the group used to speed up group averaging
Inherited elements
Documentation in replab.Str.additionalFields()
Documentation in replab.Monoid.areCommuting()
Documentation in replab.Domain.assertEqv()
Documentation in replab.Domain.assertNotEqv()
Documentation in replab.Group.automorphismGroup()
Documentation in replab.Obj.cache()
Documentation in replab.Obj.cached()
Documentation in replab.Obj.cachedOrDefault()
Documentation in replab.Obj.cachedOrEmpty()
Documentation in replab.Obj.check()
Documentation in replab.Obj.checkAndContinue()
Documentation in replab.Group.commutator()
Documentation in replab.Group.commutingMorphismsMorphism()
Documentation in replab.Monoid.compose()
Documentation in replab.Monoid.composeAll()
Documentation in replab.Group.composeFlat()
Documentation in replab.Monoid.composeN()
Documentation in replab.Group.composeWithInverse()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Domain.eqv()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Obj.id()
Documentation in replab.Monoid.identity
Documentation in replab.Obj.inCache()
Documentation in replab.Group.innerAutomorphism()
Documentation in replab.Group.inverse()
Documentation in replab.Monoid.isIdentity()
Documentation in replab.Obj.isequal()
Documentation in replab.Group.isomorphismByFunctions()
Documentation in replab.Obj.laws()
Documentation in replab.Group.leftConjugate()
Documentation in replab.Str.longStr()
Documentation in replab.Group.morphismByFunction()
Documentation in replab.Obj.ne()
Documentation in replab.Domain.sample()
Documentation in replab.Str.shortStr()
Constructs a representation from commuting representations
field ({'R', 'C'}
) – Field
dimension (integer
) – Dimension of the representation
reps (cell(1,*) of Rep
) – Commuting representations with the given field and dimension
A representation computed from the product of representations
Returns the direct product of this group with itself a number of times
n (integer
) – Number of copies
x ...(n times)... x self
The return type is specialized as in directProduct
.
Returns the direct product of groups
Example
>>> S3 = replab.S(3);
>>> G = S3.directProduct(S3, S3);
>>> G.order
216
varargin – Variable number of arguments of type CompactGroup
If all groups are of type FiniteGroup
, the return type FiniteGroup
as well.
Computes the direct sum of representations on this group
Returns whether the group has a “reconstruction”
True if the call to reconstruction
would succeed
logical
Constructs a compact group from function handles
header (char
) – Header display string
eqvFun (function_handle
) – Handle implementing the eqv
method
sampleFun (function_handle
) – Handle implementing the sample
method
composeFun (function_handle
) – Handle implementing the compose
method
identity (element
) – Identity element of this monoid
inverseFun (function_handle
) – Handle implementing the inverse
method
The constructed compact group
replab.CompactGroup
Returns, if available, the dimension of the maximal torus contained in the connected component of this group
Maximal torus dimension if available, or []
if no reconstruction is available
integer or []
Returns a reconstruction of the group used to speed up group averaging
When G
is a compact Lie group, we consider the chain of subgroups G >= G0 >= T
, where:
G0
is the connected component of the group around the identity; we also know that the number of left cosets
of G0
in G
is finite; see the group of components, or, for example:
https://mathoverflow.net/questions/378160/improved-classification-of-compact-lie-groups .
We write R
a (finite) set of left coset representatives. Thus any element g
of G
can be written g = r g0
where r \in R
and g0 \in G0
.
G0
contains a maximal torus T
.
To average over the action of a representation rho
of G
on x
, we write x1 = \int_G d\mu(g) \rho(g) x
.
However, this is equivalent to x1 = 1/|R| \sum_{r \in R} \int_G0 d\mu(g) \rho(g) x
.
We finally write x1 = 1/{R} \sum_{r \in R} \int_G0 d\mu(g) \rho(g) \int_T d\mu(t) \rho(t) x
; again, the fact that we integrate
first over the maximal torus subgroup does not affect the result. However, integration over the maximal torus can often be done
very quickly, and the reconstruction speeds up the computation of various equivariant subspaces dramatically.
This method returns R
as a SetProduct
, and T
as a Morphism
from T
to G
.
Describes an external semidirect product of groups
See the construction in https://en.wikipedia.org/wiki/Semidirect_product
Let H = self
be a group, N
a group.
The semidirect product is defined using a homomorphism
`` phi: H -> Aut(N) ``
which we write here in uncurried form:
phi: H x N -> N ``, ``n1 = phi(h, n)
.
We describe this homomorphism by a function handle with parameters of type H x N
, which returns
an element of type N
.
We write each semidirect group element as a cell array of two elements {h, n}
.
The basic law of a semidirect product construction is the following.
Let h \in H
, n \in N
, h1 = {h, N.identity}
, n1 = {H.identity, n}
. Then
phi(h, n) == h1 n1 h1^-1
.
The type of the return value depends on the most refined type at the intersection
of the type of self
and N
, with possible types CompactGroup/FiniteGroup.
N (CompactGroup
) – Group acted upon
phi (function_handle
) – Function describing a homomorphism as described above
Semidirect product group
Computes the tensor product of representations
Returns the trivial representation of this group on a finite dimensional vector space
For convenience, either the representation can act on a real or complex vector space, and multiple copies of the 1-dimensional trivial representation can be included, when dimension > 1.
field ({'R', 'C'}
) – Whether the representation is real (R) or complex (C)
dimension (integer, optional
) – Representation dimension
Default value 1
An instance of the trivial representation
Bases: replab.Group
Describes the automorphism group of a group
Class members list
Properties
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
Property cache
cache
– Sets the value of the designated property in the cache
cached
– Returns the cached property if it exists, computing it if necessary
cachedOrDefault
– Returns the cached property if it exists, or the provided default value if it is unknown yet
cachedOrEmpty
– Returns the cached property if it exists, or []
if it is unknown yet
inCache
– Returns whether the value of the given property has already been computed
Laws
check
– Checks the consistency of this object
checkAndContinue
– Checks the consistency of this object
laws
– Returns the laws that this object obeys
Unique ID
eq
– Equality test
id
– Returns the unique ID of this object (deprecated)
isequal
– Equality test
ne
– Non-equality test
Test helpers
assertEqv
– Compares two elements for equality
assertNotEqv
– Compares two elements for inequality
Sampling and equality test
Monoid operations
areCommuting
– Returns whether the two given elements commute
compose
– Composes two monoid/group elements
composeAll
– Composes a sequence of monoid elements
composeN
– Computes the power of a given element by repeated squaring
isIdentity
– Tests if the given element is the identity
Morphisms
automorphismGroup
– Returns the automorphism group of this group
commutingMorphismsMorphism
– Constructs a morphism from morphisms with commuting images
innerAutomorphism
– Returns the inner automorphism given using conjugation by the given element
isomorphismByFunctions
– Constructs a group isomorphism using preimage/image functions
morphismByFunction
– Constructs a group morphism using an image function
Group methods
commutator
– Returns the commutator of two group elements
composeFlat
– Returns the composition of elements from an array picked according to the given indices/letters
composeWithInverse
– Returns the composition of an element with the inverse of another element
inverse
– Computes the inverse of an element
leftConjugate
– Returns the left conjugate of a group element
General
Inherited elements
No documentation
Documentation in replab.Str.additionalFields()
Documentation in replab.Monoid.areCommuting()
Documentation in replab.Domain.assertEqv()
Documentation in replab.Domain.assertNotEqv()
Documentation in replab.Group.automorphismGroup()
Documentation in replab.Obj.cache()
Documentation in replab.Obj.cached()
Documentation in replab.Obj.cachedOrDefault()
Documentation in replab.Obj.cachedOrEmpty()
Documentation in replab.Obj.check()
Documentation in replab.Obj.checkAndContinue()
Documentation in replab.Group.commutator()
Documentation in replab.Group.commutingMorphismsMorphism()
Documentation in replab.Monoid.compose()
Documentation in replab.Monoid.composeAll()
Documentation in replab.Group.composeFlat()
Documentation in replab.Monoid.composeN()
Documentation in replab.Group.composeWithInverse()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Domain.eqv()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Obj.id()
Documentation in replab.Monoid.identity
Documentation in replab.Obj.inCache()
Documentation in replab.Group.innerAutomorphism()
Documentation in replab.Group.inverse()
Documentation in replab.Monoid.isIdentity()
Documentation in replab.Obj.isequal()
Documentation in replab.Group.isomorphismByFunctions()
Documentation in replab.Obj.laws()
Documentation in replab.Group.leftConjugate()
Documentation in replab.Str.longStr()
Documentation in replab.Group.morphismByFunction()
Documentation in replab.Obj.ne()
Documentation in replab.Domain.sample()
Documentation in replab.Str.shortStr()
Bases: replab.Obj
A group action describing the action of a group on a set
Elements of the group G
act upon elements of type P
.
Class members list
Properties
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
Property cache
cache
– Sets the value of the designated property in the cache
cached
– Returns the cached property if it exists, computing it if necessary
cachedOrDefault
– Returns the cached property if it exists, or the provided default value if it is unknown yet
cachedOrEmpty
– Returns the cached property if it exists, or []
if it is unknown yet
inCache
– Returns whether the value of the given property has already been computed
Laws
check
– Checks the consistency of this object
checkAndContinue
– Checks the consistency of this object
laws
– Returns the laws that this object obeys
Unique ID
eq
– Equality test
id
– Returns the unique ID of this object (deprecated)
isequal
– Equality test
ne
– Non-equality test
General
lambda
– Constructs an action from a function handle
Action methods
leftAction
– Computes the left action of a group element on a set element
rightAction
– Computes the right action of a group element on a set element
Inherited elements
Documentation in replab.Str.additionalFields()
Documentation in replab.Obj.cache()
Documentation in replab.Obj.cached()
Documentation in replab.Obj.cachedOrDefault()
Documentation in replab.Obj.cachedOrEmpty()
Documentation in replab.Obj.check()
Documentation in replab.Obj.checkAndContinue()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Obj.id()
Documentation in replab.Obj.inCache()
Documentation in replab.Obj.isequal()
Documentation in replab.Obj.laws()
Documentation in replab.Str.longStr()
Documentation in replab.Obj.ne()
Documentation in replab.Str.shortStr()
Constructs an action from a function handle
G (Group
) – Group acting
(Domain (P
) – Set acted upon
leftActionFun (function_handle
) – Handle implementing leftAction
The action
Computes the left action of a group element on a set element
Returns the left action, often denoted by p1 = g(p)
of G over P,
which is compatible with group composition as in:
`` p2 = g(h(p)) = (g compose h)(p) ``
Computes the right action of a group element on a set element
Returns the right action, often denoted p1 = p^g
,
compatible with the group composition as in
p2 = (p^g)^h = p^(g compose h)