From 97866cfbb51aececb3ce2b68883fb073174e69e9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 4 Jul 2024 17:23:54 +0200 Subject: [PATCH] Turn zzModRing & ZZModRing into ResidueRing subtypes Since the element types of these ring types are subtypes of ResElem, the rings should be subtypes of ResidueRing. Otherwise some generic code gets confused (notably check_parent for ResElem). This lead to a wrong error in the OSCAR book's introduction notebook. --- src/flint/FlintTypes.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flint/FlintTypes.jl b/src/flint/FlintTypes.jl index 9640539f9..35c48d5ee 100644 --- a/src/flint/FlintTypes.jl +++ b/src/flint/FlintTypes.jl @@ -410,7 +410,7 @@ The ring $\mathbb Z/n\mathbb Z$ for some $n$. See [`residue_ring`](@ref). Implementation for the modulus being a machine integer [`Int`](@ref). For the modulus being a [`ZZRingElem`](@ref) see [`ZZModRing`](@ref). """ -@attributes mutable struct zzModRing <: Ring +@attributes mutable struct zzModRing <: ResidueRing{UInt} n::UInt ninv::UInt @@ -506,7 +506,7 @@ The ring $\mathbb Z/n\mathbb Z$ for some $n$. See [`residue_ring`](@ref). Implementation for the modulus being a big integer [`ZZRingElem`](@ref). For the modulus being an [`Int`](@ref) see [`zzModRing`](@ref). """ -@attributes mutable struct ZZModRing <: Ring +@attributes mutable struct ZZModRing <: ResidueRing{ZZRingElem} n::ZZRingElem ninv::fmpz_mod_ctx_struct