-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add is_euclidean_type trait #1943
base: master
Are you sure you want to change the base?
Conversation
For examples, this now works: julia> is_domain_type(ZZ) true julia> is_domain_type(ZZ(2)) true julia> is_domain_type(residue_ring(ZZ,6)[1]) false
The idea is that this true for ring / ring elem types that explicitly support a euclidean division with remainder, and ideally also a euclidean degree (to be defined in the interface). This is just a draft to have a point for discussion and experiments: it is missing many things, including documentation as to what is_euclidean_type(x)==true means, which promises this incurrs; and of course also code needs to be adapted to use it (e.g. the residue ring or ideal constructions or whatnot that only work sensible for euclidean rings should check this.
On Fri, Dec 20, 2024 at 07:47:18AM -0800, Max Horn wrote:
The idea is that this true for ring / ring elem types that explicitly support a euclidean division with remainder, and ideally also a euclidean degree (to be defined in the interface). This is just a draft to have a point for discussion and experiments: it is missing many things, including documentation as to what is_euclidean_type(x)==true means, which promises this incurs; and of course also code needs to be adapted to use it (e.g. the residue ring or ideal constructions or whatnot that only work sensible for euclidean rings should check this.
Most recent motivation for this is oscar-system/Oscar.jl#4410 but there are many others.
Note that this is explicitly different from the *mathematical* property. I'd be happy to also add a function `is_euclidean_ring` resp. `is_euclidean(::Ring)` for the mathematical property, if someone wants it, but that's a separate thing.
Anyway, with that out of the way: let's get started with the flaming and bikeshedding :-)
Part of why we haven't proceeded with the traits was that we never
fogured out what to do in the presence of more than one applicable
trait...
also we were waiting for some trait system to become standart in Julia
…
(Includes PR #1942 for my convenience)
You can view, comment on, or merge this pull request online at:
#1943
-- Commit Summary --
* Make is_exact_type and is_domain_type more convenient
* Add is_euclidean_type trait
-- File Changes --
M src/Fields.jl (2)
M src/Poly.jl (11)
M src/Rings.jl (31)
-- Patch Links --
https://github.com/Nemocas/AbstractAlgebra.jl/pull/1943.patch
https://github.com/Nemocas/AbstractAlgebra.jl/pull/1943.diff
--
Reply to this email directly or view it on GitHub:
#1943
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
A few weeks ago in https://hackmd.io/EYHpciQ9ToCCYQcbmv7oGg I collected some ideas of @fieker, @joschmitt and myself on ring traits and matrix normal forms (HNF, SNF, etc). There is some overlap with this here. Just some random comments/questions:
From experience a "euclidean" trait is not that useful and as far as I can tell, the (real? original?) question is about collecting properties to make I think we could already solve some of these issues by doing |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1943 +/- ##
==========================================
- Coverage 88.21% 88.17% -0.04%
==========================================
Files 119 119
Lines 30385 30395 +10
==========================================
- Hits 26803 26801 -2
- Misses 3582 3594 +12 ☔ View full report in Codecov by Sentry. |
The idea is that this true for ring / ring elem types that explicitly support a euclidean division with remainder, and ideally also a euclidean degree (to be defined in the interface). This is just a draft to have a point for discussion and experiments: it is missing many things, including documentation as to what is_euclidean_type(x)==true means, which promises this incurs; and of course also code needs to be adapted to use it (e.g. the residue ring or ideal constructions or whatnot that only work sensible for euclidean rings should check this.
Some possibly relevant issues:
ZZ[:x]
, calls togcdx
result in infinite loop Nemo.jl#1474Note that this is explicitly different from the mathematical property. I'd be happy to also add a function
is_euclidean_ring
resp.is_euclidean(::Ring)
for the mathematical property, if someone wants it, but that's a separate thing.Anyway, with that out of the way: let's get started with the flaming and bikeshedding :-)
(Includes PR #1942 for my convenience)