Skip to content
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
2 changes: 2 additions & 0 deletions docs/src/Groups/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ orbit(Omega::GSetByElements{<:GAPGroup, S}, omega::S) where S
orbit(G::PermGroup, omega)
orbits(Omega::T) where T <: GSetByElements{TG} where TG <: GAPGroup
is_transitive(Omega::GSet)
transitivity(Omega::GSet)
rank_action(Omega::GSet)
is_regular(Omega::GSet)
is_semiregular(Omega::GSet)
```
Expand Down
52 changes: 52 additions & 0 deletions src/Groups/gsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,58 @@ minimal_block_reps(G::GSet) = error("not implemented")
all_blocks(G::GSet) = error("not implemented")


"""
rank_action(Omega::GSet)

Return the rank of the transitive group action associated with `Omega`.
This is defined as the number of orbits in the action on ordered pairs
of points in `Omega`,
and is equal to the number of orbits of the stabilizer of a point in `Omega`
on `Omega`, see [Cam99; Section 1.11](@cite).

An exception is thrown if the group action is not transitive on `Omega`.

# Examples
```jldoctest
julia> G = symmetric_group(4); Omega = gset(G); rank_action(Omega) # 4-transitive
2

julia> G = dihedral_group(PermGroup, 8); Omega = gset(G); rank_action(Omega) # not 2-transitive
3
```
"""
function rank_action(Omega::GSet)
@req is_transitive(Omega) "the group is not transitive"
@req !isempty(Omega) "the action domain is empty"
H = stabilizer(Omega)[1]
return length(orbits(H))
end

"""
transitivity(Omega::GSet)

Return the maximum `k` such that group action associated with `Omega`
acts `k`-transitively on `Omega`,
that is, every `k`-tuple of points in `Omega` can be mapped simultaneously
to every other `k`-tuple by an element of the group.

The output is `0` if the group acts intransitively on `Omega`.

# Examples
```jldoctest
julia> G = mathieu_group(24); Omega = gset(G); transitivity(Omega)
5

julia> G = symmetric_group(4); Omega = gset(G); transitivity(Omega)
4
```
"""
function transitivity(Omega::GSet)
acthom = action_homomorphism(Omega)
return transitivity(image(acthom)[1])
end


"""
is_transitive(Omega::GSet)

Expand Down
6 changes: 6 additions & 0 deletions test/Groups/gsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
@test ! is_primitive(Omega)
@test ! is_regular(Omega)
@test ! is_semiregular(Omega)
@test transitivity(Omega) == 0
@test_throws ArgumentError rank_action(Omega)
@test_throws ArgumentError gset(G, permuted, omega)

R, x = polynomial_ring(QQ, [:x1, :x2, :x3]);
Expand All @@ -98,6 +100,8 @@
@test is_primitive(Omega)
@test ! is_regular(Omega)
@test ! is_semiregular(Omega)
@test transitivity(Omega) == 3
@test rank_action(Omega) == 2

# seeds can be anything iterable
G = symmetric_group(6)
Expand Down Expand Up @@ -249,7 +253,9 @@ end

# transitivity
@test transitivity(G8) == 1
@test transitivity(gset(G8)) == 1
@test transitivity(S4) == 4
@test transitivity(gset(S4)) == 4
@test_throws ArgumentError transitivity(S4, 1:3)
@test transitivity(S4, 1:4) == 4
@test transitivity(S4, 1:5) == 0
Expand Down