diff --git a/experimental/GModule/src/GModule.jl b/experimental/GModule/src/GModule.jl index 7129d29ad009..2b37b2c4305d 100644 --- a/experimental/GModule/src/GModule.jl +++ b/experimental/GModule/src/GModule.jl @@ -790,7 +790,7 @@ end gmodule(k::fpField, C::GModule{<:Any, <:AbstractAlgebra.FPModule{fpFieldElem}}) = C -@attr function _character(C::GModule{<:Any, <:AbstractAlgebra.FPModule{<:AbstractAlgebra.FieldElem}}) +@attr Any function _character(C::GModule{<:Any, <:AbstractAlgebra.FPModule{<:AbstractAlgebra.FieldElem}}) G = group(C) phi = epimorphism_from_free_group(G) ac = Oscar.GrpCoh.action(C) @@ -841,7 +841,7 @@ end Oscar.character_field(C::GModule{<:Any, <:AbstractAlgebra.FPModule{QQFieldElem}}) = QQ -@attr function _character_field(C::GModule{<:Any, <:AbstractAlgebra.FPModule{AbsSimpleNumFieldElem}}) +@attr Any function _character_field(C::GModule{<:Any, <:AbstractAlgebra.FPModule{AbsSimpleNumFieldElem}}) val = _character(C) k, mkK = Hecke.subfield(base_ring(C), [x[2] for x = val]) return k, mkK diff --git a/experimental/Schemes/src/AlgebraicCycles.jl b/experimental/Schemes/src/AlgebraicCycles.jl index 2b097ebf3b1c..70651709f895 100644 --- a/experimental/Schemes/src/AlgebraicCycles.jl +++ b/experimental/Schemes/src/AlgebraicCycles.jl @@ -374,7 +374,7 @@ function Base.show(io::IO, D::AlgebraicCycle) end -@attr function dim(D::AlgebraicCycle) +@attr Any function dim(D::AlgebraicCycle) result = -1 for I in components(D) d = dim(I) diff --git a/experimental/Schemes/src/CoherentSheaves.jl b/experimental/Schemes/src/CoherentSheaves.jl index 4b2a9349fc42..8f52b9e7a60e 100644 --- a/experimental/Schemes/src/CoherentSheaves.jl +++ b/experimental/Schemes/src/CoherentSheaves.jl @@ -1065,7 +1065,7 @@ end For a `SheafOfModules` ``ℳ`` on an `AbsCoveredScheme` ``X``, return the ``𝒪_X``-dual ``ℋ om_{𝒪_X}(ℳ , 𝒪_X)`` of ``ℳ``. """ -@attr function dual(M::SheafOfModules) +@attr Any function dual(M::SheafOfModules) OOX = sheaf_of_rings(M) F = free_module(OOX, ["1"]) return HomSheaf(M, F) @@ -1431,7 +1431,7 @@ end end #@attr Covering function trivializing_covering(M::AbsCoherentSheaf) -@attr function trivializing_covering(M::AbsCoherentSheaf) +@attr Any function trivializing_covering(M::AbsCoherentSheaf) X = scheme(M) OOX = OO(X) patch_list = Vector{AbsAffineScheme}() @@ -1466,7 +1466,7 @@ function inherit_decomposition_info!(C::Covering, X::AbsCoveredScheme) return C end -@attr function trivializing_covering(M::HomSheaf) +@attr Any function trivializing_covering(M::HomSheaf) X = scheme(M) OOX = OO(X) # The problem is that every module of a HomSheaf must know that it is diff --git a/experimental/Schemes/src/CoveredProjectiveSchemes.jl b/experimental/Schemes/src/CoveredProjectiveSchemes.jl index 67ebcd30cb3b..d15a6218d55a 100644 --- a/experimental/Schemes/src/CoveredProjectiveSchemes.jl +++ b/experimental/Schemes/src/CoveredProjectiveSchemes.jl @@ -915,7 +915,7 @@ function _compute_gluing(gd::ProjectiveGluingData) return pr end -@attr function covered_scheme(P::CoveredProjectiveScheme) +@attr Any function covered_scheme(P::CoveredProjectiveScheme) X = base_scheme(P) C = base_covering(P) new_patches = Vector{AbsAffineScheme}() @@ -989,7 +989,7 @@ end return result end -@attr function covered_projection_to_base(P::CoveredProjectiveScheme) +@attr Any function covered_projection_to_base(P::CoveredProjectiveScheme) if !has_attribute(P, :covering_projection_to_base) covered_scheme(P) end diff --git a/experimental/Schemes/src/CoveredScheme.jl b/experimental/Schemes/src/CoveredScheme.jl index 12a2a1961738..e8319ca1ceed 100644 --- a/experimental/Schemes/src/CoveredScheme.jl +++ b/experimental/Schemes/src/CoveredScheme.jl @@ -239,7 +239,7 @@ end end # coefficient ring an MPolyAnyRing -@attr function standard_covering(X::AbsProjectiveScheme{CRT, <:Union{<:MPolyDecRing, <:MPolyQuoRing}}) where {CRT<:Union{<:MPolyQuoLocRing, <:MPolyLocRing, <:MPolyRing, <:MPolyQuoRing}} +@attr Any function standard_covering(X::AbsProjectiveScheme{CRT, <:Union{<:MPolyDecRing, <:MPolyQuoRing}}) where {CRT<:Union{<:MPolyQuoLocRing, <:MPolyLocRing, <:MPolyRing, <:MPolyQuoRing}} Y = base_scheme(X) R = ambient_coordinate_ring(Y) kk = coefficient_ring(R) diff --git a/experimental/Schemes/src/IdealSheaves.jl b/experimental/Schemes/src/IdealSheaves.jl index ad3a009c705f..2826e3e69920 100644 --- a/experimental/Schemes/src/IdealSheaves.jl +++ b/experimental/Schemes/src/IdealSheaves.jl @@ -617,7 +617,7 @@ Return whether ``I`` is prime. We say that a sheaf of ideals is prime if its support is irreducible and ``I`` is locally prime. (Note that the empty set is not irreducible.) """ -@attr function is_prime(I::AbsIdealSheaf) +@attr Any function is_prime(I::AbsIdealSheaf) is_locally_prime(I) || return false # TODO: this can be made more efficient PD = maximal_associated_points(I) diff --git a/experimental/Schemes/src/MorphismFromRationalFunctions.jl b/experimental/Schemes/src/MorphismFromRationalFunctions.jl index e996ea992fe6..7918ed9d989a 100644 --- a/experimental/Schemes/src/MorphismFromRationalFunctions.jl +++ b/experimental/Schemes/src/MorphismFromRationalFunctions.jl @@ -595,11 +595,11 @@ end # But they can be set by the user so that certain checks of other methods # are satisfied; i.e. the user has to take responsibility and confirm that # they know what they're doing through these channels. -@attr function is_proper(phi::AbsCoveredSchemeMorphism) +@attr Any function is_proper(phi::AbsCoveredSchemeMorphism) error("no method implemented to check properness") end -@attr function is_isomorphism(phi::AbsCoveredSchemeMorphism) +@attr Any function is_isomorphism(phi::AbsCoveredSchemeMorphism) error("no method implemented to check for being an isomorphism") end diff --git a/experimental/Schemes/src/WeilDivisor.jl b/experimental/Schemes/src/WeilDivisor.jl index 6915bebdf50f..87e7a9d6b8db 100644 --- a/experimental/Schemes/src/WeilDivisor.jl +++ b/experimental/Schemes/src/WeilDivisor.jl @@ -60,7 +60,7 @@ end ### forwarding of all essential functionality underlying_cycle(D::WeilDivisor) = D.C -@attr function dim(I::AbsIdealSheaf) +@attr Any function dim(I::AbsIdealSheaf) dims = [dim(I(U)) for U in affine_charts(scheme(I))] return maximum(dims) end @@ -401,12 +401,12 @@ function intersect(D::AbsWeilDivisor, E::AbsWeilDivisor; return result end -@attr function has_dimension_leq_zero(I::Ideal) +@attr Any function has_dimension_leq_zero(I::Ideal) is_one(I) && return true return dim(I) <= 0 end -@attr function has_dimension_leq_zero(I::MPolyLocalizedIdeal) +@attr Any function has_dimension_leq_zero(I::MPolyLocalizedIdeal) R = base_ring(I) P = base_ring(R)::MPolyRing J = ideal(P, numerator.(gens(I))) @@ -415,7 +415,7 @@ end return dim(I) <= 0 end -@attr function has_dimension_leq_zero(I::MPolyQuoLocalizedIdeal) +@attr Any function has_dimension_leq_zero(I::MPolyQuoLocalizedIdeal) R = base_ring(I) P = base_ring(R)::MPolyRing J = ideal(P, lifted_numerator.(gens(I))) diff --git a/experimental/Schemes/src/elliptic_surface.jl b/experimental/Schemes/src/elliptic_surface.jl index 08da57a27782..03863aee86a0 100644 --- a/experimental/Schemes/src/elliptic_surface.jl +++ b/experimental/Schemes/src/elliptic_surface.jl @@ -244,7 +244,7 @@ The first return value is the basis of the ambient space of `L`. The second consists of additional generators for `L` coming from torsion sections. The third is ``L``. """ -@attr function algebraic_lattice(X::EllipticSurface) +@attr Any function algebraic_lattice(X::EllipticSurface) return _algebraic_lattice(X,X.MWL) end @@ -335,7 +335,7 @@ end Return the torsion part of the Mordell-Weil group of the generic fiber of ``S``. """ -@attr function mordell_weil_torsion(S::EllipticSurface) +@attr Any function mordell_weil_torsion(S::EllipticSurface) E = generic_fiber(S) O = E([0,1,0]) N = trivial_lattice(S)[2] @@ -729,7 +729,7 @@ Internal function. Returns a list consisting of: - gram matrix - fiber_components without multiplicities """ -@attr function _trivial_lattice(S::EllipticSurface) +@attr Any function _trivial_lattice(S::EllipticSurface) #= inc_Y = S.inc_Y X = codomain(inc_Y) @@ -977,7 +977,7 @@ function fiber_components(S::EllipticSurface, P; algorithm=:exceptional_divisors return fiber_components end -@attr function exceptional_divisors(S::EllipticSurface) +@attr Any function exceptional_divisors(S::EllipticSurface) PP = AbsIdealSheaf[] @vprintln :EllipticSurface 2 "computing exceptional divisors" for E in S.ambient_exceptionals @@ -1107,7 +1107,7 @@ end Return the zero section of the relatively minimal elliptic fibration \pi\colon X \to C$. """ -@attr zero_section(S::EllipticSurface) = _section(S, generic_fiber(S)([0,1,0])) +@attr Any zero_section(S::EllipticSurface) = _section(S, generic_fiber(S)([0,1,0])) ################################################################################ # diff --git a/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Properties.jl b/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Properties.jl index 6de3d4336670..8fcff87dc661 100644 --- a/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Properties.jl +++ b/src/AlgebraicGeometry/Schemes/AffineAlgebraicSet/Objects/Properties.jl @@ -2,4 +2,4 @@ # Avoid computing the reduced structure by using fat_scheme ################################################################################ -@attr dim(X::AbsAffineAlgebraicSet) = dim(fat_scheme(X)) +@attr Any dim(X::AbsAffineAlgebraicSet) = dim(fat_scheme(X)) diff --git a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl index 9a7b14cec104..0d4d8020f371 100644 --- a/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/AffineSchemes/Objects/Attributes.jl @@ -50,7 +50,7 @@ end Return the total ring of fractions of the coordinate ring of `X`. """ -@attr function total_ring_of_fractions(X::AbsAffineScheme) +@attr Any function total_ring_of_fractions(X::AbsAffineScheme) return total_ring_of_fractions(OO(X)) end @@ -196,15 +196,15 @@ function ambient_space(X::AbsAffineScheme{BRT, RT}) where {BRT, RT<:MPolyRing} return X end -@attr function ambient_space(X::AffineScheme{BRT,RT}) where {BRT<:Field, RT <: Union{MPolyQuoRing,MPolyLocRing,MPolyQuoLocRing}} +@attr Any function ambient_space(X::AffineScheme{BRT,RT}) where {BRT<:Field, RT <: Union{MPolyQuoRing,MPolyLocRing,MPolyQuoLocRing}} return variety(spec(ambient_coordinate_ring(X)), check=false) end -@attr function ambient_space(X::AffineScheme{BRT,RT}) where {BRT, RT <: Union{MPolyQuoRing,MPolyLocRing,MPolyQuoLocRing}} +@attr Any function ambient_space(X::AffineScheme{BRT,RT}) where {BRT, RT <: Union{MPolyQuoRing,MPolyLocRing,MPolyQuoLocRing}} return spec(ambient_coordinate_ring(X)) end -@attr function ambient_space(X::AbsAffineScheme{BRT,RT}) where {BRT, RT <: Union{MPolyQuoRing,MPolyLocRing,MPolyQuoLocRing}} +@attr Any function ambient_space(X::AbsAffineScheme{BRT,RT}) where {BRT, RT <: Union{MPolyQuoRing,MPolyLocRing,MPolyQuoLocRing}} return ambient_space(underlying_scheme(X)) end @@ -401,15 +401,15 @@ julia> dim(Y) # one dimension comes from ZZ and two from x1 and x2 """ dim(X::AbsAffineScheme) -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoLocRing}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoLocRing}) error("Not implemented") end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:MPolyPowersOfElement}}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:MPolyPowersOfElement}}) return dim(closure(X)) end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:Union{MPolyComplementOfPrimeIdeal, MPolyComplementOfKPointIdeal}}}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:Union{MPolyComplementOfPrimeIdeal, MPolyComplementOfKPointIdeal}}}) # Spec (R / I)_P R = OO(X) P = prime_ideal(inverted_set(R)) @@ -417,25 +417,25 @@ end return dim(I) - dim(P) end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyLocRing}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyLocRing}) error("Not implemented") end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:MPolyPowersOfElement}}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:MPolyPowersOfElement}}) # zariski open subset of A^n return dim(closure(X)) end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:Union{MPolyComplementOfPrimeIdeal, MPolyComplementOfKPointIdeal}}}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyLocRing{<:Any,<:Any,<:MPolyRing,<:MPolyRingElem, <:Union{MPolyComplementOfPrimeIdeal, MPolyComplementOfKPointIdeal}}}) P = prime_ideal(inverted_set(OO(X))) return codim(P) end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyRing}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyRing}) return dim(ideal(ambient_coordinate_ring(X), [zero(ambient_coordinate_ring(X))])) end -@attr function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoRing}) +@attr Any function dim(X::AbsAffineScheme{<:Ring, <:MPolyQuoRing}) return dim(modulus(OO(X))) end @@ -477,7 +477,7 @@ julia> codim(Y) 1 ``` """ -@attr function codim(X::AbsAffineScheme) +@attr Any function codim(X::AbsAffineScheme) return dim(ideal(ambient_coordinate_ring(X), [zero(ambient_coordinate_ring(X))])) - dim(X) end @@ -573,7 +573,7 @@ julia> reduced_scheme(Y) ``` """ -@attr function reduced_scheme(X::AbsAffineScheme{<:Field, <:MPolyQuoLocRing}) +@attr Any function reduced_scheme(X::AbsAffineScheme{<:Field, <:MPolyQuoLocRing}) if has_attribute(X, :is_reduced) && is_reduced(X) return X, identity_map(X) end @@ -585,7 +585,7 @@ julia> reduced_scheme(Y) return Xred, inc end -@attr function reduced_scheme(X::AbsAffineScheme{<:Field, <:MPolyQuoRing}) +@attr Any function reduced_scheme(X::AbsAffineScheme{<:Field, <:MPolyQuoRing}) if has_attribute(X, :is_reduced) && is_reduced(X) return X, identity_map(X) end @@ -597,7 +597,7 @@ end end ## to make reduced_scheme agnostic for quotient ring -@attr function reduced_scheme(X::AbsAffineScheme{<:Field, <:MPAnyNonQuoRing}) +@attr Any function reduced_scheme(X::AbsAffineScheme{<:Field, <:MPAnyNonQuoRing}) return X, ClosedEmbedding(X, ideal(OO(X), one(OO(X))), check=false) end @@ -873,7 +873,7 @@ true ``` """ defining_ideal(X::AbsAffineScheme) = error("method not implemented for input of type $(typeof(X))") -@attr defining_ideal(X::AbsAffineScheme{<:Any, <:MPolyRing}) = ideal(OO(X), [zero(OO(X))]) +@attr Any defining_ideal(X::AbsAffineScheme{<:Any, <:MPolyRing}) = ideal(OO(X), [zero(OO(X))]) defining_ideal(X::AbsAffineScheme{<:Any, <:MPolyQuoRing}) = modulus(OO(X)) defining_ideal(X::AbsAffineScheme{<:Any, <:MPolyLocRing}) = modulus(OO(X)) defining_ideal(X::AbsAffineScheme{<:Any, <:MPolyQuoLocRing}) = modulus(OO(X)) diff --git a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl index 06bf9dd4b0a0..7acbc2c03064 100644 --- a/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/CoveredSchemes/Objects/Attributes.jl @@ -190,7 +190,7 @@ function dim(X::AbsCoveredScheme) return get_attribute(X, :dim)::Int end -@attr function singular_locus_reduced(X::AbsCoveredScheme) +@attr Any function singular_locus_reduced(X::AbsCoveredScheme) D = IdDict{AbsAffineScheme, Ideal}() for U in affine_charts(X) _, inc_sing = singular_locus_reduced(U) @@ -257,7 +257,7 @@ given by the pullback function (y//z) -> 0 ``` """ -@attr function singular_locus( +@attr Any function singular_locus( X::AbsCoveredScheme; ) D = IdDict{AbsAffineScheme, Ideal}() diff --git a/src/AlgebraicGeometry/Schemes/Gluing/Attributes.jl b/src/AlgebraicGeometry/Schemes/Gluing/Attributes.jl index 2d45fff9ffb7..128f28cc2ab3 100644 --- a/src/AlgebraicGeometry/Schemes/Gluing/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/Gluing/Attributes.jl @@ -44,7 +44,7 @@ end Return the gluing `H` with `patches`, `gluing_domains`, and `gluing_morphisms` in opposite order compared to `G`. """ -@attr function inverse(G::AbsGluing) +@attr Any function inverse(G::AbsGluing) Ginv = inverse(underlying_gluing(G)) set_attribute!(Ginv, :inverse, G) set_attribute!(G, :inverse, Ginv) @@ -57,7 +57,7 @@ end patches(G::Gluing) = G.X, G.Y gluing_morphisms(G::Gluing) = G.f, G.g gluing_domains(G::Gluing) = domain(G.f), domain(G.g) -@attr function inverse(G::Gluing) +@attr Any function inverse(G::Gluing) Ginv = Gluing(G.Y, G.X, G.g, G.f, check=false) set_attribute!(Ginv, :inverse, G) return Ginv diff --git a/src/AlgebraicGeometry/Schemes/PrincipalOpenSubset/Objects/Properties.jl b/src/AlgebraicGeometry/Schemes/PrincipalOpenSubset/Objects/Properties.jl index 6dd3cb447217..d0ef71e8d46b 100644 --- a/src/AlgebraicGeometry/Schemes/PrincipalOpenSubset/Objects/Properties.jl +++ b/src/AlgebraicGeometry/Schemes/PrincipalOpenSubset/Objects/Properties.jl @@ -1,7 +1,7 @@ ######################################################################## # Properties of PrincipalOpenSubsets # ######################################################################## -@attr function is_dense(U::PrincipalOpenSubset) +@attr Any function is_dense(U::PrincipalOpenSubset) return !is_zero_divisor(complement_equation(U)) end diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Morphisms/Methods.jl b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Morphisms/Methods.jl index f3d60b82e5a1..5f86d5c6ad19 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Morphisms/Methods.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Morphisms/Methods.jl @@ -15,7 +15,7 @@ function ==(f::AbsProjectiveSchemeMorphism{<:AbsProjectiveScheme{<:Union{<:MPoly return map_on_affine_cones(f) == map_on_affine_cones(g) end -@attr function covered_scheme_morphism( +@attr Any function covered_scheme_morphism( f::AbsProjectiveSchemeMorphism{<:Any, <:Any, <:Any, Nothing} # No map on base rings ) PX = domain(f) @@ -114,7 +114,7 @@ with default covering 3: [(x//z), (y//z)] ``` """ -@attr function covered_scheme_morphism( +@attr Any function covered_scheme_morphism( f::AbsProjectiveSchemeMorphism ) # with map on the base rings PX = domain(f) diff --git a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl index 1ea08da67bbf..43bba38c16b2 100644 --- a/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl +++ b/src/AlgebraicGeometry/Schemes/ProjectiveSchemes/Objects/Attributes.jl @@ -152,7 +152,7 @@ Projective space of dimension 2 with homogeneous coordinates [x, y, z] ``` """ -@attr function ambient_space(X::AbsProjectiveScheme) +@attr Any function ambient_space(X::AbsProjectiveScheme) return proj(ambient_coordinate_ring(X)) end @@ -215,7 +215,7 @@ with default covering end -@attr function covered_projection_to_base(X::AbsProjectiveScheme{<:Union{<:MPolyQuoLocRing, <:MPolyLocRing, <:MPolyQuoRing, <:MPolyRing}}) +@attr Any function covered_projection_to_base(X::AbsProjectiveScheme{<:Union{<:MPolyQuoLocRing, <:MPolyLocRing, <:MPolyQuoRing, <:MPolyRing}}) if !has_attribute(X, :covering_projection_to_base) C = standard_covering(X) end @@ -286,7 +286,7 @@ julia> affine_cone(P) """ affine_cone(P::AbsProjectiveScheme) -@attr function affine_cone( +@attr Any function affine_cone( P::AbsProjectiveScheme{RT} ) where {RT<:Union{MPolyRing, MPolyQuoRing, MPolyQuoLocRing, MPolyLocRing}} S = homogeneous_coordinate_ring(P) @@ -298,7 +298,7 @@ affine_cone(P::AbsProjectiveScheme) return C, phi end -@attr function affine_cone( +@attr Any function affine_cone( P::AbsProjectiveScheme{RT, <:MPolyQuoRing} ) where {RT<:Union{Field, ZZRing}} S = homogeneous_coordinate_ring(P) @@ -312,7 +312,7 @@ end return C, phi end -@attr function affine_cone( +@attr Any function affine_cone( P::AbsProjectiveScheme{RT, <:MPolyDecRing} ) where {RT<:Union{Field, ZZRing}} S = homogeneous_coordinate_ring(P) @@ -322,7 +322,7 @@ end return C, phi end -@attr function affine_cone( +@attr Any function affine_cone( X::AbsProjectiveScheme{CRT, RT} ) where { CRT<:AffineSchemeOpenSubschemeRing, @@ -349,7 +349,7 @@ end return X.C, psi end -@attr function affine_cone( +@attr Any function affine_cone( X::AbsProjectiveScheme{CRT, RT} ) where { CRT<:AffineSchemeOpenSubschemeRing, diff --git a/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/special_attributes.jl b/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/special_attributes.jl index c9ba0714095b..20cd5cc54632 100644 --- a/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/special_attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/CohomologyClasses/special_attributes.jl @@ -58,7 +58,7 @@ julia> polynomial(volume_form(hirzebruch_surface(NormalToricVariety, 5))) end -@attr function _intersection_form_via_exponents(v::NormalToricVariety) +@attr Any function _intersection_form_via_exponents(v::NormalToricVariety) # extract the cohomology classes corresponding to the torus-invariant prime divisors generators = [cohomology_class(d) for d in torusinvariant_prime_divisors(v)] diff --git a/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl b/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl index e7fb40cdb96c..6448e493c455 100644 --- a/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/ToricSchemes/attributes.jl @@ -221,7 +221,7 @@ with default covering 3: [x_1_3, x_2_3] ``` """ -@attr function underlying_scheme(Z::NormalToricVariety) +@attr Any function underlying_scheme(Z::NormalToricVariety) @req is_pure(polyhedral_fan(Z)) "underlying_scheme is currently only supported for toric varieties whose fan is pure" patch_list = affine_open_covering(Z) for (k, A) in enumerate(patch_list) diff --git a/src/AlgebraicGeometry/ToricVarieties/cohomCalg/special_attributes.jl b/src/AlgebraicGeometry/ToricVarieties/cohomCalg/special_attributes.jl index 7c6ce9fb3dcd..cb8712647934 100644 --- a/src/AlgebraicGeometry/ToricVarieties/cohomCalg/special_attributes.jl +++ b/src/AlgebraicGeometry/ToricVarieties/cohomCalg/special_attributes.jl @@ -56,7 +56,7 @@ x_1 - x_2 <= -2 x_1 <= -3 ``` """ -@attr function immaculate_line_bundles(variety::NormalToricVarietyType) +@attr Any function immaculate_line_bundles(variety::NormalToricVarietyType) denominator_contributions = reduce(vcat, contributing_denominators(variety)) list_of_polyhedra = Polyhedron{QQFieldElem}[turn_denominator_into_polyhedron(variety, m) for m in denominator_contributions] return ToricVanishingSet(variety, list_of_polyhedra, collect(0:dim(variety))) diff --git a/src/Groups/group_characters.jl b/src/Groups/group_characters.jl index 86905b16dde6..f383b6f0ce16 100644 --- a/src/Groups/group_characters.jl +++ b/src/Groups/group_characters.jl @@ -241,7 +241,7 @@ julia> [length(c) for c in conjugacy_classes(tbl)] == class_lengths(tbl) true ``` """ -@attr function conjugacy_classes(tbl::GAPGroupCharacterTable) +@attr Any function conjugacy_classes(tbl::GAPGroupCharacterTable) G = group(tbl) # If `GapObj(tbl)` does not yet store conjugacy classes diff --git a/src/Modules/mpoly-localizations.jl b/src/Modules/mpoly-localizations.jl index f785c031ef70..7c30d2ae82b7 100644 --- a/src/Modules/mpoly-localizations.jl +++ b/src/Modules/mpoly-localizations.jl @@ -123,7 +123,7 @@ of a rational point this returns a triple ``(F♭, φ, φ⁻¹)`` where ``F♭`` corresponding free module over ``R`` and ``φ : F♭ → F♭`` is the isomorphism over the shift map ``Φ : R → R`` which is moving the point of ``𝔪`` to the origin. """ -@attr function shifted_module( +@attr Any function shifted_module( F::FreeMod{T} ) where {T<:MPolyLocRingElem{<:Field, <:FieldElem, <:MPolyRing, <:MPolyRingElem, <:MPolyComplementOfKPointIdeal}} @@ -132,7 +132,7 @@ the shift map ``Φ : R → R`` which is moving the point of ``𝔪`` to the orig return base_ring_module(F), a, b end -@attr function base_ring_shifts( +@attr Any function base_ring_shifts( F::FreeMod{T} ) where {T<:MPolyLocRingElem{<:Field, <:FieldElem, <:MPolyRing, <:MPolyRingElem, <:MPolyComplementOfKPointIdeal}} @@ -156,7 +156,7 @@ of a rational point and a `pre_saturated_module` ``N`` over ``R``, this returns ``(N', φ, φ⁻¹)`` where ``N'`` is a module over ``R``, and ``φ : N → N'`` is an isomorphism over the shift map ``Φ : R → R`` which is moving the point of ``𝔪`` to the origin. """ -@attr function shifted_module( +@attr Any function shifted_module( M::SubquoModule{T} ) where {T<:MPolyLocRingElem{<:Field, <:FieldElem, <:MPolyRing, <:MPolyRingElem, <:MPolyComplementOfKPointIdeal}} @@ -187,7 +187,7 @@ ideal ``𝔪`` of a rational point and a `pre_saturated_module` ``N`` over ``R`` ``(N', φ, φ⁻¹)`` where ``N'`` is a module over ``R``, and ``φ : N → N'`` is an isomorphism over the shift map ``Φ : R → R`` which is moving the point of ``𝔪`` to the origin. """ -@attr function shifted_module( +@attr Any function shifted_module( M::SubModuleOfFreeModule{T} ) where {T<:MPolyLocRingElem{<:Field, <:FieldElem, <:MPolyRing, <:MPolyRingElem, <:MPolyComplementOfKPointIdeal}} diff --git a/src/Modules/mpolyquo.jl b/src/Modules/mpolyquo.jl index c3780f33067b..6fff56308e7b 100644 --- a/src/Modules/mpolyquo.jl +++ b/src/Modules/mpolyquo.jl @@ -4,7 +4,7 @@ ######################################################################## # The essential three functions: # ######################################################################## -@attr function kernel( +@attr Any function kernel( f::FreeModuleHom{DomainType, CodomainType} ) where { DomainType<:FreeMod{<:MPolyQuoRingElem}, @@ -45,7 +45,7 @@ end # unless we implement them. # ######################################################################## #= -@attr function kernel( +@attr Any function kernel( f::FreeModuleHom{DomainType, CodomainType} ) where { DomainType<:FreeMod{<:MPolyQuoRingElem}, @@ -99,7 +99,7 @@ end ### For a free module F = R^r over R = P/I, this returns a lifting map # to the module P^r/I*P^r. Note that this is an unnatural map since # the latter is an R-module only by accident. -@attr function _lifting_iso(F::FreeMod{T}) where {T<:MPolyQuoRingElem} +@attr Any function _lifting_iso(F::FreeMod{T}) where {T<:MPolyQuoRingElem} M = _as_poly_module(F) function my_lift(v::FreeModElem{T}) where {T<:MPolyQuoRingElem} parent(v) === F || error("element does not have the right parent") @@ -112,7 +112,7 @@ end ### For a free module F = R^r over R = P/I, this returns a lifting map # to the module P^r. Note that this is not a homomorphism of modules. -@attr function _lifting_map(F::FreeMod{T}) where {T<:MPolyQuoRingElem} +@attr Any function _lifting_map(F::FreeMod{T}) where {T<:MPolyQuoRingElem} FP = _poly_module(F) function my_lift(v::FreeModElem{T}) where {T<:MPolyQuoRingElem} parent(v) === F || error("element does not have the right parent") @@ -125,7 +125,7 @@ end ### To a free module over R = P/I, return the free module over R # in the same number of generators -@attr function _poly_module(F::FreeMod{T}) where {T<:MPolyQuoRingElem} +@attr Any function _poly_module(F::FreeMod{T}) where {T<:MPolyQuoRingElem} R = base_ring(F) P = base_ring(R) # the polynomial ring r = rank(F) @@ -135,7 +135,7 @@ end ### Return the canonical projection FP -> F from the P-module FP to the # R-module F. -@attr function _poly_module_restriction(F::FreeMod{T}) where {T<:MPolyQuoRingElem} +@attr Any function _poly_module_restriction(F::FreeMod{T}) where {T<:MPolyQuoRingElem} R = base_ring(F) P = base_ring(R) FP = _poly_module(F) @@ -143,7 +143,7 @@ end end ### Return the same module, but as a SubquoModule over the polynomial ring -@attr function _as_poly_module(F::FreeMod{T}) where {T<:MPolyQuoRingElem} +@attr Any function _as_poly_module(F::FreeMod{T}) where {T<:MPolyQuoRingElem} R = base_ring(F) P = base_ring(R) I = modulus(R) @@ -166,14 +166,14 @@ end end ### Return an isomorphism with _as_poly_module(F) -@attr function _iso_with_poly_module(F::FreeMod{T}) where {T<:MPolyQuoRingElem} +@attr Any function _iso_with_poly_module(F::FreeMod{T}) where {T<:MPolyQuoRingElem} M = _as_poly_module(F) return hom(M, F, gens(F), x->(base_ring(F)(x))) end ### Return the preimage of M under the canonical projection P^r -> R^r # for R^r the ambient_free_module of M. -@attr function _poly_module(M::SubModuleOfFreeModule{T}) where {T<:MPolyQuoRingElem} +@attr Any function _poly_module(M::SubModuleOfFreeModule{T}) where {T<:MPolyQuoRingElem} F = ambient_free_module(M) FP = _poly_module(F) v = elem_type(FP)[_lifting_map(F)(g) for g in gens(M)] @@ -182,7 +182,7 @@ end return MP end -@attr function _as_poly_module(M::SubquoModule{T}) where {T<:MPolyQuoRingElem} +@attr Any function _as_poly_module(M::SubquoModule{T}) where {T<:MPolyQuoRingElem} F = ambient_free_module(M) FP = _poly_module(F) v = [_lifting_map(F)(g) for g in ambient_representatives_generators(M)] @@ -192,12 +192,12 @@ end return MP end -@attr function _iso_with_poly_module(F::SubquoModule{T}) where {T<:MPolyQuoRingElem} +@attr Any function _iso_with_poly_module(F::SubquoModule{T}) where {T<:MPolyQuoRingElem} M = _as_poly_module(F) return hom(M, F, gens(F), x->(base_ring(F)(x))) end -@attr function _lifting_iso(F::SubquoModule{T}) where {T<:MPolyQuoRingElem} +@attr Any function _lifting_iso(F::SubquoModule{T}) where {T<:MPolyQuoRingElem} M = _as_poly_module(F) function my_lift(v::SubquoModuleElem{T}) where {T<:MPolyQuoRingElem} parent(v) === F || error("element does not have the right parent") diff --git a/src/Rings/MPolyMap/flattenings.jl b/src/Rings/MPolyMap/flattenings.jl index ea0a71cb03d6..2d7ff7ca2f97 100644 --- a/src/Rings/MPolyMap/flattenings.jl +++ b/src/Rings/MPolyMap/flattenings.jl @@ -459,7 +459,7 @@ function preimage(phi::RingFlattening, x::RingElem) end ### Computation of induced morphisms on flattened towers of polynomial rings -@attr function flatten( +@attr Any function flatten( f::MPolyAnyMap{<:MPolyRing{RingElemType}, <:MPolyRing{RingElemType}, Nothing @@ -477,7 +477,7 @@ end return hom(codomain(flat_S), codomain(flat_T), imgs, check=false) end -@attr function flatten( +@attr Any function flatten( f::MPolyAnyMap{<:MPolyRing{RingElemType}, <:MPolyRing{RingElemType} # Note the missing requirement here: It allows for a non-trivial coefficient map diff --git a/src/Rings/MPolyQuo.jl b/src/Rings/MPolyQuo.jl index 3d422c5bfc61..34567799f976 100644 --- a/src/Rings/MPolyQuo.jl +++ b/src/Rings/MPolyQuo.jl @@ -558,7 +558,7 @@ end # and `MPolyQuoLocRing` together with their ideals. # We return the preimage of the given ideal under the # canonical map from the underlying free polynomial ring. -@attr function saturated_ideal(I::MPolyQuoIdeal) +@attr Any function saturated_ideal(I::MPolyQuoIdeal) R = base_ring(base_ring(I)) J = ideal(R, lift.(gens(I))) + modulus(base_ring(I)) return J diff --git a/src/Rings/mpoly-ideals.jl b/src/Rings/mpoly-ideals.jl index 2ac686fad008..5a6fd7ae7451 100644 --- a/src/Rings/mpoly-ideals.jl +++ b/src/Rings/mpoly-ideals.jl @@ -898,7 +898,7 @@ Multivariate polynomial ring in 2 variables over number field graded by y -> [1] ``` """ -@attr function absolute_primary_decomposition(I::MPolyIdeal{<:MPolyRingElem{QQFieldElem}}) +@attr Any function absolute_primary_decomposition(I::MPolyIdeal{<:MPolyRingElem{QQFieldElem}}) R = base_ring(I) if is_zero(I) return [(ideal(R, zero(R)), ideal(R, zero(R)), ideal(R, zero(R)), 1)] @@ -917,7 +917,7 @@ Multivariate polynomial ring in 2 variables over number field graded by for i in 1:length(decomp)] end -@attr function absolute_primary_decomposition( +@attr Any function absolute_primary_decomposition( I::MPolyIdeal{T} ) where {U<:Union{AbsSimpleNumFieldElem, <:Hecke.RelSimpleNumFieldElem}, T<:MPolyRingElem{U}} R = base_ring(I) @@ -1204,7 +1204,7 @@ julia> L = equidimensional_decomposition_weak(I) Ideal with 1 generator ``` """ -@attr function equidimensional_decomposition_weak(I::MPolyIdeal) +@attr Any function equidimensional_decomposition_weak(I::MPolyIdeal) R = base_ring(I) iszero(I) && return [I] @req coefficient_ring(R) isa AbstractAlgebra.Field "The coefficient ring must be a field" @@ -1230,7 +1230,7 @@ julia> L = equidimensional_decomposition_weak(I) return V end -@attr function equidimensional_decomposition_weak( +@attr Any function equidimensional_decomposition_weak( I::MPolyIdeal{T} ) where {U<:Union{AbsSimpleNumFieldElem, <:Hecke.RelSimpleNumFieldElem}, T<:MPolyRingElem{U}} R = base_ring(I) @@ -1278,7 +1278,7 @@ julia> L = equidimensional_decomposition_radical(I) Ideal (x^4 - x^3*y - x^3 - x^2 - x*y^2 + x*y + x + y^3 + y^2) ``` """ -@attr function equidimensional_decomposition_radical(I::MPolyIdeal) +@attr Any function equidimensional_decomposition_radical(I::MPolyIdeal) R = base_ring(I) @req coefficient_ring(R) isa AbstractAlgebra.Field "The coefficient ring must be a field" if isa(base_ring(R), NumField) && !isa(base_ring(R), AbsSimpleNumField) @@ -1305,7 +1305,7 @@ julia> L = equidimensional_decomposition_radical(I) return V end -@attr function equidimensional_decomposition_radical( +@attr Any function equidimensional_decomposition_radical( I::MPolyIdeal{T} ) where {U<:Union{AbsSimpleNumFieldElem, <:Hecke.RelSimpleNumFieldElem}, T<:MPolyRingElem{U}} R = base_ring(I) diff --git a/src/Rings/mpoly-localizations.jl b/src/Rings/mpoly-localizations.jl index 5c66b59fe6cc..82d430f8a09c 100644 --- a/src/Rings/mpoly-localizations.jl +++ b/src/Rings/mpoly-localizations.jl @@ -1269,7 +1269,7 @@ end is_domain_type(T::Type{MPolyLocRingElem{BRT, BRET, RT, RET, MST}}) where {BRT, BRET, RT, RET, MST} = true is_exact_type(T::Type{MPolyLocRingElem{BRT, BRET, RT, RET, MST}}) where {BRT, BRET, RT, RET, MST} = true -@attr function base_ring_shifts(L::MPolyLocRing{<:Any, <:Any, <:Any, <:Any, <:MPolyComplementOfKPointIdeal}) +@attr Any function base_ring_shifts(L::MPolyLocRing{<:Any, <:Any, <:Any, <:Any, <:MPolyComplementOfKPointIdeal}) a = point_coordinates(inverted_set(L)) R = base_ring(L) shift = hom(R, R, gens(R)+R.(a), check=false) @@ -1956,7 +1956,7 @@ end Base.:(:)(I::IdealType, J::IdealType) where {IdealType<:MPolyLocalizedIdeal} = quotient(I, J) -@attr function shifted_ideal( +@attr Any function shifted_ideal( I::MPolyLocalizedIdeal{LRT, LRET} ) where {LRT<:MPolyLocRing{<:Any, <:Any, <:Any, <:Any, <:MPolyComplementOfKPointIdeal}, LRET} L = base_ring(I) diff --git a/src/Rings/primary_decomposition_helpers.jl b/src/Rings/primary_decomposition_helpers.jl index dcd15adb7e83..fd6a851ddd93 100644 --- a/src/Rings/primary_decomposition_helpers.jl +++ b/src/Rings/primary_decomposition_helpers.jl @@ -130,7 +130,7 @@ function _expand_coefficient_field_to_QQ(R::MPolyQuoRing{<:MPolyRingElem{T}}; re end::Tuple{<:Ring, <:Map, <:Map} end -@attr function equidimensional_decomposition_weak(I::MPolyQuoIdeal) +@attr Any function equidimensional_decomposition_weak(I::MPolyQuoIdeal) A = base_ring(I)::MPolyQuoRing R = base_ring(A)::MPolyRing J = saturated_ideal(I) @@ -139,7 +139,7 @@ end end -@attr function equidimensional_decomposition_radical(I::MPolyQuoIdeal) +@attr Any function equidimensional_decomposition_radical(I::MPolyQuoIdeal) A = base_ring(I)::MPolyQuoRing R = base_ring(A)::MPolyRing J = saturated_ideal(I) @@ -147,7 +147,7 @@ end return typeof(I)[ideal(A, unique!([x for x in A.(gens(K)) if !iszero(x)])) for K in res] end -@attr function equidimensional_hull(I::MPolyQuoIdeal) +@attr Any function equidimensional_hull(I::MPolyQuoIdeal) A = base_ring(I)::MPolyQuoRing R = base_ring(A)::MPolyRing J = saturated_ideal(I) @@ -155,7 +155,7 @@ end return ideal(A, unique!([x for x in A.(gens(res)) if !iszero(x)])) end -@attr function equidimensional_hull_radical(I::MPolyQuoIdeal) +@attr Any function equidimensional_hull_radical(I::MPolyQuoIdeal) A = base_ring(I)::MPolyQuoRing R = base_ring(A)::MPolyRing J = saturated_ideal(I) @@ -163,7 +163,7 @@ end return ideal(A, unique!([x for x in A.(gens(res)) if !iszero(x)])) end -@attr function absolute_primary_decomposition(I::MPolyQuoIdeal) +@attr Any function absolute_primary_decomposition(I::MPolyQuoIdeal) A = base_ring(I)::MPolyQuoRing R = base_ring(A)::MPolyRing J = saturated_ideal(I)