Consultation for adding functions related to elliptic genera

52 views
Skip to first unread message

kenta kobayashi

unread,
Mar 26, 2023, 8:54:09 AM3/26/23
to sage-devel
Hi everyone,
I am a newcomer to SageMath and have written some functions that I would like to contribute to Sage.
Specifically, I have developed functions to:
1. Compute the bases of Weak Jacobi forms for both integral weights and half-integral indices.
2. Compute the coefficients of elliptic genera represented by Chern numbers.
3. Compute integrations of cohomology classes of homogeneous spaces and their complete intersections.

I have a few questions regarding these functions:
Question 1:
Would it be appropriate to push these functions as a ‘Geometry and Topology’ library in Sage?

Question 2:
I cannot find  any SageMath polynomial library that supports polynomials of rational degrees.
However, elliptic genera are Laurent polynomial series of rational degrees.
What is the most appropriate representation for this?

Question 3:
In my code, I have redefined the zeta function only for negative integers due to computation time.
Is it acceptable to use such ad-hoc coding, or should I use the zeta function of the SageMath library in the code to be published?

Here are some additional details about my codes:
1. Compute the bases of Weak Jacobi forms for both integral weights and half-integral indices.
    * For each pair of integers n and half-integer k, the function outputs a list of bases of the space of weak Jacobi forms of weight n and index k.
    * For any weak Jacobi form of weight n and index k, the function outputs the coefficients when we express the form by the basis which is output by the above function.
2. Compute the coefficients of elliptic genera represented by Chern numbers
    * For each dimension d, the function outputs the elliptic genera of varieties of dimension d whose coefficients are written by Chern numbers.
3. Compute integrations of cohomology classes of homogeneous spaces and their complete intersections.
    * We define abstract classes of varieties and vector bundles with abstract functions 'Chern classes', 'Chern characters', and 'Todd classes'.
    * We also define  classes  of homogeneous spaces, equivariant vector bundles on them, and their complete intersections, which implements the above abstract classes and computes the integrations of any cohomology classes on them.
    * By combining these, we can compute the Chern numbers of these spaces.

Thank you for your time and consideration.

Kenta Kobayashi,
Ph.D student at Tokyo University

Nils Bruin

unread,
Mar 26, 2023, 12:53:58 PM3/26/23
to sage-devel
On Sunday, 26 March 2023 at 05:54:09 UTC-7 kenta kobayashi wrote:
Question 1:
Would it be appropriate to push these functions as a ‘Geometry and Topology’ library in Sage?
 
Nowadays, for brand new code that isn't obviously extending or improving already existing capabilities in sage, it's probably a good idea to start with packaging the code into a stand-alone repository. It's your choice how nicely packaged you want to make it: you can just make it a directory that people can download and then link into sage (at their barest, python modules really just consist of a directory with python files), or you can wrap it up in a pip-installable package on github and/or publish it on pypi.
(see for instance https://github.com/nbruin/RiemannTheta for an "intermediately polished" example)

It has the advantage that the code is available immediately and that for the first while you can respond very quickly to bugs and issues that arise (so SageMath development cycle or review to contend with!). It also allows for a period to gauge how people actually use the code, which can be quite different from what you envisaged.

Once the usage has stabilized a bit, it's worth pushing for inclusion into the sagemath library itself, so that your code is kept up-to-date with other changes in the library (over longer time spans this becomes important). At that point you can archive the original repo with a pointer to the relevant code in sagemath.

This process also has the advantage that there is a specific place for you to point at to show what you've accomplished (for job and grant applications).
 
Question 2:
I cannot find  any SageMath polynomial library that supports polynomials of rational degrees.
However, elliptic genera are Laurent polynomial series of rational degrees.
What is the most appropriate representation for this?

LaurentPolynomialRing (for finite series) and LaurentSeriesRing
 
Question 3:
In my code, I have redefined the zeta function only for negative integers due to computation time.
Is it acceptable to use such ad-hoc coding, or should I use the zeta function of the SageMath library in the code to be published?

You could look if this redefinition is already available somewhere in sage and then you can import it from there. In general, you should probably use whatever feature is already available that significantly fills your need, to avoid duplication of effort and also because your (first) version would probably not handle edge cases and variations of inputs as gracefully as more mature code does.

Your redefinition obviously needs to stay confined to your own modules and then for maintainability it should probably be named "modified_zeta" to match (so that other people reading your code understand it's not the usual zeta function).

kenta kobayashi

unread,
Mar 26, 2023, 6:32:47 PM3/26/23
to sage-devel

Thank you very much Mr.Bruin for your helpful advice.

 I will follow your suggestion and try to start with a stand-alone repository.


Thank you once again.

Kenta Kobayashi


2023年3月27日月曜日 1:53:58 UTC+9 Nils Bruin:
Reply all
Reply to author
Forward
0 new messages