An interface for Lie group operations

LieGroups.AbstractGroupOperation โ€” Type
AbstractGroupOperation

Represent a type of group operation for a AbstractLieGroup $\mathcal G$, that is a smooth binary operation $โˆ˜ : \mathcal G ร— \mathcal G โ†’ \mathcal G$ on elements of a Lie group $\mathcal G$.

source
LieGroups.Identity โ€” Type
Identity{O<:AbstractGroupOperation}

Represent the group identity element $e โˆˆ \mathcal G$ on an AbstractLieGroup $\mathcal G$ with AbstractGroupOperation of type O.

Similar to the philosophy that points are agnostic of their group at hand, the identity does not store the group $\mathcal G$ it belongs to. However it depends on the type of the AbstractGroupOperation used.

See also identity_element on how to obtain the corresponding AbstractManifoldPoint or array representation.

Constructors

Identity(::AbstractLieGroup{๐”ฝ,O}) where {๐”ฝ,O<:AbstractGroupOperation}
Identity(o::AbstractGroupOperation)
Identity(::Type{AbstractGroupOperation})

create the identity of the corresponding subtype O<:AbstractGroupOperation

source

You can combine some specific group operations with one of several manifolds to form a Lie group. You can still define the corresponding functions generically for all groups with this group operation regardless of the manifold. The following sections collect these.

Additive group operation

LieGroups.AdditionGroupOperation โ€” Type
AdditionGroupOperation <: AbstractGroupOperation

A group operation that is realised introducing defaults that fall back to + and - being overloaded, for example _compose(G::LieGroup{๐”ฝ,AdditionGroupOperation}, a, b) = a + b

source
LieGroups.diff_right_compose! โ€” Method
diff_right_compose(G::LieGroup{๐”ฝ,AdditionGroupOperation}, g, h, X)
diff_right_compose!(G::LieGroup{๐”ฝ,AdditionGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its second (right) argument h.

Another interpretation is to consider a function where we do a fixed multiplication from the left with g. i.e. the left group multiplication function $ฮป_g(h) = gโˆ˜h$ (where the left refers to the fixed argument $g$.).

For the AdditionGroupOperation it reads $\mathrm{d}ฮป_g(h)[X] = X$.

source
LieGroups.diff_right_compose โ€” Method
diff_right_compose(G::LieGroup{๐”ฝ,AdditionGroupOperation}, g, h, X)
diff_right_compose!(G::LieGroup{๐”ฝ,AdditionGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its second (right) argument h.

Another interpretation is to consider a function where we do a fixed multiplication from the left with g. i.e. the left group multiplication function $ฮป_g(h) = gโˆ˜h$ (where the left refers to the fixed argument $g$.).

For the AdditionGroupOperation it reads $\mathrm{d}ฮป_g(h)[X] = X$.

source

Multiplication group operation

LieGroups.AbstractMultiplicationGroupOperation โ€” Type
AbstractMultiplicationGroupOperation <: AbstractGroupOperation

A group operation that is realised introducing defaults that fall back to * being overloaded, for example _compose(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, a, b) = a * b

source
LieGroups.diff_inv! โ€” Method
diff_inv(G::LieGroup{๐”ฝ, <:AbstractMultiplicationGroupOperation}, g, X)
diff_inv!(G::LieGroup{๐”ฝ, <:AbstractMultiplicationGroupOperation}, Y, g, X)

Compute the value of differential $\mathrm{d}ฮน_{\mathcal G}(g)[X]$ of matrix inversion $ฮน_{\mathcal G}(g) := g^{-1}$ at $X โˆˆ ๐”ค$ in the LieAlgebra $๐”ค$ of the LieGroup G.

The (classical) differential $\mathrm{D}ฮน_{\mathcal G}(g): T_g\mathcal G โ†’ T_{g^{-1}}\mathcal G$ reads

\[ \mathrm{D}ฮน_{\mathcal G}(g)[W] = -g^{-1}Wg^{-1} = -Xg^{-1} = -g^{-1}(gXg^{-1}) = -g^{-1}\mathrm{Ad}(g)[X] = V โˆˆ T_{g^{-1}}\mathcal G,\]

see e.g. [Gil08]. To bring this back to the Lie algebra, we Write $V = g^{-1}Y โˆˆ T_{g^{-1}}\mathcal G$ for some $Y โˆˆ ๐”ค$ and obtain

\[ \mathrm{d} ฮน_{\mathcal G}(g)[X] = -\mathrm{Ad}(g)[X] โˆˆ ๐”ค,\]

where we use $\mathrm{d}$ to denote the differential in the Lie algebra.

source
LieGroups.diff_inv โ€” Method
diff_inv(G::LieGroup{๐”ฝ, <:AbstractMultiplicationGroupOperation}, g, X)
diff_inv!(G::LieGroup{๐”ฝ, <:AbstractMultiplicationGroupOperation}, Y, g, X)

Compute the value of differential $\mathrm{d}ฮน_{\mathcal G}(g)[X]$ of matrix inversion $ฮน_{\mathcal G}(g) := g^{-1}$ at $X โˆˆ ๐”ค$ in the LieAlgebra $๐”ค$ of the LieGroup G.

The (classical) differential $\mathrm{D}ฮน_{\mathcal G}(g): T_g\mathcal G โ†’ T_{g^{-1}}\mathcal G$ reads

\[ \mathrm{D}ฮน_{\mathcal G}(g)[W] = -g^{-1}Wg^{-1} = -Xg^{-1} = -g^{-1}(gXg^{-1}) = -g^{-1}\mathrm{Ad}(g)[X] = V โˆˆ T_{g^{-1}}\mathcal G,\]

see e.g. [Gil08]. To bring this back to the Lie algebra, we Write $V = g^{-1}Y โˆˆ T_{g^{-1}}\mathcal G$ for some $Y โˆˆ ๐”ค$ and obtain

\[ \mathrm{d} ฮน_{\mathcal G}(g)[X] = -\mathrm{Ad}(g)[X] โˆˆ ๐”ค,\]

where we use $\mathrm{d}$ to denote the differential in the Lie algebra.

source
LieGroups.diff_left_compose! โ€” Method
diff_left_compose(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, g, h, X)
diff_left_compose!(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its first (left) argument g.

Another interpretation is to consider a function where we do a fixed multiplication from the right with h. i..e. the right group multiplication function $ฯ_h(g) = gโˆ˜h$.

The differential simplifies for an AbstractMultiplicationGroupOperation to

\[\mathrm{d} ฯ_h(g)[X] = h^{-1}Xh = \mathrm{Ad}(h^{-1})[X] โˆˆ ๐”ค,\]

where $\mathrm{Ad}$ denotes the adjoint.

source
LieGroups.diff_left_compose โ€” Method
diff_left_compose(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, g, h, X)
diff_left_compose!(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its first (left) argument g.

Another interpretation is to consider a function where we do a fixed multiplication from the right with h. i..e. the right group multiplication function $ฯ_h(g) = gโˆ˜h$.

The differential simplifies for an AbstractMultiplicationGroupOperation to

\[\mathrm{d} ฯ_h(g)[X] = h^{-1}Xh = \mathrm{Ad}(h^{-1})[X] โˆˆ ๐”ค,\]

where $\mathrm{Ad}$ denotes the adjoint.

source
LieGroups.diff_right_compose! โ€” Method
diff_right_compose(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, g, h, X)
diff_right_compose!(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its second (right) argument h.

Another interpretation is to consider a function where we do a fixed multiplication from the left with g. i..e. the left group multiplication function $ฮป_g(h) = gโˆ˜h$.

It reads for an AbstractMultiplicationGroupOperation $\mathrm{d}ฮป_g(h)[X] = X$.

source
LieGroups.diff_right_compose โ€” Method
diff_right_compose(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, g, h, X)
diff_right_compose!(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its second (right) argument h.

Another interpretation is to consider a function where we do a fixed multiplication from the left with g. i..e. the left group multiplication function $ฮป_g(h) = gโˆ˜h$.

It reads for an AbstractMultiplicationGroupOperation $\mathrm{d}ฮป_g(h)[X] = X$.

source

Abelian multiplication group operation

Since the commutativity of some Lie groups leads to a significant simplification of computations on those groups, the abelian multiplication group operation optimizes these cases. Additionally, it provides an interface for the abelian Lie groups. Some of these can are represented by isbits-types, which don't have mutating variants of the functions.

Base.exp โ€” Method
exp(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, X)
exp(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, X)
exp!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, h, X)
exp!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, h, g, X)

Compute the Lie group exponential on a LieGroup at a point g or the Identity with an AbelianMultiplicationGroupOperation.

Due to differences in the representation of some abelian Lie groups, this method wraps a concrete implementation of a specific abelian LieGroup with inputs of type AbstractArray{<:Any,0} and supports in-place computation.

This can be computed in-place of h if h is mutable.

source
Base.inv โ€” Method
inv(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, g)
inv!(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, h, g)

Compute the inverse group element $g^{-1}$, which for the AbelianMultiplicationGroupOperation simplifies for a scalar input to the ordinary scalar inverse $g^{-1}$.

Due to differences in the representation of some abelian Lie groups, this method wraps a concrete implementation of a specific abelian LieGroup with inputs of type AbstractArray{<:Any,0} and supports in-place computation.

This can be computed in-place of h if h is mutable.

source
Base.log โ€” Method
log(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, h)
log(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, h)
log!(G::LieGroup{๐”ฝ,<:AbeliantMultiplicationGroupOperation}, X, g)
log!(G::LieGroup{๐”ฝ,<:AbeliantMultiplicationGroupOperation}, X, g, h)

Compute the Lie group logarithm on a LieGroup at a point g or the Identity with a concrete instance of AbelianMultiplicationGroupOperation.

Due to differences in the representation of some abelian Lie groups, this method wraps a concrete implementation of a specific abelian LieGroup with inputs of type AbstractArray{<:Any,0} and supports in-place computation.

This can be computed in-place of X if X is mutable.

source
LieGroups.diff_inv! โ€” Method
diff_inv(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, X)
diff_inv!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, Y, g, X)

Compute the value of the differential $\mathrm{d}ฮน_{\mathcal G}(g)[X]$ of the inversion $ฮน_{\mathcal G}(g) := g^{-1}$ at $X โˆˆ ๐”ค$ in the LieAlgebra $๐”ค$ of the LieGroup G.

In the Abelian case, the computation simplifies to

\[\mathrm{d}ฮน_{\mathcal G}(g)[X] = -gXg^{-1} = -X.\]

This can be computed in-place of Y if Y is mutable.

source
LieGroups.diff_left_compose! โ€” Method
diff_left_compose(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, h, X)
diff_left_compose!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its first (left) argument g.

Another interpretation is to consider a function where we do a fixed multiplication from the right with h. i..e. the right group multiplication function $ฯ_h(g) = gโˆ˜h$.

The differential simplifies for an AbelianMultiplicationGroupOperation to the identity, i.e. $\mathrm{d}ฯ_h(g)[X] = X$.

This can be computed in-place of Y if Y is mutable.

source
LieGroups.diff_left_compose โ€” Method
diff_left_compose(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, h, X)
diff_left_compose!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its first (left) argument g.

Another interpretation is to consider a function where we do a fixed multiplication from the right with h. i..e. the right group multiplication function $ฯ_h(g) = gโˆ˜h$.

The differential simplifies for an AbelianMultiplicationGroupOperation to the identity, i.e. $\mathrm{d}ฯ_h(g)[X] = X$.

This can be computed in-place of Y if Y is mutable.

source
LieGroups.diff_right_compose! โ€” Method
diff_right_compose(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, h, X)
diff_right_compose!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its second (right) argument h.

Another interpretation is to consider a function where we do a fixed multiplication from the left with g. i..e. the left group multiplication function $ฮป_g(h) = gโˆ˜h$.

The differential simplifies for an AbelianMultiplicationGroupOperation to the identity, i.e. $\mathrm{d}ฮป_g(h)[X] = X$.

source
LieGroups.diff_right_compose โ€” Method
diff_right_compose(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, h, X)
diff_right_compose!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, Y, g, h, X)

Compute the differential of the group operation $gโˆ˜h$, on an AbstractLieGroup G with respect to its second (right) argument h.

Another interpretation is to consider a function where we do a fixed multiplication from the left with g. i..e. the left group multiplication function $ฮป_g(h) = gโˆ˜h$.

The differential simplifies for an AbelianMultiplicationGroupOperation to the identity, i.e. $\mathrm{d}ฮป_g(h)[X] = X$.

source
Manifolds.inv! โ€” Method
inv(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, g)
inv!(G::LieGroup{๐”ฝ,<:AbstractMultiplicationGroupOperation}, h, g)

Compute the inverse group element $g^{-1}$, which for the AbelianMultiplicationGroupOperation simplifies for a scalar input to the ordinary scalar inverse $g^{-1}$.

Due to differences in the representation of some abelian Lie groups, this method wraps a concrete implementation of a specific abelian LieGroup with inputs of type AbstractArray{<:Any,0} and supports in-place computation.

This can be computed in-place of h if h is mutable.

source
ManifoldsBase.exp! โ€” Method
exp(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, X)
exp(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, X)
exp!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, h, X)
exp!(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, h, g, X)

Compute the Lie group exponential on a LieGroup at a point g or the Identity with an AbelianMultiplicationGroupOperation.

Due to differences in the representation of some abelian Lie groups, this method wraps a concrete implementation of a specific abelian LieGroup with inputs of type AbstractArray{<:Any,0} and supports in-place computation.

This can be computed in-place of h if h is mutable.

source
ManifoldsBase.log! โ€” Method
log(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, h)
log(G::LieGroup{๐”ฝ,<:AbelianMultiplicationGroupOperation}, g, h)
log!(G::LieGroup{๐”ฝ,<:AbeliantMultiplicationGroupOperation}, X, g)
log!(G::LieGroup{๐”ฝ,<:AbeliantMultiplicationGroupOperation}, X, g, h)

Compute the Lie group logarithm on a LieGroup at a point g or the Identity with a concrete instance of AbelianMultiplicationGroupOperation.

Due to differences in the representation of some abelian Lie groups, this method wraps a concrete implementation of a specific abelian LieGroup with inputs of type AbstractArray{<:Any,0} and supports in-place computation.

This can be computed in-place of X if X is mutable.

source

Literature

[Gil08]
M.ย B.ย Giles. Collected Matrix Derivative Results for Forward and Reverse Mode Algorithmic Differentiation. In: Advances in Automatic Differentiation, Lecture Notes in Computational Science and Engineering, edited by C.ย H.ย Bischof, H.ย M.ย Bรผcker, P.ย Hovland, U.ย Naumann and J.ย Utke (Springer, Berlin, Heidelberg, 2008); pp.ย 35โ€“44.