Computing dimensions of theta spaces

A Mathematica package to compute the dimension of $H^p_d(D)$.

The main theorem proved in [Carlet-Casati-Shadrin'17] asserts that the dimension of the Poisson cohomology of a $D$ dimensional scalar Poisson bracket of hydrodynamic type in degree $(p,d)$ is given by $$ \mathrm{dim} ( H^p_d(D) ) + \mathrm{dim} ( H^{p+1}_d (D) ) , $$

where
$$ H(D) = \frac{\Theta}{\partial_{x_1} \Theta + \dots + \partial_{x_{D-1}} \Theta} , $$

and $\Theta$ is generated by anticommuting variables $\theta^{(i_1, \dots , i_{D-1})}$, see the article.

Here is a Mathematica notebook file that computes the dimension of $H^p_d(D)$.