Skip to content

Commit

Permalink
rename *_subgroups to *_subgroup_classes
Browse files Browse the repository at this point in the history
for `*` one of `hall`, `maximal`, `low_index`
  • Loading branch information
ThomasBreuer committed Feb 2, 2024
1 parent a46e6d9 commit 71169c1
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 49 deletions.
4 changes: 2 additions & 2 deletions docs/src/Groups/subgroups.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ conjugacy_class(G::GAPGroup, g::GAPGroupElem)
conjugacy_class(G::T, g::T) where T<:GAPGroup
conjugacy_classes(G::GAPGroup)
complement_classes
hall_subgroups
maximal_subgroups(G::GAPGroup)
hall_subgroup_classes
maximal_subgroup_classes(G::GAPGroup)
subgroup_classes(G::GAPGroup)
```

Expand Down
22 changes: 11 additions & 11 deletions src/Groups/GAPGroups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -789,44 +789,44 @@ function subgroup_classes(G::GAPGroup; order::T = ZZRingElem(-1)) where T <: Int
end

"""
maximal_subgroups(G::Group)
maximal_subgroup_classes(G::Group)
Return the vector of all conjugacy classes of maximal subgroups of G.
# Examples
```jldoctest
julia> G = symmetric_group(3);
julia> maximal_subgroups(G)
julia> maximal_subgroup_classes(G)
2-element Vector{GAPGroupConjClass{PermGroup, PermGroup}}:
Conjugacy class of permutation group in G
Conjugacy class of permutation group in G
```
"""
@gapattribute function maximal_subgroups(G::GAPGroup)
@gapattribute function maximal_subgroup_classes(G::GAPGroup)
L = Vector{GapObj}(GAP.Globals.ConjugacyClassesMaximalSubgroups(G.X)::GapObj)
T = typeof(G)
LL = [GAPGroupConjClass(G, _as_subgroup_bare(G, GAPWrap.Representative(cc)), cc) for cc in L]
return Vector{GAPGroupConjClass{T, T}}(LL)
end

"""
low_index_subgroups(G::GAPGroup, n::Int)
low_index_subgroup_classes(G::GAPGroup, n::Int)
Return a vector of conjugacy classes of subgroups of index at most `n` in `G`.
# Examples
```jldoctest
julia> G = symmetric_group(5);
julia> low_index_subgroups(G, 5)
julia> low_index_subgroup_classes(G, 5)
3-element Vector{GAPGroupConjClass{PermGroup, PermGroup}}:
Conjugacy class of Sym(5) in Sym(5)
Conjugacy class of Alt(5) in Sym(5)
Conjugacy class of permutation group in Sym(5)
```
"""
function low_index_subgroups(G::GAPGroup, n::Int)
function low_index_subgroup_classes(G::GAPGroup, n::Int)
@req (n > 0) "index must be positive"
ll = GAP.Globals.LowIndexSubgroups(G.X, n)::GapObj
return [conjugacy_class(G, H) for H in _as_subgroups(G, ll)]
Expand Down Expand Up @@ -1208,7 +1208,7 @@ function sylow_subgroup(G::GAPGroup, p::IntegerUnion)
end

"""
hall_subgroups(G::Group, P::AbstractVector{<:IntegerUnion})
hall_subgroup_classes(G::Group, P::AbstractVector{<:IntegerUnion})
Return a vector that contains the conjugacy classes of
Hall `P`-subgroups of the finite group `G`, for a vector `P` of primes.
Expand All @@ -1223,24 +1223,24 @@ up to conjugacy.
```jldoctest
julia> g = dihedral_group(30);
julia> h = hall_subgroups(g, [2, 3]);
julia> h = hall_subgroup_classes(g, [2, 3]);
julia> (length(h), order(representative(h[1])))
(1, 6)
julia> g = GL(3, 2)
GL(3,2)
julia> h = hall_subgroups(g, [2, 3]);
julia> h = hall_subgroup_classes(g, [2, 3]);
julia> (length(h), order(representative(h[1])))
(2, 24)
julia> h = hall_subgroups(g, [2, 7]); length(h)
julia> h = hall_subgroup_classes(g, [2, 7]); length(h)
0
```
"""
function hall_subgroups(G::GAPGroup, P::AbstractVector{<:IntegerUnion})
function hall_subgroup_classes(G::GAPGroup, P::AbstractVector{<:IntegerUnion})
P = unique(P)
@req all(is_prime, P) "The integers must be prime"
res_gap = GAP.Globals.HallSubgroup(G.X, GAP.Obj(P, recursive = true))::GapObj
Expand Down
8 changes: 4 additions & 4 deletions src/Groups/GrpAb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function subgroup_classes(G::FinGenAbGroup; order::T = ZZRingElem(-1)) where T <
return [conjugacy_class(G, H) for (H, mp) in Hecke.subgroups(G, order = order)]
end

function low_index_subgroups(G::FinGenAbGroup, n::Int)
function low_index_subgroup_classes(G::FinGenAbGroup, n::Int)
@req (n > 0) "index must be positive"
res = [conjugacy_class(G, G)]
ord = order(G)
Expand All @@ -146,7 +146,7 @@ function low_index_subgroups(G::FinGenAbGroup, n::Int)
return res
end

function maximal_subgroups(G::FinGenAbGroup)
function maximal_subgroup_classes(G::FinGenAbGroup)
@req is_finite(G) "G is not finite"
primes = [p for (p, e) in factor(order(G))]
res = typeof(G)[]
Expand Down Expand Up @@ -283,7 +283,7 @@ function sylow_system(G::FinGenAbGroup)
return result
end

function hall_subgroups(G::FinGenAbGroup, P::AbstractVector{<:IntegerUnion})
function hall_subgroup_classes(G::FinGenAbGroup, P::AbstractVector{<:IntegerUnion})
@req is_finite(G) "G is not finite"
P = unique(P)
@req all(is_prime, P) "The integers must be prime"
Expand All @@ -309,7 +309,7 @@ function hall_system(G::FinGenAbGroup)
primes = [p for (p, e) in factor(order(G))]
result = FinGenAbGroup[]
for P in subsets(Set(primes))
push!(result, representative(hall_subgroups(G, collect(P))[1]))
push!(result, representative(hall_subgroup_classes(G, collect(P))[1]))
end
return result
end
Expand Down
2 changes: 1 addition & 1 deletion src/Groups/gsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ the action is transitive and the point stabilizers are maximal in `G`.
```jldoctest
julia> G = alternating_group(6);
julia> mx = filter(is_transitive, map(representative, maximal_subgroups(G)))
julia> mx = filter(is_transitive, map(representative, maximal_subgroup_classes(G)))
3-element Vector{PermGroup}:
Permutation group of degree 6 and order 24
Permutation group of degree 6 and order 36
Expand Down
2 changes: 1 addition & 1 deletion src/Groups/sub.jl
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ function is_maximal_subgroup(H::T, G::T; check::Bool = true) where T <: GAPGroup
t = right_transversal(G, H)[2:end] #drop the identity
return all(x -> order(sub(G, vcat(gens(H), [x]))[1]) == order(G), t)
end
return any(C -> H in C, maximal_subgroups(G))
return any(C -> H in C, maximal_subgroup_classes(G))
end

"""
Expand Down
4 changes: 2 additions & 2 deletions src/NumberTheory/GaloisGrp/GaloisGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ function set_orbit(G::PermGroup, H::PermGroup)
# http://dblp.uni-trier.de/db/journals/jsc/jsc79.html#Elsenhans17
# https://doi.org/10.1016/j.jsc.2016.02.005

l = map(representative, low_index_subgroups(H, 2*degree(G)^2))
l = map(representative, low_index_subgroup_classes(H, 2*degree(G)^2))
S, g = slpoly_ring(ZZ, degree(G), cached = false)

sort!(l, lt = (a,b) -> isless(order(b), order(a)))
Expand Down Expand Up @@ -1227,7 +1227,7 @@ mutable struct DescentEnv
#a more select choice of group....

function DescentEnv(G::PermGroup, f::GroupFilter = GroupFilter())
s = map(representative, maximal_subgroups(G))
s = map(representative, maximal_subgroup_classes(G))
r = new()
r.G = G
@vprint :GaloisGroup 1 "starting with $(length(s)) maximal subgroup classes\n"
Expand Down
2 changes: 1 addition & 1 deletion src/NumberTheory/GaloisGrp/Group.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ minimal supergroups, ie. it fails in ``C_4``.
function maximal_subgroup_chain(G::PermGroup, U::PermGroup)
l = [G]
while order(l[end]) > order(U)
m = reduce(vcat, map(collect, maximal_subgroups(l[end])))
m = reduce(vcat, map(collect, maximal_subgroup_classes(l[end])))
push!(l, m[findfirst(x -> is_subset(U, x), m)])
end
return reverse(l)
Expand Down
14 changes: 7 additions & 7 deletions src/deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -685,20 +685,20 @@ Base.@deprecate_binding jacobi_ideal jacobian_ideal
@deprecate number_transitive_groups number_of_transitive_groups
@deprecate has_number_transitive_groups has_number_of_transitive_groups

@deprecate hall_subgroup_reps(G::T, P::AbstractVector{<:IntegerUnion}) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, hall_subgroups(G, P))
@deprecate hall_subgroups_representatives(G::GAPGroup, P::AbstractVector{<:IntegerUnion}) map(representative, hall_subgroups(G, P))
@deprecate hall_subgroup_reps(G::T, P::AbstractVector{<:IntegerUnion}) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, hall_subgroup_classes(G, P))
@deprecate hall_subgroups_representatives(G::GAPGroup, P::AbstractVector{<:IntegerUnion}) map(representative, hall_subgroup_classes(G, P))

function hall_subgroup(G::T, P::AbstractVector{<:IntegerUnion}) where T <: Union{GAPGroup, FinGenAbGroup}
Base.depwarn("The function hall_subgroup is deprecated. Please use hall_subgroups.", :hall_subgroup)
Base.depwarn("The function hall_subgroup is deprecated. Please use hall_subgroup_classes.", :hall_subgroup)
@req is_solvable(G) "The group is not solvable"
return representative(hall_subgroups(G, P)[1])
return representative(hall_subgroup_classes(G, P)[1])
end

@deprecate low_index_subgroup_reps(G::T, n::Int) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, low_index_subgroups(G, n))
@deprecate low_index_subgroup_reps(G::T, n::Int) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, low_index_subgroup_classes(G, n))

@deprecate complement_class_reps(G::T, N::T) where T <: GAPGroup map(representative, complement_classes(G, N))

@deprecate maximal_subgroup_reps(G::T) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, maximal_subgroups(G))
@deprecate maximal_subgroup_reps(G::T) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, maximal_subgroup_classes(G))
@deprecate subgroup_reps(G::T) where T <: Union{GAPGroup, FinGenAbGroup} map(representative, subgroup_classes(G))
@deprecate conjugacy_classes_maximal_subgroups(G::T) where T <: Union{GAPGroup, FinGenAbGroup} maximal_subgroups(G)
@deprecate conjugacy_classes_maximal_subgroups(G::T) where T <: Union{GAPGroup, FinGenAbGroup} maximal_subgroup_classes(G)
@deprecate conjugacy_classes_subgroups(G::T) where T <: Union{GAPGroup, FinGenAbGroup} subgroup_classes(G)
6 changes: 3 additions & 3 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ export h_vector
export halfspace
export halfspace_matrix_pair
export hall_subgroup
export hall_subgroups
export hall_subgroup_classes
export hall_system, has_hall_system, set_hall_system
export has_du_val_singularities
export has_edge
Expand Down Expand Up @@ -925,7 +925,7 @@ export load_lp
export load_mps
export localized_ring
export loops
export low_index_subgroups
export low_index_subgroup_classes
export lower_central_series, has_lower_central_series, set_lower_central_series
export lower_triangular_matrix
export map
Expand Down Expand Up @@ -963,7 +963,7 @@ export maximal_extension
export maximal_groebner_cone
export maximal_normal_subgroups, has_maximal_normal_subgroups, set_maximal_normal_subgroups
export maximal_polyhedra, maximal_polyhedra_and_multiplicities
export maximal_subgroups, has_maximal_subgroups, set_maximal_subgroups
export maximal_subgroup_classes, has_maximal_subgroup_classes, set_maximal_subgroup_classes
export metadata
export milnor_algebra
export milnor_number
Expand Down
12 changes: 6 additions & 6 deletions test/Groups/GrpAb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ end
@test length(S1) == length(S2)
end
for n in 1:4
S1 = low_index_subgroups(G1, n)
S2 = low_index_subgroups(G2, n)
S1 = low_index_subgroup_classes(G1, n)
S2 = low_index_subgroup_classes(G2, n)
@test length(S1) == length(S2)
end
S1 = maximal_subgroups(G1)
S2 = maximal_subgroups(G2)
S1 = maximal_subgroup_classes(G1)
S2 = maximal_subgroup_classes(G2)
@test sort!([length(x) for x in S1]) == sort!([length(x) for x in S2])

# operations
Expand All @@ -138,8 +138,8 @@ end

# operations depending on sets of primes
for P in subsets(Set(primes))
@test [images(iso, representative(C))[1] for C in hall_subgroups(G1, collect(P))] ==
map(representative, hall_subgroups(G2, collect(P)))
@test [images(iso, representative(C))[1] for C in hall_subgroup_classes(G1, collect(P))] ==
map(representative, hall_subgroup_classes(G2, collect(P)))
end
@test sort!([order(images(iso, S)[1]) for S in hall_system(G1)]) ==
sort!([order(S) for S in hall_system(G2)])
Expand Down
4 changes: 2 additions & 2 deletions test/Groups/conjugation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
@test !is_conjugate_with_data(G,x,y)[1]
end

CC = @inferred maximal_subgroups(G)
CC = @inferred maximal_subgroup_classes(G)
@test length(CC)==3
@test Set([order(Int, representative(l)) for l in CC])==Set([6,8,12])

Expand All @@ -107,7 +107,7 @@
@test normalizer(G,H)==normalizer(G,x)

G = symmetric_group(5)
CC = @inferred maximal_subgroups(G)
CC = @inferred maximal_subgroup_classes(G)
all(H -> degree(H) == degree(G), map(representative, CC))

G = symmetric_group(10)
Expand Down
2 changes: 1 addition & 1 deletion test/Groups/matrixgroups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ end
G = GL(2,3)
@test length(conjugacy_classes(G))==8
@test length(@inferred subgroup_classes(G))==16
@test length(@inferred maximal_subgroups(G))==3
@test length(@inferred maximal_subgroup_classes(G))==3
end

@testset "Jordan structure" begin
Expand Down
16 changes: 8 additions & 8 deletions test/Groups/subgroups_and_cosets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
for H in L1
@test H in K
end
@test length(maximal_subgroups(G)) == 3
@test sum(map(length, maximal_subgroups(G))) == 8
@test any(C -> A in C, maximal_subgroups(G))
@test length(maximal_subgroup_classes(G)) == 3
@test sum(map(length, maximal_subgroup_classes(G))) == 8
@test any(C -> A in C, maximal_subgroup_classes(G))
@test maximal_normal_subgroups(G)==[A]
H = sub(G,[G([3,4,1,2]), G([2,1,4,3])])[1]
@test minimal_normal_subgroups(G)==[H]
Expand Down Expand Up @@ -328,15 +328,15 @@ end
end
L = [[2],[3],[5],[7],[2,3],[2,5],[2,7],[3,5],[3,7],[5,7],[2,3,5],[2,3,7],[2,5,7],[3,5,7],[2,3,5,7]]
@testset for l in L
h = hall_subgroups(G, l)
h = hall_subgroup_classes(G, l)
@test length(h) == 1
@test representative(h[1]) == sub(G,[g^(210÷lcm(l))])[1]
end
h = hall_subgroups(G, Int64[])
h = hall_subgroup_classes(G, Int64[])
@test length(h) == 1
@test representative(h[1]) == sub(G, [one(G)])[1]
@test length(hall_subgroups(symmetric_group(5), [2, 5])) == 0
@test_throws ArgumentError hall_subgroups(G, [4])
@test length(hall_subgroup_classes(symmetric_group(5), [2, 5])) == 0
@test_throws ArgumentError hall_subgroup_classes(G, [4])

L = sylow_system(G)
Lo = [order(l) for l in L]
Expand Down Expand Up @@ -389,7 +389,7 @@ end
@test order(fitting_subgroup(G)[1])==8
@test fitting_subgroup(S)==sub(S,[S([3,4,1,2]), S([4,3,2,1])])
@test frattini_subgroup(S)==sub(S,[one(S)])
@test frattini_subgroup(G)[1]==intersect(collect(Iterators.flatten(maximal_subgroups(G))))[1]
@test frattini_subgroup(G)[1]==intersect(collect(Iterators.flatten(maximal_subgroup_classes(G))))[1]
@test frattini_subgroup(G)==center(G)
@test is_characteristic_subgroup(center(G)[1], G)
@test socle(G)==frattini_subgroup(G)
Expand Down

0 comments on commit 71169c1

Please sign in to comment.