Skip to content

Commit

Permalink
Change psylow_subgroup to sylow_subgroup (#1355)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevellM committed Jan 26, 2024
1 parent bf8c367 commit ea33652
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/src/abelian/structural.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sub(s::Vector{GrpAbFinGenElem})
sub(G::GrpAbFinGen, M::ZZMatrix)
sub(G::GrpAbFinGen, n::ZZRingElem)
sub(G::GrpAbFinGen, n::Integer)
psylow_subgroup(G::GrpAbFinGen, p::Union{ZZRingElem, Integer})
sylow_subgroup(G::GrpAbFinGen, p::Union{ZZRingElem, Integer})
Hecke.has_quotient(G::GrpAbFinGen, invariant::Vector{Int})
Hecke.has_complement(f::GrpAbFinGenMap)
is_pure(U::GrpAbFinGen, G::GrpAbFinGen)
Expand Down
2 changes: 1 addition & 1 deletion ext/GAPExt/maximal_abelian_subextension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function check_abelian_extension(C::Hecke.ClassField, res_act::Vector{GrpAbFinGe
new_prime = false
for (P, v) in fac
# I check that the action of the P-Sylow has no fixed points.
PS, mPS = psylow_subgroup(G, P, false)
PS, mPS = sylow_subgroup(G, P, false)
s, ms = snf(PS)
act_sub = induce_action_on_subgroup(ms*mPS, res_act)
if !is_fixed_point_free(act_sub)
Expand Down
4 changes: 4 additions & 0 deletions src/Deprecations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,7 @@ simplest_inside(x::arb) = simplest_rational_inside(x)
# Deprecated during 0.18.*

@deprecate abelian_fields abelian_extensions

# Deprecated during 0.24.*

@deprecate psylow_subgroup sylow_subgroup
2 changes: 1 addition & 1 deletion src/Grp/GenGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ elements(G::GrpGen) = collect(G)

elements(HtoG::GrpGenToGrpGenMor) = unique(HtoG.img)

function psylow_subgroup(G::GrpGen, p::IntegerUnion)
function sylow_subgroup(G::GrpGen, p::IntegerUnion)
if !is_prime(p)
error("$p not prime")
end
Expand Down
24 changes: 20 additions & 4 deletions src/GrpAb/GrpAbFinGen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1525,12 +1525,28 @@ function _psylow_subgroup_gens(G::GrpAbFinGen, p::IntegerUnion)
end

@doc raw"""
psylow_subgroup(G::GrpAbFinGen, p::IntegerUnion) -> GrpAbFinGen, GrpAbFinGenMap
sylow_subgroup(G::GrpAbFinGen, p::IntegerUnion) -> GrpAbFinGen, GrpAbFinGenMap
Return the $p$-Sylow subgroup of `G`.
Return the Sylow $p-$subgroup of the finitely generated abelian group `G`, for a
prime `p`. This is the subgroup of `p`-power order in `G` whose index in `G` is
coprime to `p`.
# Examples
```jldoctest
julia> A = abelian_group(ZZRingElem[2, 6, 30])
GrpAb: Z/2 x Z/6 x Z/30
julia> H, j = sylow_subgroup(A, 2);
julia> H
GrpAb: (Z/2)^3
julia> divexact(order(A), order(H))
45
```
"""
function psylow_subgroup(G::GrpAbFinGen, p::IntegerUnion,
to_lattice::Bool = true)
function sylow_subgroup(G::GrpAbFinGen, p::IntegerUnion,
to_lattice::Bool = true)
@req is_prime(p) "Number ($p) must be prime"
S, mS = snf(G)
z = _psylow_subgroup_gens(S, p)
Expand Down
2 changes: 1 addition & 1 deletion src/GrpAb/SubgroupEnum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ function _psubgroups(G::GrpAbFinGen, p::IntegerUnion; subtype = [-1],
order = -1,
index = -1,
fun = sub)
P, mP = psylow_subgroup(G, p, false)
P, mP = sylow_subgroup(G, p, false)

if quotype != [-1]
return ( fun(G, map(mP, z))
Expand Down
2 changes: 1 addition & 1 deletion src/GrpAb/stable_sub.jl
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ function _stable_subgroup_snf(R::GrpAbFinGen, act::Vector{GrpAbFinGenMap}; quoty
list = Base.Generator[]
for p in keys(lf.fac)
x1 = valuation(c, p)
G, mG = psylow_subgroup(R, p, false)
G, mG = sylow_subgroup(R, p, false)
S, mS = snf(G)
comp = mS*mG

Expand Down
2 changes: 1 addition & 1 deletion src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,6 @@ export pseudo_matrix
export psi_lower
export psi_upper
export psubgroups
export psylow_subgroup
export push!
export push_through_isogeny
export qAdicConj
Expand Down Expand Up @@ -899,6 +898,7 @@ export supersingular_polynomial
export support
export swan_module
export swap_rows!
export sylow_subgroup
export symbol
export t2
export tamagawa_number
Expand Down
6 changes: 3 additions & 3 deletions test/Grp/GenGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@

@testset "psylow" begin
G,AtoG,GtoA = Hecke.generic_group([1, -1, im, -im], *)
@test order(psylow_subgroup(G,2)[1]) == 4
@test order(psylow_subgroup(G,3)[1]) == 1
@test_throws ErrorException psylow_subgroup(G,10)
@test order(sylow_subgroup(G,2)[1]) == 4
@test order(sylow_subgroup(G,3)[1]) == 1
@test_throws ErrorException sylow_subgroup(G,10)
end

@testset "GrpGenToGrpAb" begin
Expand Down
6 changes: 3 additions & 3 deletions test/GrpAb/GrpAbFinGen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,11 @@

@testset "p-Sylow subgroup" begin
G = abelian_group([1, 3, 9, 5, 15, 20, 7])
P, mP = psylow_subgroup(G, 3)
P, mP = sylow_subgroup(G, 3)
@test order(P) == 3^valuation(order(G), 3)
P, mP = psylow_subgroup(G, 5)
P, mP = sylow_subgroup(G, 5)
@test order(P) == 5^valuation(order(G), 5)
P, mP = psylow_subgroup(G, 11)
P, mP = sylow_subgroup(G, 11)
@test order(P) == 11^valuation(order(G), 11)
end

Expand Down

0 comments on commit ea33652

Please sign in to comment.