Module localpoly¶
-
cvolume.localpoly.Nlocal(g, n, stratum, labeled=False, mode='derivative')[source]¶ Return a local polynomial \(N_{g,n}^{\kappa}(b_1, ..., b_n)\), where \(\kappa\) is stratum.
INPUT:
g– int, genusn– int, number of boundariesstratum– list or tuple, orders of zeros of the stratumlabeled– boolean (default False), whether to consider labeled zeros or notmode– ‘derivative’ (default) or ‘recursive’, ‘derivative’ uses Arbarello-Cornalba formulae and ‘recursive’ uses recursion on local polynomials dervied from the same AC formulae
OUTPUT:
- a symmetric Sage Multivariate Polynomial in variables b1, b2, … .
EXAMPLES:
Here we compute local polynomial of genus 2, two bondary components and stratum \(\mathcal{Q}(5, 1, 1, 1)\):
sage: from cvolume import Nlocal sage: S = PolynomialRing(QQ,['b%d' % i for i in range(1,10)]) sage: b1,b2,b3,b4,b5 = S.gens()[:5] sage: Nlocal(2, 2, (5, 1, 1, 1)) 1/192*b1^6 + 95/3072*b1^4*b2^2 + 95/3072*b1^2*b2^4 + 1/192*b2^6
And here is the same local polynomial, but with labeled zeros:
sage: Nlocal(2, 2, (5, 1, 1, 1), labeled = True) 1/32*b1^6 + 95/512*b1^4*b2^2 + 95/512*b1^2*b2^4 + 1/32*b2^6
Another example for a different stratum:
sage: Nlocal(2, 2, (7, 1)) 35/192*b1^4 + 35/64*b1^2*b2^2 + 35/192*b2^4
Here we show that recursive and derivative methods give consistent answers:
sage: assert Nlocal(0, 5, [3, 1, 1, 1], mode = 'recursive') == Nlocal(0, 5, [3, 1, 1, 1]) sage: assert Nlocal(1, 3, [3, 1, 1, 1], mode = 'recursive') == Nlocal(1, 3, [3, 1, 1, 1]) sage: assert Nlocal(0, 4, [3, 1, 1, -1], mode = 'recursive') == Nlocal(0, 4, [3, 1, 1, -1]) sage: assert Nlocal(0, 3, [3, 1, -1, -1], mode = 'recursive') == Nlocal(0, 3, [3, 1, -1, -1])
-
cvolume.localpoly.shift(variables, k)[source]¶ Return a copy of the list of variables shifted k units to the left.