TODO:

inject variables
parser sage tests
more script tests (parabolic?)
PARABOLIC

# HARD POSITIVE ERRORS


DIV DIFF MAYBE NILHECKERING

# infinite parabolic rings

!!PERM tests!!
SCHUB tests

Switch off best effort positive
# Quantum correctness tests
Coerce tensor rings
document

DOCS

# perm actions
# PERMUTATION CALL check

# free_symbols and sub
# sympy guardrails for GeneratingSet check


Convert poly permute monomial
Fast basis change
# Fix subs 

# Change vars breaks if not positive

Test if Poly technique is faster
Results: higher degree and/or fewer terms, poly faster

# Use symengine for everything possible

more tests

subs faster, do better with dense product

# Parabolic classical if that's what we want

# code display!!! !!!

DIFFERENT Q VARS

# refactor scripts to print as code

parallelism if useful

Permutation class functions

All polynomial funcs

# Have scripts only use basic functions

# Peterson-Woodward in basic libraries

rewrite rules to re-express

# parabolic script tests

# Single var quantum parabolic

Drawing

# Best effort positive for same var (speed?)

# Script display order = 'old'

FOCUS ON SEM basis!!!!!!!!!

Single SEM, avoids 312 and 1432
What about single EM at all, not necessarily SEM?
Div diffs on the SEMS that don't expand them
1423, 1432, 4132, 3142

Avoids 1432, and if it has a 312 then it has repeats

multiples

!!4132 = e_1_1 * 3142!!


string generation is expensive. Cache?

SEM tests

UNIVERSAL SCHUBS

Very useful to detect if reducible

If it factorizes? 

# Pull out generator

Pull out elem sym
nil hecke

more formalism around elem sym
coproduct of inverse
elem sym coproduct

when do Schub products combine

Elem sym vars

principal specialization

# Patterns kind of correspond to coproducts


coeff var coproduct can actually be expressed fully as products of normal double Schubs with coeffs

speed up single var coproduct

Make use of variable separation as a last resort to avoid linear optimization

More tests


as_independent(*deps, **hint) → tuple[Expr, Expr][source]
A mostly naive separation of a Mul or Add into arguments that are not are dependent on deps. To obtain as complete a separation of variables as possible, use a separation method first, e.g.:

separatevars() to change Mul, Add and Pow (including exp) into Mul

.expand(mul=True) to change Add or Mul into Add

.expand(log=True) to change log expr into an Add

Test separatevars before mult_poly

Element __call__ to substitute vals

pull_out_gen and eval tests
pull_out_gen for quantum

quantum elem syms

coproduct vpathdicts

cached elem sym eval

Allow zero coeff_vars/genvars

Difference algebra
Difference ideal groebner
groeber basis on (y1 - z1) ideal

Infinite gensets

We can get speed improvements by splitting into definitely linearly independent sets

Simplify elem sym (copy sympy)

Fix up single ElemSym

H missing extra variables

(TESTSTESTS)

Complete sym decomp will be useful for mul

At least splitting hom monom elements 321 231

replace pieces with hom in CEM factorization

Elem product positive suspiciously often

Change alt go to backwards
Backwards better
Hierarchy number of y variables

Symbolic quantum elem syms

graded ring functionality
degree of generators
Is this worth it?


E(1, 1, y_1, z_3)*E(1, 1, y_10, z_5) + E(1, 1, y_1, z_3)*E(1, 1, y_3, z_1) + E(1, 1, y_1, z_3)*E(1, 1, y_4, z_2) + E(1, 1, y_1, z_3)*E(1, 1, y_9, z_4) + E(1, 1, y_10, z_5)*E(1, 1, y_2, z_2) + E(1, 1, y_10, z_5)*E(1, 1, y_3, z_4) 
+ E(1, 1, y_10, z_5)*E(1, 1, y_4, z_2) + E(1, 1, y_10, z_5)*E(1, 1, y_8, z_1) + E(1, 1, y_2, z_2)*E(1, 1, y_3, z_1) + E(1, 1, y_2, z_2)*E(1, 1, y_8, z_3) + E(1, 1, y_2, z_2)*E(1, 1, y_9, z_4) + E(1, 1, y_3, z_1)*E(1, 1, y_3, z_4) 
+ E(1, 1, y_3, z_1)*E(1, 1, y_4, z_3) + E(1, 1, y_3, z_4)*E(1, 1, y_4, z_2) + E(1, 1, y_3, z_4)*E(1, 1, y_8, z_3) + E(1, 1, y_4, z_2)*E(1, 1, y_4, z_3) + E(1, 1, y_4, z_2)*E(1, 1, y_8, z_1) + E(1, 1, y_4, z_2)*E(1, 1, y_9, z_4) 
+ E(1, 1, y_8, z_1)*E(1, 1, y_8, z_3) + E(1, 1, y_8, z_1)*E(1, 1, y_9, z_4) - E(1, 1, y_10, z_5)*E(1, 1, y_8, z_2) - E(1, 1, y_3, z_1)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_2)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_2)*E(1, 1, y_9, z_4) 
+ E(2, 2, y_1, y_8, z_3) + E(2, 2, y_2, y_4, z_2) + E(2, 2, y_3, y_8, z_1) + E(2, 2, y_3, y_9, z_4)

