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
7 changes: 7 additions & 0 deletions docs/src/Groups/permgroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ julia> x(6)
6
```

## Moved points of permutations and permutation groups
```@docs
smallest_moved_point
largest_moved_point
moved_points
number_of_moved_points
```

## Cycle structures

Expand Down
1 change: 1 addition & 0 deletions src/GAP/wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ GAP.@wrap SizeOfFieldOfDefinition(x::GapObj, y::GapInt)::GapInt
GAP.@wrap SizesCentralizers(x::GapObj)::GapObj
GAP.@wrap SizesConjugacyClasses(x::GapObj)::GapObj
GAP.@wrap SLPforElement(x::GapObj, y::GapObj)::GAP.Obj
GAP.@wrap SmallestMovedPoint(x::Any)::GapInt
GAP.@wrap Source(x::GapObj)::GapObj
GAP.@wrap Sqrt(x::Int64)::GAP.Obj
GAP.@wrap Stabilizer(v::GapObj, w::Any, x::GapObj, y::GapObj, z::GapObj)::GapObj
Expand Down
57 changes: 57 additions & 0 deletions src/Groups/perm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,63 @@ function (G::PermGroup)(H::PermGroup)
throw(ArgumentError("H has degree $dH, cannot be coerced to degree $dG"))
end

@doc raw"""
smallest_moved_point(x::PermGroupElem) -> Union{Int, PosInf}

Return the smallest positive integer which is not fixed by `x` if
such an integer exists, and `inf` if `x` is the identity.

smallest_moved_point(G::PermGroup) -> Union{Int, PosInf}

Return the smallest positive integer which is not fixed by `G` if
such an integer exists, and `inf` if `G` is trivial.

# Examples
```jldoctest
julia> g = symmetric_group(4); s = sylow_subgroup(g, 3)[1];

julia> smallest_moved_point(s)
1

julia> smallest_moved_point(gen(s, 1))
1

julia> smallest_moved_point(one(s))
infinity
```
"""
function smallest_moved_point(x::Union{PermGroupElem,PermGroup})
pt = GAPWrap.SmallestMovedPoint(GapObj(x))
pt isa Int && return pt
return inf
end

@doc raw"""
largest_moved_point(x::PermGroupElem) -> Int

Return the largest positive integer which is not fixed by `x` if
such an integer exists, and `0` if `x` is the identity.

largest_moved_point(G::PermGroup) -> Int

Return the largest positive integer which is not fixed by `G` if
such an integer exists, and `0` if `G` is trivial.

# Examples
```jldoctest
julia> g = symmetric_group(4); s = sylow_subgroup(g, 3)[1];

julia> largest_moved_point(s)
3

julia> largest_moved_point(gen(s, 1))
3

julia> largest_moved_point(one(s))
0
```
"""
largest_moved_point(x::Union{PermGroupElem,PermGroup}) = GAPWrap.LargestMovedPoint(GapObj(x))

@doc raw"""
moved_points(x::PermGroupElem) -> Vector{Int}
Expand Down
2 changes: 2 additions & 0 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,7 @@ export label!
export labeled_matrix_formatted
export labelings
export laplacian_matrix
export largest_moved_point
export lattice_homomorphism
export lattice_of_cyclic_flats
export lattice_of_flats
Expand Down Expand Up @@ -1653,6 +1654,7 @@ export small_generating_set, has_small_generating_set, set_small_generating_set
export small_group
export small_group_identification, has_small_group_identification
export smaller_degree_permutation_representation
export smallest_moved_point
export snub_cube
export snub_dodecahedron
export socle, has_socle, set_socle
Expand Down
Loading