An interface for Lie groups
LieGroups.LieGroup
β TypeLieGroup{π½, O<:AbstractGroupOperation, M<:AbstractManifold{π½}} <: AbstractManifold{π½}
Represent a Lie Group $\mathcal G$.
A Lie Group $\mathcal G$ is a group endowed with the structure of a manifold such that the group operations $β: \mathcal GΓ\mathcal G β \mathcal G$, see compose
and the inverse operation $β
^{-1}: \mathcal G β \mathcal G$, see inv
are smooth, see for example [HN12, Definition 9.1.1].
Lie groups are named after the Norwegian mathematician Marius Sophus Lie (1842β1899).
Fields
manifold
: anAbstractManifold
$\mathcal M$op
: anAbstractGroupOperation
$β$ on that manifold
Constructor
LieGroup(M::AbstractManifold, op::AbstractGroupOperation)
Generate a Lie group based on a manifold M
and a group operation op
, where vectors by default are stored in the Lie Algebra.
Functions on Lie groups
Base.adjoint
β Methodadjoint(G::LieGroup, g X)
adjoint!(G::LieGroup, Y, g, X)
Compute the adjoint $\mathrm{Ad}(g): \mathfrak g β \mathfrak g$, which is defined as the differential diff_conjugate
of the conjugate
$c_g(h) = gβhβg^{-1}$ evaluated at the Identity
$h=\mathrm{e}$. The operation can be performed in-place of Y
.
\[ \mathrm{Ad}(g)[X] = D c_g(\mathrm{e}) [X], \qquad X β \mathfrak g.\]
see [HN12, Section 9.2.3].
On matrix Lie groups the adjoint reads $\mathrm{Ad}(g)[X] = gβXβg^{-1}$.
Base.exp
β Functionexp(G::LieGroup, g, X, t::Number=1)
exp!(G::LieGroup, h, g, X, t::Number=1)
Compute the Lie group exponential map given by
\[\exp_g X = gβ\exp_{\mathcal G}(X)\]
where X
can be scaled by t
, the computation can be performed in-place of h
, and $\exp_{\mathcal G}$ denotes the Lie group exponential function.
If g
is the Identity
the Lie group exponential function is computed directly. Implementing the Lie group exponential function introduces a default implementation for this function.
The Lie group exponential map is usually different from the exponential map with respect to the metric of the underlying Riemannian manifold $\mathcal M$. To access the (Riemannian) exponential map, use exp(
base_manifold
(G), g, X)
.
Base.exp
β Methodexp(G::LieGroup, e::Identity, X)
exp!(G::LieGroup, h, e::Identity, X)
Compute the (Lie group) exponential function
\[\exp_{\mathcal G}: \mathfrak g β \mathcal G,\qquad \exp_{\mathcal G}(X) = Ξ³_X(1),\]
where $Ξ³_X$ is the unique solution of the initial value problem
\[Ξ³(0) = \mathrm{e}, \quad Ξ³'(t) = Ξ³(t)β X.\]
The computation can be performed in-place of h
.
See also [HN12, Definition 9.2.2].
Base.inv
β Methodinv(G::LieGroup, g)
inv!(G::LieGroup, h, g)
Compute the inverse group element $g^{-1}$ with respect to the AbstractGroupOperation
$β$ on the LieGroup
$\mathcal G$, that is, return the unique element $h=g^{-1}$ such that $hβg=\mathrm{e}$, where $\mathrm{e}$ denotes the Identity
.
This can be done in-place of h
, without side effects, that is you can do inv!(G, g, g)
.
Base.isapprox
β Methodisapprox(M::LieGroup, g, h; kwargs...)
Check if points g
and h
from LieGroup
are approximately equal. this function calls the corresponding isapprox
on the AbstractManifold
after handling the cases where one or more of the points are the Identity
. All keyword argments are passed to this function as well.
Base.log
β Methodlog(G::LieGroup, g, h)
log!(G::LieGroup, X, g, h)
Compute the Lie group logarithmic map
\[\log_g h = \log_{\mathcal G}(g^{-1}βh)\]
where $\log_{\mathcal G}$ denotes the Lie group logarithmic function The computation can be performed in-place of X
.
If g
is the Identity
the Lie group logarithmic function is computed directly. Implementing the Lie group logarithmic function introduces a default implementation for this function.
The Lie group logarithmic map is usually different from the logarithmic map with respect to the metric of the underlying Riemannian manifold $\mathcal M$. To access the (Riemannian) logarithmic map, use log(
base_manifold
G, g, h)
.
Base.log
β Methodlog(G::LieGroup, e::Identity, g)
log!(G::LieGroup, X, e::Identity, g)
Compute the (Lie group) logarithmic function $\log_{\mathcal G}: \mathcal G β \mathfrak g$, which is the inverse of the Lie group exponential function The compuation can be performed in-place of X
.
Base.rand
β Methodrand(::LieGroup; vector_at=nothing, Ο::Real=1.0, kwargs...)
rand(::LieAlgebra; Ο::Real=1.0, kwargs...)
rand!(::LieGroup, gX; vector_at=nothing, Ο::Real=1.0, kwargs...)
rand!(::LieAlgebra, X; Ο::Real=1.0, kwargs...)
Compute a random point or tangent vector on a Lie group.
For points this just means to generate a random point on the underlying manifold itself.
For tangent vectors, an element in the Lie Algebra is generated, see also rand(::LieAlgebra; kwargs...)
LieGroups.adjoint!
β Methodadjoint(G::LieGroup, g X)
adjoint!(G::LieGroup, Y, g, X)
Compute the adjoint $\mathrm{Ad}(g): \mathfrak g β \mathfrak g$, which is defined as the differential diff_conjugate
of the conjugate
$c_g(h) = gβhβg^{-1}$ evaluated at the Identity
$h=\mathrm{e}$. The operation can be performed in-place of Y
.
\[ \mathrm{Ad}(g)[X] = D c_g(\mathrm{e}) [X], \qquad X β \mathfrak g.\]
see [HN12, Section 9.2.3].
On matrix Lie groups the adjoint reads $\mathrm{Ad}(g)[X] = gβXβg^{-1}$.
LieGroups.compose!
β Methodcompose(G::LieGroup, g, h)
compose!(G::LieGroup, k, g, h)
Perform the group oepration $g β h$ for two $g, h β \mathcal G$ on the LieGroup
G
. This can also be done in-place of h
.
This function also handles the case where g
or/and h
are the Identity
(G)
. Since this would lead to ambiguities when implementing a new group operations, this function calls _compose
and _compose!
, respectively, which is meant for the actual computation of group operations on (non-Identity
` but maybe its numerical representation) elements.
LieGroups.conjugate!
β Methodconjugate(G::LieGroup, g, h)
conjugate!(G::LieGroup, k, g, h)
Compute the conjugation map $c_g: \mathcal G β \mathcal G$ given by $c_g(h) = gβhβg^{-1}$. This can be done in-place of k
.
LieGroups.conjugate
β Methodconjugate(G::LieGroup, g, h)
conjugate!(G::LieGroup, k, g, h)
Compute the conjugation map $c_g: \mathcal G β \mathcal G$ given by $c_g(h) = gβhβg^{-1}$. This can be done in-place of k
.
LieGroups.diff_conjugate!
β Methoddiff_conjugate(G::LieGroup, g, h, X)
diff_conjugate!(G::LieGroup, Y, g, h, X)
Compute the differential of the conjugate
$c_g(h) = gβhβg^{-1}$, which can be performed in-place of Y
.
\[ D(c_g(h))[X], \qquad X β \mathfrak g.\]
LieGroups.diff_conjugate
β Methoddiff_conjugate(G::LieGroup, g, h, X)
diff_conjugate!(G::LieGroup, Y, g, h, X)
Compute the differential of the conjugate
$c_g(h) = gβhβg^{-1}$, which can be performed in-place of Y
.
\[ D(c_g(h))[X], \qquad X β \mathfrak g.\]
LieGroups.diff_inv!
β Methoddiff_inv(G::LieGroup, g, X)
diff_inv!(G::LieGroup, Y, g, X)
Compute the differential of the function $ΞΉ_{\mathcal G}(g) = g^{-1}$, where $DΞΉ_{\mathcal G}(g): \mathfrak g β \mathfrak g$. This can be done in-place of Y
.
LieGroups.diff_inv
β Methoddiff_inv(G::LieGroup, g, X)
diff_inv!(G::LieGroup, Y, g, X)
Compute the differential of the function $ΞΉ_{\mathcal G}(g) = g^{-1}$, where $DΞΉ_{\mathcal G}(g): \mathfrak g β \mathfrak g$. This can be done in-place of Y
.
LieGroups.diff_left_compose!
β Methoddiff_left_compose(G::LieGroup, g, h, X)
diff_left_compose!(G::LieGroup, Y, g, h, X)
Compute the differential of the left group multiplication $Ξ»_g(h) = gβh$, on the LieGroup
G
, that is Compute $DΞ»_g(h)[X]$, $X β π€$. This can be done in-place of Y
.
LieGroups.diff_left_compose
β Methoddiff_left_compose(G::LieGroup, g, h, X)
diff_left_compose!(G::LieGroup, Y, g, h, X)
Compute the differential of the left group multiplication $Ξ»_g(h) = gβh$, on the LieGroup
G
, that is Compute $DΞ»_g(h)[X]$, $X β π€$. This can be done in-place of Y
.
LieGroups.diff_right_compose!
β Methoddiff_right_compose(G::LieGroup, h, g, X)
diff_right_compose!(G::LieGroup, Y, h, g, X)
Compute the differential of the right group multiplication $Ο_g(h) = hβg$, on the LieGroup
G
, that is Compute $DΟ_g(h)[X]$, $X β π€$ This can be done in-place of Y
.
LieGroups.diff_right_compose
β Methoddiff_right_compose(G::LieGroup, h, g, X)
diff_right_compose!(G::LieGroup, Y, h, g, X)
Compute the differential of the right group multiplication $Ο_g(h) = hβg$, on the LieGroup
G
, that is Compute $DΟ_g(h)[X]$, $X β π€$ This can be done in-place of Y
.
LieGroups.identity_element!
β Methodidentity_element(G::LieGroup)
identity_element!(G::LieGroup, e)
Return a point representation of the Identity
on the LieGroup
G
. By default this representation is the default array or number representation. It should return the corresponding default representation of $e$ as a point on G
if points are not represented by arrays. This can be performed in-place of e
.
LieGroups.inv!
β Methodinv(G::LieGroup, g)
inv!(G::LieGroup, h, g)
Compute the inverse group element $g^{-1}$ with respect to the AbstractGroupOperation
$β$ on the LieGroup
$\mathcal G$, that is, return the unique element $h=g^{-1}$ such that $hβg=\mathrm{e}$, where $\mathrm{e}$ denotes the Identity
.
This can be done in-place of h
, without side effects, that is you can do inv!(G, g, g)
.
LieGroups.inv_left_compose!
β Methodcompose(G::LieGroup, g, h)
compose!(G::LieGroup, k, g, h)
Perform the group oepration $g β h$ for two $g, h β \mathcal G$ on the LieGroup
G
. This can also be done in-place of h
.
This function also handles the case where g
or/and h
are the Identity
(G)
. Since this would lead to ambiguities when implementing a new group operations, this function calls _compose
and _compose!
, respectively, which is meant for the actual computation of group operations on (non-Identity
` but maybe its numerical representation) elements.
LieGroups.inv_left_compose
β Methodinv_left_compose(G::LieGroup, g, h)
inv_left_compose!(G::LieGroup, k, g, h)
Compute the inverse of the left group operation $Ξ»_g(h) = gβh$, on the LieGroup
G
, that is, compute $Ξ»_g^{-1}(h) = g^{-1}βh$. This can be done in-place of k
.
LieGroups.inv_right_compose!
β Methodinv_right_compose(G::LieGroup, h, g)
inv_right_compose!(G::LieGroup, k, h, g)
Compute the inverse of the right group operation $Ο_g(h) = hβg$, on the LieGroup
G
, that is compute $Ο_g^{-1}(h) = hβg^{-1}$. This can be done in-place of k
.
LieGroups.inv_right_compose
β Methodinv_right_compose(G::LieGroup, h, g)
inv_right_compose!(G::LieGroup, k, h, g)
Compute the inverse of the right group operation $Ο_g(h) = hβg$, on the LieGroup
G
, that is compute $Ο_g^{-1}(h) = hβg^{-1}$. This can be done in-place of k
.
Manifolds.compose
β Methodcompose(G::LieGroup, g, h)
compose!(G::LieGroup, k, g, h)
Perform the group oepration $g β h$ for two $g, h β \mathcal G$ on the LieGroup
G
. This can also be done in-place of h
.
This function also handles the case where g
or/and h
are the Identity
(G)
. Since this would lead to ambiguities when implementing a new group operations, this function calls _compose
and _compose!
, respectively, which is meant for the actual computation of group operations on (non-Identity
` but maybe its numerical representation) elements.
Manifolds.identity_element
β Methodidentity_element(G::LieGroup)
identity_element!(G::LieGroup, e)
Return a point representation of the Identity
on the LieGroup
G
. By default this representation is the default array or number representation. It should return the corresponding default representation of $e$ as a point on G
if points are not represented by arrays. This can be performed in-place of e
.
Manifolds.is_identity
β Methodis_identity(G::LieGroup, q; kwargs)
Check whether q
is the identity on the LieGroup
$\mathcal G$. This means it is either the Identity
{O}
with the respect to the corresponding AbstractGroupOperation
O
, or (approximately) the correct point representation.
See also
ManifoldsBase.base_manifold
β Methodbase_manifold(G::LieGroup)
Return the manifold stored within the LieGroup
G
.
ManifoldsBase.exp!
β Functionexp(G::LieGroup, g, X, t::Number=1)
exp!(G::LieGroup, h, g, X, t::Number=1)
Compute the Lie group exponential map given by
\[\exp_g X = gβ\exp_{\mathcal G}(X)\]
where X
can be scaled by t
, the computation can be performed in-place of h
, and $\exp_{\mathcal G}$ denotes the Lie group exponential function.
If g
is the Identity
the Lie group exponential function is computed directly. Implementing the Lie group exponential function introduces a default implementation for this function.
The Lie group exponential map is usually different from the exponential map with respect to the metric of the underlying Riemannian manifold $\mathcal M$. To access the (Riemannian) exponential map, use exp(
base_manifold
(G), g, X)
.
ManifoldsBase.exp!
β Methodexp(G::LieGroup, e::Identity, X)
exp!(G::LieGroup, h, e::Identity, X)
Compute the (Lie group) exponential function
\[\exp_{\mathcal G}: \mathfrak g β \mathcal G,\qquad \exp_{\mathcal G}(X) = Ξ³_X(1),\]
where $Ξ³_X$ is the unique solution of the initial value problem
\[Ξ³(0) = \mathrm{e}, \quad Ξ³'(t) = Ξ³(t)β X.\]
The computation can be performed in-place of h
.
See also [HN12, Definition 9.2.2].
ManifoldsBase.get_coordinates!
β Methodexp(G::LieGroup, e::Identity, X)
exp!(G::LieGroup, h, e::Identity, X)
Compute the (Lie group) exponential function
\[\exp_{\mathcal G}: \mathfrak g β \mathcal G,\qquad \exp_{\mathcal G}(X) = Ξ³_X(1),\]
where $Ξ³_X$ is the unique solution of the initial value problem
\[Ξ³(0) = \mathrm{e}, \quad Ξ³'(t) = Ξ³(t)β X.\]
The computation can be performed in-place of h
.
See also [HN12, Definition 9.2.2].
ManifoldsBase.get_coordinates
β Methodget_coordinates(G::LieGroup, g, X, B::AbstractBasis)
get_coordinates(π€::LieAlgebra, X, B::AbstractBasis)
get_coordinates!(G::LieGroup, c, g, X, B::AbstractBasis)
get_coordinates!(π€::LieAlgebra, c, X, B::AbstractBasis)
Return the vector of coordinates to the decomposition of X
with respect to an AbstractBasis
of the LieAlgebra
π€
. Since all tangent vectors are assumed to be represented in the Lie algebra, both signatures are equivalent. The operation can be performed in-place of c
.
By default this function requires identity_element
(G)
and calls the corresponding get_coordinates
function of the Riemannian manifold the Lie group is build on.
The inverse operation is get_vector
.
See also vee
.
ManifoldsBase.get_vector!
β Methodexp(G::LieGroup, e::Identity, X)
exp!(G::LieGroup, h, e::Identity, X)
Compute the (Lie group) exponential function
\[\exp_{\mathcal G}: \mathfrak g β \mathcal G,\qquad \exp_{\mathcal G}(X) = Ξ³_X(1),\]
where $Ξ³_X$ is the unique solution of the initial value problem
\[Ξ³(0) = \mathrm{e}, \quad Ξ³'(t) = Ξ³(t)β X.\]
The computation can be performed in-place of h
.
See also [HN12, Definition 9.2.2].
ManifoldsBase.get_vector
β Methodget_vector(G::LieGroup, g, c, B::AbstractBasis)
get_vector(π€::LieAlgebra, c, B::AbstractBasis)
get_vector!(G::LieGroup, X, g, c, B::AbstractBasis)
get_vector!(π€::LieAlgebra, X, c, B::AbstractBasis)
Return the vector corresponding to a set of coefficients in an AbstractBasis
of the LieAlgebra
π€
. Since all tangent vectors are assumed to be represented in the Lie algebra, both signatures are equivalend. The operation can be performed in-place of a tangent vector X
.
By default this function requires identity_element
(G)
and calls the corresponding get_vector
function of the Riemannian manifold the Lie group is build on.
The inverse operation is get_coordinates
.
See also hat
ManifoldsBase.hat!
β Methodhat(G::LieGroup, c)
hat!(G::LieGroup, X, c)
Compute the hat map $(β )^Μ$ that maps a vector of coordinates $c_i$ with respect to a certain basis to a tangent vector in the Lie algebra
\[X = \sum_{iβ\mathcal I} c_iB_i,\]
where $\{ B_i \}_{iβ\mathcal I}$ is a basis of the Lie algebra and $\mathcal I$ a corresponding index set, which is usually $\mathcal I=\{ 1,\ldots,n \}$.
The computation can be performed in-place of X
. The inverse of hat
is vee
.
Technically, hat
is a specific case of get_vector
and is implemented using the LieAlgebraOrthogonalBasis
ManifoldsBase.hat
β Methodhat(G::LieGroup, c)
hat!(G::LieGroup, X, c)
Compute the hat map $(β )^Μ$ that maps a vector of coordinates $c_i$ with respect to a certain basis to a tangent vector in the Lie algebra
\[X = \sum_{iβ\mathcal I} c_iB_i,\]
where $\{ B_i \}_{iβ\mathcal I}$ is a basis of the Lie algebra and $\mathcal I$ a corresponding index set, which is usually $\mathcal I=\{ 1,\ldots,n \}$.
The computation can be performed in-place of X
. The inverse of hat
is vee
.
Technically, hat
is a specific case of get_vector
and is implemented using the LieAlgebraOrthogonalBasis
ManifoldsBase.is_point
β Methodis_point(G::LieGroup, g; kwargs...)
Check whether g
is a valid point on the Lie Group G
. This falls back to checking whether g
is a valid point on G.manifold
, unless g
is an Identity
. Then, it is checked whether it is the identity element corresponding to G
.
ManifoldsBase.is_vector
β Methodis_vector(G::LieGroup, X; kwargs...)
is_vector(G::LieGroup{π½,O}, e::Indentity{O}, X; kwargs...)
Check whether X
is a tangent vector, that is an element of the LieAlgebra
of G
. The first variant calls is_point
on the LieAlgebra
π€
of G
. The second variant calls is_vector
on the AbstractManifold
at the identity_element
.
All keyword arguments are passed on to the corresponding call
ManifoldsBase.is_vector
β Methodis_vector(G::LieGroup, X; kwargs...)
is_vector(G::LieGroup{π½,O}, e::Indentity{O}, X; kwargs...)
Check whether X
is a tangent vector, that is an element of the LieAlgebra
of G
. The first variant calls is_point
on the LieAlgebra
π€
of G
. The second variant calls is_vector
on the AbstractManifold
at the identity_element
.
All keyword arguments are passed on to the corresponding call
ManifoldsBase.log!
β Methodlog(G::LieGroup, g, h)
log!(G::LieGroup, X, g, h)
Compute the Lie group logarithmic map
\[\log_g h = \log_{\mathcal G}(g^{-1}βh)\]
where $\log_{\mathcal G}$ denotes the Lie group logarithmic function The computation can be performed in-place of X
.
If g
is the Identity
the Lie group logarithmic function is computed directly. Implementing the Lie group logarithmic function introduces a default implementation for this function.
The Lie group logarithmic map is usually different from the logarithmic map with respect to the metric of the underlying Riemannian manifold $\mathcal M$. To access the (Riemannian) logarithmic map, use log(
base_manifold
G, g, h)
.
ManifoldsBase.vee!
β Methodvee(G::LieGroup, X)
vee!(G::LieGroup, c, X)
Compute the vee map $(β
)^β¨$ that maps a tangent vector X
from the LieAlgebra
to its coordinates with respect to the LieAlgebraOrthogonalBasis
basis in the Lie algebra
\[X = \sum_{iβ\mathcal I} c_iB_i,\]
where $\{ B_i \}_{iβ\mathcal I}$ is a basis of the Lie algebra and $\mathcal I$ a corresponding index set, which is usually $\mathcal I=\{ 1,\ldots,n \}$.
The computation can be performed in-place of c
. The inverse of vee
is hat
.
Technically, vee
is a specific case of get_coordinates
and is implemented using the LieAlgebraOrthogonalBasis
ManifoldsBase.vee
β Methodvee(G::LieGroup, X)
vee!(G::LieGroup, c, X)
Compute the vee map $(β
)^β¨$ that maps a tangent vector X
from the LieAlgebra
to its coordinates with respect to the LieAlgebraOrthogonalBasis
basis in the Lie algebra
\[X = \sum_{iβ\mathcal I} c_iB_i,\]
where $\{ B_i \}_{iβ\mathcal I}$ is a basis of the Lie algebra and $\mathcal I$ a corresponding index set, which is usually $\mathcal I=\{ 1,\ldots,n \}$.
The computation can be performed in-place of c
. The inverse of vee
is hat
.
Technically, vee
is a specific case of get_coordinates
and is implemented using the LieAlgebraOrthogonalBasis
Random.rand!
β Methodrand(::LieGroup; vector_at=nothing, Ο::Real=1.0, kwargs...)
rand(::LieAlgebra; Ο::Real=1.0, kwargs...)
rand!(::LieGroup, gX; vector_at=nothing, Ο::Real=1.0, kwargs...)
rand!(::LieAlgebra, X; Ο::Real=1.0, kwargs...)
Compute a random point or tangent vector on a Lie group.
For points this just means to generate a random point on the underlying manifold itself.
For tangent vectors, an element in the Lie Algebra is generated, see also rand(::LieAlgebra; kwargs...)
Literature
- [HN12]
- J.Β Hilgert and K.-H.Β Neeb. Structure and Geometry of Lie Groups (Springer Monographs in Mathematics, 2012).