- E(1, 1, y_10, z_5)*E(1, 1, y_8, z_2) - E(1, 1, y_3, z_1)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_2)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_2)*E(1, 1, y_9, z_4)
=
- E(1, 1, y_10, z_5)*E(1, 1, y_8, z_2)  - E(1, 1, y_8, z_2)*E(1, 1, y_9, z_4)      |    - E(1, 1, y_3, z_1)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_2)*E(1, 1, y_8, z_3) 
switch left 1
- E(1, 1, y_10, z_4)*E(1, 1, y_8, z_2)  - E(1, 1, y_8, z_2)*E(1, 1, y_9, z_5)      |    - E(1, 1, y_3, z_1)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_2)*E(1, 1, y_8, z_3) 
switch right 1
- E(1, 1, y_10, z_5)*E(1, 1, y_8, z_2)  - E(1, 1, y_8, z_2)*E(1, 1, y_9, z_4)      |    - E(1, 1, y_3, z_2)*E(1, 1, y_8, z_3) - E(1, 1, y_8, z_1)*E(1, 1, y_8, z_3) 

or is this more of a quotient ring problem?

classical elementary monomials form a basis no z

single schub in CEM

This is by definition not positive, but the monomial EMs are
Monomial ems canonical, no, but there might be a canonical positive em form
pulling out the variable. Combinatorial, decidedly not canonical
Is there a canonical one? If it is positive, there is a positive final EM form
But is there a canonical one?
Can we do it by manually pulling out a variable?
Monomial mul, positive
2 div diff, 0 out, 1 positive
The way the 0 out works is path by path?
May have to manually posify the div diff if can't do it abstractly?
If the 1 is always positive if we posify from the right
We've had a problem with this commuting pull out var map
Is the pull out var map positive for all positive? We have to dry
Make schub pull out gen backwards seems to be positive

(y_5 - z_5)*(y_5 - z_6)

not quite but start from the dominant

pull out var simulates the div diff?

pull out gen, inverse linear div diff
in CEM basis pull out gen?

relation, dominate up, div down

pos v -> coeffpv
|           |
v     -> coeffv
|           |
dom v -> coeffdv

dom v -> coeff dom v
| ddx
pos v -> coeff v

same as backwards pull out var
backwards pull out var as linear tensor map
div diff on beginning, skew on end

DSx(~Permutation([3,2,5,1,4]),"z")*(x_4-z_5) = 
DSx((4, 2, 1, 6, 3, 5), z) - DSx((4, 2, 5, 1, 3), z) - DSx((4, 5, 1, 2, 3), z) - DSx((5, 2, 1, 4, 3), z)

>>> poing = DSx((4, 2, 1, 6, 3, 5), z).pull_out_gen(x_1)
>>> poing
(x_1 - z_1)*(x_1 - z_2)*(x_1 - z_3)*(x_1 - z_5)*DS(x\x_1)((2, 1, 4, 3), z) + (x_1 - z_1)*(x_1 - z_2)*(x_1 - z_3)*DS(x\x_1)((2, 1, 5, 3, 4), z)


(x_1 - z_5)

(x_1 - z_1)*(x_1 - z_2)*(x_1 - z_3)*DS(x\x_1)((2, 1, 4, 3), z) + (x_1 - z_1)*(x_1 - z_2)*(x_1 - z_3)*DS(x\x_1)((2, 1, 5, 3, 4), z)

OK back to canonical positive


E(1, a_k, b_k) + E(k-1, a_1, ..., a_k-1, b_1,...,b_k-1) = E(k,a_1,...,a_k,b_1,...b_k)

E(1,a_k,b)E(k-1,a_1,...,a_{k-1},b) = E(k,a_1,...,a_k,b) 

hey coproduct tensorwize on the missing vars

pull out var might work but issue with the extra hanging vars

schubert division

good mul elem sym rep
pos elem sym rep

E(1, 1, x_1, y_3)*(E(1, 1, x_1, y_1)*E(2, 3, x_1, x_2, x_3, y_1, y_2) - E(3, 3, x_1, x_2, x_3, y_1))
>>> DSx([4,1,3,2]).positive_elem_sym_rep_backward()

E(1, 1, x_1, y_3)*(E(1, 1, x_1, y_1)*E(2, 3, x_1, x_2, x_3, y_1, y_2) - E(3, 3, x_1, x_2, x_3, y_1))
E(1, 1, x_1, y_3)*(E(2, 2, x_1, x_2, y_1)*E(1, 1, x_1, y_2) + E(2, 2, x_1, x_3, y_2)*E(1, 1, x_1, y_1))

