From b42ca2dec644b6259e51a16d2278bdccad9af08c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 19 Apr 2024 00:50:31 +0200 Subject: [PATCH] Minor cleanup related to FacElemMon and FacElem FacElemMon is a monoid, not a ring --- src/HeckeTypes.jl | 4 +++- src/Misc/FactoredElem.jl | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HeckeTypes.jl b/src/HeckeTypes.jl index 5439a996a6..58688843c1 100644 --- a/src/HeckeTypes.jl +++ b/src/HeckeTypes.jl @@ -593,7 +593,7 @@ end Parent for factored elements, ie. power products. """ -mutable struct FacElemMon{S} <: Ring +mutable struct FacElemMon{S} base_ring::S # for the base basis_conjugates_log::Dict{RingElem, Tuple{Int, Vector{ArbFieldElem}}} basis_conjugates::Dict{RingElem, Tuple{Int, Vector{ArbFieldElem}}} @@ -631,6 +631,8 @@ end FacElemMon(R::S) where {S} = FacElemMon{S}(R) +const FacElemMonDict = AbstractAlgebra.CacheDictType() + """ FacElem{B, S} diff --git a/src/Misc/FactoredElem.jl b/src/Misc/FactoredElem.jl index ee9561a251..58d2f515a3 100644 --- a/src/Misc/FactoredElem.jl +++ b/src/Misc/FactoredElem.jl @@ -69,8 +69,6 @@ end # abstract nonsense -const FacElemMonDict = AbstractAlgebra.CacheDictType{Ring, FacElemMon}() - function (x::FacElemMon{S})() where S z = FacElem{elem_type(S), S}() z.fac = Dict{elem_type(S), ZZRingElem}()