A curated record of the collaborative design, debugging, and mathematical implementation process behind the Young Diagram² Calculator website.
WebsiteYoung Diagram² Calculator
Main filedouble_young_diagram.html
Assistant versionGPT-5.5 Thinking
Document dateMay 6, 2026
Young diagramsLie theorySchubert calculusBrowser-side mathHuman–AI collaboration
Project summary
The project began as a request for a second webpage, parallel to an existing single Young diagram calculator, but with two drawable Young diagrams. The goal grew into a compact research-oriented calculator for operations involving two partitions: tensor products, Littlewood–Richardson style decompositions, finite-rank Lie algebra representations, Kostka tableaux, Kronecker coefficients, plethysm, Schur functors, and Grassmannian cup products.
The development style was iterative. The user repeatedly tested the generated webpage, pointed out mathematical or interface issues, and asked for targeted changes. The assistant generated updated versions of the HTML while preserving the shared stylesheet css/site.css whenever possible.
Important principle: later revisions were intentionally based on the user’s latest satisfactory HTML file, rather than rebuilding the whole document from scratch. This kept previous good features intact.
Chronology of the discussion
1
Initial second-page concept
The user asked for a new page named double_young_diagram with two Young diagram canvases, basic statistics, export, and additional mathematical cards. The first implementation reused css/site.css and created a standalone two-diagram webpage.
2
Canvas layout refinement
The two diagrams were moved into one canvas panel with two grids separated by small padding. Rows and columns were unified, defaulting to a 5×5 grid. The Lie type/rank selector was moved into the canvas heading.
3
Card simplification
Unfinished cards such as the initial fixed-rank coefficient and weight-space cards were removed. The Schur card was renamed and restyled as a Littlewood–Richardson decomposition card in the compact output style of the existing website.
4
Responsive behavior
The user wanted diagram λ and diagram μ to remain horizontally aligned even on small screens. The layout was changed so the two grids shrink rather than stack. The diagram input card also became draggable in the small-screen card stack.
5
Fixed-rank tensor product debate
The fixed-rank Lie algebra tensor product went through several revisions. A naive truncation idea was rejected. The user emphasized that SageMath computes representation tensor products using actual Lie algebra representation algorithms, not Young diagram truncation.
6
From Sage scripts to browser output
A temporary version generated SageMath code, but the user wanted the answer directly in the page. The implementation moved toward browser-side Weyl-character-style computations, then away from overly expensive Kostant partition routines.
7
Algorithmic bottlenecks found
The user noticed timeouts even for small examples such as D₆ with λ=μ=(1). The discussion identified the problem: candidate loops and coefficient subroutines were still doing unnecessary weight support or Weyl alternation work.
8
Freudenthal and Brauer–Klimyk
The fixed-rank tensor product engine was rebuilt around Freudenthal character generation for the smaller factor and Brauer–Klimyk / Racah–Speiser straightening. This removed the old Kostant partition recursion from the tensor product path.
9
Candidate range by invariant norm
The user proposed enumerating dominant weights γ satisfying ‖γ‖≤‖λ‖+‖μ‖. This became the fixed-rank candidate source, with a dimension check used as a completeness guard.
10
Lazy cards and exports
All cards were made collapsed by default, and calculations were changed so they do not run while the corresponding card is collapsed. Export buttons write results to the single Export card textarea instead of forcing a download.
11
New invariant and tableau cards
A Lie algebra invariants card was added, then a separate Kostka tableaux card was created to list all semistandard Young tableaux of shape λ and weight μ.
12
Kronecker, plethysm, and Schur functor
Cards for Kronecker decomposition and plethysm decomposition were added. A Schur functor card was then refined so that it respects the selected Dynkin type and decomposes the finite-type result as a sum of irreducibles V^γ.
13
Grassmannian cup product
A Grassmannian cup product card was inserted before Export. It computes σλ∪σμ in Gr(r,n), with r equal to the grid rows and n−r equal to the grid columns. It supports Young diagram output and a Chern-class polynomial mode.
14
Visual polish
The grids were softened: heavy black borders were removed, cells became slightly smaller, padding was reduced for large grids, and the click behavior was restored so clicking a filled square removes the southeast rectangle.
15
Final identity and citation
The title became Young Diagram² Calculator, the subtitle became “double diagrams · double interactions,” the computation cap increased to 25 boxes, and the default Export text became a BibTeX template.
Final website features
Drawing and layout
Two Young diagrams λ and μ in one canvas panel.
Unified grid size, default 5×5.
Both diagrams stay horizontally aligned on small screens.
Every computational card follows the same interaction pattern: the card is collapsed by default, the user opens it, presses compute, sees a scrollable decomposition-style output, and may press export to place a text version into the Export card.
Mathematical and computational algorithms
Feature
Algorithmic idea
Implementation note
Stable type A LR
Littlewood–Richardson tableaux / coefficients.
Enumerate target partitions ν and compute cνλμ.
Stable B/C/D
Stable Newell–Littlewood-style coefficient.
Uses auxiliary partitions α,β,γ and LR coefficients.
Fixed-rank tensor products
Dominant norm-bound candidates plus Freudenthal characters and Brauer–Klimyk straightening.
Dimension check guards completeness.
Weyl dimensions
Weyl dimension formula using positive coroots.
Fractions are reduced to integers before display.
Kostka tableaux
Backtracking enumeration of semistandard Young tableaux.
Lists the tableaux, not only the count.
Kronecker coefficients
Symmetric group characters via Murnaghan–Nakayama.
Uses character inner products over conjugacy classes.
Plethysm
Power-sum expansion of Schur plethysm.
Browser cap prevents runaway expansions.
Schur functor
Finite-type character of Vλ, Adams operations, then highest-weight peeling.
Output is expressed as irreducibles Vγ for the selected Dynkin type.
Grassmannian cup product
Schubert product by LR coefficients inside an r×(n−r) rectangle.
Presentation can be Young diagrams or Chern-class polynomial via Giambelli determinants.
Core fixed-rank pattern
The most important algorithmic improvement was to avoid repeated Weyl-group alternation and instead follow the character approach used in computer algebra systems:
character = irreducibleCharacterFreudenthal(smallerFactor)
for each weight η with multiplicity m in character:
γ = shiftedWeylStraighten(largerFactor + η)
if γ is dominant and nonsingular:
coefficient[γ] += sign * m
This is paired with a candidate enumeration by invariant norm:
One shared stylesheet: the project reused css/site.css to stay visually aligned with the existing site.
Page-local styles: special layout rules for the two-diagram page were kept inside the HTML to avoid disturbing the original single-diagram calculator.
Collapsed cards: all cards start collapsed to keep the page fast and scalable as more cards are added.
Lazy computation: a card computes only when the user opens it or presses its compute button.
Consistent outputs: decomposition cards use the same formula line, multiplicity column, mini diagram, partition label, and export behavior.
Touch-friendly drag: pointer-based card dragging was used instead of relying only on desktop drag events.
Soft grid style: black borders were replaced by lighter strokes and adaptive padding.
Corrections and lessons learned
Several early versions were mathematically or computationally unsatisfactory. These corrections are a useful record for future projects.
Do not fake fixed rank by truncation. The finite-rank Lie algebra tensor product must be computed in the representation ring.
Do not enumerate full product weight supports unnecessarily. For higher rank, pairwise support sums become expensive.
Do not rely on Kostant partition recursion for every tensor coefficient. The recursion can explode for exceptional types.
Use Freudenthal character generation and Brauer–Klimyk straightening. This is closer to the efficient strategy used by systems such as SageMath.
Use dimension checks. When candidate generation is heuristic or bounded, comparing dimensions reveals missing summands.
Base edits on the latest satisfactory file. Rewriting from scratch can accidentally delete good features.
Separate independent mathematics into separate cards. For example, Kostka tableaux are independent of Dynkin type and therefore belong in their own card.
How to make a similar website
Start with a stable visual grammar. Define the card style, canvas style, button style, and export pattern first.
Represent partitions simply. Store a Young diagram as a non-increasing array of row lengths, such as [3,2,1].
Separate UI state from mathematical functions. Canvas drawing, card state, and computation routines should not be tangled.
Add one card at a time. Give each card a title, compute button, export button, output div, and a small hint.
Make calculations lazy. Do not compute while cards are collapsed.
Use caps and warnings. Browser-side exact combinatorics can become large very quickly.
Give mathematical outputs in a familiar visual form. Use formula lines and miniature diagrams, not raw arrays only.
Export plain text. Let users copy or download results from one shared Export card.
Keep a process document. Record what failed, what was corrected, and what algorithms were ultimately used.
This website was developed through a conversation between the user and ChatGPT. The assistant version recorded for this production document is GPT-5.5 Thinking.
The final site links back to the single Young diagram calculator:
<footer>
One applet built with p5.js, with help from ChatGPT.
The single Young diagram calculator is
<a href="https://ramified.github.io/web/database/young_diagrams.html">here</a>.
</footer>
The default export textbox in the final website contains a BibTeX template so users can cite the applet. The author name, canonical URL, release date, and version number can be edited later.