Skip to content

Commit

Permalink
add docstrings for acting_group and action_function (oscar-system…
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrodgers committed Feb 28, 2024
1 parent a8335b0 commit fe2857d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/src/Groups/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,14 @@ A G-set provides an explicit bijection between the elements of the set and
the corresponding set of positive integers on which the induced permutation
group acts,
see [`action_homomorphism(Omega::GSetByElements{T}) where T<:GAPGroup`](@ref).
Note that the explicit elements of a G-set `Omega` can be obtained using
`collect(Omega)`.

```@docs
gset(G::GAPGroup, fun::Function, Omega)
permutation
acting_group(Omega::GSetByElements)
action_function(Omega::GSetByElements)
action_homomorphism(Omega::GSetByElements{T}) where T<:GAPGroup
orbit(Omega::GSetByElements{<:GAPGroup}, omega::T) where T
orbit(G::PermGroup, omega)
Expand Down
36 changes: 34 additions & 2 deletions src/Groups/gsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,40 @@ function Base.show(io::IO, x::GSetByElements)
end
end

# TODO: document `acting_group`, `action_function`
"""
acting_group(Omega::GSetByElements)
Return the group `G` acting on `Omega`.
# Examples
```jldoctest
julia> G = symmetric_group(4);
julia> acting_group(gset(G, [1])) == G
true
```
"""
acting_group(Omega::GSetByElements) = Omega.group

@doc raw"""
action_function(Omega::GSetByElements)
Return the function $f: \Omega \times G \to \Omega$ that defines the G-set.
# Examples
```jldoctest
julia> G = symmetric_group(4);
julia> action_function(gset(G, [1])) == ^
true
julia> action_function(gset(G, [[1, 2]])) == on_tuples
true
julia> action_function(gset(G, on_sets, [[1, 2]])) == on_sets
true
```
"""
action_function(Omega::GSetByElements) = Omega.action_function

# The following works for all G-set types that support attributes
Expand Down Expand Up @@ -241,7 +273,7 @@ function ^(omega::ElementOfGSet, g::T) where {T<:AbstractAlgebra.GroupElem}
return ElementOfGSet(Omega, fun(omega.obj, g))
end

==(omega1::ElementOfGSet, omega2::ElementOfGSet) =
==(omega1::ElementOfGSet, omega2::ElementOfGSet) =
((omega1.gset == omega2.gset) && (omega1.obj == omega2.obj))

function Base.hash(omega::ElementOfGSet, h::UInt)
Expand Down
1 change: 1 addition & 0 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export acting_domain
export acting_group
export acting_subgroup
export action
export action_function
export action_homomorphism
export add_edge!
export add_gluing!
Expand Down

0 comments on commit fe2857d

Please sign in to comment.