Skip to content

Glyphs ​

Pictorial representations of combinatorial values. A value draws as the Show of its frame layer by default: Permutation([3, 1, 2]) is Show(StrandDiagram(Permutation([3, 1, 2]))). The examples below write those Shows out, sized to the line.

A frame's parts are addresses that rules color and a click picks, so every layer takes ColorRules, BoundaryStyle and Selection:

valueslayeraddresspropertiespartsrelations to the pick
Permutation, SetPartition, DiagramStrandDiagram(slot, level)In, Out, Through, Cap, Cup, Loop, CrossingSlot, Level, Block, ImageSameBlock, Crosses, Adjacent
IntegerPartition, StandardTableau, Composition, SubsetCellDiagram(row, column)Filled, Corner, InFirstRow, InFirstColumn, EntryRow, Column, Content, Hook, Arm, Leg, Entry, PartSameRow, SameColumn, SameContent, Hook, Adjacent
PlaneTree, BinaryTreeTreeDiagram(depth, order)Leaf, Root, InternalDepth, Order, Children, SubtreeSizeAncestor, Descendant, Subtree, Sibling, Adjacent
DyckPath, LatticePathPathDiagram(step, height) or (x, y)Peak, Valley, Return, Up, Down; East, North, CornerStep, Height, X, AreaSameHeight, SameColumn, Adjacent, Tunnel
polytopesPolytopeFaces(dimension, index)Vertex, Edge, Ridge, Facet, Interior, TopDimension, VertexCount, Valence, Index, DepthFaceOf, Cofaces, Incident, Adjacent, SameDimension

A polytope is no glyph, but the same kind of frame: its layer sits under a camera instead of a fixed view.

A picture's default look themes from --notatio-accent / --notatio-border / --notatio-fg.

The vocabulary ​

Values as pictures ​

Permutation strand diagram

Slot i on the in row is joined to slot image[i] on the out row — the one-line word 3 1 2. It is a Show of a StrandDiagram; the true bracketed matrix is MatrixForm, a TeX representation still to come.

source · editable

Subset with an explicit ground-set size

n sets how many cells to draw; members are filled (Filled), the rest are cells too. Without it, n defaults to the largest member. A CellDiagram of Subset([1, 3], 6).

source · editable

Young tableau (from a partition shape)

The Ferrers shape of the partition, its cells numbered 1…n in reading order — the superstandard filling, always a valid standard Young tableau (rows increase rightward, columns downward). A CellDiagram of StandardTableau; each cell's Entry is its number.

source · editable

Set partition (restricted-growth string)

value[i] is the block of element i+1 (a restricted-growth string). Each block draws as a pill (a chain of joined slots) over its elements — [0,0,1,0,2] is {1,2,4} {3} {5}.

source · editable

Lattice path (east/north step word)

A monotone staircase of unit steps east (0) and north (1) across the grid it spans; counts C(a+b, a). A PathDiagram of LatticePath: its points are the addresses (x, y), its steps the links.

source · editable

Binary tree (preorder shape word)

1 is an internal node (always two children), 0 a leaf, listed in preorder. A TreeDiagram of its tidy layout: leaves take sequential x, each internal node sits over the mean of its children, and a node's address is its (depth, order). The five shapes of size 3 (Catalan again):

source · editable

Plane tree (preorder child-count word)

tree reads each entry as that node's number of children, so any rooted ordered tree draws: here a root with three children, the middle one a cherry, the last a chain.

source · editable

Click a figure ​

Written as a Show, a cell, tree or path figure is picked and styled the way a lattice's tiles are: a click selects an address (shift-click adds more), and a rule's test reads the pick through a relation. CellDiagram, TreeDiagram and PathDiagram are the layers; with no rules they draw the look of the figure they stand for. Their data is an IntegerPartition, StandardTableau, Composition, Subset, PlaneTree, BinaryTree, DyckPath or LatticePath. Cell addresses count from 1; tree and path addresses from 0.

Click a cell: its hook

Hook(Selected) lights the cell and the cells right of it and below it; the tooltip gives its hook length. Corner marks the removable cells.

source
<Show Variables="[_s -> Variable(Automatic, [])]" Selection="_s" ImageSize="[Automatic, 200]">
  <CellDiagram
    ColorRules="[Selected -> Gold, Hook(Selected) -> Red, Corner -> Green, Filled -> Opacity(0.2, Gray)]"
    BoundaryStyle="[
      Hook(Selected) -> Directive(Red, AbsoluteThickness(2)),
      True -> Directive(Gray, AbsoluteThickness(1))
    ]"
  >
    <IntegerPartition>
      <ToExpression value="[5, 3, 3, 1]" />
    </IntegerPartition>
  </CellDiagram>
</Show>

Click a node: its subtree

Subtree(Selected) is the picked node and everything under it; Ancestor(Selected) the nodes above.

source
<Show Variables="[_s -> Variable(Automatic, [])]" Selection="_s" ImageSize="[Automatic, 200]">
  <TreeDiagram
    ColorRules="[
      Selected -> Gold,
      Subtree(Selected) -> Orange,
      Ancestor(Selected) -> Gray,
      Leaf -> Opacity(0.5, Teal),
      True -> Opacity(0.16, Teal)
    ]"
  >
    <PlaneTree>
      <ToExpression value="[3, 0, 2, 0, 2, 0, 0, 1, 2, 0, 0]" />
    </PlaneTree>
  </TreeDiagram>
</Show>

Click a point: its height and tunnel

SameHeight(Selected) lights the points level with the pick; Tunnel(Selected) the ends of the matching up and down steps of the step arriving there. Peaks are gold, valleys teal.

source
<Show Variables="[_s -> Variable(Automatic, [])]" Selection="_s" ImageSize="[Automatic, 150]">
  <PathDiagram
    ColorRules="[
      Selected -> White,
      Tunnel(Selected) -> Red,
      SameHeight(Selected) -> Orange,
      Peak -> Gold,
      Valley -> Teal,
      True -> Gray
    ]"
  >
    <DyckPath>
      <ToExpression value="[1, 1, 0, 1, 1, 0, 0, 1, 0, 0]" />
    </DyckPath>
  </PathDiagram>
</Show>