Repository navigation
Speculative Polytopes
Speculative. A proposal, not adopted.
The catalogue files five polytopes (Permutahedron, Simplex, CrossPolytope, Associahedron, Cyclohedron) as collections with no kernel, and @notatio/polytope declares no compute-engine heads, so none of them can be evaluated. A polytope is a value, not a collection: it has vertices, faces and an f-vector. The package is also faces-first, with no vertex coordinates exposed and no cyclohedron. This page establishes what exists, decides what a polytope is here, and lays out the work, including the three items the Ideas page names: the cyclohedron's unrank, the vertex-only families (hypersimplex, Birkhoff, type-B permutahedron) and overlaying several polytopes.
"Measured" means read or counted from the tree at origin/main, commit bfa63e225, with path:line; counts are ones I computed from files or from short Python (Fubini and Delannoy numbers, binomials). Nothing was built, run or tested: no node_modules exist, so a statement about what code "does" is a reading, said so where it matters. "From memory, not checked" marks mathematics or other systems' behavior stated without a source in the tree. "Assumed" means reasoned, not read.
Take option C of §1. A polytope is a value built by a constructor head (Permutahedron(n), Hypersimplex(n, k), …); its vertex set is a collection, Vertices(P), whose order is the induced order of an existing combinatorial collection through a stated bijection; its face lattice is a poset once the Poset carrier lands. Records for the constructors are value records, like HypercubeGraph, not grades records. The five misfiled records stay at their names, so no permalink moves.
-
Slice 1 (data and declare). Refile the five records, add
Hypercube, declare the five existing constructors and the accessorsDimension,Vertices,VertexCount,FVector. Vertex orders come only from collections whose order is already declared (SymmetricGroup/Permutations,KSubsets,SignedPermutations,BinaryTrees). -
Slice 2 (vertex-only families).
Hypersimplex,BirkhoffPolytope, and the type-B permutahedron, with vertices and coordinates only; faces and f-vectors decline until a facet description (H-representation) is supplied. -
Slice 3 (cyclohedron). Vertices and faces, after
Dissectionshas a decided order. -
Later. Face lattice as
Poset, skeleton graph, shared-projection overlay.
The geometry is ours, not compute-engine's: neither Wolfram nor mpmath has these families (§1), so there is no upstream-candidate argument; they belong in the combinatorics layer, with the drawing in notatio.
The package. @notatio/polytope is packages/symbols/combinatorics/polytope: 9 source files, 2 test files, README.md, one doc page (docs/polytope.md). package.json:3 says "Polytopes as face posets"; enumeratio.layer is extension, extends is [] (package.json:38-43); its one dependency is @notatio/engine (package.json:23-25). README.md:3-6 says it "declares no CE heads" and is "a data layer".
Representation. A polytope is a TypeScript Polytope record (src/face.ts:15-43) with enumerate(n) (every face, "in the collection's own order"), dimension(face), point(face) (barycenter), hasVertex(big, vertex), derived contains, and dimensionAt(n). A face is a readonly number[] (face.ts:13). Vertices are the dimension-0 faces (face.ts:50); there is no vertex-coordinate accessor and no stored coordinate list. point is "up to one fixed positive scale shared by every face" (face.ts:23-32).
Which polytopes (src/index.ts:42-48; face word in parentheses):
| Constructor | Face carrier | Dimension at n | Source |
|---|---|---|---|
Permutahedron(n) |
set compositions, as label words | n−1 | permutahedron.ts:52-64 |
Simplex(n) |
nonempty subsets, 0/1 words | n−1 | simplex.ts:21-31 |
CrossPolytope(n) |
signed subsets over {−1,0,+1} | n | crosspolytope.ts:33-43 |
Hypercube(n) |
same words, dual reading | n | hypercube.ts:33-44 |
Associahedron(n) |
dissections of an (n+2)-gon, 0/1 words over diagonals | n−1 | associahedron.ts:98-115 |
No cyclohedron, hypersimplex, Birkhoff or type-B permutahedron exists in the package (index.ts exports the five above and nothing else polytope-named). The legacy port page says the cyclohedron is "left" and gives its plan (the wiki's Archive-Legacy-Port, §2).
Coordinates are scaled. The permutahedron's point doubles (permutahedron.ts:7-10, 58-61: a singleton block gives 2·rank), so its vertices are 2σ, not σ. The simplex multiplies by n! (simplex.ts:28), the cross-polytope likewise (crosspolytope.ts:40). The hypercube's are exact (hypercube.ts:39-41). The associahedron's vertices are Loday's coordinates (associahedron.ts:15-19, 75-96). The scale is free for drawing because the frame normalizes it away (face.ts:27-28), but a Vertices(P) value must state or remove it.
Functions (src/index.ts:1-31): polytope, factorial, cast, scene, stratum, skeleton, spanBasis, hyperplaneBasis, centredOn, faceNormal, rotated, orientedTo, toUnitCube, ring, drawn, sameFace. There is no unrank, fVector or edges by those names; skeleton(polytope, points) derives the 1-skeleton from the poset (scene.ts:131), and tests check its length equals the 1-face count (polytopes.test.ts:93-99).
Cost. Everything starts from enumerating every face. contains filters all vertices per call (face.ts:49-58). The frontend refuses a polytope with more than MAX_FACES = 1500 faces (polytope-frame.ts:44, 86-87). Face counts are Fubini for the permutahedron (1, 1, 3, 13, 75, 541, 4683 for n = 0..6, computed), so order 5 draws (541) and order 6 (4683) does not. The enumeration is also exponential per face for the associahedron (it walks all noncrossing diagonal sets, associahedron.ts:47-62).
Tests. 10 tests in tests/permutahedron.test.ts and 11 in tests/polytopes.test.ts (counted by test( lines). They hold: Fubini counts, hexagon at n=3 and truncated octahedron at n=4, vertices are doubled permutations, barycenters lie in one hyperplane, containment is an order with the body on top, the 1-skeleton equals the 1-faces, associahedron vertex counts [1, 2, 5, 14, 42] and {0: 14, 1: 21, 2: 9, 3: 1} at n=4 with facets 3 squares + 6 pentagons, and little Schröder face totals [3, 11, 45, 197] (polytopes.test.ts:82-91); simplex, cross-polytope, hypercube counts; orientation and normal tests. None checks convexity, coordinates of a non-permutahedron against an independent source, or an f-vector against an OEIS row. Nothing is declared in compute-engine, so no test evaluates a polytope.
Where it is drawn. packages/frontend/src/polytope-frame.ts maps five head names to the POLYTOPES keys (:31-37), builds a Part per (polytope, n) (:80-114) and a Show layer (:232); PolytopeFaces is in FIGURE_HEADS (figure-frames.ts:22). The bare constructors are display symbols, not engine heads: Permutahedron(4) is Show(PolytopeFaces(Permutahedron(4))) (symbols.ts:926-940; test symbols.test.ts:174-178). The doc page docs/polytope.md carries the demos; the site redirects /playground/polytope to /docs/polytope/polytope (web/.vitepress/redirects.ts:50). The CLI has one polytope golden (cli/tests/cell-draw.test.ts:51). The marks are points, lines, polygons and, for k≥3, a Polyhedron boundary (polytope-frame.ts:249-260); the lowering goes through the Show tile canvas, not through Graphics3DBox (the Graphics3DBox code in frontend/src/graphics-3d-box.ts is the complex-plot surface path; I did not trace whether polytopes reach it).
What the records claim. Five records under packages/reference/entries/:
| Record | Lines | Carrier | Notes |
|---|---|---|---|
Associahedron |
index.md:15-19 |
Dissection |
stub: carrier, grades: n; OEIS A001003; Sage row says Sage builds the geometric polytope from a Cartan type, "ours is the combinatorial face poset" |
CrossPolytope |
index.md:15-19 |
SignedSubset |
stub: carrier; A000244 (3^n faces, "cardinality only") |
Cyclohedron |
index.md:5-10 |
Dissection |
stub: carrier; the only hand-written summary: centrally symmetric dissections |
Permutahedron |
index.md:15-19 |
SetComposition |
stub: carrier; A000670 (Fubini) |
Simplex |
index.md:5-10 |
Finset |
stub: carrier; "faces of the (n−1)-simplex — the non-empty subsets of [n]; 2ⁿ−1" |
Each has grades (n, axis), and a record with grades is a catalogued collection ("presence is the kind", packages/entry/src/types.ts:410-425). Their pages therefore say "no kernel of its own yet". The explorer golden has all five as null (no table): packages/frontend/tests/explorer.golden.json:69, 310, 332, 1279, 1724. Hypercube has no record, though a display symbol exists (symbols.ts:928); HypercubeGraph is a different thing (a graph value). PermutahedronVertex is a map record on the "map frontier", declared undefined because its image is an ordered tuple, not a finset (combinatorics/reference/PermutahedronVertex/index.md:3-8).
What is declared. The face carriers: SetComposition and SignedSubset and SignedSetComposition (set-partitions/src/carrier-data.ts:53-77), Dissection (trees/src/carrier-data.ts:26-31, shape tuple<list<integer>, integer>). Collections with kernels: SetCompositions (set-partitions/src/families/core.ts:348, Epsil unrank), SymmetricGroup (lex unrank, permutations/src/families/core.ts:101-111), SignedPermutations (Epsil count 2^n·n!, :146-160), Subsets/KSubsets (collections/src/families/core.ts:21, 32; KSubsets is lexicographic per its record summary), BinaryTrees(n) (record with a library signature), DelannoyPaths(n) (lattice-paths/src/families/paths-partitions.ts:363, count A001850). With no kernel: Dissections and SignedSubsets (stubs, stub: carrier, no signature), whose order the earlier survey calls open (Speculative-Collections-Without-Kernels §3). A Hypercube-order note there: the code walks signs 0, 1, -1 (hypercube.ts:27).
Wolfram's names (packages/wolfram/src/system-names.ts, grepped): present are Polyhedron (:5488), PolyhedronData (:5493), PolyhedronCoordinates (:5492), ConvexHullMesh (:1629), Simplex (:6351), Cube (:1748), Cuboid, Octahedron, Tetrahedron, DualPolyhedron (:2236), ConvexPolyhedronQ, HypercubeGraph (:3451), RegularPolygon. Absent: Polytope, Hypercube, Permutohedron, Permutahedron, Associahedron, Cyclohedron, Hypersimplex, Birkhoff…, CrossPolytope. So four of our five heads have no Wolfram name, and the three named families have none either. Whether Simplex takes our argument is from memory, not checked (Wolfram's Simplex is a region taking points, I believe).
Sage (from memory, not checked): polytopes.permutahedron(n), polytopes.associahedron(['A', n]), polytopes.hypersimplex(dim, k), polytopes.Birkhoff_polytope(n), polytopes.cross_polytope(dim), polytopes.hypercube(dim), each a geometric Polyhedron with vertices and facets; the records' notes agree for the permutahedron, associahedron and cross-polytope (Permutahedron/index.md, Associahedron/index.md, CrossPolytope/index.md, Sage rows). I do not know whether Sage has a cyclohedron; I think it does not.
Related pieces. Poset statistics name the order polytope and chain polytope facet counts (St000104, St000151; Speculative-Posets §3 table and :252, OrderPolytopeFacetCount, proposed, not in the tree: a grep for the name finds none). The FindStat file findstat/data/statistics.json has 13 titles mentioning a polytope (computed): order polytope (2), chain polytope, stable set polytope, edge polytope (3), Chvátal's polytope (2), Gelfand–Tsetlin polytopes (4). None is about the five families here. The existing 1-skeleton precedent is HypercubeGraph(n), declared (integer) -> value, vertex i labels bit pattern i − 1 (collections/src/graphs.ts:429-430, 775-781). A grep finds no head for the permutahedron's Cayley graph.
The AGENTS rules: a carrier is a type space; a collection is a carrier plus one stated total order; a plural head is a collection and its singular builds a member; order is first-class. A polytope fits none of "carrier" or "collection": it is not counted-and-ordered in its own right, it is an object with parts.
| A. Value with accessors | B. Collection of vertices, polytope as realization | C. Both (recommended) | |
|---|---|---|---|
Permutahedron(n) is |
a value of type polytope
|
the collection Permutations(n) plus a coordinate map |
a value; Vertices(P) is SymmetricGroup(n) read through the coordinate map |
| Vertex order | unstated unless the value carries one | the combinatorial collection's order | the combinatorial collection's order, stated per constructor |
| Faces | FaceLattice(P) |
not expressible |
FaceLattice(P), a Poset when that carrier lands |
| Fits the plural/singular ruling | yes (no plural at all) | no: names a realization with a plural | yes |
| Fits what the code does | yes (Polytope record) |
no: the code starts from faces | yes |
| Cost | order question left open | loses facets, f-vector, drawing | order question answered by construction |
B fails because a vertex set does not determine what the code carries (faces, normals, scene); also because the Associahedron record already says "ours is the combinatorial face poset", the opposite of a coordinate realization. A leaves the order question the rulings care about unanswered. C answers it: the order of Vertices(P) is not new, it is the declared order of an existing collection, so the ruling "never declare a collection whose order is not decided" holds by reuse.
Value shape. Precedent in the tree: HypercubeGraph(n) is declared (integer) -> value (graphs.ts:775-776), and the incidence package's Chain(n) and BooleanLattice(n) are held expressions over a TypeScript interface (Speculative-Posets, "What exists"). Follow that: Permutahedron(n) is a held constructor call, typed polytope, read through the Polytope interface by name. No new carrier is needed, and the carrier rule (a carrier is counted and ordered in its own right) says none should be made.
Parameter convention. The code's conventions differ by family: Permutahedron(n) and Simplex(n) have dimension n−1, CrossPolytope(n) and Hypercube(n) have dimension n, Associahedron(n) has dimension n−1 and Catalan(n) vertices (table above; tests at polytopes.test.ts:82-91). Each is the natural "n" of its vertex collection (permutations of n, n vertices, ±e_i of n axes, bit strings of n, binary trees with n internal nodes). Keep it: the argument is the parameter of the vertex collection, which is what makes C's order rule uniform. Say so on each record, because Sage's conventions differ (from memory: Sage's associahedron takes a Cartan type whose rank is the dimension; the Associahedron record notes "type A_{n-2} for our n").
Accessors. Dimension(P), Vertices(P), VertexCount(P), FVector(P) (face counts by dimension), FaceLattice(P), SkeletonGraph(P). …Count follows the naming ruling. Heads for statistics on a polytope are only declared when they have a definition and a check (§5).
Coordinates and scale. Vertices(P) returns true coordinates. The permutahedron's doubling and the n! scales (§What exists) are internal to drawing; the declared accessor divides them out, or the Polytope record gains an explicit scale so point stays exact-integer for drawing (open question 3).
Order of Vertices(P) by constructor, each tied to a declared collection:
| Polytope | Vertex collection | Order | Coordinate map |
|---|---|---|---|
Permutahedron(n) |
SymmetricGroup(n) |
lex (permutations/families/core.ts:110) |
σ ↦ (σ(1), …, σ(n)) |
Hypersimplex(n, k) |
KSubsets(n, k) |
lex (record summary) | indicator vector |
BirkhoffPolytope(n) |
SymmetricGroup(n) |
lex | permutation matrix, row-major (a convention to fix) |
| type-B permutahedron | SignedPermutations(n) |
sign mask from r div n!, lex from r mod n! (:158-160, as visible lines) |
signed one-line word |
Hypercube(n) |
Subsets(n) or bit strings |
to decide (the code's 0, 1, -1 walk, hypercube.ts:27, is not a vertex order) |
±1 per axis |
Simplex(n) |
Range(n) |
trivial | e_i |
CrossPolytope(n) |
no collection exists (±e_i) | open | ±e_i |
Associahedron(n) |
BinaryTrees(n) |
the collection's | Loday's coordinates (associahedron.ts:75-96) |
Cyclohedron(n) |
none (§2.i) | open | open |
The existing enumerate order for the permutahedron vertices is (by reading, not run) grouped by block count then lex over label words (permutahedron.ts:28-42); for n singleton blocks a label word is the one-line permutation, so it should equal lex. A test should assert that before Vertices is declared; it is not claimed here. Whether the face order in enumerate equals the SetCompositions family order is not checked; the frame's (k, index) addresses depend on the first.
Why the associahedron's vertex collection is BinaryTrees, not Dissections. The code reads a triangulation as a binary tree to get Loday's point (associahedron.ts:15-19, 75-96), and the vertex count is Catalan. BinaryTrees(n) has a decided order and a kernel; Dissections has neither. This removes the order question from the associahedron's vertex slice, at the price that the face carrier (a dissection) and the vertex collection (binary trees) are different types, linked by the triangulation bijection, which needs a test.
From memory, not checked: the cyclohedron's vertices are the centrally symmetric triangulations of a (2n+2)-gon, equivalently maximal tubings of a cycle graph; its faces are centrally symmetric dissections, equivalently tubings. The legacy port page (the wiki's Archive-Legacy-Port, §2) states the plan: faces are centrally symmetric dissections of a (2n+2)-gon (fixed points of the associahedron's half-turn), dim = (m/2 − 1) − (orbit count), faces with k orbits number C(n,k)·C(n+k,k) summing to the central Delannoy numbers (A001850), "enumerate by orbits, not by filtering", with an explicit bijection for unrank an open issue (#330 there). I checked the arithmetic: Σ C(n,k)C(n+k,k) for n = 0..6 is 1, 3, 13, 63, 321, 1683, 8989, and the top term C(2n,n) (2, 6, 20, 70, 252, 924 for n = 1..6) is the vertex count. n = 1 is a segment (2 vertices + body = 3), n = 2 a hexagon (6 + 6 + 1 = 13): consistent with dimension n in that page's n. That makes it dimension n, unlike Permutahedron(n) and Associahedron(n) (dimension n−1): a parameter-convention conflict to settle (question 4).
What exists: the record Cyclohedron (carrier Dissection, stub: carrier, §What exists); the carrier Dissection and a kernel-less Dissections; DelannoyPaths(n) with the right count (paths-partitions.ts:363, and its record says count is central Delannoy, DelannoyPaths/index.md). What does not: a cyclohedron object in the package, any order on dissections, and any bijection.
What unrank needs, in order:
- A decided order on
Dissections(the survey lists it as open): e.g. lex over the 0/1 word of diagonals. The existingenumerategroups by diagonal count (associahedron.ts:45-62), which is not lex, so the polytope's enumeration order and the collection's must be reconciled or stated apart. - The face collection as a restriction of
Dissections(2n+2)to half-turn-fixed words: a named restriction with an induced order (Restrictions: a restriction head means the induced order). The restriction table's heads are(integer) -> collectionon the same size (structures/src/restriction.ts:306), so the polygon size 2n+2 against n does not fit as declared; a restriction with a second parameter "does not fit the table" (Speculative-Collections-Without-Kernels, §What exists). Open. - A count (Delannoy, Epsil) and an unrank. A kernel-free route: unrank the induced lex order by counting completions per prefix, as
DyckPathUnrankdoes (collections/src/families/kernels-extra.ts:71, by reading). The completion count of a prefix over orbit words is not worked out here; the Delannoy-path bijection (#330) would replace it with a closed form. Neither is proven. - Proof: count equals
DelannoyPaths(n)count (A001850) for n ≤ 8; every unranked word is centrally symmetric and noncrossing; rank∘unrank is the identity; vertices are the words with n orbit diagonals.
Recommend: do vertices first (C(2n,n) of them), their order defined as the restriction's induced order, and the face collection after. A vertex-only unrank is a count of binomials, KSubsets(2n, n)'s size; the bijection to KSubsets is the part needing a proof, and I do not have it.
For each, the vertex collection exists here; faces are what "vertex-only" leaves out.
-
Hypersimplex Δ(n, k): vertices
KSubsets(n, k)(collections/src/families/core.ts:32), coordinates the 0/1 indicator; dimension n−1 for 0 < k < n; Σ x_i = k. Adjacency is the Johnson graph (two k-sets sharing k−1 elements), per the legacy page and, from memory, correct. Facet inequalities 0 ≤ x_i ≤ 1 give 2n facets for 1 < k < n−1 (from memory, not checked). -
Birkhoff polytope B_n: vertices
SymmetricGroup(n)as permutation matrices, dimension (n−1)² (from memory), n² facets for n ≥ 3 (x_ij ≥ 0, from memory). The legacy page says "transposition adjacency"; from memory the edges join σ and τ when σ⁻¹τ is a single cycle (Brualdi–Gibson), of any length, so a transposition-only graph would be wrong. Check before declaringSkeletonGraph. -
Type-B permutahedron: vertices
SignedPermutations(n)(2^n·n! of them,permutations/families/core.ts:147-153), the orbit of (1, …, n) under the hyperoctahedral group (from memory); its faces are indexed by signed set compositions, and the carrierSignedSetComposition(set-partitions/carrier-data.ts:66-70) exists; its collectionSignedSetCompositionsis kernel-less (the earlier survey, bucket c). Name: no abbreviation, so not "TypeB…"; candidatesSignedPermutahedron,HyperoctahedralPermutahedron(question 5).
What vertex-only leaves out is every face above dimension 0: FVector, FaceLattice, edges, facets, and drawing (the frame needs 2-faces). Acceptable for a first version if the accessors decline for faces rather than answer: FVector(Hypersimplex(5, 2)) stays unevaluated. A vertex-only polytope needs a different TypeScript interface from Polytope, since the current one requires enumerate of all faces (face.ts:21); split it into a vertex part (vertices, dimensionAt, coordinates) and a face part.
A way to faces without a hull. Given a facet description (the inequalities above), a face is the set of vertices tight on some set of facets, and the faces are exactly the intersections of facet vertex-sets, so the face lattice is computable from vertex-facet incidence, with no exact hull algorithm. The current code needs no hull either (docs/polytope.md:13-17), since incidence is the primitive. This requires the facet inequalities as data per family (from memory above, to be verified), and a test checking every claimed facet is tight on at least dimension-many affinely independent vertices.
How Show combines them today: all PolytopeFaces layers of a Show share one frame ("all of them, whole, in order", frontend/src/show-spec.ts:42, 150-151), faces are numbered on after earlier layers in each dimension (polytope-frame.ts:236-238), and relations do not cross polytopes (docs/polytope.md:94-98). But each polytope is centered on its own vertex centroid, projected on the leading three axes of its own span, and scaled to its own circumscribed unit sphere (polytope-frame.ts:90-93; scene.ts:70-93). So today's overlay is concentric thumbnails in one camera: no shared projection, no shared scale. That cannot show containment, duality, or a polytope inside another, which is what the legacy overlay was for (shared Gram–Schmidt over the union of vertices, Archive-Legacy-Port §2).
What the drawing side needs: an option on the frame to take one projection (a basis of the span of the union of the vertices) and one scale for all layers when they live in the same ambient space; the camera and the 3 × d ProjectionMatrix -> … override already exist (docs/polytope.md:187-192), so a shared default is a change to how the default is chosen, not a new concept. Polytopes in different ambient dimensions need a rule (embed the smaller by zero-padding, or decline). This is notatio's.
What the object side supplies: true vertex coordinates in a stated ambient space (§1, "Coordinates and scale"); without that, no shared projection can be right. Today's scaled point (the permutahedron at 2σ, the simplex at n!·e_i) would make an overlay of a permutahedron and a hypersimplex misleading, which is why the scale must be removed or stated before the overlay slice. Pairs that make sense: hypersimplex Δ(n, k) inside the hypercube; Birkhoff against the permutahedron through the Birkhoff-to-permutahedron linear map (from memory, not checked); permutahedron against the type-B permutahedron.
Refile the five. Delete grades, stub, carrier from each; write value records on the model of HypercubeGraph (signatures with library, type: (integer) -> polytope, a one-line summary, seeAlso to the vertex collection). The crosswalk rows stay: the OEIS rows are face counts (A000670 for the permutahedron, A001003 the associahedron's total faces, A000244 the cross-polytope's), which belong as notes on FVector/FaceCount rows or on the face collection's record; the Sage rows' own notes already say Sage's object is the geometric polyhedron. Kind is then "head" (value constructor), not "collection". Each record's examples become: Vertices(Permutahedron(3)) (the six permutations in lex order, coordinates (1,2,3) …), VertexCount, FVector ([24, 36, 14, 1] for the permutahedron at n=4, computed from k!·S(n,k): 24, 36, 14, 1; the associahedron [14, 21, 9, 1], polytopes.test.ts:84-86), and a boxes-shaped drawing example for the display (AGENTS.md, Reference entries). Face-count sequences carry OEIS rows from the existing records; FVector rows would hold the known tables (the permutahedron's is, from memory, A019538, not checked).
New records. Hypercube (none today), Hypersimplex, BirkhoffPolytope, and the type-B permutahedron; accessor records Dimension, Vertices, VertexCount, FVector. Dimension and Vertices are generic names: check for a collision with existing heads before declaring (not checked here).
Permalinks. The five pages exist: /reference/symbol/Associahedron, CrossPolytope, Cyclohedron, Permutahedron, Simplex (web/ledger.tsv:2074, 2495, 2549, 4311, 4880); /docs/polytope/polytope and /playground/polytope (:77, 5452); /packages/polytope (:5489). Refiling in place keeps all of them, so no redirect and no ledger change is needed. If an owner instead retires a name (e.g. renames Cyclohedron), the ledger is append-only and the redirect comes first (web/ledger.tsv:1-2). New pages are appended by the ledger test. The explorer golden's five null entries (§What exists) disappear with grades, so UPDATE_EXPLORER=1 regenerates explorer.golden.json.
Declared heads vs display symbols. Today Permutahedron(n) is a display symbol (symbols.ts:928). After declaration the engine head and the display symbol must agree: the display symbol should read the engine's held value, or the declared head and display symbol coexist on the same name. A change there touches frontend (not examined further here).
-
In reach now (by definition, counts against a table):
Dimension,VertexCount,FVector, edge and facet counts. The permutahedron's edge count n!(n−1)/2 and f-vector k!·S(n,k) (from memory, matching the computed [24, 36, 14, 1]); the associahedron's total faces are the little Schröder numbers (polytopes.test.ts:90); the hypercube's and cross-polytope's follow from 3^n words. The existing code already computes them by enumeration, so a first version declares the count heads over the same enumeration and cites the tests. - Not in reach. Volume and Ehrhart polynomials. They need exact rational linear algebra and a triangulation; the repository has no hull. Closed forms from memory, not checked: the permutahedron's normalized volume n^{n−2}; its lattice-point count the number of forests on n labeled vertices; the hypersimplex's volume an Eulerian number; the order polytope's volume the linear-extension count over n!. The Birkhoff polytope's volume and Ehrhart polynomial are not closed-form (from memory) and stay out.
-
Face lattice as a poset.
FaceLattice(P)returns aPosetonce the carrier lands; Speculative-Posets is not adopted, so for nowcontainsstays internal and a headFaceLatticedoes not exist (do not declare it before the carrier). The package's own order, containment derived from vertex incidence (face.ts:37-40, 49-58), is the model. -
1-skeleton.
SkeletonGraph(P)returns aGraphvalue numbered by the order ofVertices(P), on theHypercubeGraphprecedent (graphs.ts:429-430). The permutahedron's graph is the Cayley graph of S_n by adjacent transpositions (the legacy Element-Relations page says its edge count is n!(n−1)/2, Archive-Element-Relations §(c)); no existing head produces it. The cube's skeleton isHypercubeGraph(n), but the vertex numbering would differ unless the hypercube's vertex order is chosen to match (bit patterni − 1); decide that deliberately and test equality, not isomorphism. -
Links to other statistics. The FindStat polytope statistics (13 titles, computed) are on posets, graphs and partitions, not on these families;
OrderPolytopeFacetCountand graph polytope counts are statistics of other carriers that happen to name a polytope. They do not need a polytope value:St000104is covers + minimal + maximal (Speculative-Posets §3). Do not build anOrderPolytope(poset)constructor to serve them.
Smallest first; each names its proof.
-
Pin what exists. Add tests that hold the scale and order claims: vertex enumeration order of
PERMUTAHEDRONequals lex; vertex coordinates of each polytope divided by its scale are the true ones; f-vectors against the formulas above. Proof: the tests, and the Fubini/Schröder counts already inpolytopes.test.ts. -
Records and declares for the five plus
Hypercube. Refile, add the constructors as(integer) -> polytope, andDimension,Vertices,VertexCount,FVector. Proof:FVector(Permutahedron(4))= [24, 36, 14, 1];VertexCount(Associahedron(n))equalsCount(BinaryTrees(n));Vertices(Permutahedron(n))has the order ofSymmetricGroup(n); each vertex's coordinates sum to a constant (n(n+1)/2 for the permutahedron, k for the hypersimplex, n for the Birkhoff row sums); explorer golden regenerated. Package layering:polytopecurrently extends nothing, so declaring heads over collections needs anextendsedge and a manifest hierarchy edit (manifest/src/engine.ts:99, hierarchy test), or the heads move to combinatorics (question 6). -
Vertex-only families.
Hypersimplex,BirkhoffPolytope, the type-B permutahedron: vertices andDimensiononly; faces decline. Proof: vertex counts C(n,k), n!, 2^n·n!; coordinates satisfy the stated sums; convexity check at small n in a test: every vertex is the unique maximizer of some linear functional over the vertex set (so each is extreme), and the affine rank of the vertices equals the stated dimension. That is exact on integers and needs no hull. Facets from the H-description (question 7) come after. -
Skeleton graph.
SkeletonGraphfor the five existing and the vertex-only ones where the adjacency is proven; the Birkhoff adjacency (single cycle) is checked against the incidence of faces for n ≤ 4 before declaring. Proof: the permutahedron's graph is regular of degree n−1 on n! vertices; the hypersimplex's is the Johnson graph. - Shared-projection overlay (drawing side, notatio). After step 2's true coordinates. Proof: a polytope drawn alone and as a one-layer overlay is identical; two polytopes with a vertex in common draw it at one point.
-
Cyclohedron. After
Dissectionshas an order. Proof as in §2(i). -
Face lattice as
Poset. After the carrier lands.
Do not: declare a vertex collection whose order is not decided (the cross-polytope's ±e_i, the hypercube's, the cyclohedron's, Dissections, SignedSubsets); declare FaceLattice before Poset; present faces for a vertex-only family from a coordinate guess (decline rather than answer wrong); declare a volume or Ehrhart head without an exact method.
- Is a polytope a value, a collection or both? Both (C): value with a vertex collection whose order is a declared collection's. Reason: matches the plural/singular ruling and what the code carries.
-
Refile in place or retire and rename? In place. Reason: five permalinks stay valid; no ledger change (
web/ledger.tsv:2074, 2495, 2549, 4311, 4880). -
True coordinates or the code's scaled ones in
Vertices? True, with the scale an explicit field of thePolytoperecord so drawing keeps exact integers. Reason: overlay and any external comparison need true coordinates (§2 iii). -
Cyclohedron's argument: dimension n (legacy) or n−1 (like the others)? Match the legacy page's dimension n in the record only if every polytope states its dimension in
Dimension; otherwise adopt the vertex collection's size, as for the others. I lean the latter once the vertex bijection is known; unresolved here because the bijection is not. -
Names for the type-B permutahedron and the Birkhoff polytope.
SignedPermutahedron(n)andBirkhoffPolytope(n). Reason: no abbreviations; neither has a Wolfram name (§What exists), so nothing to align with. -
Where do the heads live? In
@notatio/polytopewith a newextendson combinatorics. Reason: keeps the geometry in its own package and imports down the hierarchy; the alternative (moving the heads into combinatorics) leaves the package a data layer. The hierarchy edit is a cost either way. - Facets by hand or by hull? By hand as data for the three vertex-only families, each verified by the tightness test; no hull until a polytope without a known facet description needs one. Reason: no exact hull exists in the tree and the three families' inequalities are standard (from memory, to be checked).
-
Is the hypercube's vertex order bit-pattern order? Yes, so
SkeletonGraph(Hypercube(n))equalsHypercubeGraph(n). Reason: one numbering, tested by equality. -
Does a polytope value have a
Dimensionthat can differ from its ambient dimension? Yes, and the accessor says which (the permutahedron lives in n coordinates with dimension n−1,permutahedron.ts:63). Reason: the existing code already separates them (face.ts:41).
Measured (read at bfa63e225, no code run): the package's files, functions, exports and layering; the five record front matters and the absence of a Hypercube record; the display symbols and PolytopeFaces plumbing; the Wolfram names present and absent; the declared collections used for vertex orders and where they are declared; the ledger lines; the explorer golden entries; the 13 FindStat polytope titles; test names and counts; computed arithmetic: Fubini 1, 1, 3, 13, 75, 541, 4683; Delannoy 1, 3, 13, 63, 321, 1683, 8989; C(2n,n) for n = 1..6; Catalan 1, 2, 5, 14, 42, 132, 429; the permutahedron's f-vector at n=4.
From memory, not checked: everything about Sage's functions and conventions, Wolfram's Simplex argument, the cyclohedron's definition and vertex description, the hypersimplex and Birkhoff polytope dimensions, facets and edges, Birkhoff edges as single cycles, the type-B permutahedron, volumes and Ehrhart facts, OEIS A019538.
Assumed: that PERMUTAHEDRON.enumerate's vertices come out in lex order; that SetCompositions' family order and the polytope's face order may differ; that the faces-from-incidence route works for the three families; that polytope heads declared in @notatio/polytope need the hierarchy edit; that the frame does not reach Graphics3DBox; and that no existing head is called Vertices or Dimension (not searched).