RepLAB provides constructions of standard continuous groups.
First, we consider torus-like groups.
TorusGroup
: Describes a compact, connected, abelian Lie group (i.e. a torus group).
T
: Describes the standard torus group of given rank.
Then, we have the classical compact groups.
ClassicalCompactGroup
: Class implementing all the groups below.
O
: Constructs the group of (real) orthogonal matrices of a given size.
SO
: Constructs the group of (real) special orthogonal matrices of a given size.
U
: Constructs the group of (complex) unitary matrices of a given size.
SU
: Constructs the group of (complex) special unitary matrices of a given size.
Sp
: Constructs the compact symplectic group of a given size, which encodes using complex numbers the generalization of the unitary group to quaternions.
Bases: replab.CompactGroup
Describes a compact, connected, abelian Lie group
Its elements are column vectors of angles expressed in turns (see https://en.wikipedia.org/wiki/Turn_(angle)),
i.e. real numbers between 0 and 1, 1 not included. The group binary operation is addition modulo 1, the identity
is the turn 0
, and the inverse operation maps any non-zero turn x
to 1-x
.
When there are no additional restrictions on the elements of a given torus group, it is the standard torus group,
and it can be constructed with the function replab.T
.
Torus morphisms from integer matrices: https://math.stackexchange.com/questions/2229088/automorphisms-of-a-torus.
Let s = [s1;...;sn]
be the element of a (standard) torus of dimension n
and t = [t1;...;tm]
the element of
a (standard) torus of dimension m
. A torus morphism f
is given by a m x n
integer matrix M
, with the
image of s
being written t = f(s) = mod(M * s, 1)
.
Let the coefficients [t1; t2; ...; tn]
be the coefficients of this column vector, where n
is the torus group
dimension. The coefficients may or may not obey equations of the form mod(a1*t1 + a2*t2 + ... + an*tn, 1) == 0
,
where the coefficients a1 ... an
are integers. Those equations are collected as rows in the E
integer matrix.
Equivalently, the torus group obeying those relations is the kernel of the torus morphism encoded in E
.
How do we deal with those equations? We use the Hermite normal form of the matrix E
to extract a pair of morphisms
from T
(whose elements obey the equations) to a standard torus S
(whose dimension is then the rank of T
).
The morphism projection
from T
to S
is surjective, and the morphism injection
from S
to T
is injective,
and while projection(injection(s)) = s
. Both morphisms are given by integer matrices.
The defining representation of this group (definingRep
) is the n x n
matrix with diagonal elements u1
… un
.
Automorphisms of a torus group are given by invertible square integer matrices M
such that E*M*injection = 0
.
The explicit group elements (for example, the value returned by sample
) are written using the additive convention;
while the equations are written multiplicatively in symbolic form.
Class members list
Properties
E
– Equations obeyed by the elements of this torus
identity
– Monoid identity element
injection
– Injection map from maximal torus to this torus
n
– Torus dimension
names
– Names of coefficients in the multiplicative convention
projection
– Projection map from this torus to a maximal torus
r
– Torus rank
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
automorphism
– Constructs an automorphism of this torus from an integer matrix describing a torus map
automorphismGroup
– Returns the automorphism group of this group
commutingMorphismsMorphism
– Constructs a morphism from morphisms with commuting images
endomorphism
– Constructs an endomorphism of this torus from an integer matrix describing a torus map
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
torusMorphism
– Constructs a morphism from this torus group to another torus group from an integer matrix
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
definingRep
– Returns the defining representation of this torus group
diagonalRep
– Returns a diagonal representation of this torus group
diagonalRepWith
– Returns a diagonal rep of this torus group
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
General
TorusGroup
– Constructs a torus group obeying the given equations, with optional element names
equation
– Returns the i-th equation defining this torus group in monomial form
equations
– Returns all equations that this torus group obeys in monomial form
nEquations
– Returns the number of equations defining this torus group
subgroup
– Returns a subgroup of this torus that obeys the equations given in integer matrix form
subgroupWith
– Returns a subgroup of this torus that obeys the equations given in monomial form
torusRepImage
– Returns the sparse diagonal matrix corresponding to the given torus element
torusRepRealImage
– Returns the sparse block-diagonal matrix corresponding to the given torus element
withNames
– Returns a copy of this torus group with the names of the unit complex coefficients replaced
Group constructions
semidirectProductByFiniteGroup
– Returns the semidirect product of a finite group and this torus, with the finite group action defined by images
semidirectProductFromRep
– Returns the semidirect product of a finite group on the torus elements using one of its integer representations
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.CompactGroup.commutingRepsRep()
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.CompactGroup.directPower()
Documentation in replab.CompactGroup.directProduct()
Documentation in replab.CompactGroup.directSumRep()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Domain.eqv()
Documentation in replab.CompactGroup.hasReconstruction()
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.CompactGroup.maximalTorusDimension()
Documentation in replab.Group.morphismByFunction()
Documentation in replab.Obj.ne()
Documentation in replab.CompactGroup.reconstruction()
Documentation in replab.Domain.sample()
Documentation in replab.CompactGroup.semidirectProduct()
Documentation in replab.Str.shortStr()
Documentation in replab.CompactGroup.tensorRep()
Documentation in replab.CompactGroup.trivialRep()
Equations obeyed by the elements of this torus
integer(*,n)
Injection map from maximal torus to this torus
integer(n,r)
Torus dimension
integer
Names of coefficients in the multiplicative convention
cell(1,*) of charstring
Projection map from this torus to a maximal torus
integer(r,n)
Torus rank
integer
Constructs a torus group obeying the given equations, with optional element names
E (integer(*,n)
) – Integer matrix describing the equations; its number of columns provide the torus dimension
names (cell(1,n) of charstring, optional
) – Names of the group element coefficients in their unit complex form
Constructs an automorphism of this torus from an integer matrix describing a torus map
This function accepts a variable number of arguments. Each argument must be of the form:
An integer matrix with n
columns, defining equations as in the call to subgroup
,
A charstring containing an equation in monomial form.
Those arguments will be parsed and concatenated vertically to form an integer matrix describing the torus map. That matrix must be invertible.
The constructed automorphism
Returns the defining representation of this torus group
The defining representation of a torus group of dimension n
is a n-dimensional representation,
whose images are diagonal in the standard Euclidean basis.
Representation
Returns a diagonal representation of this torus group
Constructs a representation using a torusMap
, whose images are diagonal matrices. The diagonal
elements are monomials of the phases of the torus group. Each row of torusMap
corresponds to
a diagonal element, and the columns give the integer exponents corresponding to every phase.
torusMap (integer(d, n)
) – Phase exponents
Representation
Returns a diagonal rep of this torus group
Constructs an endomorphism of this torus from an integer matrix describing a torus map
This function accepts a variable number of arguments. Each argument must be of the form:
An integer matrix with n
columns, defining equations as in the call to subgroup
,
A charstring containing an equation in monomial form.
Those arguments will be parsed and concatenated vertically to form an integer matrix describing the torus map.
The constructed endomorphism
Returns the i-th equation defining this torus group in monomial form
i (integer
) – Equation index
Equation in monomial form (whose value must be equal to one)
charstring
Returns all equations that this torus group obeys in monomial form
Equations defining this torus group in monomial form
cell(1,*) of charstring
Returns the number of equations defining this torus group
Number of equations
integer
Returns the semidirect product of a finite group and this torus, with the finite group action defined by images
group (FiniteGroup
) – Finite group acting on this torus group
preimages – Preimages of the morphism which generate group
, defaults to group.generators
images – Action on the torus for the given preimages, defaults to a permutation action if group
is a permutation group
cell(1, *) of group
elements
cell(1, *) of target
elements
Semidirect product of group
and this torus group
Returns the semidirect product of a finite group on the torus elements using one of its integer representations
Invertible integer matrices represent automorphisms of a torus group of the same dimension; thus, given a
group G
, a representation of G
with integer images defines a morphism from G
to the automorphism
group of a torus T
.
One can then use this morphism to construct an outer semidirect product of G
acting on T
.
rep (Rep
) – Group representation with integer coefficients
Semidirect product of rep.group
and this torus group
Returns a subgroup of this torus that obeys the equations given in integer matrix form
E (integer(*, n)
) – New equations
Torus group satisfying the equations of this group and the additional ones given
Returns a subgroup of this torus that obeys the equations given in monomial form
This function accepts a variable number of arguments. Each argument must be of the form:
An integer matrix with n
columns, defining equations as in the call to subgroup
,
A charstring containing an equation in monomial form. If the equation has no right-hand side, the right-hand side is assumed to be the identity.
Torus group satisfying the equations of this group and the additional ones given
Constructs a morphism from this torus group to another torus group from an integer matrix
After the target
argument, this function accepts a variable number of arguments.
Each of these arguments must be of the form:
An integer matrix with n
columns, defining equations as in the call to subgroup
,
A charstring containing an equation in monomial form.
target (TorusGroup
) – Torus group target of the morphism
A morphism from this torus group to a torus group of dimension n1
Returns the sparse diagonal matrix corresponding to the given torus element
Equivalent to torusGroup.definingRep.image(t)
, without constructing additional objects.
t (double(n,1)
) – Torus group element
Diagonal matrix corresponding to the torus element
double(n,n), sparse
Returns the sparse block-diagonal matrix corresponding to the given torus element
The element t(i)
will correspond to a 2x2 block: [c s; -s c]
where
c = cos(2*pi*t(i))
and s = sin(2*pi*t(i))
.
t (double(n,1)
) – Torus group element
Block diagonal matrix of 2x2 real matrices
double(2*n,2*n)
Returns a copy of this torus group with the names of the unit complex coefficients replaced
newNames (cell(1,n) of charstring
) – New names of the complex coefficients
Updated group
Returns the standard torus group of given rank
n (integer
) – Torus group rank
Standard torus group
Bases: replab.CompactGroup
Describes a classical compact group of square real/complex/quaternionic matrices
Group elements are matrices whose coefficients are encoded using double floating-point arithmetic. Of course, they will only be approximately orthogonal and thus do not represent directly a group element.
Instead, we postulate that the matrix encodes the nearest group element in Frobenius norm. For non-special groups, this element
can be found as U = X*sqrtm(X'*X)
where X
is the approximate element.
While inverses should be exact (we take the conjugate transpose), the composition is only approximate. Thus, to be able to check
the usual group laws, we compare group elements up to a certain tolerance, defined in replab.globals.matrixGroupTol
.
Class members list
Properties
algebra
– Unital associative algebra over which the group is defined
identity
– Monoid identity element
isSpecial
– Whether the matrices should have determinant one; must be false when algebra = ‘H’
n
– Dimension of the matrices
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
Representations
commutingRepsRep
– Constructs a representation from commuting representations
definingRep
– Returns the defining representation of this unitary group
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
General
ClassicalCompactGroup
– Constructs a classical compact group
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.CompactGroup.commutingRepsRep()
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.CompactGroup.directPower()
Documentation in replab.CompactGroup.directProduct()
Documentation in replab.CompactGroup.directSumRep()
Documentation in replab.Str.disp()
Documentation in replab.Obj.eq()
Documentation in replab.Domain.eqv()
Documentation in replab.CompactGroup.hasReconstruction()
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.CompactGroup.maximalTorusDimension()
Documentation in replab.Group.morphismByFunction()
Documentation in replab.Obj.ne()
Documentation in replab.CompactGroup.reconstruction()
Documentation in replab.Domain.sample()
Documentation in replab.CompactGroup.semidirectProduct()
Documentation in replab.Str.shortStr()
Documentation in replab.CompactGroup.tensorRep()
Documentation in replab.CompactGroup.trivialRep()
Unital associative algebra over which the group is defined
‘R’, ‘C’ or ‘H’
Whether the matrices should have determinant one; must be false when algebra = ‘H’
logical
Dimension of the matrices
integer
Constructs a classical compact group
n (integer
) – Size of the n x n
matrices
algebra ('R', 'C' or 'H'
) – Unital associatvie algebra over which the group is defined
isSpecial (logical
) – Whether the matrices should have det(X) == 1
Returns the defining representation of this unitary group
“Defining representation” is a loosely defined term designing the smallest faithful representation of a
group. In our case, the defining representation of O(n)
or SO(n)
is a n-dimensional real representation,
the defining representation of U(n)
or SU(n)
is a n-dimension complex representation, while
the defining representation of Sp(n)
is a 2n-dimension complex representation.
All these representations are unitary. By specifying the field, one can encode the representation in a
different field: if the natural field is real (O(n)
, SO(n)
), the representation can be complexified
into a representation of the same dimension. If the natural field is complex (U(n)
, SU(n)
, Sp(n)
),
the complex representation can be encoded into a real representation, doubling its dimension.
field ('R', 'C', optional
) – Field over which to define the matrices, default: group dependent, see above
Defining representation
Returns the group of d x d orthonormal matrices
Returns the group of d x d orthonormal matrices with determinant one
Returns the group of d x d unitary complex matrices
Returns the group of d x d unitary complex matrices with determinant one
Returns the compact symplectic group whose elements are unitary quaternion matrices