Opened 5 years ago
Closed 2 months ago
#23443 closed defect (fixed)
More Schubert polynomial shenanigans
Reported by:  darij  Owned by:  

Priority:  major  Milestone:  sage9.7 
Component:  combinatorics  Keywords:  schubert, polynomials, divided differences 
Cc:  tscrim, sagecombinat, aschilling, VivianePons  Merged in:  
Authors:  Darij Grinberg  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  94d9d75 (Commits, GitHub, GitLab)  Commit:  94d9d75d07444fac858d9954992ccc89e6bcb349 
Dependencies:  Stopgaps: 
Description (last modified by )
Title stolen from Stanley, but this is, alas, a bug, not a determinant conjecture:
sage: X = SchubertPolynomialRing(ZZ) sage: X([]).expand() 1 sage: X([1]).expand() 1 sage: X([]) == X([1]) False
Normally, X(perm)
reduces the permutation perm
by removing all fixed points attached to its right end (i.e., if a permutation in S_n
sends n
to n
, then it reduces it to a permutation in S_{n1}
and so on, until this reduction is no longer possible). And rightfully so, since the Schubert basis is indexed by reduced permutations.
sage: X = SchubertPolynomialRing(ZZ) sage: X([1]) X[1] sage: X([1,2]) X[1] sage: X([1,2,3]) X[1]
However, it fails to reduce [1]
to []
due to the behavior of Permutation.remove_extra_fixed_points
.
Can we just fix it, or does symmetrica break on contact with the empty list? In the latter case, should we reduce []
to [1]
instead?
Related: #23403.
Attachments (1)
Change History (21)
comment:1 Changed 5 years ago by
 Cc VivianePons added
comment:2 Changed 5 years ago by
 Description modified (diff)
comment:3 Changed 5 years ago by
The way I understand Schubert polynomials, you either deal with them in a fixed number of indeterminates (in which case the basis is indexed by S_n
), or in infinitely many indeterminates (in which case the basis is indexed by S_0 \cup S_1 \cup S_2 \cup ...
, and this is an increasing union, not a disjoint union  i.e., we identify permutations that only differ in trailing fixed points). I have never seen a situation where Schubert polynomials have a basis indexed by the *disjoint* union S_0 \sqcup S_1 \sqcup S_2 \sqcup ...
; they are not the MalvenutoReutenauer Hopf algebra. So I think the basis
method is wrong here.
comment:4 Changed 5 years ago by
By doing the tower approach, you can get a little bit of both worlds: you are considering a fixed number of variables that you can arbitrarily move between different rings (i.e., you do not have to deal with coercions between different parents). I do not have any preference on what approach is taken; I am just stating how I understand the code.
However, there are some large inconsistencies between the code parts (and possibly the doc). Those do need to be fixed. We might just be better off changing the entire class to perhaps do some slight adjustments to the permutations when sending them back and forth with symmetrica.
comment:5 Changed 4 months ago by
The attached schubert1.diff file (I can't push for some stupid security reasons) fixes two basic bugs: the X([]) shenanigans (it's X([1]) now) and the problems stemming from X([1]).expand() landing in Z[x] instead of Z[x0] (which led to the product X([1]).expand() * X([1,2]).expand() being undefined).
The basis() method still needs to be fixed.
comment:6 Changed 4 months ago by
 Branch set to public/combinat/schubert_shenanigans23443
 Commit set to 379fc130015e2b9f77a28e03c7f87312b2a7f204
 Reviewers set to Travis Scrimshaw
 Status changed from new to needs_review
Is there anything else that is needed for this ticket? If not, then you can set a positive review if I have applied your patch correctly.
New commits:
379fc13  Applying Darij's patch to better normalize permutations for Schubert polynomials.

comment:7 Changed 4 months ago by
 Milestone changed from sage8.1 to sage9.7
comment:8 Changed 4 months ago by
 Status changed from needs_review to positive_review
