Skip to content

New linear representation type #6

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

Open
olivierverdier opened this issue Sep 18, 2024 · 12 comments
Open

New linear representation type #6

olivierverdier opened this issue Sep 18, 2024 · 12 comments
Labels
help wanted Extra attention is needed

Comments

@olivierverdier
Copy link
Collaborator

Many group actions are actually linear representations, which allows to define apply_diff automatically. I would suggest the following:

  1. Create a new abstract type AbstractLinearRepresentation:
abstract type AbstractLinearRepresentation{AD <: ActionDirection} <: AbstractGroupAction{AD} end
  1. Define apply_diff for this class of group actions:
Manifolds.apply_diff(A::AbstractLinearRepresentation, g, ::Any, X) = apply(A, g, X)
  1. Make the existing linear group actions derive from AbstractLinearRepresentation
    For instance:
struct TranslationAction{TAD<:ActionDirection,TM<:AbstractManifold,TRn<:TranslationGroup} <:
       AbstractLinearRepresentation{TAD}
    manifold::TM
    Rn::TRn
end
  1. Clean up existing code
    Most of the existing implementations of apply_diff follow this pattern (because they are linear representation), for instance:
  • apply_diff(::TranslationAction,...)
  • apply_diff(::RotationActionOnVector,...)
  • apply_diff(::RotationTranslationOnVector,...)`
@kellertuer
Copy link
Member

Can we maybe do discussions about groups only in LIeGroups.jl?
I am slowly getting some overview about the groups in here, but if we add more and more features here, I will never catch up, as it seems, I will for now be the only one working on LieGroups.jl.

Also not my most recent question, whether the GroupAction we currently have should stay abstract – this indicates it maybe should? But again, since I am just starting redesigning that on the other repository, maybe changing the code here is a bit counterproductive – Let's do it over on LieGroups – otherwise I will just completely loose track.

@kellertuer
Copy link
Member

I can even finish the Interface PR without actions and you do a PR on actions over on Lie groups?

@olivierverdier
Copy link
Collaborator Author

The LieGroups.jl repo is totally empty. I am suggesting a simple, incremental improvement of the current codebase (which is still hosted here). That code base can be carried over later to LieGroups.jl.

It is not adding a new feature. It is more a simplification, since all the apply_diff current implementations (except for group actions on themselves) are of the same type.

As to your question: should group action be abstract: yes (even without this proposal).

@kellertuer
Copy link
Member

kellertuer commented Sep 18, 2024

All work on the repo is in the first PR (#7).

Later today I will remove my first steps towards GroupActions because they seem to be total bogus again probably, and merge that first PR.

@kellertuer
Copy link
Member

It's merged, I will probably do a PR on exp or a first group next – so you could start a PR on Actions? Again, Ia ma not sure whether we need one or two directions (one in the action one as argument in apply).

translate is now combined with compose already. So we just need apply

@mateuszbaran
Copy link
Member

Sure, we can do that. Maybe AbstractAffineAction would be a better name though?

@kellertuer kellertuer transferred this issue from JuliaManifolds/Manifolds.jl Sep 19, 2024
@kellertuer kellertuer reopened this Sep 19, 2024
@kellertuer
Copy link
Member

We can easily keep track of it here in LieGroups.jl then :)

@kellertuer kellertuer transferred this issue from another repository Oct 9, 2024
@kellertuer
Copy link
Member

@olivierverdier the interface here is now stable enough that we could add this in a next (maybe even just small) PR, do you maybe have a reference we can use in the docs?

Besides that, would the (slightly longer) name AbstractLinearRepresentationAction be ok?

@olivierverdier
Copy link
Collaborator Author

Yes, absolutely 👍

@kellertuer
Copy link
Member

nice. I will have to read up a bit to write a nice doc string, but might do this as one of my next PRs then – though my next one will first be a ValidationLieGroup

@kellertuer
Copy link
Member

kellertuer commented Mar 4, 2025

Nice, I checked a bit your code further over the weekend and I have a question, namely about my least favourite thing in Lie group theory actually: left/right.
Formerly we had so many left/rights and forward/backwards and so on that we nearly had an 8bit number system in place.

We reduced that a bit I hope and made it clearer in a few places.

We also do no longer have an TranslationAction but (just) a generic GroupOperationActionType together with a GroupAction that has a type the Lie group and the manifold as parameters (fields).

One could probably best model with as a

struct LinearRepresentation{T<: GroupOperationActionType} <: GroupOperationActionType end

?

We also have a default_left_action(L,M)

That now would return then the linear-representation-wrapper-struct's action I just proposed for the correct pair of arguments.

Then the diff_apply (that name changed also a bit to have a unified naming scheme) could dispatch exactly on this as

function diff_apply!(A::GroupAction{<: LinearRepresentation{GroupOperationActionType}, L, M}, g, p, X)
   return apply(A, g, X)
end

(maybe one has to form the nonlinearRrepresentation one first before calling apply?)

The reason I am asking this first before starting with a PR is, that my usual feeling is that what ever you propose to do, as soon as I try to do it I spend a lot of time and the answer is usually: No this is wrong.

So I would like to clarify a few things upfront, before I am the one doing the PR.

@kellertuer
Copy link
Member

Ah, for the doc string of the linear representation – do you maybe have a nice reference for a definition of this idea?

@kellertuer kellertuer added the help wanted Extra attention is needed label Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants