Let $s: \mathbb C^n \to \mathbb C$ be a homogeneous degree-$d$ polynomial which is nonsingular (in the sense that the hypersurface it defines in $\mathbb{CP}^{n-1}$ is smooth; equivalently the discriminant does not vanish). Write $\Omega$ for the canonical holomorphic $n$-form $\mathrm d z\_1\cdots\mathrm d z\_n$ on $\mathbb C^n$. I am interested in integrals against the measure $\exp(s)\Omega$.
Specifically, one can ask about integrals of the form $\int\_\gamma f\exp(s)\Omega$ for some contour $\gamma$, where $f$ is a polynomial.


By a "contour" I mean a boundary-free (but not compact) real-$n$-dimensional submanifold of $\mathbb C^n$. For the integral to converge, you'd like exponential decay at the ends of $\gamma$; i.e. at the ends of $\gamma$ we should have $\Re(s)\to -\infty$. By Stokes' Theorem, small perturbations of $\gamma$ don't matter, and neither do compact cycles. So all that matters in $\gamma$ is the class it represents in the relative homology group $\mathrm H\_n(\mathbb C^n,\lbrace \Re(s)\lt 0\rbrace)$. If $n\gt 1$, by the long exact sequence for relative homology this group is equal to $\mathrm H\_{n-1}(\lbrace \Re(s)\lt 0\rbrace)$. (When $n=1$ it is the quotient of this by $\mathrm H\_0(\mathbb C^n)$ which is one-dimensional.)


Stoke's theorem also implies that integrals of total derivatives (of functions that vanish at infinity) vanish. Namely (provided $\gamma$ is as above), if $f$ is of the form $\frac{\partial g}{\partial z\_i} + \frac{\partial s}{\partial z\_i}g$ for some $i=1,\dots,n$ and some polynomial $g$, then $\int\_\gamma f\exp(s)\Omega = 0$.



> 
> Thus the integral determines a pairing of the form
>  $$ \textstyle \mathrm H\_n\bigl(\mathbb C^n,\lbrace \Re(s)\lt 0\rbrace\bigr) \otimes \bigl(\mathbb C[z\_1,\dots,z\_n] / \sum\_i (\text{image of } \frac{\partial}{\partial z\_i} + \frac{\partial s}{\partial z\_i})\bigr) \to \mathbb C $$
>  My question is whether this pairing is perfect. If it matters, I am primarily interested in the case when $s$ is generic.
> 
> 
> 


The answer is (somewhat trivially) "yes" when $n=1$ or when $d=2$. When $n=2$ I convinced myself that the answer is yes for "diagonal" $s(z\_1,z\_2) = z\_1^d + z\_2^d$; at least, we calculated the dimension for $d=3$, and a similar argument should work for higher $d$. At least some of the people I have asked have given the prediction that the answer is "no" in general.


For generic $s$ I have complete control over the "algebraic side": I can give an explicit basis for the quotient and for this basis and the monomial basis explicit formulas for the map. An easy part of this is to see that this "algebraic" piece is $(d-1)^n$-dimensional. 


On the other hand, I'm not very good at algebraic topology and algebraic geometry, and the homology group is definitely inaccessible to pure algebra and is rather a piece of real algebraic geometry. After talking with a number of folks at Berkeley, we've been unable to calculate even the dimension of the relative homology group, but maybe there were tricks we didn't think of. Or maybe there's an a priori reason why the pairing is perfect, and then I would have a calculation of this "real topology" side.



Is the pairing between contours and functions perfect (modulo the kernel given by Stokes' theorem)?
This does not address the perfectness of the pairing, but just the dimension calculation on the topology side.


Call your hypersurface $H(d,n-2)$. Introduce one more variable $z\_{n+1}$ and consider the polynomial $s(z\_1,\dots ,z\_n)+z\_{n+1}^d$. It defines a smooth hypersurface $H(d,n-1)$ in $P(n)$ whose intersection with $P(n-1)$ is $H(d,n-2)$. 


Your set of all $z\in \mathbb C^n$ where $s(z)$ has negative real part is the product of an open disk with the set where $s(z)=-1$. (Choose a branch of the $d$th root function in that half-plane.) And the latter set is the difference $H(d,n-1)-H(d,n-2)$. So the question is about the homology of this difference set.


The homology, in fact the diffeomorphism type, of $H(d,n-2)$ is independent of the choice of polynomial, since the space of all nonsingular homogeneous complex polynomials of degree $d$ in $n$ variables is connected. So we can use the simplest polynomial $\Sigma\_j z\_j^d$ if we want. 


The relative homology $H\_j(P(n+1),H(d,n))$ is trivial for $j\le n$ by a theorem of Lefschetz that can be proved using Morse theory. Thus the homology of $H(d,n)$ is isomorphic to that of complex projective space in dimensions $0$ through $n-1$. The same is true in dimensions $n+1$ through $2n$ by duality, since $H(d,n)$ is an oriented $2n$-manifold (although the inclusion $H\to P(n+1)$ is not an isomorphism in these higher dimensions, just mod torsion). So basically the homology of $H(d,n)$ looks like that of $P(n)$ plus something extra in the middle dimension.


You can calculate the rank of this extra bit by calculating the Euler characteristic of $H(d,n)$. For this let's use that simplest equation. $H(d,n)$ has an obvious map to $P(n)$, forgetting the last coordinate. This map is $1:1$ over $H(d,n-1)$ and otherwise $d:1$. Using this you can inductively find the Euler characteristic of $H(d,n)$ and thus the rank of the extra homology in the middle.


The homology of the difference $H(d,n)-H(d,n-1)$ can now be found by a long exact sequence, using also a Thom isomorphism $H\_j(H(d,n),H(d,n)-H(d,n-1))=H\_{j-2}(H(d,n-1)$. Except for $H\_0=\mathbb Z$, it is all in dimension $n$ and of rank $(d-1)^{n+1}$. 


EDIT Actually the rank calculation is easier with the affine variety than the projective: Write $V(d,n)=H(d,n)-H(d,n-1)$. Then $V(d,n)$ is a $d$-fold branched cover of affine $n$-space, unbranched except over $V(d,n-1)$ where it is totally branched. If we write $e(d,n)$ for the Euler number of $V(d,n)$, it follows that $e(d,n)-1=(1-d)(e(d,n-1)-1)$.