The basis still needs fixing (it has too many elements because it doesn't enforce the "no unnecessary fixed points at the end" rule for its permutation). But I'll open a new ticket for that.
Thanks for posting and reviewing, Travis!
comment:9 Changed 4 months ago by
Note: one can use something like
git commit author="Other Person <other.person@example.com>
to properly indicate authorship when committing someone else's code.
Or as an afterthought, git commit amend noedit author=...
.
comment:10 Changed 4 months ago by
I didn't know that. Thank you. Could you push the revision? I am away from my computer until next week.
comment:11 Changed 4 months ago by
 Commit changed from 379fc130015e2b9f77a28e03c7f87312b2a7f204 to c000c8c89ed17cde730b171ef938f0c539547478
 Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. This was a forced push. New commits:
c000c8c  Better normalize permutations for Schubert polynomials

comment:12 followup: ↓ 14 Changed 4 months ago by
 Status changed from needs_review to positive_review
Same commit, now with author Darij Grinberg.
comment:13 Changed 4 months ago by
Thank you! The wrong basis is now #33766, so this ticket can be closed once merged.
comment:14 in reply to: ↑ 12 Changed 4 months ago by
comment:15 Changed 3 months ago by
 Status changed from positive_review to needs_work
[sagemath_doc_htmlnone] [combinat ] The inventory files are in local/share/doc/sage/inventory/en/reference/combinat. [sagemath_doc_htmlnone] Error building the documentation. [sagemath_doc_htmlnone] Traceback (most recent call last): [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/runpy.py", line 196, in _run_module_as_main [sagemath_doc_htmlnone] return _run_code(code, main_globals, None, [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/runpy.py", line 86, in _run_code [sagemath_doc_htmlnone] exec(code, run_globals) [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage_docbuild/__main__.py", line 2, in <module> [sagemath_doc_htmlnone] main() [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage_docbuild/__init__.py", line 1762, in main [sagemath_doc_htmlnone] builder() [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage_docbuild/__init__.py", line 801, in _wrapper [sagemath_doc_htmlnone] getattr(DocBuilder, build_type)(self, *args, **kwds) [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage_docbuild/__init__.py", line 145, in f [sagemath_doc_htmlnone] runsphinx() [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage_docbuild/sphinxbuild.py", line 326, in runsphinx [sagemath_doc_htmlnone] sys.stderr.raise_errors() [sagemath_doc_htmlnone] File "/home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage_docbuild/sphinxbuild.py", line 262, in raise_errors [sagemath_doc_htmlnone] raise OSError(self._error) [sagemath_doc_htmlnone] OSError: /home/release/Sage/local/var/lib/sage/venvpython3.10.3/lib/python3.10/sitepackages/sage/combinat/permutation.py:docstring of sage.combinat.permutation.Permutation.remove_extra_fixed_points:6: ERROR: Unknown interpreted text role "module".
comment:16 Changed 3 months ago by
Ack, :module:
> :mod:
.
comment:17 Changed 2 months ago by
 Commit changed from c000c8c89ed17cde730b171ef938f0c539547478 to 94d9d75d07444fac858d9954992ccc89e6bcb349
comment:18 Changed 2 months ago by
 Status changed from needs_work to positive_review
I finally was able to fix this. I checked the doc builds. Since the change is trivial, I am allowing myself to reset to a positive review.
comment:19 Changed 2 months ago by
Thank you, Travis!
comment:20 Changed 2 months ago by
 Branch changed from public/combinat/schubert_shenanigans23443 to 94d9d75d07444fac858d9954992ccc89e6bcb349
 Resolution set to fixed
 Status changed from positive_review to closed
I've updated the ticket description to better describe where the error is coming from (rather than the symptom).
There does seem to be some issue with symmetrica and empty lists:
More shenanigans:
So one of the definite problems is that the indexing set could be considered too big. However, we could also consider
X
as a tower of polynomial rings, so it would make sense to distinguishX[1, 2]
fromX[1]
, etc. by considering each within a homogeneous component with a fixed number of variables.