Skip to content

add support for non-coprime moduli in CRT for IntegerMod_int #32487

@maxale

Description

@maxale

The sage.arith.misc.crt() function well supports non-coprime moduli like in the example below:

sage: crt([6,0],[10,4])                                                                                                                                                                                            
16

However, the same example does not work with the sage.rings.finite_rings.integer_mod_ring.crt() function as

mod(6,10).crt(mod(0,4))

gives an error ZeroDivisionError: moduli must be coprime.

Please remove this restriction from sage.rings.finite_rings.integer_mod_ring.crt() and let it accept non-coprime moduli like sage.arith.misc.crt() does.

CC: @yyyyx4

Component: algebra

Issue created by migration from https://trac.sagemath.org/ticket/32487

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions