sage icon indicating copy to clipboard operation
sage copied to clipboard

Improve counting of local solutions for QuadraticForm at p=2

Open WvanWoerden opened this issue 1 year ago • 6 comments

Fixes #38679.

Introduces new method CountAllLocalGoodTypesNormalForm(Q, p, k, m, zvec, nzvec) to compute the number of local solutions of 'good type' for Q[v] = m mod p^k when Q is in local normal form at p. This replaces the use of the slow brute-force function CountAllLocalTypesNaive indirectly used in local_good_density_congruence_even for (p,k)=(2,3) .

:memo: Checklist

  • [x] The title is concise and informative.
  • [ ] The description explains in detail what this PR is about.
  • [x] I have linked a relevant issue or discussion.
  • [x] I have created tests covering the changes.
  • [x] I have updated the documentation and checked the documentation preview.

:hourglass: Dependencies

WvanWoerden avatar Sep 19 '24 10:09 WvanWoerden

Documentation preview for this PR (built with commit b945f4b5ba0b029ee8649c487d1697d90a0e9c31; changes) is ready! :tada: This preview will update shortly after each push to this PR.

github-actions[bot] avatar Sep 20 '24 14:09 github-actions[bot]

one failing doctest

fchapoton avatar Sep 20 '24 14:09 fchapoton

Should be resolved now. The old doctest failed the (already existing) input assumption that Q is given in local diagonal form. The new code uses this assumption and therefore gave unexpected results. Now the local diagonal form is passed to the function in the doctest. I verified the results also with release version 10.4.

WvanWoerden avatar Sep 20 '24 15:09 WvanWoerden

The previous build resulted in an error because some .coverage file was missing (see https://github.com/sagemath/sage/actions/runs/10962048022/job/30442695828 ). Is there something I can do to fix this? The coverage report is fine on my local machine and it is unclear to me what this error is referring to.

I also merged the latest develop branch again, maybe this will already resolve the issue.

WvanWoerden avatar Oct 04 '24 13:10 WvanWoerden

That seems to have fixed it, should be good to merge now.

WvanWoerden avatar Oct 07 '24 13:10 WvanWoerden

the documentation in count_local_2 is not looking right ; you can see it by clicking above and navigating to that file in the reference manual

fchapoton avatar Oct 09 '24 08:10 fchapoton

Thank you both for noticing this and for the suggestions. I've updated the docs accordingly.

WvanWoerden avatar Oct 16 '24 15:10 WvanWoerden

Thank you both for noticing this and for the suggestions. I've updated the docs accordingly.

Thanks for the changes, looks good to me now! Not sure why the workflows require approval, but since the last commit only changed documentation and the tests ran correctly before, I'll set this to positive review.

S17A05 avatar Oct 17 '24 10:10 S17A05