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]:
In [436]:
Pi = mv.Mv(embcoords, emb.lift_from_quotient(rmap, limit=20))
In [437]:
# lifted bivector
Pi
Out[437]:
In [438]:
# bivector is poisson
mv.sBr(Pi,Pi).sort()
Out[438]:
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]:
In [ ]: