AbstractAlgebra.jl icon indicating copy to clipboard operation
AbstractAlgebra.jl copied to clipboard

add divrem for EuclideanRingResidueRing

Open fieker opened this issue 1 year ago • 7 comments

would resolve https://github.com/oscar-system/Oscar.jl/issues/4340

fieker avatar Dec 04 '24 11:12 fieker

Codecov Report

Attention: Patch coverage is 87.17949% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.19%. Comparing base (7a473f4) to head (cad3977).

Files with missing lines Patch % Lines
src/generic/Residue.jl 87.17% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1921      +/-   ##
==========================================
+ Coverage   88.17%   88.19%   +0.01%     
==========================================
  Files         120      120              
  Lines       30303    30342      +39     
==========================================
+ Hits        26719    26759      +40     
+ Misses       3584     3583       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 04 '24 11:12 codecov[bot]

Add some tests?

fingolfin avatar Dec 04 '24 22:12 fingolfin

I am a bit confused. The code is for residue rings of euclidean rings, but then does something with leading coefficients?

thofma avatar Dec 05 '24 13:12 thofma

On Thu, Dec 05, 2024 at 05:29:11AM -0800, Tommy Hofmann wrote:

I am a bit confused. The code is for residue rings of euclidean rings, but then does something with leading coefficients?

We can try to do it with canonical_unit? The probelm is that coprime base and gcd loose the units

-- Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/pull/1921#issuecomment-2520329569 You are receiving this because you authored the thread.

Message ID: @.***>

fieker avatar Dec 05 '24 14:12 fieker

possibly we need a more sane algorithm?

fieker avatar Dec 05 '24 15:12 fieker

How about just doing the Euclidean division in the "base ring" and then project down?

thofma avatar Dec 05 '24 15:12 thofma

On Thu, Dec 05, 2024 at 07:37:57AM -0800, Tommy Hofmann wrote:

How about just doing the Euclidean division in the "base ring" and then project down?

I guess it comes down to what euc. function we want on the quotient? For Z/nZ we choose phi(a) = gcd(a, n) you're suggesting to use on R/mR

  • choose the euc-minimal rep of a + mR
  • euc(a)? but keep the canonical unit? and not try to do eps a to find a minimal rep?

-- Reply to this email directly or view it on GitHub: https://github.com/Nemocas/AbstractAlgebra.jl/pull/1921#issuecomment-2520653282 You are receiving this because you authored the thread.

Message ID: @.***>

fieker avatar Dec 06 '24 07:12 fieker