ManifoldGroupTesting.jl
ManifoldGroupTesting.jl
contains several useful functions to test new group implementations.
Group Test Helpers
ManifoldGroupTesting.check_adjoint_action
— Methodcheck_adjoint_action(G, grp_rep, alg_rep, χ, ξ)
The group representation $ρ$ and algebra representation $ρ$ commute with the adjoint action:
\[ρ(χ) ρ(ξ) ρ(χ)^{-1} = ρ(\mathrm{Ad}_χ (ξ))\]
ManifoldGroupTesting.check_adjoint_action_in_alg
— Methodcheck_adjoint_action_in_alg(G, χ, ξ)
The adjoint action of $χ$ on $ξ$ is an element of $\mathrm{Alg}(G)$:
\[\mathrm{Ad}_{χ}ξ ∈ \mathrm{Alg}(G)\]
ManifoldGroupTesting.check_adjoint_action_lie_bracket
— Methodcheck_adjoint_action_lie_bracket(G, χ, ξ1, ξ2)
Adjoint action commutes with Lie bracket.
\[χ [ξ_1, ξ_2] χ^{-1} = [χξ_1χ^{-1}, χξ_2χ^{-1}]\]
ManifoldGroupTesting.check_alg_rep
— Methodcheck_alg_rep(G, alg_rep, ξ1, ξ2)
The algebra representation $ρ$ is an algebra morphism.
\[ρ([ξ_1, ξ_2]) = [ρ(ξ_1), ρ(ξ_2)]\]
where the latter is a matrix commutator.
ManifoldGroupTesting.check_apply_diff_group_at_id
— Functioncheck_apply_diff_group_at_id(G, side::GroupActionSide)
The covariant group operation action on itself $α(χ_1, χ_2)$ is either (left side)
\[α(χ_1, χ_2) = χ_1 χ_2\]
or (right side)
\[α(χ_1, χ_2) = χ_2 χ_1^{-1}\]
Now fix $χ_2 = 1$ ($1$ is the identity of $G$) and define $f : G → G$ by $f(χ) := α(χ, 1)$. Since $f(1) = 1$, its differential at identity is a map $\mathrm{Alg}(G) → \mathrm{Alg}(G)$. This map is either
- $I$ (left side)
- $-I$ (right side)
ManifoldGroupTesting.check_exp_ad
— Methodcheck_exp_ad(G, ξ_1, ξ_2)
$\mathrm{Ad}$ and $\exp$ commute in the sense that
\[{\exp(ξ_1)}ξ_2 \exp(-ξ_1) = \exp([ξ_1, \cdot]) ξ_2\]
where the second exponential is the matrix exponential for the linear operator $ξ ↦ [ξ_1, ξ]$.
ManifoldGroupTesting.check_exp_exp_
— Methodcheck_exp_exp_(G, exp, exp!, χ_, χ, v)
Compare exp
and exp!
.
ManifoldGroupTesting.check_exp_invariant
— Functioncheck_exp_invariant(G, exp, χ, v, χ_, conv=(LeftAction(), LeftSide()))
The invariant exponential of a Lie group fulfils
\[χ' \exp_{χ}(v) = \exp_{χ'χ}(χ' v)\]
There is a right version which is:
\[\exp_χ(v) χ' = \exp_{χχ'}(v χ')\]
ManifoldGroupTesting.check_exp_lie_ad
— MethodThe group exponential commutes with the adjoint action:
\[\exp(χξχ^{-1}) = χ\exp(ξ)χ^{-1}\]
ManifoldGroupTesting.check_exp_lie_point
— Methodcheck_exp_lie_point(G, ξ)
The Lie group exponential sends the vector $ξ \in \mathfrak{g}$ in the algebra to an element in the group.
\[\exp(ξ)\in G\]
ManifoldGroupTesting.check_exp_log
— Methodcheck_exp_log(G, exp, log, χ1, χ2)
Check the identity
\[\exp_{χ_1}(\log_{χ_1}(χ_2)) = χ_2\]
ManifoldGroupTesting.check_grp_rep_Identity
— Methodcheck_grp_rep_Identity(G)
The representation works at the point Identity(G)
.
ManifoldGroupTesting.check_grp_rep_compose
— Methodcheck_grp_rep_compose(G, ρ, χ1, χ2)
The group representation $ρ$ commutes with composition.
\[ ρ(χ_1 χ_2) = ρ(χ_1) ρ(χ_2)\]
where the latter is a matrix multiplication.
ManifoldGroupTesting.check_inv_rep
— Methodcheck_inv_rep(G, grp_rep, χ)
The group representation $ρ$ commutes with the inverse.
\[ρ(χ)^{-1} = ρ(χ^{-1})\]
ManifoldGroupTesting.check_log_exp
— Methodcheck_log_exp(G, log, exp, χ, v)
Check the identity
\[\log_{χ}(\exp_{χ}(v)) = v\]
ManifoldGroupTesting.check_log_log_
— Methodcheck_log_log_(G, log, log!, v_, χ1, χ2)
Compare log
and log!
.
ManifoldGroupTesting.check_zero_Identity
— Methodcheck_zero_Identity(G)
The zero vector at Identity(G)
is the same as the zero vector at identity_element(G)
.
Action Test Helpers
ManifoldGroupTesting.check_action_morphism
— Methodcheck_action_morphism(α::GroupAction, χ1, χ2, p)
For a group action $α$,
\[α(χ_1, α(χ_2, p)) = α(m(χ_1, χ_2), p)\]
where for a left action
\[m(χ_1, χ_2) = χ_1 χ_2\]
and for a right action
\[m(χ_1, χ_2) = χ_2 χ_1\]
ManifoldGroupTesting.check_apply_diff_linear
— Functioncheck_apply_diff_linear(A::AbstractGroupAction, χ, p, X, Y, λ=1.)
If the action $α$ is a group action, its differential with respect to the point $p$ is linear. Fix $χ ∈ G$, define $π_χ(p) ≔ α(χ, p)$ and $q ≔ π_{χ}(p)$. We have
\[⟨Dπ_{χ}, X + λY ⟩_p = ⟨Dπ_{χ}, X⟩_q + λ ⟨Dπ_{χ}, Y⟩_q\]
ManifoldGroupTesting.check_apply_morphism_Identity
— Methodcheck_apply_morphism_Identity(α::AbstractGroupAction, p)
For any action $α$ and $p$ in the manifold, one has
\[α(1, p) = p\]
where $1$ denotes Identity(G)
and $G$ is the action group.
ManifoldGroupTesting.check_switch_action_direction
— Methodcheck_switch_action_direction(α::GroupAction, χ, p)
For any group action $α$ and its dual $α'$ obtained by switch_direction
one has
\[α(χ,p) = α'(χ^{-1}, p)\]
ManifoldGroupTesting.check_trivial_infinitesimal_action
— Functioncheck_trivial_infinitesimal_action(A::GroupAction, p)
For an action $α$ and a point $p∈ M$, consider the function $f : G → M$ defined as $f(χ) := α(χ, p)$. The tangent map at identity $D := T f(1)$ is a linear map and sends zero to zero:
\[D 0 = 0\]
Diff Test Helpers
ManifoldGroupTesting.check_apply_diff_group
— Methodcheck_apply_diff_group(
A::AbstractGroupAction{TAD}, # group action G ⊂ Diff(M)
χ, # element of G
ξ, # element of Alg(G)
p, # element of M
id_func, # `identity_element` or `Identity`
)
This should hold for any group action $α$ on any manifold. If you define $π_p(χ) := α(χ, p)$ for $χ ∈ G$ and $p ∈ M$, and define, for $ξ ∈ Alg(G)$, $T_R(χ, ξ) := ξχ$ (the right translation), and $T_L(χ, ξ) := χξ$ (the left translation), then we have the identity:
\[⟨Dπ_{p}(χ), T(χ, ξ)⟩ = ⟨Dπ_{α(χ,p)}(1), ξ⟩\]
where, for a left action, $T$ is the right translation, and for a right action, $T$ is the left translation.
ManifoldGroupTesting.check_inv_diff
— Methodcheck_inv_diff(
G, # Group
χ, # group element
ξ, # Lie algebra element
side::Manifolds.GroupActionSide,
)
Test the differential of the inverse on a Lie group G
. Denote this inverse by $I(χ) := χ^{-1}$. If the left and right transports are $T_L(χ,ξ) := χξ$ and $T_R(χ,ξ) := ξχ$ respectively, then
\[⟨DI(χ), T_L(χ,ξ)⟩ = -T_R(χ^{-1}, ξ)\]
and
\[⟨DI(χ), T_R(χ,ξ)⟩ = -T_L(χ^{-1}, ξ)\]