From da2e556732303f9f6178d7815ae5c30ed59341e3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 19 Dec 2024 18:47:27 +0100 Subject: [PATCH 1/2] Remove some redundant base_ring methods --- src/AlgebraicGeometry/Schemes/FunctionField/FunctionFields.jl | 1 - src/Rings/PBWAlgebra.jl | 2 -- src/Rings/PBWAlgebraQuo.jl | 2 -- src/Rings/mpoly-graded.jl | 2 -- src/Rings/mpolyquo-localizations.jl | 1 - 5 files changed, 8 deletions(-) diff --git a/src/AlgebraicGeometry/Schemes/FunctionField/FunctionFields.jl b/src/AlgebraicGeometry/Schemes/FunctionField/FunctionFields.jl index 710e252f4d97..d11dc00cae28 100644 --- a/src/AlgebraicGeometry/Schemes/FunctionField/FunctionFields.jl +++ b/src/AlgebraicGeometry/Schemes/FunctionField/FunctionFields.jl @@ -354,7 +354,6 @@ function parent_type(::Type{T}) where {ParentType, T<:VarietyFunctionFieldElem{< end base_ring(KK::VarietyFunctionField) = base_ring(representative_field(KK)) -base_ring(a::VarietyFunctionFieldElem) = base_ring(parent(a)) is_domain_type(::Type{T}) where {T<:VarietyFunctionFieldElem} = true is_exact_type(::Type{T}) where {T<:VarietyFunctionFieldElem} = true diff --git a/src/Rings/PBWAlgebra.jl b/src/Rings/PBWAlgebra.jl index b692649288a9..83e545d5abe7 100644 --- a/src/Rings/PBWAlgebra.jl +++ b/src/Rings/PBWAlgebra.jl @@ -68,8 +68,6 @@ coefficient_ring(a::PBWAlgElem) = coefficient_ring(parent(a)) base_ring(a::PBWAlgRing) = a.poly_ring -base_ring(a::PBWAlgElem) = base_ring(parent(a)) - function Base.deepcopy_internal(a::PBWAlgElem, dict::IdDict) return PBWAlgElem(parent(a), deepcopy_internal(a.sdata, dict)) end diff --git a/src/Rings/PBWAlgebraQuo.jl b/src/Rings/PBWAlgebraQuo.jl index 8f2635c4b851..0e721b7c739a 100644 --- a/src/Rings/PBWAlgebraQuo.jl +++ b/src/Rings/PBWAlgebraQuo.jl @@ -85,8 +85,6 @@ base_ring(Q::PBWAlgQuo) = base_ring(Q.I) base_ring_type(::Type{PBWAlgQuo{T, S}}) where {T, S} = base_ring_type(PBWAlgIdeal{0, T, S}) -base_ring(a::PBWAlgQuoElem) = base_ring(parent(a)) - function Base.deepcopy_internal(a::PBWAlgQuoElem, dict::IdDict) return PBWAlgQuoElem(parent(a), deepcopy_internal(a.data, dict)) end diff --git a/src/Rings/mpoly-graded.jl b/src/Rings/mpoly-graded.jl index 5854c5b2822a..f225c0bd9100 100644 --- a/src/Rings/mpoly-graded.jl +++ b/src/Rings/mpoly-graded.jl @@ -1174,8 +1174,6 @@ number_of_generators(W::MPolyDecRing) = number_of_generators(forget_decoration(W gens(W::MPolyDecRing) = map(W, gens(forget_decoration(W))) gen(W::MPolyDecRing, i::Int) = W(gen(forget_decoration(W), i)) -base_ring(f::MPolyDecRingElem) = base_ring(forget_decoration(f)) - function show_homo_comp(io::IO, M) (W, d) = get_attribute(M, :data) n = AbstractAlgebra.get_name(W) diff --git a/src/Rings/mpolyquo-localizations.jl b/src/Rings/mpolyquo-localizations.jl index cf425cdfbdbe..99e9fc757ec0 100644 --- a/src/Rings/mpolyquo-localizations.jl +++ b/src/Rings/mpolyquo-localizations.jl @@ -443,7 +443,6 @@ denominator(a::MPolyQuoLocRingElem) = underlying_quotient(parent(a))(a.denominat ### additional getter functions underlying_quotient(a::MPolyQuoLocRingElem) = underlying_quotient(parent(a)) localized_ring(a::MPolyQuoLocRingElem) = localized_ring(parent(a)) -base_ring(a::MPolyQuoLocRingElem) = base_ring(parent(a)) is_reduced(a::MPolyQuoLocRingElem) = a.is_reduced @doc raw""" From d0e9fee4858cfc3b8394c17435b05587e37cc2d4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 20 Dec 2024 10:08:35 +0100 Subject: [PATCH 2/2] VarietyFunctionFieldElem now isa FieldElem --- src/AlgebraicGeometry/Schemes/FunctionField/Types.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AlgebraicGeometry/Schemes/FunctionField/Types.jl b/src/AlgebraicGeometry/Schemes/FunctionField/Types.jl index b726faca3706..d46957caffc0 100644 --- a/src/AlgebraicGeometry/Schemes/FunctionField/Types.jl +++ b/src/AlgebraicGeometry/Schemes/FunctionField/Types.jl @@ -30,7 +30,7 @@ end ######################################################################## mutable struct VarietyFunctionFieldElem{FracType<:AbstractAlgebra.Generic.FracFieldElem, ParentType<:VarietyFunctionField - } + } <: FieldElem KK::ParentType f::FracType