Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ThomasBreuer
Copy link
Member

Instead, call Hecke.force_coerce_cyclo(Kg, data(x), Val(false)), which finds out whether the conversion works.

Instead, call `Hecke.force_coerce_cyclo(Kg, data(x), Val(false))`,
which finds out whether the conversion works.
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

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

Project coverage is 84.59%. Comparing base (24c8f63) to head (06796c3).
Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
src/Rings/AbelianClosure.jl 70.58% 5 Missing ⚠️
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     
Files with missing lines Coverage Δ
src/Rings/AbelianClosure.jl 94.28% <70.58%> (-0.02%) ⬇️

... and 34 files with indirect coverage changes

error("element has no preimage")
end
res = Hecke.force_coerce_cyclo(C1, data(x), Val(false))
!check && res === nothing && error("element has no preimage")
Copy link
Collaborator

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.

Copy link
Member

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 ?!

Copy link
Member

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?

Copy link
Member Author

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.

@thofma
Copy link
Collaborator

thofma commented Oct 26, 2024

might be better if @fieker has a look

@thofma thofma requested a review from fieker October 26, 2024 11:04
@ThomasBreuer
Copy link
Member Author

Yes, the function _embedding returns nothing if the second argument suppresses the error, like Hecke.force_coerce_cyclo does.
(I admit that the meaning of check may be confusing; taking that _embedding is undocumented and used only in my code, we could change this.)

@thofma
Copy link
Collaborator

thofma commented Oct 28, 2024

Sorry, I missed that this is an internal function. Then forget my question. But @fieker should check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants