# Extending functions on curves to functions on abelian varieties

Say I have a function $f_g$ on the moduli space of curves $M_g$ for all $g\geq 1$. Is there some way of extending this to the moduli space of abelian varieties $A_g$ in a nice way?

What if I have more information? Say I can extend my function on $M_g$ in some compatible way to the moduli spaces $M_{g,n}$, for example. Is there more hope now?

What if we add level structures?

-
If $X$ is a positive-codimension subscheme of $Y$, it is almost always possible to extend functions on $X$ to functions on $Y$ in multiple different ways. For regular functions on closed subschemes of affine spaces, we can exactly characterize the number of ways to do this, but for other spaces it's more complicated. I don't see any reason to believe that existence fails or uniqueness occurs here, but there could be an argument I'm missing. –  Will Sawin Feb 11 '12 at 22:44
If $f_g$ is regular, then it is constant for $g \geq 3$. This makes the question of extension not particularly difficult (or interesting). –  S. Carnahan Feb 13 '12 at 2:55