-
Notifications
You must be signed in to change notification settings - Fork 126
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
avoid calling conductor
#4247
base: master
Are you sure you want to change the base?
avoid calling conductor
#4247
Conversation
Instead, call `Hecke.force_coerce_cyclo(Kg, data(x), Val(false))`, which finds out whether the conversion works.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4247 +/- ##
==========================================
- Coverage 84.59% 84.59% -0.01%
==========================================
Files 631 631
Lines 84906 85061 +155
==========================================
+ Hits 71830 71955 +125
- Misses 13076 13106 +30
|
error("element has no preimage") | ||
end | ||
res = Hecke.force_coerce_cyclo(C1, data(x), Val(false)) | ||
!check && res === nothing && error("element has no preimage") |
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.
Hm, if check == true
and res === nothing
, will this return nothing? Sorry, I am not good with logic.
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.
This code is rather confusing to me as well. But so is the old code: it indeed also returns nothing
when check
is true
and conductor(x) != 1
?!
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.
I guess what confuses me is that check
apparently has a different meaning here than it has in e.g. our constructors. Since I don't know what the meaning of check
is supposed to be here, I can't comment further.
Is it documented somewhere?
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.
@fingolfin See my comment below: The function in question is internal and not documented (as well as the functions called by it). I think we could change the meaning of check
to that in other situations.
might be better if @fieker has a look |
Yes, the function |
Sorry, I missed that this is an internal function. Then forget my question. But @fieker should check. |
Instead, call
Hecke.force_coerce_cyclo(Kg, data(x), Val(false))
, which finds out whether the conversion works.