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

Implement basis_of_weight for rings of quasimodular forms #35029

Merged

Conversation

DavidAyotte
Copy link
Member

📚 Description

This PR implements the method QuasiModularForms.basis_of_weight(k). It returns a list of quasimodular forms which generate the space of weight k. Some examples:

sage: QM = QuasiModularForms(1)
sage: QM.basis_of_weight(12)
[q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6),
 1 + 65520/691*q + 134250480/691*q^2 + 11606736960/691*q^3 + 274945048560/691*q^4 + 3199218815520/691*q^5 + O(q^6),
 1 - 288*q - 129168*q^2 - 1927296*q^3 + 65152656*q^4 + 1535768640*q^5 + O(q^6),
 1 + 432*q + 39312*q^2 - 1711296*q^3 - 14159664*q^4 + 317412000*q^5 + O(q^6),
 1 - 576*q + 21168*q^2 + 308736*q^3 - 15034608*q^4 - 39208320*q^5 + O(q^6),
 1 + 144*q - 17712*q^2 + 524736*q^3 - 2279088*q^4 - 79760160*q^5 + O(q^6),
 1 - 144*q + 8208*q^2 - 225216*q^3 + 2634192*q^4 + 1488672*q^5 + O(q^6)]
sage: QM = QuasiModularForms(Gamma1(3))
sage: QM.basis_of_weight(3)
[1 + 54*q^2 + 72*q^3 + 432*q^5 + O(q^6),
 q + 3*q^2 + 9*q^3 + 13*q^4 + 24*q^5 + O(q^6)]
sage: QM.basis_of_weight(5)
[1 - 90*q^2 - 240*q^3 - 3744*q^5 + O(q^6),
 q + 15*q^2 + 81*q^3 + 241*q^4 + 624*q^5 + O(q^6),
 1 - 24*q - 18*q^2 - 1320*q^3 - 5784*q^4 - 10080*q^5 + O(q^6),
 q - 21*q^2 - 135*q^3 - 515*q^4 - 1392*q^5 + O(q^6)]

CC: @videlec

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@videlec
Copy link
Contributor

videlec commented Feb 8, 2023

This is a really cool feature.

It would be nice if this was used to refactor a bit _homogeneous_to_polynomial.

@codecov-commenter
Copy link

Codecov Report

Base: 88.59% // Head: 88.58% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (6185e8c) compared to base (104dde9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35029      +/-   ##
===========================================
- Coverage    88.59%   88.58%   -0.01%     
===========================================
  Files         2136     2136              
  Lines       396142   396150       +8     
===========================================
- Hits        350948   350946       -2     
- Misses       45194    45204      +10     
Impacted Files Coverage Δ
src/sage/modular/quasimodform/ring.py 95.65% <100.00%> (+0.26%) ⬆️
src/sage/crypto/util.py 91.37% <0.00%> (-5.18%) ⬇️
src/sage/homology/matrix_utils.py 84.40% <0.00%> (-3.67%) ⬇️
src/sage/interfaces/qsieve.py 71.30% <0.00%> (-2.61%) ⬇️
src/sage/rings/polynomial/pbori/parallel.py 59.82% <0.00%> (-1.79%) ⬇️
src/sage/categories/weyl_groups.py 96.47% <0.00%> (-0.59%) ⬇️
src/sage/modular/arithgroup/congroup_gamma0.py 94.41% <0.00%> (-0.56%) ⬇️
src/sage/combinat/tableau.py 95.72% <0.00%> (-0.50%) ⬇️
src/sage/graphs/generic_graph.py 89.12% <0.00%> (-0.42%) ⬇️
src/sage/modular/arithgroup/arithgroup_perm.py 92.57% <0.00%> (-0.38%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@DavidAyotte
Copy link
Member Author

About commit 0f486e3 : Oops my bad, I wanted to implement the depth of a quasimodular form, but accidently pushed the changes to this branch.

@DavidAyotte
Copy link
Member Author

This is a really cool feature.

It would be nice if this was used to refactor a bit _homogeneous_to_polynomial.

Hello Vincent, I was wondering what do you have in mind when you say to refactor _homogeneous_to_polynomial? This method is implemented in the modular forms ring element class. Do you mean to use the method monomials_of_weight at the polynomial ring level in order to first compute a weight $k$ basis?

@videlec
Copy link
Contributor

videlec commented Apr 17, 2023

Indeed, _homogeneous_to_polynomial is a method of GradedModularFormElement. Though it does need to generate the list of elements of given weight.

@DavidAyotte
Copy link
Member Author

Indeed, _homogeneous_to_polynomial is a method of GradedModularFormElement. Though it does need to generate the list of elements of given weight.

Ok I see. I'll do the changes in a seperate PR. Also, there are some more refactoring and enhancement that could be done in the polynomial and polynomial_ring methods for (quasi)modular forms.

Copy link
Contributor

@grhkm21 grhkm21 left a comment

Choose a reason for hiding this comment

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

Hey, you'll be receiving a few notifications from me, since I'm going through old PRs. Nevermind, there's only three PRs still open, and one I don't understand :)

I gave some feedback.

src/sage/modular/quasimodform/ring.py Outdated Show resolved Hide resolved
src/sage/modular/quasimodform/ring.py Show resolved Hide resolved
src/sage/modular/quasimodform/ring.py Show resolved Hide resolved
src/sage/modular/quasimodform/ring.py Outdated Show resolved Hide resolved
@DavidAyotte
Copy link
Member Author

Hey, you'll be receiving a few notifications from me, since I'm going through old PRs. Nevermind, there's only three PRs still open, and one I don't understand :)

I gave some feedback.

Hello, thank you for the reviews, I will address the comments in a few weeks.

Copy link
Contributor

@grhkm21 grhkm21 left a 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. Thanks!

Copy link

Documentation preview for this PR (built with commit 4df388b; changes) is ready! 🎉

@vbraun vbraun merged commit 0c873c6 into sagemath:develop Mar 25, 2024
22 of 23 checks passed
@mkoeppe mkoeppe added this to the sage-10.4 milestone Mar 25, 2024
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.

6 participants