Skip to content

Commit

Permalink
Adjust to deleted deprecations/aliases Hecke edition
Browse files Browse the repository at this point in the history
  • Loading branch information
joschmitt committed Feb 16, 2024
1 parent ab42a44 commit c934784
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 61 deletions.
6 changes: 3 additions & 3 deletions docs/src/NumberTheory/galois.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The main information is included in the number field chapter, see
- [`Hecke.principal_subfields(K::SimpleNumField)`](@ref)
- [`subfields(FF::Generic.FunctionField{QQFieldElem})`](@ref)

By setting `set_verbose_level(:Subfields, n::Int)` to 1 or 2
By setting `set_verbosity_level(:Subfields, n::Int)` to 1 or 2
information about the progress can be obtained.

## Galois Group
Expand All @@ -75,8 +75,8 @@ find explicit subfields of the splitting field as well.

Information about the progress is available via

- `set_verbose_level(:GaloisGroup, n::Int)`
- `set_verbose_level(:GaloisInvariants, n::Int)`
- `set_verbosity_level(:GaloisGroup, n::Int)`
- `set_verbosity_level(:GaloisInvariants, n::Int)`

```@docs
galois_group(K::AbsSimpleNumField, extra::Int = 5; useSubfields::Bool = true, pStart::Int = 2*degree(K), prime::Int = 0)
Expand Down
2 changes: 1 addition & 1 deletion experimental/GModule/Brueckner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ function lift(C::GModule, mp::Map)
@hassert :BruecknerSQ 2 preimage(z, z(chn)) == chn
GG, GGinj, GGpro, GMtoGG = Oscar.GrpCoh.extension(PcGroup, z(chn))
@assert is_surjective(GGpro)
if get_assert_level(:BruecknerSQ) > 1
if get_assertion_level(:BruecknerSQ) > 1
_GG, _ = Oscar.GrpCoh.extension(z(chn))
@assert is_isomorphic(GG, _GG)
end
Expand Down
8 changes: 4 additions & 4 deletions experimental/GModule/Cohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import Base: parent
import Oscar: pretty, Lowercase, @show_name, @show_special

function __init__()
Hecke.add_verbose_scope(:GroupCohomology)
Hecke.add_assert_scope(:GroupCohomology)
Hecke.add_verbosity_scope(:GroupCohomology)
Hecke.add_assertion_scope(:GroupCohomology)

Hecke.add_verbose_scope(:GaloisCohomology)
Hecke.add_assert_scope(:GaloisCohomology)
Hecke.add_verbosity_scope(:GaloisCohomology)
Hecke.add_assertion_scope(:GaloisCohomology)
end

######################################################################
Expand Down
20 changes: 10 additions & 10 deletions experimental/GModule/GModule.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,17 @@ end


function __init__()
add_verbose_scope(:BruecknerSQ)
set_verbose_level(:BruecknerSQ, 0)
add_verbosity_scope(:BruecknerSQ)
set_verbosity_level(:BruecknerSQ, 0)

add_assert_scope(:BruecknerSQ)
set_assert_level(:BruecknerSQ, 0)
add_assertion_scope(:BruecknerSQ)
set_assertion_level(:BruecknerSQ, 0)

add_assert_scope(:MinField)
set_assert_level(:MinField, 0)
add_assertion_scope(:MinField)
set_assertion_level(:MinField, 0)

add_verbose_scope(:MinField)
set_verbose_level(:MinField, 0)
add_verbosity_scope(:MinField)
set_verbosity_level(:MinField, 0)
end

function irreducible_modules(k::FinField, G::Oscar.GAPGroup)
Expand Down Expand Up @@ -914,7 +914,7 @@ function hilbert90_cyclic(A::MatElem{<:FinFieldElem}, s, os::Int)
@hassert :MinField 2 A == B*inv(map_entries(s, B))
return B
else
if cnt > 10 && get_assert_level(:MinField) > 1
if cnt > 10 && get_assertion_level(:MinField) > 1
error("")
end
cnt += 1
Expand Down Expand Up @@ -1259,7 +1259,7 @@ function hom_base(C::_T, D::_T) where _T <: GModule{<:Any, <:AbstractAlgebra.FPM
push!(S, s)
end
end
if nbits(pp) > 1000 && get_assert_level(:MinField) > 1
if nbits(pp) > 1000 && get_assertion_level(:MinField) > 1
error("ndw")
end
if length(S) == length(T)
Expand Down
4 changes: 2 additions & 2 deletions experimental/GModule/GaloisCohomology.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ julia> k, a = number_field(x^4 - 12*x^3 + 36*x^2 - 36*x + 9);
julia> a = ray_class_field(8*3*maximal_order(k), n_quo = 2);
julia> a = filter(isnormal, subfields(a, degree = 2));
julia> a = filter(is_normal, subfields(a, degree = 2));
julia> I = idel_class_gmodule(k);
Expand Down Expand Up @@ -1518,7 +1518,7 @@ and explicit 2-cochains.
function relative_brauer_group(K::AbsSimpleNumField, k::Union{QQField, AbsSimpleNumField} = QQ)
G, mG = automorphism_group(PermGroup, K)
if k != QQ
fl, mp = issubfield(k, K)
fl, mp = is_subfield(k, K)
p = mp(gen(k))
@assert fl
s, ms = sub(G, [x for x = G if mG(x)(p) == p])
Expand Down
10 changes: 5 additions & 5 deletions experimental/GaloisGrp/src/Solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ using Oscar
import Oscar: AbstractAlgebra, Hecke, GaloisGrp.GaloisCtx

function __init__()
Hecke.add_verbose_scope(:SolveRadical)
Hecke.add_assert_scope(:SolveRadical)
Hecke.add_verbosity_scope(:SolveRadical)
Hecke.add_assertion_scope(:SolveRadical)
end


Expand Down Expand Up @@ -420,7 +420,7 @@ a corresponding primitive n-th root of 1, find an isomorphic radical extension
using Lagrange resolvents.
"""
function as_radical_extension(K::NumField, aut::Map, zeta::NumFieldElem; simplify::Bool = !false)
CHECK = get_assert_level(:SolveRadical) > 0
CHECK = get_assertion_level(:SolveRadical) > 0

g = gen(K)
d = degree(K)
Expand Down Expand Up @@ -468,7 +468,7 @@ The necessary roots of unity are not themselves computed as radicals.
See also [`galois_group`](@ref).
# VERBOSE
Supports `set_verbose_level(:SolveRadical, i)` to obtain information.
Supports `set_verbosity_level(:SolveRadical, i)` to obtain information.
# Examples
Expand Down Expand Up @@ -503,7 +503,7 @@ function Oscar.solve(f::ZZPolyRingElem; max_prec::Int=typemax(Int), show_radical
@req is_squarefree(f) "Polynomial must be square-free"

#switches check = true in hom and number_field on
CHECK = get_assert_level(:SolveRadical) > 0
CHECK = get_assertion_level(:SolveRadical) > 0
@vprint :SolveRadical 1 "computing initial galois group...\n"
@vtime :SolveRadical 1 G, C = galois_group(f)
lp = [p for p = keys(factor(order(G)).fac) if p > 2]
Expand Down
2 changes: 1 addition & 1 deletion experimental/ModStd/ModStdNF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Hecke: modular_lift, modular_proj, modular_env, RecoCtx,
induce_rational_reconstruction

function __init__()
Hecke.add_verbose_scope(:ModStdNF)
Hecke.add_verbosity_scope(:ModStdNF)
end


Expand Down
2 changes: 1 addition & 1 deletion experimental/ModStd/ModStdQ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Oscar: MPolyIdeal, BiPolyArray, IdealGens, Hecke, AbstractAlgebra
import Hecke: induce_rational_reconstruction, induce_crt

function __init__()
Hecke.add_verbose_scope(:ModStdQ)
Hecke.add_verbosity_scope(:ModStdQ)
end

function (R::fpMPolyRing)(f::QQMPolyRingElem)
Expand Down
2 changes: 1 addition & 1 deletion experimental/ModStd/ModStdQt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Oscar.Hecke
import Oscar.Solve

function __init__()
Hecke.add_verbose_scope(:ModStdQt)
Hecke.add_verbosity_scope(:ModStdQt)
end

function Oscar.evaluate(f::FracElem{<:MPolyRingElem}, v::Vector{<:RingElem}; ErrorTolerant::Bool = false)
Expand Down
2 changes: 1 addition & 1 deletion src/AlgebraicGeometry/Surfaces/K3Auto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ and it is equal to $2$ if and only if $S$ is $2$-elementary.
If an ample class is given, then the generators returned preserve it.
This kind of computation can be very expensive. To print progress information
use `set_verbose_level(:K3Auto, 2)` or higher.
use `set_verbosity_level(:K3Auto, 2)` or higher.
# Input
- `S`: a hyperbolic lattice
Expand Down
14 changes: 7 additions & 7 deletions src/NumberTheory/GaloisGrp/GaloisGrp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ module GaloisGrp

using Oscar, Random
import Base: ^, +, -, *, ==
import Oscar: Hecke, AbstractAlgebra, GAP, extension_field, isinteger,
upper_bound
import Oscar: Hecke, AbstractAlgebra, GAP, extension_field, isinteger
using Oscar: SLPolyRing, SLPoly, SLPolynomialRing, CycleType

import Oscar: pretty, LowercaseOff
Expand All @@ -17,16 +16,17 @@ export galois_quotient
export power_sum
export slpoly_ring
export to_elementary_symmetric
export upper_bound
export valuation_of_roots

import Hecke: orbit, fixed_field, extension_field

function __init__()
GAP.Packages.load("ferret"; install=true)

Hecke.add_verbose_scope(:GaloisGroup)
Hecke.add_verbose_scope(:GaloisInvariant)
Hecke.add_assert_scope(:GaloisInvariant)
Hecke.add_verbosity_scope(:GaloisGroup)
Hecke.add_verbosity_scope(:GaloisInvariant)
Hecke.add_assertion_scope(:GaloisInvariant)
end

"""
Expand Down Expand Up @@ -1171,8 +1171,8 @@ end
#TODO: Max: rank the filter function by cost, cheapest first...
# possibly needs a third field in the structure
function (F::GroupFilter)(G::PermGroup)
do_print = Hecke.get_verbose_level(:GaloisGroup) >= 1
do_all = Hecke.get_verbose_level(:GaloisGroup) >= 2
do_print = Hecke.get_verbosity_level(:GaloisGroup) >= 1
do_all = Hecke.get_verbosity_level(:GaloisGroup) >= 2

res = true
for (x, s) = F.f
Expand Down
38 changes: 19 additions & 19 deletions src/Oscar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,34 +112,34 @@ function __init__()
end
__init_group_libraries()

add_verbose_scope(:K3Auto)
add_assert_scope(:K3Auto)
add_verbosity_scope(:K3Auto)
add_assertion_scope(:K3Auto)

add_verbose_scope(:EllipticSurface)
add_assert_scope(:EllipticSurface)
add_verbosity_scope(:EllipticSurface)
add_assertion_scope(:EllipticSurface)

add_verbose_scope(:MorphismFromRationalFunctions)
add_assert_scope(:MorphismFromRationalFunctions)
add_verbosity_scope(:MorphismFromRationalFunctions)
add_assertion_scope(:MorphismFromRationalFunctions)

add_verbose_scope(:Gluing)
add_assert_scope(:Gluing)
add_verbosity_scope(:Gluing)
add_assertion_scope(:Gluing)

add_verbose_scope(:Intersections)
add_assert_scope(:Intersections)
add_verbosity_scope(:Intersections)
add_assertion_scope(:Intersections)

add_verbose_scope(:MaximalAssociatedPoints)
add_assert_scope(:MaximalAssociatedPoints)
add_verbosity_scope(:MaximalAssociatedPoints)
add_assertion_scope(:MaximalAssociatedPoints)

add_verbose_scope(:Divisors)
add_assert_scope(:Divisors)
add_verbosity_scope(:Divisors)
add_assertion_scope(:Divisors)

add_verbose_scope(:Blowup)
add_assert_scope(:Blowup)
add_verbosity_scope(:Blowup)
add_assertion_scope(:Blowup)

add_verbose_scope(:hilbert)
add_assert_scope(:hilbert)
add_verbosity_scope(:hilbert)
add_assertion_scope(:hilbert)

add_verbose_scope(:FTheoryModelPrinter)
add_verbosity_scope(:FTheoryModelPrinter)

add_verbosity_scope(:LinearQuotients)

Expand Down
2 changes: 1 addition & 1 deletion src/PolyhedralGeometry/Polyhedron/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Construct a `Polyhedron` corresponding to a `Polymake.BigObject` of type `Polyto
"""
function polyhedron(p::Polymake.BigObject)
T, f = _detect_scalar_and_field(Polyhedron, p)
if T == EmbeddedNumFieldElem{AbsSimpleNumFieldElem} && Hecke.isquadratic_type(number_field(f))[1] && Polymake.bigobject_eltype(p) == "QuadraticExtension"
if T == EmbeddedNumFieldElem{AbsSimpleNumFieldElem} && Hecke.is_quadratic_type(number_field(f))[1] && Polymake.bigobject_eltype(p) == "QuadraticExtension"
p = _polyhedron_qe_to_on(p, f)
end
return Polyhedron{T}(p, f)
Expand Down
2 changes: 1 addition & 1 deletion src/Rings/FinField.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Oscar.Nemo
import Oscar.Hecke

function __init__()
Hecke.add_verbose_scope(:DiscLog)
Hecke.add_verbosity_scope(:DiscLog)
end

###############################################################
Expand Down
6 changes: 3 additions & 3 deletions test/Groups/gsets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ end
@test has_preimage_with_preimage(acthom, pi)[1]
@test order(image(acthom)[1]) == 48

# isconjugate
# is_conjugate
Omega = gset(G)
@test isconjugate(Omega, gen(V, 1), gen(V, 2))
@test ! isconjugate(Omega, zero(V), gen(V, 1))
@test is_conjugate(Omega, gen(V, 1), gen(V, 2))
@test ! is_conjugate(Omega, zero(V), gen(V, 1))

# is_conjugate_with_data
Omega = gset(G)
Expand Down
2 changes: 1 addition & 1 deletion test/PolyhedralGeometry/polyhedron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@
D = polyhedron(Polymake.polytope.dodecahedron())
R = coefficient_field(D)
NF = number_field(R)
let isq = Hecke.isquadratic_type(NF)
let isq = Hecke.is_quadratic_type(NF)
@test isq[1]
@test isq[2] == 5
end
Expand Down

0 comments on commit c934784

Please sign in to comment.