<jupyter_start><jupyter_text>```t*(x0,x1,x2,y0,y1,y2) = (t^2*x0, t*x1, t*x2, t-2*y0, t^-1*y1, t^-1*y2)invariants:x0*y0x1*y1x2*y2x1*y2x2*y1x0*y1^2x0*y1*y2x0*y2^2y0*x1^2y0*x1*x2y0*x2^2```<jupyter_code>q = sympy.symbols(tuple('q%d' %x for x in range(5)))
a = sympy.symbols(tuple('a%d' %x for x in range(3)))
b = sympy.symbols(tuple('b%d' %x for x in range(3)))
#z = sympy.symbols('z0 z1')

x = sympy.symbols('x0 x1 x2')
y = sympy.symbols('y0 y1 y2')
stdbrac = mv.Mv(x+y, {(x[0],y[0]):1, (x[1],y[1]):1, (x[2],y[2]):1}).brac
rmap = {
    q[0]: x[0]*y[0], 
    q[1]: x[1]*y[1],
    q[2]: x[2]*y[2],
    q[3]: x[1]*y[2],
    q[4]: x[2]*y[1],
    a[0]: x[0]*(y[1]**2),
    a[1]: x[0]*(y[1]*y[2]),
    a[2]: x[0]*(y[2]**2),
    b[0]: y[0]*(x[1]**2),
    b[1]: y[0]*(x[1]*x[2]),
    b[2]: y[0]*(x[2]**2)
}

embcoords, invariants = list(zip(*rmap.items()))
gbK = sympy.polys.groebner([ai-xi for (ai,xi) in rmap.items()])
K = [g for g in gbK if not (set(g.as_poly().gens) - set(embcoords))]
{k:(Pi1.brac(q[0], k)/k).simplify() for k in K}
{k:(Pi1.brac((q[1] - q[2])/2, k)/k).simplify() for k in K}
Km = [
    q[1]*q[2] - q[3]*q[4],
    -1*a[2]*b[0] + q[0]*q[3]**2,
    -1*a[2]*b[1] + q[0]*q[2]*q[3],
    -1*a[1]*b[0] + q[0]*q[1]*q[3],
    -1*a[2]*b[2] + q[0]*q[2]**2,
    -1*a[1]*b[1] + q[0]*q[3]*q[4],
    -1*a[0]*b[0] + q[0]*q[1]**2,
    -1*a[0]*b[1] + q[0]*q[1]*q[4],
    -1*a[1]*b[2] + q[0]*q[2]*q[4],
    -1*a[0]*b[2] + q[0]*q[4]**2,
    -1*a[1]*q[3] + a[2]*q[1],
    -1*a[0]*q[3] + a[1]*q[1],
    a[1]*q[2] - a[2]*q[4],
    a[0]*q[2] - a[1]*q[4],
    b[0]*q[2] - b[1]*q[3],
    -b[0]*q[4] + b[1]*q[1],
    b[1]*q[2] - b[2]*q[3],
    -b[1]*q[4] + b[2]*q[1],
    a[1]*b[1]*q[3] - a[2]*b[0]*q[4],
    a[0]*b[1]*q[3] - a[1]*b[0]*q[4],
    a[1]*b[2]*q[3] - a[2]*b[1]*q[4],
    a[0]*b[2]*q[3] - a[1]*b[1]*q[4],
    a[0]*a[2] - a[1]**2,
    b[0]*b[2] - b[1]**2
]
Kcoords = sympy.symbols(
    ['C'] + 
    ['MQ%d' %x for x in range(9)] + 
    ['AQ%d' %x for x in range(4)] + 
    ['BQ%d' %x for x in range(4)] +
    ['MM%d' %x for x in range(4)] + 
    ['AA%d' %x for x in range(1)] + 
    ['BB%d' %x for x in range(1)]
)
KHom = dict(zip(Kcoords, Km))
kerCoords, kerPolys = list(zip(*KHom.items()))
P = {}
for k1, k2 in product(rmap.keys(), rmap.keys()):
    if (k2, k1) not in P.keys():
        P[(k1, k2)] = stdbrac(rmap[k1],rmap[k2])
lift = emb.lift(rmap, embcoords, x+y)
Pi = mv.Mv(embcoords, P).mapCoeffs(lambda x:lift(x))
Pi.mapCoeffs(lambda x:x.simplify())
mv.sBr(Pi,Pi).sort().mapCoeffs(lambda x:x.simplify()/2) == 0
Jac = mv.sBr(Pi,Pi).sort().mapCoeffs(lambda x:x.simplify()/2)
Jac.mapCoeffs(liftK)
Pi_degs = Pi.deg()
reload(emb)
liftK = emb.lift(KHom, kerCoords, embcoords)
for c in sorted(embcoords, key=lambda x:str(x)):
    print(c,'\t',-1*mv.sBr(Pi, mv.Mv(embcoords, {():c})).sort().mapCoeffs(lambda x:x.simplify()))
for qk in K:
    print(qk,'\t',-1*mv.sBr(Pi, mv.Mv(embcoords, {():qk})).sort().mapCoeffs(liftK), end='\n\n')<jupyter_output>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word_length': 3.7726723095525996, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '223058', 'license': 'MIT', 'n_tokens_mistral': 2571, 'n_tokens_neox': 2480, 'n_words': 338, 'path': 'notebooks/poisson-embedding-211-action.ipynb', 'repo_name': 'afraenkel/schouten-calculus', 'size': '3946'}