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

Test and fix norm_equation for RelNumFieldOrder #4282

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Conversation

fingolfin
Copy link
Member

While looking at PR #4261 I noticed the norm equation code for RelNumFieldOrder is untested. So I though I could just quickly add a simple test. Sadly it revealed that that code is unrunnable. I applied the first obviously necessary tweak. But it is not enough: there is no Hecke.absolute_field method which takes a Hecke.RelSimpleNumField{AbsSimpleNumFieldElem} (and the methods which do exist seem to have two return values, not three as the code here expects).

I think it is more efficient if @fieker has a look at resolving this, he may know immediately what's going on, unlike me :-).

Oh yeah, and next up missing would be a test for is_irreducible(a::AbsSimpleNumFieldOrderElem) but I didn't even try to go there 😂

@fingolfin fingolfin requested a review from fieker November 6, 2024 20:36
@@ -129,7 +129,7 @@ norm_equation(R::AbsNumFieldOrder, k::Base.Integer; abs::Bool = false) = norm_eq
function norm_equation_fac_elem(R::Hecke.RelNumFieldOrder{AbsSimpleNumFieldElem,Hecke.AbsSimpleNumFieldOrderFractionalIdeal}, a::AbsNumFieldOrderElem{AbsSimpleNumField,AbsSimpleNumFieldElem})

@assert Hecke.is_maximal(R)
Ka, mKa, mkK = absolute_field(Hecke.nf(R))
Ka, mKa, mkK = Hecke.absolute_field(Hecke.nf(R))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this line needs to be changed further

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope @fieker or @thofma can tell me what the right replacement is here (or just take care of it)

src/NumberTheory/NmbThy.jl Outdated Show resolved Hide resolved
@fingolfin fingolfin marked this pull request as ready for review November 10, 2024 09:05
@fingolfin fingolfin changed the title Test and fix (? eventually... ?) norm_equation for RelNumFieldOrder Test and fix norm_equation for RelNumFieldOrder Nov 10, 2024
src/NumberTheory/NmbThy.jl Outdated Show resolved Hide resolved
src/NumberTheory/NmbThy.jl Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.53%. Comparing base (194d82b) to head (c1ce3b9).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/NumberTheory/NmbThy.jl 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4282      +/-   ##
==========================================
+ Coverage   84.49%   84.53%   +0.03%     
==========================================
  Files         641      641              
  Lines       85528    85528              
==========================================
+ Hits        72269    72303      +34     
+ Misses      13259    13225      -34     
Files with missing lines Coverage Δ
src/NumberTheory/NmbThy.jl 78.75% <88.88%> (+17.61%) ⬆️

@fingolfin
Copy link
Member Author

@fieker @thofma OK to merge? Then please approve ;-)

@fingolfin fingolfin enabled auto-merge (squash) November 12, 2024 21:44
@fingolfin fingolfin merged commit a0d60ee into master Nov 13, 2024
30 checks passed
@fingolfin fingolfin deleted the mh/norm_equation branch November 13, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants