Add affine Schubert polynomial support via length-additive affine/finite factorization#3
Draft
Copilot wants to merge 3 commits into
Draft
Add affine Schubert polynomial support via length-additive affine/finite factorization#3Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/ghseeli/combinatorialpolynomials/sessions/79368070-cceb-4b52-b735-4f771f3879fd Co-authored-by: ghseeli <3360068+ghseeli@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ghseeli/combinatorialpolynomials/sessions/79368070-cceb-4b52-b735-4f771f3879fd Co-authored-by: ghseeli <3360068+ghseeli@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add affine Schubert polynomials to combinatorial polynomials
Add affine Schubert polynomial support via length-additive affine/finite factorization
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds affine Schubert polynomials for (w \in \widetilde{S}n) using the requested decomposition formula
[
\widetilde{\mathfrak{S}}w=\sum{w=w_1w_2,\ \ell(w_1)+\ell(w_2)=\ell(w)} F{w_1},\mathfrak{S}_{w_2},
]
integrated into the existing Schubert-family module and API style.
New affine decomposition helper
additive_affine_length_decomposition(w)inschubert_polynomials.py.New user-facing affine Schubert constructor
affine_Schubert(w, base_ring=ZZ, x_pref='x', sf_basis='s').base_ring[x1,...,xn]and returns a symmetric function in the requested basis.w1.stanley_symmetric_function()(affine Stanley part),w2.Documentation updates
sf_basis='m').Original prompt
Implement affine Schubert polynomials in
ghseeli/combinatorialpolynomials.Context:
The repository already implements several Schubert-family constructions in
schubert_polynomials.py, including ordinary, double, quantum, and quantum double Schubert polynomials.The user wants affine Schubert polynomials for affine permutations
w \in \tilde{S}_n.The intended formula is:
affine_schubert(w) = sum([w1.stanley_symmetric_function()*schubert(w2) for (w1,w2) in additive_affine_length_decomposition(w)])Here
additive_affine_length_decomposition(w)means all pairs(w1, w2)such that:w1 \in \tilde{S}_nw2 \in S_nw = w1 * w2length(w1) + length(w2) = length(w)Expected behavior/design guidance:
schubert_polynomials.py, unless a clearly better repo-consistent location emerges.reduced_factorization_pairsand the existing Schubert-family functions.ZZ[x_1, ..., x_n](or a configurable base ring consistent with existing APIs).affine_Schubert(...), plus any helper needed for additive affine length decompositions.Repository context already observed:
schubert_polynomials.pycontains existing functions such asreduced_factorization_pairs,quantum_Schubert,quantum_double_Schubert, and Schubert-family helper ring classes.multi_sf.pycontainsSymFnInAlphabetsRing, which may be useful for representing symmetric functions in one alphabet with polynomial coefficients.Implementation expectations:
stanley_symmetric_function().The following is the prior conversation context from the user's chat exploration (may be truncated):
User: I want to implement affine Schubert polynomials in this library. For affine permutation w \in \tilde{S}_n, can think of them as living in symmetric functions with coefficients in ZZ[x_1,...,x_n]. The formula I want to use is affine_schubert(w) = sum([w1.stanley_symmetric_function()schubert(w2)for (w1,w2) in additive_affine_length_decomposition(w)]) and the additive affine length decompositions are all pairs w1 \in \tilde{S}_n, w2 \in S_n such that w = w1w2 and \ell(w1)+\ell(w2) = \ell(w).
Assistant: Yes — the natural place is
schubert_polynomials.py, and the implementation should mirror the existing pattern used forquantum_Schubert,quantum_double_Schubert, and the factorization helperreduced_factorization_pairs. The repo already centralizes Schubert-family constructions there, including the reduced-length factorization helper atreduced_factorization_pairsand the quantum Schubert construction based on a basis expansion.python name=schubert_polynomials.py url=https://github.com/ghseeli/combinatorialpolynomials/blob/aeb2f37199761f670a6d535d22061d3b905c27e8/schubert_polynomials.py#L393-L421 def reduced_factorization_pairs(w): r""" Given a permutation ``w``, return all pairs `(u,v)` such that `u \cdot v = w` and `\ell(u)+\ell(v) = \ell(w)`. """ w = Permutation(w) n = len(w) P = Permutations(n) red_words = w.reduced_words() pairs = [(P(w),P.identity()),(P.identity(),P(w))] for word in red_words: for s in range(len(word)): u = P.from_reduced_word(word[:s]) v = P.from_reduced_word(word[s:]) pairs.append((u,v)) return list(set(pairs))and ```python name=schubert_polynomials.py url=combinatorialpolynomials/schubert_polynomials.py
Lines 698 to 719 in aeb2f37
def quantum_Schubert(perm, base_ring=QQ, start=1):
...
schub_in_e = Schubert_in_e(perm, base_ring)
coeffs_in_e = [coeff for (coeff,supp) in schub_in_e]
d = Permutation(perm).length()
poly_in_quantum_E = sum([coeff*elm...
This pull request was created from Copilot chat.