Skip to content
wpegdenPublic

About

Trellis autoformalization of Strong Perfect Graph Theorem (Chudnovsky, Robertson, Seymour, Thomas)

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Formalization of "The strong perfect graph theorem" by Maria Chudnovsky, Neil Robertson, Paul Seymour and Robin Thomas

A static, self-contained view of all 1,495 nodes: each one's Lean statement and proof, its natural-language statement, its dependencies, and its correspondence to the paper. Reading that is a far easier way in than cloning 552,000 lines of Lean.

Formalization by Trellis

Paper targets

Label Node Statement
SPGC Tablet.SPGC For every finite simple graph $G$, $G$ is Berge if and only if $G$ is perfect.
decomp Tablet.decomp For every finite Berge graph $G$, either $G$ is basic, $G$ admits a $2$-join, $\overline G$ admits a $2$-join, $G$ admits an M-join, or $G$ admits a balanced skew partition.

Both targets are Lean-closed against the pinned Mathlib revision, contain no sorry, and depend only on the standard Lean axioms propext, Classical.choice and Quot.sound. The project's axiom gate (APPROVED_AXIOMS.json) authorizes no additional axioms. This holds of the whole development, not only the targets: no node in Tablet/ contains a sorry, and none depends on sorryAx.

Both targets and PerfectComplement also pass the external lean-eval comparator, which checks that the proof closes the stated theorem under a declared axiom whitelist; inputs and results are in comparator/.

Semantic closure

Trusting the two targets means trusting the definitions they are stated in terms of. The following are the definitions in that closure, as computed by the Trellis kernel.

Node Definition
Tablet.Berge $G$ is Berge if every hole and every antihole of $G$ has even length.
Tablet.Perfect $\mathrm{Perfect}(G)$ holds if for every $X\subseteq V(G)$ the chromatic number of $G\vert X$ equals the maximum size of a clique in $G\vert X$.
Tablet.Basic $G$ is basic if $G$ is bipartite, or $\overline G$ is bipartite, or $G$ is the line graph of a bipartite graph, or $\overline G$ is, or $G$ is a bicograph.
Tablet.Hole $\mathrm{Hole}(p)$ holds when the closed walk $p$ is a cycle, the subgraph it traverses is induced in $G$, and its length is at least four.
Tablet.Antihole $\mathrm{Antihole}(p)$ holds when $p$ is a hole of $\overline G$; such a walk represents in $G$ the complement of that hole.
Tablet.TwoJoin A 2-join witness is an ordered partition $(X_1,X_2)$ of $V(G)$ with disjoint nonempty $A_i,B_i\subseteq X_i$ such that $A_1$ is complete to $A_2$, $B_1$ to $B_2$, no other edges run between $X_1$ and $X_2$, every component of $G\vert X_i$ meets both $A_i$ and $B_i$, and when $A_i,B_i$ are singletons every induced path spanning $X_i$ between them has length at least three.
Tablet.MJoin An M-join witness is a partition $(A,B,C,D,E,F)$ of $V(G)$ into six nonempty sets where every vertex of $A$ has a neighbour and a nonneighbour in $B$ and vice versa, $(C,A),(A,F),(F,B),(B,D)$ are complete, and $(D,A),(A,E),(E,B),(B,C)$ are anticomplete.
Tablet.SkewPartition A skew-partition witness is a partition of $V(G)$ into $A,B$ with $A$ not connected in $G$ and $B$ not anticonnected in $G$.
Tablet.BalancedSkewPartition A skew-partition witness $(A,B)$ whose pair $(A,B)$ is balanced.
Tablet.BalancedPair $(A,B)$ is balanced if disjoint, every induced path in $G$ with nonadjacent ends in $B$ and interior in $A$ has even length, and every antipath of the dual form has even length.
Tablet.LineGraphOfBipartite $G$ is a line graph of a bipartite graph if it is isomorphic to $L(H)$ for some bipartite $H$, where $L(H)$ has the edges of $H$ as vertices, adjacent when they share an end.
Tablet.Bicograph $G$ is a bicograph if it is isomorphic to some $\mathrm{BicographModel}(m,n,\varepsilon)$ with $m,n\ge 2$.
Tablet.BicographModel For $m,n$ and $\varepsilon:{0..m{-}1}\times{0..n{-}1}\to{0,1}$, the explicit graph on $({0..m{-}1}\times{0,1})\sqcup({0..n{-}1}\times{0,1})$ determined by $\varepsilon$.
Tablet.InducedPath $\mathrm{InducedPath}(p)$ holds when the walk $p$ is vertex-simple and the subgraph it traverses is induced; the single-vertex walk is the path of length zero.
Tablet.PathInterior The vertices in the support of $p$ other than its two ends; a path of length zero has empty interior.
Tablet.ConnectedSet $X$ is connected in $G$ if every two vertices of $G\vert X$ are joined by a walk in $G\vert X$ (preconnected convention: the empty set is connected).
Tablet.Component $C$ is a component of $X$ if $C$ is nonempty, $C\subseteq X$, connected in $G$, and maximal with those properties.
Tablet.AnticonnectedSet $X$ is anticonnected in $G$ if $X$ is connected in $\overline G$; the empty set is anticonnected.
Tablet.AnticompletePair $X,Y$ are anticomplete if every vertex of $X$ is adjacent in $\overline G$ to every vertex of $Y$ — for disjoint sets, that $G$ has no edge between them.

