Skip to content

Commit

Permalink
Turn zzModRing & ZZModRing into ResidueRing subtypes
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fingolfin committed Jul 4, 2024
1 parent 4e6ffb0 commit 97866cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flint/FlintTypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 97866cf

Please sign in to comment.