Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lie bracket is zero on so(2) #761

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Union type `MatrixGroup`
- Columnwise group action with arbitrary matrix groups
- `uniform_distribution` now has an error hint explaining what has to be done to make it work.
- `lie_bracket` is exactly zero on orthogonal Lie algebra in 2D

## [0.10.3] - 2024-10-04

Expand Down
16 changes: 16 additions & 0 deletions src/groups/general_unitary_groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,22 @@ function adjoint_action!(G::GeneralUnitaryMultiplicationGroup, Y, p, X, ::RightA
return copyto!(G, Y, inv(G, p) * X * p)
end

function Manifolds.lie_bracket(
G::Manifolds.GeneralUnitaryMultiplicationGroup{ManifoldsBase.TypeParameter{Tuple{2}},ℝ},
X,
::Any,
)
return zero(X)
end
function Manifolds.lie_bracket!(
G::Manifolds.GeneralUnitaryMultiplicationGroup{ManifoldsBase.TypeParameter{Tuple{2}},ℝ},
X,
::Any,
::Any,
)
return fill!(X, 0)
end

function volume_density(M::GeneralUnitaryMultiplicationGroup, p, X)
return volume_density(M.manifold, p, X)
end
9 changes: 9 additions & 0 deletions test/groups/general_unitary_groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ include("group_utils.jl")
X = [0.0 -0.7071067811865475; 0.7071067811865475 0.0]
@test volume_density(M, p, X) ≈ 1.0

@testset "SO(2) Lie Bracket == 0" begin
Y = [0.0 0.7071067811865475; -0.7071067811865475 0.0]
X_ = copy(X)
X_[1, 2] += 1e-16
@test is_vector(M, identity_element(M), X_)
@test lie_bracket(M, X_, Y) == zeros(2, 2)
@test lie_bracket!(M, similar(X_), X_, Y) == zeros(2, 2)
end

M = SpecialOrthogonal(3)
p = [
-0.5908399013383766 -0.6241917041179139 0.5111681988316876
Expand Down
Loading