Correspondence with the paper

The paper carries 131 labelled statements. 120 of them have a Tablet node of exactly the same name — SPGC, decomp, RR, RRC, RRstrip, betterwheel, allpairs, balancev, K4jump and so on — so that correspondence is by name and is mechanically checkable. Note that an exact name match establishes association, not statement agreement.

The 11 remaining labels are not uniformly "renamed". reference/paper-label-map.md gives the full 131-row mapping with a verdict for each; in summary, 5 are renamed because the label is not a legal Lean identifier (1-hat, hole&antihole, hole&antipath, hole&antipath2, t=3), 1 is split across declarations (summary, whose twelve items the paper itself proves separately), 1 carries the adjusted name but states a different result (linegraph2.5), and 4 are not declared at all (bighole&antihole, bicographs, recalcitrant, CCZthm). The paper itself describes the big-hole theorem as unused and CCZthm as an alternative route not taken.

Not every node corresponds to something printed in this paper. The formalization proves background results from the literature as first-class nodes rather than assuming them. 56 nodes are grounded in three sources — Chvátal–Sbihi (21), Cornuéjols' strong perfect graph conjecture survey (21), and Trotignon's Perfect graphs: a survey (16) — listed node by node in reference/literature-grounding.md.

Other named results proved along the way

The two paper targets above are the run's configured goals. Other named theorems are proved as intermediate nodes, among them the weak perfect graph theorem of Lovász:

Node Statement
Tablet.PerfectComplement For every finite simple graph $G$, the complement $\overline G$ is perfect if and only if $G$ is perfect.

Deviations from the printed paper

Three deviations were automatically authorized during the Trellis process. Each is documented in full under reference/, stating the defect, the repair, and why the deviation is local.

Deviation Affected nodes Defect
betterwheel2_hub_relation betterwheel2 The printed subsidiary statement asserts a containment $Y \subseteq Y'$ that its own proof does not establish in two singleton-hub cases.
nonsat_k4_complement_outcome nonsat The printed intermediate theorem omits a genuine $K_4$-complement outcome.
smallbico_one_end_residual smallbico, SmallBicoNonmajorComplement, SmallBicoNonmajorOutcomeTwoTranslation The printed theorem misses a long-antipath one-end residual case.

In each case the deviation is absorbed by downstream consumers without changing their statements, and neither paper target is altered.

Provenance

One commit per state-changing supervisor checkpoint — 1,470 commits carrying 1,571 checkpoint tags, since a checkpoint that changed nothing on disk reuses its predecessor's commit. The publication metadata (this README, LICENSE, formalization.yaml, SIZE_ANALYSIS.md and the two mappings under reference/) rides in the final checkpoint commit rather than in a separate publication commit. The run began 2026-07-17 and was driven end to end by Trellis: a single model (OpenAI gpt-5.6-sol via the Codex CLI, reasoning effort xhigh) filled every role — worker, reviewer, and the four independent verifier lanes (correspondence, soundness, paper-faithfulness, substantiveness) — with workers running in a bwrap sandbox against a pinned Mathlib, and only the Mathlib import prefix permitted.

The only human input was approval of the stated theorem statements at the human gate after the theorem-stating phase. No mathematical content, proof steps, or formalization hints were supplied by hand.

process-memory/ records the run's own accumulated findings, one entry per decision, including where it concluded the printed paper was defective. It is the run's working notes rather than a curated document.

Phases

The formalization phase ended at cycle 1444; cycle 1445 was the first cleanup cycle. The tag formalization-complete marks that boundary. The protocol admits the cleanup phase only with an empty blocker set, so the tagged commit is the first state in which every node had passed all four verifier lanes and both paper targets were Lean-closed. Every Trellis commit after it is cleanup: proof simplification, helper extraction and lint repair, with neither target statement changed. The final commit additionally carries the hand-written publication metadata described under Provenance.

The run is still going, so this repository gains commits. Cleanup continues to simplify proofs and extract helpers, and later snapshots are published as it does. Both paper targets have been Lean-closed since formalization-complete, and every commit after that tag preserves their statements byte-for-byte; what changes is how the proofs are organized. To read the formalization at the moment it was first complete, check out that tag. Commits verified by the external comparator carry their own tags — see comparator/README.md.

SIZE_ANALYSIS.md is a crude size analysis of this repository produced by ChatGPT, included unedited and offered as possibly useful context from an agent rather than as a result of this project.

Cleanup is still under active development in Trellis. In particular, some cleanup-phase semantics were changed during this portion of the run. The no-steering property is unaffected — no mathematical content, proof steps, or formalization hints were supplied by hand in cleanup any more than in the earlier phases — but the phase itself is less settled than the ones preceding it.

Building

lake exe cache get
lake build

Requires the toolchain in lean-toolchain and the Mathlib revision pinned in lake-manifest.json.

semantic-closure.json records, for each node, the definitions its statement is expressed in terms of, as computed by the Trellis kernel. It is shipped so that the viewer linked at the top can be rebuilt from this repository alone, with no Lean toolchain — the export script reads it in place of the run's internal state. Nodes absent from it are definitions, which carry no closure record.

About

Trellis autoformalization of Strong Perfect Graph Theorem (Chudnovsky, Robertson, Seymour, Thomas)

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages