From f6cf0f204eab2e8998fb42a74648a21c7d7f135f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 29 Nov 2024 16:31:35 +0100 Subject: [PATCH] Add `hash(::Union{ZZIdl, ZZFracIdl})` --- src/NumField/QQ.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/NumField/QQ.jl b/src/NumField/QQ.jl index a6d80a2f02..7b72284e09 100644 --- a/src/NumField/QQ.jl +++ b/src/NumField/QQ.jl @@ -32,8 +32,6 @@ struct ZZFracIdl <: NumFieldOrderFractionalIdeal end end -Base.hash(x::ZZIdl, h::UInt) = hash(gen(x), h) - order(::ZZIdl) = ZZ order(::ZZFracIdl) = ZZ @@ -93,10 +91,18 @@ function ==(I::ZZIdl, J::ZZIdl) return I.gen == J.gen end +function Base.hash(I::ZZIdl, h::UInt) + return hash(I.gen, h) +end + function ==(I::ZZFracIdl, J::ZZFracIdl) return I.gen == J.gen end +function Base.hash(I::ZZFracIdl, h::UInt) + return hash(I.gen, h) +end + # access gen(I::ZZIdl) = I.gen