E(1, 1, x_1, y_3)*(E(1, 1, x_1, y_1)*(E(2, 2, x_1, x_3, y_2) + E(1,1,x_1,y_2)E(1,2,) + E() - E(3, 3, x_1, x_2, x_3, y_1))
E(1, 1, x_1, y_3)*(E(1, 1, x_1, y_1)*E(2, 2, x_1, x_3, y_2) + E(2, 2, x_1, x_2, y_1)*E(1, 1, x_1, y_2) )


E(1, 1, x_1, y_3)*(E(1, 1, x_1, y_1)*(E(2, 2, x_2, x_3, y_1) + E(1, 1, x_2, y_1)*E(1, 1, x_1,y_2) -E(3, 3, x_1, x_2, x_3, y_1))
E(1, 1, x_1, y_3)*(E(1, 1, x_1, y_1)*E(2, 2, x_1, x_3, y_2) + E(2, 2, x_1, x_2, y_1)*E(1, 1, x_1, y_2) )


E(3,3,x_1,x_2,x_3,y_1)

transformation rules

E(1, 1, y_4, z_3)*(E(1, 1, y_4, z_1)*E(1, 2, y_1, y_4, z_1, z_2) - E(2, 2, y_1, y_4, z_1))

E(1, 1, y_4, z_3)*(E(1, 1, y_4, z_1)*(E(1, 1, y_1,z_1)+E(1,1,y_4, z_2)) - E(2, 2, y_1, y_4, z_1))


CEM and backwards related
CEM to backwards pos cancelation rules


E(1, 1, x_1, y_3)*E(1, 1, x_1, y_1)*E(2, 3, x_1, x_2, x_3, y_1, y_2) - E(1, 1, x_1, y_3)*E(3, 3, x_1, x_2, x_3, y_1))
E(1, 1, x_1, y_3)*E(2, 2, x_1, x_2, y_1)*E(1, 1, x_1, y_2) +           E(1, 1, x_1, y_3)*E(2, 2, x_1, x_3, y_2)*E(1, 1, x_1, y_1))


E(1, 2, y_3, y_4, y_1, y_2)*(E(1, 1, y_3, y_1) + E(1, 1, y_4, y_3)) - E(2, 2, y_3, y_4, y_1)
E(1, 1, y_3, y_1) + E(1, 1, y_4, y_2))*E(1, 1, y_4, y_3) + E(1, 1, y_3, y_1)*E(1, 1, y_3, y_2)


(E(2, 3, z_1, z_3, z_4, y_1, y_2)*(E(1, 1, z_3, y_1) + E(1, 1, z_4, y_3)) - E(3, 3, z_1, z_3, z_4, y_1)
E(1, 1, z_4, y_3)*(E(1, 1, z_4, y_2)*E(1, 1, z_1, y_1) + E(2, 2, z_1, z_3, y_1)) + E(2, 2, z_1, z_3, y_1)*E(1, 1, z_3, y_2) + E(2, 2, z_3, z_4, y_2)*E(1, 1, z_3, y_1) + E(2, 2, z_3, z_4, y_2)*E(1, 1, z_4, y_3))

(-E(1, 1, z_3, y_3)*E(2, 2, z_3, z_4, y_1) + E(1, 1, z_3, y_1)*E(1, 2, z_3, z_4, y_1, y_2)*E(1, 1, z_3, y_3), 
E(1, 1, z_3, y_1)*E(1, 1, z_3, y_3)*E(1, 1, z_3, y_2))

E(1, 1, z_3, y_1)*E(1, 1, z_3, y_3) - E(1, 1, z_4, y_3)*E(1, 1, z_1, y_1) + E(1, 2, z_1, z_4, y_1, y_2)*(E(1, 1, z_3, y_1) + E(1, 1, z_4, y_3))
SEMs instead of cEM

SEM straightening

CEM for pos mul then subs

A = expand((DSx([],"z",elem_sym=True)*(DSx([4,1,3,5,2],"a").positive_elem_sym_rep_backward()).in_CEM_basis())
B = DSx([3,4,1,5,2],elem_sym=True)*A
C = B.ring.from_dict({k: v.subs({a[i]: z[i] for i in range(20)}) for k,v in B.items() if expand(v,func=True)!=S.Zero})

straightening winkel

interpolate


Elem sym rings straighten canonical form
question what to do with squares

elem sym rings

lex transform algorithm

greedy algo
subtract off compute pos simply faster schubert poly reexpress

groeb

fast schub creation solving

elem sym q shifting

generates its own q_vars?

elem sym not quite work


more tests

parabolic as polynomial is slow

quantum correctness verification

graded module monk

fomin-kirillov
Zero out then schubify? Same expression?
Any extra mul terms cut

Quantum Dunkl -> Commuting difference operators classical Dunkl -> constant term, invertible, identical tau rep

(y_2 - z_1)*(y_3 - z_1)*QDSx([1, 1], y) + (y_2 - z_1)*QDSx([1, 2], y) + QDSx([2, 2], y) reduced tau rep

skip terms that produce a q
simplify FK remove terms identically zero

If we can reduce in lower algebra, good to go

Eigenvalues
char poly
eigenvectors