Skip to content

SergioHC95/Mirzakhani-Recursion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weil–Petersson Volumes and $\psi$-Class Intersection Numbers via Mirzakhani Recursion

Mirzakhani-style recursion for intersection numbers with exact rational arithmetic and parallelization.

Install (editable)

pip install -e .

Quickstart

Open notebooks/Intersection_Numbers_Tutorial.ipynb. It:

  • Verifies the core API.
  • Builds the normalized table R_X(g,n,alpha) via iterate(...).
  • Shows how to convert to intersection numbers ⟨τ_{d1}⋯τ_{dn}⟩_g using x_from_rx(...).
  • Provides helper utilities to query arbitrary (g, n, alpha) tuples.

Minimal API

import wp

# Fill cache up to a degree bound and return a dict { (g,n,alpha): Fraction }
rx = wp.iterate(dmax=6, cache_path="data/wp_rx.pkl", max_workers=None, fill_missing=True)

# Convert normalized value to the actual intersection number
from fractions import Fraction
g, n, alpha = 0, 4, (1,0,0,0)
X = wp.x_from_rx(g, n, alpha, rx[(g,n,tuple(sorted(alpha, reverse=True)))])
assert X == Fraction(1,1)  # ⟨τ_1 τ_0^3⟩_0 = 1

Notes

  • Cache file defaults to data/wp_rx.pkl

About

Efficient computation and memoization of Weil–Petersson intersection numbers via Mirzakhani recursion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published