Generate juggling diagrams and juggling braids from bounded affine permutations

Code written by Johan Asplund that accompanies the paper [ABCSCLW23]. Mathematical context and definitions of juggling diagrams, juggling braids and positroid strata are found in [ABCSCLW23]. See also [KLS13] and [CGGS21].

Input: A k-bounded affine permutation f = [a1,...,an] without the brackets.
Output: The corresponding juggling diagram, juggling braid and positroid pair.
Warning: Erroneous inputs will either silently fail or generate a nonsensical diagram.









Juggling braid 1:
Corresponding positroid pair:



Juggling braid 2:
Corresponding positroid pair:

References
[ABCSCLW23] Johan Asplund, Youngjin Bae, Orsola Capovilla-Searle, Marco Castronovo, Caitlin Leverson, and Angela Wu. Lagrangian cobordism of positroid links. 2023. [arxiv]
[CGGS21] Roger Casals, Eugene Gorsky, Mikhail Gorsky, and José Simental. Positroid links and braid varieties. 2021. [arxiv]
[KLS13] Allen Knutson, Thomas Lam, and David E. Speyer. Positroid varieties: juggling and geometry. Compos. Math., 149(10):1710–1752, 2013. [arxiv]
Generate positroid strata for complex Grassmannians
Code generating positroid strata is originally due to Marco Castronovo.
For n ≤ 4, covering relations between the positroid strata are shown.
For n ≥ 7 the program might take too long to generate strata in which case closing the page and reloading will reset it.