From c934784f504b6fa54f510af4cd423763751eeead Mon Sep 17 00:00:00 2001 From: Johannes Schmitt Date: Fri, 16 Feb 2024 09:53:41 +0100 Subject: [PATCH] Adjust to deleted deprecations/aliases Hecke edition --- docs/src/NumberTheory/galois.md | 6 +-- experimental/GModule/Brueckner.jl | 2 +- experimental/GModule/Cohomology.jl | 8 ++-- experimental/GModule/GModule.jl | 20 +++++----- experimental/GModule/GaloisCohomology.jl | 4 +- experimental/GaloisGrp/src/Solve.jl | 10 ++--- experimental/ModStd/ModStdNF.jl | 2 +- experimental/ModStd/ModStdQ.jl | 2 +- experimental/ModStd/ModStdQt.jl | 2 +- src/AlgebraicGeometry/Surfaces/K3Auto.jl | 2 +- src/NumberTheory/GaloisGrp/GaloisGrp.jl | 14 +++---- src/Oscar.jl | 38 +++++++++---------- .../Polyhedron/constructors.jl | 2 +- src/Rings/FinField.jl | 2 +- test/Groups/gsets.jl | 6 +-- test/PolyhedralGeometry/polyhedron.jl | 2 +- 16 files changed, 61 insertions(+), 61 deletions(-) diff --git a/docs/src/NumberTheory/galois.md b/docs/src/NumberTheory/galois.md index df8a02f60dd9..9294ab41c1b8 100644 --- a/docs/src/NumberTheory/galois.md +++ b/docs/src/NumberTheory/galois.md @@ -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 @@ -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) diff --git a/experimental/GModule/Brueckner.jl b/experimental/GModule/Brueckner.jl index 052108ee1d56..159cb9b33a0f 100644 --- a/experimental/GModule/Brueckner.jl +++ b/experimental/GModule/Brueckner.jl @@ -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 diff --git a/experimental/GModule/Cohomology.jl b/experimental/GModule/Cohomology.jl index 6762947010f4..183f4d1b6707 100644 --- a/experimental/GModule/Cohomology.jl +++ b/experimental/GModule/Cohomology.jl @@ -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 ###################################################################### diff --git a/experimental/GModule/GModule.jl b/experimental/GModule/GModule.jl index 11dfc8eaff02..de3937ba028c 100644 --- a/experimental/GModule/GModule.jl +++ b/experimental/GModule/GModule.jl @@ -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) @@ -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 @@ -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) diff --git a/experimental/GModule/GaloisCohomology.jl b/experimental/GModule/GaloisCohomology.jl index 6bc398a86fde..a12c0f65aa3b 100644 --- a/experimental/GModule/GaloisCohomology.jl +++ b/experimental/GModule/GaloisCohomology.jl @@ -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); @@ -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]) diff --git a/experimental/GaloisGrp/src/Solve.jl b/experimental/GaloisGrp/src/Solve.jl index 5dee7706b180..537506a661a9 100644 --- a/experimental/GaloisGrp/src/Solve.jl +++ b/experimental/GaloisGrp/src/Solve.jl @@ -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 @@ -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) @@ -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 @@ -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] diff --git a/experimental/ModStd/ModStdNF.jl b/experimental/ModStd/ModStdNF.jl index c6149b310237..328e1a2aa46e 100644 --- a/experimental/ModStd/ModStdNF.jl +++ b/experimental/ModStd/ModStdNF.jl @@ -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 diff --git a/experimental/ModStd/ModStdQ.jl b/experimental/ModStd/ModStdQ.jl index b97af8ff4bbc..7c22bae45c09 100644 --- a/experimental/ModStd/ModStdQ.jl +++ b/experimental/ModStd/ModStdQ.jl @@ -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) diff --git a/experimental/ModStd/ModStdQt.jl b/experimental/ModStd/ModStdQt.jl index abd21f8b3532..2344cddd66da 100644 --- a/experimental/ModStd/ModStdQt.jl +++ b/experimental/ModStd/ModStdQt.jl @@ -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) diff --git a/src/AlgebraicGeometry/Surfaces/K3Auto.jl b/src/AlgebraicGeometry/Surfaces/K3Auto.jl index 2f9f0c32fa1c..ee5f88013354 100644 --- a/src/AlgebraicGeometry/Surfaces/K3Auto.jl +++ b/src/AlgebraicGeometry/Surfaces/K3Auto.jl @@ -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 diff --git a/src/NumberTheory/GaloisGrp/GaloisGrp.jl b/src/NumberTheory/GaloisGrp/GaloisGrp.jl index 6bdf9fcf5cb4..f7ba8dba2a20 100644 --- a/src/NumberTheory/GaloisGrp/GaloisGrp.jl +++ b/src/NumberTheory/GaloisGrp/GaloisGrp.jl @@ -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 @@ -17,6 +16,7 @@ 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 @@ -24,9 +24,9 @@ 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 """ @@ -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 diff --git a/src/Oscar.jl b/src/Oscar.jl index 92f2dc58c99e..81e6e1504296 100644 --- a/src/Oscar.jl +++ b/src/Oscar.jl @@ -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) diff --git a/src/PolyhedralGeometry/Polyhedron/constructors.jl b/src/PolyhedralGeometry/Polyhedron/constructors.jl index 9e404d2f3193..25c7effb3a90 100644 --- a/src/PolyhedralGeometry/Polyhedron/constructors.jl +++ b/src/PolyhedralGeometry/Polyhedron/constructors.jl @@ -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) diff --git a/src/Rings/FinField.jl b/src/Rings/FinField.jl index 1346ed99aa71..3ef85d240d4b 100644 --- a/src/Rings/FinField.jl +++ b/src/Rings/FinField.jl @@ -5,7 +5,7 @@ import Oscar.Nemo import Oscar.Hecke function __init__() - Hecke.add_verbose_scope(:DiscLog) + Hecke.add_verbosity_scope(:DiscLog) end ############################################################### diff --git a/test/Groups/gsets.jl b/test/Groups/gsets.jl index 2fbd1e53871d..d10ca853c1fd 100644 --- a/test/Groups/gsets.jl +++ b/test/Groups/gsets.jl @@ -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) diff --git a/test/PolyhedralGeometry/polyhedron.jl b/test/PolyhedralGeometry/polyhedron.jl index 62842a832215..18e41a83a6be 100644 --- a/test/PolyhedralGeometry/polyhedron.jl +++ b/test/PolyhedralGeometry/polyhedron.jl @@ -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