How this calculation works
Compute a type-A Schubert polynomial from a permutation using exact divided differences and an explicit zero-based permutation convention.
Sw 0=x1^(n−1)x2^(n−2)…; ∂i f=(f−si f)/(xi−x(i+1)); Sw=∂i Swsi when w has an ascent at i.A worked example
For zero-based permutation(2,0,3,1), corresponding to(3,1,4,2), the polynomial is x1²x2+x1²x3, homogeneous of degree 3.
Good to know
Permutations of size 1–6, exact integer multivariate coefficients, at most 5000 terms per computed polynomial. Type-A ordinary Schubert convention, not double, quantum or Grothendieck polynomials.
Reference: SageMath: Schubert polynomials (opens in a new tab) ↗
A polynomial attached to a permutation
Schubert polynomials encode combinatorial and geometric information associated with permutations. They form a distinguished polynomial basis, but they are generally not symmetric in all variables. Replacing the requested permutation by its cycle type would therefore discard information needed to determine the answer.
This calculator uses ordinary type-A Schubert polynomials. It does not compute a Schur-function product, even though special permutations lead to related symmetric functions. The entered one-line permutation and the divided-difference normalization define the specific polynomial being returned.
Compare this with the Schur function product calculator with Littlewood Richardson coefficients. Compute a type-A Schubert polynomial via divided differences, rather than products of symmetric Schur functions.
Reading the permutation correctly
Enter each zero-based label exactly once. The row two-zero-three-one corresponds to the usual one-based row three-one-four-two. These are two representations of the same permutation; they are not different orderings obtained by subtracting one from positions or rearranging cycles.
The input is one-line notation, not cycle notation. A row can have fixed points, and appending the next fixed label is compatible with the stable Schubert convention. Within the supported size bound, preserving label order is essential because adjacent descents determine the divided-difference recursion.
The default polynomial and its degree
For the default permutation, the output is x1 squared times x2 plus x1 squared times x3. Both monomials have total degree three. Counting inversions in the corresponding one-line permutation also gives three, providing an independent degree check on the exact result.
A coefficient row lists one exponent per variable followed by its integer coefficient. Thus the exponent vectors two-one-zero-zero and two-zero-one-zero identify the two default monomials. The trailing zero exponent does not mean that a variable is missing from the representation; it simply has power zero in that term.
Starting from the longest permutation
The longest permutation reverses all labels and has the maximal inversion count. Its Schubert polynomial is the staircase monomial x1 to power n minus one, x2 to power n minus two and so on. That finite formula supplies the recursion's explicit starting point.
For another permutation, the algorithm chooses an adjacent ascent and swaps it to move toward the longest element. It recursively obtains the higher-length polynomial, then applies the corresponding divided difference. Memoization reuses intermediate permutations rather than recomputing their polynomials from scratch each time.
Why division remains polynomial
The divided difference subtracts a polynomial from the same polynomial with two adjacent variables exchanged. Their difference is divisible by the difference of those variables. On a monomial, this quotient can be expanded as a finite sum of integer-coefficient monomials without numeric division.
The implementation performs that exact monomial transformation. Equal terms are combined using arbitrary-precision integers and zero coefficients are removed. It does not evaluate variables at nearby floating values, so cancellation in a numerical difference quotient cannot erase an exact coefficient.
Comparing conventions and related bases
Some references index variables from zero, while the displayed mathematics here calls them x1, x2 and onward. The exponent array follows input variable order, so the first slot always refers to the first variable regardless of how another package names it.
Double Schubert polynomials introduce a second variable family, and Grothendieck polynomials use a different recursion associated with K-theory. Those objects should not be compared coefficient-for-coefficient with this ordinary version. Match the polynomial family before interpreting a mismatch as an error in a divided difference. Here no second variable family is created by the permutation input.
Structural checks before reuse
The identity permutation should produce the constant polynomial one. The longest permutation should produce the staircase monomial, and every returned term should have degree equal to inversion length. Independent symbolic divided differences using a different ascent order should agree with the same final result.
These checks validate the finite type-A computation but do not interpret a particular polynomial as a complete intersection-theoretic calculation on its own. If it is used in a geometric application, keep the permutation, variable convention and polynomial family attached to the exported exact coefficients.
A few questions, answered
Is the input in cycle notation?
No. It is zero-based one-line notation using every label exactly once.
Is the polynomial symmetric?
Not generally. Ordinary Schubert polynomials depend on the full permutation, not just its cycle type.
Why are coefficients exact?
Divided differences are applied directly to integer monomials and combined using arbitrary-precision integers.
Does this return a double Schubert polynomial?
No. It uses one variable family and the ordinary type-A convention.