-
Notifications
You must be signed in to change notification settings - Fork 133
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
feat: add iso_oscar_singular_[coeff/poly]_ring #4342
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4342 +/- ##
==========================================
- Coverage 84.50% 84.36% -0.14%
==========================================
Files 644 652 +8
Lines 85594 86973 +1379
==========================================
+ Hits 72328 73379 +1051
- Misses 13266 13594 +328
|
This comment was marked as resolved.
This comment was marked as resolved.
815f504
to
de31192
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a ton for working on this, much appreciated. I have a few questions about a few bits that genuinely confuse me. Apologies if these remarks are premature or miss the point.
This comment was marked as resolved.
This comment was marked as resolved.
@thofma : slightly off-topic, but directly related to your changes I have a question relating this to issue #4303 -- and I confess that I am not too deep into the internals of the translation: |
1310bb7
to
365ad67
Compare
@fingolfin I think I addressed all your questions and this should be ready to go. I also refactored the code, so that @afkafkafk13 The changes here only concern how the coefficients are translated between Oscar and Singular. I don't know anything about how the modules or their interaction with Singular is designed. |
Then let us get this PR merged quickly, so that this part is already in its new structure before Christian and I meet next week. I have the suspicion that this is exactly the area where we also have to take care of existing module ordering.... |
- use it in some places
I removed all the *sense. |
@fingolfin any other concerns? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, merge at will
Kx = parent(defining_polynomial(F)) | ||
Fabs, QQtoFabs = Nemo._residue_field(defining_polynomial(F); absolute = true, check = false) | ||
Fabsx, = polynomial_ring(Fabs, :x; cached = false) | ||
return Fabs, MapFromFunc(Fabs, F, a -> F(preimage(QQtoFabs, a)), b -> begin a = Fabs(); Nemo.set!(a, b); a end) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For which types does Nemo.set!(a, b)
work but not Fabs(b)
?
otherwise we could do
return Fabs, MapFromFunc(Fabs, F, a -> F(preimage(QQtoFabs, a)), b -> begin a = Fabs(); Nemo.set!(a, b); a end) | |
return Fabs, MapFromFunc(Fabs, F, a -> F(preimage(QQtoFabs, a)), b -> Fabs(b)) |
Or even
return Fabs, MapFromFunc(Fabs, F, a -> F(preimage(QQtoFabs, a)), b -> begin a = Fabs(); Nemo.set!(a, b); a end) | |
return Fabs, MapFromFunc(Fabs, F, a -> F(preimage(QQtoFabs, a)), Fabs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a matter of types. This is reinterpreting elements between different flint finite fields and outside the scope of "promotion".
Implements the plan we agreed on #976, introducing
This is similar to
iso_oscar_gap
, although here we must have two separate version.This PR here applies it only as far as we need it to fix #976.
Comments/thoughts:
singular_poly_ring
andsingular_generators
uses left, which can (and will with the right input) trigger ambiguity errors. But these might be fixed later.FqField
if the field is not absolute.CC: @fieker @ederc