In [4]:
import sys
from importlib import reload
import sympy
from itertools import product
from collections import defaultdict

In [5]:
sys.path.insert(0, '..')

In [6]:
import multivector as mv
import examples as ex
import embedding as emb

In [61]:
gens = sympy.symbols(['x%d' %x for x in range(10)])
p = mv.Mv(gens, {(g,):g**i for (i,g) in enumerate(gens)})
q = mv.Mv(gens, {(g,gens[i]):g**i for (i,g) in enumerate(gens[::-1])})
t*(x1,x2,y1,y2) = (t^p*x1, t^q*x2, t^-p*y1, t^-q*y2)

invariants:
x1*y1
x2*y2
x1^q*y2^p
x2^p*y1^q

In [427]:
p, q = 7,9

In [428]:
a = sympy.symbols('a0 a1 a2 a3')
x = sympy.symbols('x0 x1')
y = sympy.symbols('y0 y1')

In [429]:
brac = mv.Mv(x+y, {(x[0],y[0]):-1, (x[1],y[1]):-1}).brac

In [430]:
rmap = {
    a[0]: x[0]*y[0], 
    a[1]: x[1]*y[1],
    a[2]: (x[0]**q)*(y[1]**p),
    a[3]: (x[1]**p)*(y[0]**q)
}

embcoords, invariants = list(zip(*rmap.items()))

In [431]:
gb = sympy.polys.groebner(invariants)

In [432]:
P = {}
for k1, k2 in product(rmap.keys(), rmap.keys()):
    if (k2, k1) not in P.keys():
        P[(k1, k2)] = brac(rmap[k1],rmap[k2])

In [433]:
P


Out[433]:
{(a2, a2): 0,
 (a3, a2): 49*x0**9*x1**6*y0**9*y1**6 - 81*x0**8*x1**7*y0**8*y1**7,
 (a0, a2): -9*x0**9*y1**7,
 (a3, a1): 7*x1**7*y0**9,
 (a0, a1): 0,
 (a2, a1): -7*x0**9*y1**7,
 (a1, a1): 0,
 (a3, a0): -9*x1**7*y0**9,
 (a0, a0): 0,
 (a3, a3): 0}

In [436]:
Pi = mv.Mv(embcoords, emb.lift_from_quotient(rmap, limit=20))

In [437]:
# lifted bivector
Pi


Out[437]:
a0*(-49*a0**8*a1**6 + 81*a0**7*a1**7)*da3*da2 + 9*a2*da0*da2 + 7*a2*da2*da1 + 9*a3*da3*da0 - 7*a3*da3*da1

In [438]:
# bivector is poisson
mv.sBr(Pi,Pi).sort()


Out[438]:
0

what cohomology class is it in?

d_Pi(X) = -[X, Pi]

is there a vector field X such that -[X, Pi] = Pi ? (No)

What is the poisson cohomology? What are the poisson vector fields? (mod hamiltonians) What are the poisson bivectors? (what are the coboundaries?)


In [439]:
vf = mv.sBr(Pi,mv.Mv(embcoords, {():a[2]}))

In [440]:
coeffs = sympy.symbols('f1 f2 f3 f4')

In [441]:
cond = (mv.sBr(Pi, mv.Mv(embcoords, {(e,):c for e,c in zip(embcoords, coeffs)})) - Pi).sort()

In [442]:
cond


Out[442]:
(-9*a2 - 9*f3)*da0*da2 + (7*a2 + 7*f3)*da1*da2 + (-7*a3 - 7*f1)*da1*da3 + (9*a3 + 9*f1)*da0*da3 + (a0*f4*(-294*a0**8*a1**5 + 567*a0**7*a1**6) + a0*(-49*a0**8*a1**6 + 81*a0**7*a1**7) + f2*(-49*a0**8*a1**6 + 81*a0**7*a1**7 + a0*(-392*a0**7*a1**6 + 567*a0**6*a1**7)))*da2*da3

In [ ]: