26.2 “ Is a Field, Is a Line”—The Witness Thread, the Guiding Field, and Hairy-Ball Curl
Author’s Epigraph: “P is a field; NP is a line.”
Here a “line” stands for a checkable witness and a “field” for structure guiding efficient solution (MODEL). The standard classes satisfy : efficiently solvable problems also have polynomial-time verifiers, so the two are not disjoint geometric categories. “A line without a field” interprets the difficulty of finding efficient algorithms; it does not define every problem.
26.2.1 Why “ Is a Line”
For a decision problem, the condition is that an input is a yes-instance exactly when some witness , of length bounded by a polynomial in the input encoding length, is accepted by a uniform deterministic verifier . Verification time must also be polynomially bounded in the input and witness encoding lengths (see Cook’s problem description, pp. 1–3). Drawing this checking process as a polygonal thread is the geometric analogy (MODEL):
- Verification along the thread: Costs include reading the input and witness encodings and performing each local check. If check costs , the checks contribute , which is only when each cost is uniformly bounded. Counting segments alone proves no polynomial bit complexity. Formal proof terms can also be pictured as threads, but arbitrary proof terms have no uniform linear guarantee here on encoding length, type checking, or reduction cost, so this analogy does not place them within the same verification argument;
- Search without a field: Efficient witness checking does not automatically supply an efficient search method; it does not rule one out either. A “zero-cross-section thread” expresses the author’s picture of unguided search, not a discrete complexity lower bound or a claim that every problem is hard.
One field: straight along the thread, circling off it. The plane carries a single autonomous field , with , , and vanishing on the thread. The probe that starts at exactly on the cyan witness thread runs along it to ; three magenta probes that start only a little off it, but outside the channel , are caught by the first vortex under the same integrator and never reach the target. A schematic model of “a thread without a field” (MODEL), not a complexity lower bound.
26.2.2 Why “ Is a Field”
In our geometric interpretation (MODEL), geometric or algebraic structure used by some polynomial-time algorithms is pictured as a guiding field, such as a convex gradient flow . This is neither the definition of nor a necessary condition for membership. Even a smooth or curl-free field requires an analysis showing that it can be computed efficiently, reaches the required precision, and terminates in polynomially many steps. The following classical algorithms offer concrete points of comparison:
Literature result, not formalized in this book. The three classical results below illustrate field construction and topological curl. Algorithms, geometric extensions, and complexity retain their literature status; the actual suppliers and boundaries of the conditional Pfaffian sign identity are explained in Remark 26.9:
- Karmarkar’s Interior-Point Algorithm for Linear Programming (N. Karmarkar, Combinatorica 4, 373–395, 1984): Whereas Dantzig’s simplex method traverses 1D boundary edges and takes steps on worst-case Klee–Minty (1972) deformed cubes, Karmarkar’s algorithm enters the interior of the polytope and follows a smooth logarithmic-barrier gradient field to reach the optimum in polynomial time;
- Kasteleyn’s Pfaffian Planar-Matching Theorem (P. W. Kasteleyn, Physica 27, 1209–1225, 1961): Counting perfect matchings in general bipartite graphs (computing the permanent) is
#P-complete (L. G. Valiant, 1979). For a finite planar graph with nonnegative edge weights , the classical method uses a Kasteleyn orientation to form a skew-symmetric weighted adjacency matrix in which all actual perfect-matching terms in the Pfaffian expansion have the same coefficient sign. Thus the weighted perfect-matching partition function is , and Cayley’s identity gives . The sign mechanism aligns matching coefficients; nonedges have zero matrix entries. Exact evaluation in polynomial time for nonnegative rational weights encoded in binary is a literature result. If no perfect matching exists, ; handling general planar graphs also includes connected components and the zero case caused by an odd-order component. A modern account is D. Cimasoni and N. Reshetikhin (2007), Dimers on surface graphs and spin structures. I, Section 5.1, Theorem 5.1 and its matching expansion, specialized to the sphere; - Poincaré–Brouwer Hairy Ball Theorem (H. Poincaré, 1885; L. E. J. Brouwer, 1912): Because the 2-sphere has Euler characteristic , every continuous tangent vector field on must vanish at least at one point (a topological vortex).
A field: a slope everywhere except the target and the opposite point. The cyan flow lines start from all over the sphere; each looks only at the slope underfoot, and each flows to the target. The amber line is the chosen one, and the field vanishes at the opposite point (the grey ring). Reading it as a “field” is this book’s interpretation (MODEL).
26.2.2.1 From Actual Vertex Rotations to Face-Odd Orientations: A Finite Combinatorial Prerequisite
The full planar-matching result above has geometric, combinatorial, algebraic, and algorithmic parts. We first isolate a finite combinatorial question: given the cyclic order of the original graph’s edges at each vertex, can one choose a single edge orientation for which every face and every even simple cycle whose deletion leaves a perfect matching has an odd number of opposing darts? A dart is an actual edge with a direction. A bridge, for example, has two reverse darts; a facial traversal that goes out and back along it must count both occurrences. An edge set alone would lose this information.
The results below derive the required sides from vertex rotations and an integer counting condition. Here “sphere rotation” means only the finite data satisfying the Euler condition specified below; obtaining these data from a geometric embedding is a separate step.
Let be an arbitrary finite type with decidable equality, and let be a simple undirected graph on with decidable adjacency. Write for its actual dart type: a dart requires . Write for the type of actual unordered edges, , and .
A vertex rotation is a permutation of such that, for all ,
The facial successor first reverses and then rotates: . The face type is the quotient of by the orbit relation of : exactly when for some . Write for the class of . Every orbit belongs to , including singleton orbits. The rotation data themselves include no connectedness, geometric realization, or Euler equation.
All three theorems below assume that is connected, is nonempty, and the following Euler equation holds in the integers:
Each cardinality is cast to an integer before subtraction; no truncated natural-number subtraction is used. In particular, the edgeless one-vertex graph fails the nonempty-dart hypothesis and lies outside these three theorems.
Write . For a face function , the linear boundary map chooses one representative dart for each unordered edge and sets
For any dart function , define the facial opposition count by
If , it encodes an edge orientation: means that the orientation follows , and means that it opposes . The face count includes every actual dart in the complete orbit. Both darts of a bridge count separately even when they belong to the same face. Write for the linear span of the unordered-edge indicators of all actual simple cycles.
For any finite , connected simple graph , and vertex rotation as above, assume and the integer equation . Then all three statements hold:
- For every and , .
- For every , if and only if some satisfies for every .
- .
The two representatives of an unordered edge differ only by reversal, so their shore-value sum is independent of the choice. Zero boundary equates the facial values on reverse darts. Facial succession and the vertex rotation propagate this equality around a vertex, and connectedness propagates it to all faces. The kernel therefore consists of constants and has dimension . Reindexing a dart sum by the facial successor shows that every facial boundary has even incidence at every vertex, placing it in the existing actual cycle space. Rank–nullity gives , whereas the connected graph’s cycle space has dimension . The integer Euler equation makes these dimensions equal. The full proof is checked by the Lean kernel.
Next, take an actual closed walk in the original graph, based at . A simple cycle satisfies the formal predicate : no vertex repeats except the starting vertex at closure, and the zero-length walk and degenerate out-and-back traversal of one edge are excluded. Write for its vertex support, for its actual unordered-edge set, for its ordered dart list, and for the reversed walk. Write for the subgraph induced on a vertex set . Its vertices carry the condition of belonging to ; denotes the original vertex after forgetting this condition. An even simple cycle is called nice when deleting from the original graph leaves an actual induced graph with a perfect matching.
For the finite , connected simple graph , and rotation above, assume and the integer equation . For every and actual simple cycle , there exist a face function and vertex sets satisfying all the following statements.
-
The face sets and are nonempty complements, and .
-
There is a walk or such that, for every actual dart ,
-
For every , if and only if , and . Every actual dart with satisfies
For all , .
-
For each pair or , there is a connected subgraph of the original graph with vertex set exactly . For every actual dart ,
Let be this subgraph’s actual unordered-edge set, and . Both identities hold in :
-
Let , and let be the actual vertex-deleted complement. For any perfect-matching subgraph of this same graph , and every , put . There is a perfect-matching subgraph of such that, for all its vertices ,
In this case both and are even.
By Theorem 26.6, the cycle’s edge indicator has a facial preimage . Its nonzero boundary excludes constant labels, so both face values occur. All incident facial values at an off-cycle vertex agree, determining ; an original edge cannot join off-cycle vertices of different labels. The regional edge condition retains the cycle edges and edges with both shores on the chosen side. Even a chord whose endpoints both lie on the cycle must be excluded from the opposite region. Following an original graph path until it first reaches the cycle proves that each selected region is connected.
Map functions supported on one facial side into the cycle space of its region. The connected cycle-rank bound gives an Euler inequality for each side. The vertex and edge union/intersection counts, together with the global integer Euler equation, force equality on both sides. A simple cycle has equally many edges and vertices; removing both counts gives the second regional identity. At each cycle vertex, its two actual cycle edges determine two label changes in the vertex rotation, giving the direct boundary equivalences for and . Finally, the absence of cross edges keeps each edge of the given on one side. Restricting that same matching to both sides and applying perfect-matching parity makes both side cardinalities even. The full proof is checked by the Lean kernel.
Both facial sides are nonempty, but an off-cycle vertex side may be empty. The theorem requires no strictly interior vertex on either side and assumes no interior parity. Each region is a connected subgraph selected by its actual edges; these conclusions do not construct a topological disk.
Let be any finite type with decidable equality, a connected simple graph with decidable adjacency, and its vertex rotation. If , is even, and in , there exists one function satisfying
Furthermore, for every , every actual even-length simple cycle based at , and every perfect-matching subgraph of the actual complement ,
The sum counts the dart list. The existential quantifier precedes the universal quantifiers over all cycles and all complement matchings.
Start with any edge orientation and record each face’s parity defect. Since the facial boundary map has only constants in its kernel, the defects correctable by its transpose are exactly those whose total is zero. The global integer Euler equation and the even vertex count ensure this compatibility condition. Adding the same binary correction to both darts of each edge preserves reversal and makes the opposition count on every facial orbit equal to .
For any given nice even cycle, use one actual side supplied by Theorem 26.7. Summing the facial opposition counts on that side gives a contribution of from each selected noncycle edge; the direct boundary equivalence identifies the remaining terms with the dart sum along . The regional Euler identity then gives
The actual restriction of the given complement matching makes even, so the right-hand side is . If , the reversal rule changes the sum by the cycle length in ; even length makes this change zero. The single orientation chosen at the outset therefore works for every such cycle and matching. The full proof is checked by the Lean kernel.
One orientation, odd on every face and on every nice even cycle. With its planar rotation the grid has nine square faces and one outer face, and every edge carries one arrow; the number in each square counts the darts against the arrows on one walk around that face, and all of them are odd, the outer face giving . The amber even cycle has ten edges; the six squares on its inner side are pale cyan, the two cyan vertices inside are , the four magenta vertices of the bottom row outside are , and once the cycle is deleted each side has a perfect matching. Along the amber cycle darts run against the arrows (Theorem 26.8, Theorem 26.7). The orientation shown is one instance, solved for by the script and checked on every nice even cycle of this graph.
Applications of existing results and remaining literature boundaries. The preceding three theorems retain their finite combinatorial hypotheses: an actual vertex rotation, nonempty darts, connectedness, and the integer Euler equation. We now connect actual interlacing, the original Pfaffian convention, and coefficient transport on the same graph. These explanations introduce no composite theorem box.
From two matchings to rooted even cycles. Let be any finite linearly ordered type. The native carrier is FixedPointFreeInvolution, consisting of permutations satisfying and . For an ordered pair , actual components are the reflexive transitive closure of the two colors of edges and . Root each component separately at its least vertex , put (apply first), and use the full integer-power orbit of as the first phase. Both matchings exchange the component’s two disjoint orbits. The phase depends on the component minimum, not numerical label parity. The interlacing permutation follows in the first phase and in the other; its predecessor makes the opposite choice. For every such minimum and every ,
rooted_interlacing supplies these formulas, equality of the full cycles with the actual two-color components, the minimum property, and recovery of the original ordered matchings. Interlacing covers the whole component; each step flips phase, so each cycle has even length. The output carrier explicitly requires both and even support cardinality for every member of . That finset omits singleton cycles, so the first condition cannot be dropped.
Conversely, root each full cycle of an admissible at its least vertex and use its full orbit as the even phase. There set and ; on the other phase swap the choices. Even cycle length makes both successor and predecessor flip phase, including the last-to-first edge. The recovered maps are therefore fixed-point-free involutions. rooted_reconstruction gives these pointwise formulas and ; the other composite returns the original ordered pair. The actual equivalence is the Equiv definition with these inverse maps, rather than a theorem declaration or an arbitrary cardinality bijection. No nonemptiness or even-cardinality premise is imposed on : on the empty type the maps are the unique empty permutations; on odd cardinalities both carriers are empty. A shared matching edge becomes a genuine two-cycle, gives , and a two-cycle recovers coincident mates. Disconnected components have separate roots. Eğecioğlu’s incoming-edge color convention (1990, Ars Combinatoria 29, 107–116) is not asserted to equal this outward first-color convention. This structural equivalence proves no weighted sign identity or determinant square. Source audit 29209 remains at 2 unresolved and 0 validated items.
Keep the original normalized Pfaffian. Fix and any commutative ring . Pairings in P are fixed-point-free involutive functions on . Sort their lower endpoints and place each partner immediately after its lower endpoint to obtain . canonical_mate identifies the adjacent slots as partners. listingEquiv gives inverse maps between all normalized listings and these pairings: conjugate the consecutive-slot pairing by the listing, then recover that listing canonically. The original pfaffian remains
where each pair in is increasing and its first endpoints increase, and the integer sign is cast into . There is no division by a factorial or by . The empty listing contributes the empty product . The coefficient is the sign of the listing permutation, not of the partner involution. The latter corresponds to native by turning the bijective involutive function into a permutation and forgetting that structure in the inverse direction; both composites preserve the same partner function pointwise.
For normalized , put . Inversions are positions with . Count each crossing once by its lower endpoints , and each nesting once by . The actual inversionCrossNestEquiv sends an inversion to a crossing or to a nesting with a bit in . For two distinct pair slots, a crossing contributes the second–first inversion; nesting contributes that inversion and also the second–second inversion. Thus inversion_card_eq_cross_add_two_nesting_card gives
The listing sign is consequently . pfaffian_eq_crossing_sum rewrites the original sum term by term using this coefficient and , counting each paired edge once. This holds for every matrix over every commutative ring, without skew-symmetry, division, or cancellation. The correspondence includes both nesting contributions and the empty case. For an arbitrary listing, listing_value_canonical preserves its signed value when integer unit factors negate on reversal: permuting whole pairs has sign a square, hence , while reversing a pair negates both the permutation sign and its factor.
Transport on the same actual graph. Let now be finite, a simple graph on , and an enumeration. Actual perfect matchings remain Mathlib objects with exactly one neighbor at each vertex. On the complete graph, matchingEquiv chooses that neighbor as the partner map; its inverse defines adjacency by . Transport through and retain precisely those pairings whose partner edges are actual edges. These correspond exactly to actual perfect matchings of , without another matching datatype or Pfaffian core.
Let dart bits satisfy Reverses, meaning . The integer units then satisfy . The coefficient is the canonical listing sign times the product of on its actual directed matching edges. For an actual simple closed walk , write . If it alternates with , meaning exactly one of the two distinct cycle edges at each vertex belongs to , alternating_cycle_flip gives even length, an actual perfect matching , and a perfect matching of the induced graph obtained by deleting ’s vertices from this same . Every cycle vertex already has its partner inside the cycle, so uniqueness prevents matching edges crossing between inside and outside. Restricting the same supplies the complement matching. This flip result itself requires no finiteness, embedding, orientation, or weights.
With the enumeration and reversal hypothesis above, alternating_cycle_transport proves for this actual flip that
Rotate the cycle vertices once and fix every outside vertex. This permutation has even support cardinality and hence sign . It sends the matching edges on the cycle to their complementary cycle edges, while retaining the common outside pairing even when labels interleave. Listing normalization identifies the resulting signed value with . A backward-listed cycle edge contributes two cancelling negative signs; outside units square to . What remains is exactly the actual dart product.
NiceOdd requires for every actual even simple closed walk whose actual induced vertex-deleted complement has a perfect matching. The symmetric difference of two matchings has degree zero or two at every vertex. If they disagree, take an actual alternating simple cycle in that difference. The complement matching above supplies its nice-cycle premise, the dart product is , and flipping preserves the coefficient while strictly decreasing disagreement edges. Finite induction gives niceOdd_matching_tau_eq: all actual matching coefficients agree, including shared edges, disconnected graphs, and .
One unit for every weight and coefficient ring. Give actual undirected edges weights . Let have entry cast into on actual edges, and zero on nonedges and on the diagonal. Reversal makes it skew-symmetric; the diagonal is explicitly zero even in characteristic . Define by summing over actual perfect matchings and multiplying each actual undirected matching edge once. Unsupported pairings have a zero matrix factor. Supported pairings correspond inversely to actual matchings, and canonical pair slots biject with their edges. The original Pfaffian is therefore . Under Reverses and NiceOdd, weighted_pfaffian_identity factors out the common coefficient:
orientationUnit selects an actual matching’s integer unit coefficient when a matching exists and otherwise. It depends only on the graph, enumeration, and orientation, independently of . The formula includes negative and zero weights, rings with zero divisors, and characteristic , with no division. When the vertex set is empty (), the unique empty matching gives on both sides. A nonempty edgeless graph has no perfect matching and belongs to the zero case: all pairing terms vanish and . If additionally and all actual edge weights are nonnegative, then and , so taking absolute values gives . This is an application of the signed identity, not a separate absolute-value endpoint theorem.
To combine the finite rotation orientation with this identity, all data must describe the same actual graph. Retain connectedness, nonempty darts, and the integer Euler equation; identify the original dart reversal condition with Reverses, and supply the actual induced vertex-deleted complement matching for each even simple cycle to the original nice-cycle condition to obtain this NiceOdd. Passing from an arbitrary geometric planar embedding to that rotation and its complete face orbits, graphs outside the rotation hypotheses, the full Cayley determinant-square identity FullCayley, the formulation, exact rational algorithms and bit complexity, and #P-completeness of general bipartite counting remain separate obligations; the latter claims retain their literature status under Remark 26.3. Source audit 29266 retains 10 validated and 9 unresolved items. The conditional signed identity does not discharge these residual obligations.
Flip an alternating cycle: the two matchings differ only by the dart signs on it. The left panel shows two perfect matchings of the same grid: the cyan is the three vertical edges, the magenta the horizontal edges , together with the shared vertical edge . The edges where they differ form exactly the amber alternating cycle , and flipping it turns into . On the right every edge carries an arrow; walking the cycle, a dart along its arrow counts and one against it , and the four multiply to . By alternating_cycle_transport, : the two matchings have the same coefficient. The arrows are an orientation odd on all three faces (Theorem 26.8); the graph and the coefficients are an instance computed by the script.
The algorithmic and geometric extensions in Remark 26.3 retain their literature boundaries; the conditional matching identity above has exact formal suppliers. Another discrete problem admitting precise mathematics on both the “field” and the “line” sides is coloring a graph’s vertices.
Start with an odd cycle, the pentagon : vertices , edges . Paint the vertices with the colors ; no two neighbors share a color. Read the color as a height, and this is a three-level field on the vertices. Now let every edge point towards its higher-colored end:
Neighbors have different colors, so every edge receives a direction. Walking along the arrows, the color rises strictly at every step, so a thread visits each level at most once: three colors, at most three vertices on any thread. The longest thread here is , with exactly three. The field puts a ceiling on the length of every line.
Conversely, given only the arrows, can we recover a field? Let be the number of edges on the longest thread that starts at and follows the arrows:
The field fixes the threads, and the threads measure out a field. The same pentagon , its vertices placed by height on three levels. On the left the height is the color , every arrow points up, and the longest thread is the cyan , with three vertices. On the right are the same arrows with the vertices placed by : every arrow points down, and is again a three-level coloring (Theorem 26.11).
For every arrow , putting this step in front of the longest thread from gives a longer thread from , so . Thus drops along every arrow, neighbors always get different values of , and is again a three-coloring (a different one from : the arrows point up in but down in ). The lines measure out the field. Only one thing can go wrong in this step: if the arrows close up into a cycle, “the longest thread starting at ” runs round in circles. In graph theory this round trip is called the Gallai–Hasse–Roy–Vitaver theorem (Remark 26.13). The module D5/S3/Combinatorics/Graph/Walks/GallaiRoy freezes a version of it, starting with the definitions of orientation and directed path:
Let be a type, a simple graph on (Mathlib’s SimpleGraph V: a symmetric adjacency relation without loops), and a binary relation on . When holds we say there is an arc from to and write .
- is an orientation of (
IsOrientation G o) if both of the following hold: for all adjacent in , at least one of and holds (both may hold); for all , implies that and are adjacent in . - Let . A map (in Lean,
Fin m → V) is a directed path of with vertices (IsDirectedPath o f) if is injective and holds for every natural number with .
This notion of orientation is looser than the textbook one: an edge may carry arcs in both directions. A directed path, on the other hand, must have pairwise distinct vertices, so going round a directed cycle again and again does not produce ever longer paths; and counts vertices, not edges.
Let be a finite type, a simple graph on , and . The following are equivalent:
- is -colorable (Mathlib’s
G.Colorable k): there is a map with for all adjacent in ; - there is an orientation of (Definition 26.10) such that for every and every directed path of with vertices.
From a coloring to an orientation. Given a coloring , let hold exactly when are adjacent and : every edge points towards its higher-colored end. Neighbors have different colors, so every edge receives exactly one direction, and every arc is an edge. Along a directed path with vertices the color rises strictly at each step, so is a strictly monotone map from to , hence injective, and ; for there is nothing to prove.
From an orientation to a coloring. Let be an orientation whose directed paths all have at most vertices. It may contain directed cycles and two-way edges, so the proof first deletes arcs: among the relations contained in along which one can never return to the starting point in one or more steps, it takes one that is maximal under inclusion. Since is finite there are only finitely many binary relations on , and the empty relation belongs to the family, so a maximal one exists; Lean proves that it exists without constructing it. A chain along never repeats a vertex (a repetition would be a cycle), so it is a directed path of with vertices, and . Let be the largest number of edges of a -chain starting at (Lean takes it with Nat.findGreatest among ); then . If one can walk from to along in one or more steps, placing that walk in front of a longest chain from gives a longer chain from , so . The key step: let with . If , then . If not, consider the relation obtained by adding the arc to . It is contained in and strictly larger than ; were it acyclic, it would contradict the maximality of . So it has a cycle, and that cycle must use the new arc, which means that already leads from back to (in at least one step, since ); hence . In both cases . Every edge of carries an arc in at least one direction, and adjacent vertices of a simple graph are distinct, so is a coloring with colors . The full proof is checked by the Lean kernel.
The equivalence can be read in three ways.
First, two-way arcs change nothing (a manual derivation). Delete one of the two directions on every edge that carries both; the result is an orientation with exactly one direction per edge, its directed paths are directed paths of the original one, and the bound still holds. So item 2 of the theorem may just as well be searched for among orientations with exactly one direction per edge.
Second, try in turn (a manual derivation). For finite , giving every vertex its own color shows that is -colorable, so there is a least for which is -colorable: the chromatic number . Directed paths have distinct vertices, so every directed path of an orientation has at most vertices, and the number of vertices on a longest one exists. Item 2 of the theorem holds exactly when , and Theorem 26.11 holds for every , so items 1 and 2 hold for the same values of and the least such values agree:
the minimum ranging over all orientations of . This is how the graph-theory literature usually states the theorem.
Third, back in this chapter’s analogy (MODEL): a coloring is a layered field on the vertices, and a directed path is a line that follows the directions. A field with at most levels exists exactly when the edges can be given directions so that every line has at most vertices; and the field built from an orientation reads, at each vertex, “how many steps one can walk from here along the arcs that survive the deletion”. Both sides of the theorem, however, assert that some object exists. The theorem trades one kind of witness for another; it provides no way of finding either, and it says nothing about which is easier to find. A given coloring is verified by comparing the two end colors of every edge; how fast a coloring can be found is a different question, taken up in Remark 26.13.
Read the vertices as exams and an edge as “the two exams share a student”: a color is then a time slot, and an orientation decides, for every clash, which exam goes first. The film below walks through the equivalence on a small graph of five exams.
Who goes first: a coloring is an orientation (2 min 28 s). Five exams A–E, with a line joining every two that share a student; the slots 1, 2, 3 are a 3-coloring, and the amber A, B, E clash pairwise, so two slots are not enough. Each line points from the earlier slot to the later one, and the longest chains have three exams, one of them the cyan A → B → E (C → B → E is the other); flipping only A → D to D → A makes the magenta chain C → D → A → B → E run through all five. Going back, keep only the arrows and count the most steps one can still take from each exam: ; every arrow runs from a larger count to a smaller one, so minus the count is again a three-slot timetable, in which the amber D has moved (Theorem 26.11). That the chromatic number is the smallest, over all orientations, number of vertices on a longest directed path is a hand derivation from the theorem. Reading a coloring as a field and a directed path as a line is this chapter’s interpretation (MODEL), shown in violet; the theorem trades one witness for another and gives no way of finding either. That -colorability can be decided in linear time and that -coloring is -complete are literature results (Remark 26.13); (Conjecture 20.11) and the global smoothness of the unforced 3D Navier–Stokes equations (Conjecture 26.25) remain open, shown in red. The film’s “fast” means polynomial time. Every number in the film is computed on screen.
Every number in the table comes from exhaustive enumeration: choose a direction for each edge and find the number of vertices on a longest directed path by depth-first search (directed paths have distinct vertices, as in Definition 26.10). The Petersen graph is taken with an outer pentagon , an inner pentagram ( adjacent to ), and five spokes ( adjacent to ).
| Graph | Vertices / edges | Chromatic number | Orientations with one direction per edge | Vertices on a longest directed path: number of orientations |
|---|---|---|---|---|
| Pentagon | / | : , : , : | ||
| Complete graph | / | : | ||
| Petersen graph | / | minimum , attained times |
With two-way arcs allowed, has orientations and the least number of vertices on a longest directed path is still (attained times); has orientations, each containing a directed path with vertices. For and the program also checks both sides of Theorem 26.11 for (on the coloring side by enumerating every map ). For all three graphs the minimum equals the chromatic number, in agreement with above.
Among the orientations of whose longest directed path has vertices, are directed cycles (one for each sense of rotation). For the directed cycle , the maximal acyclic sub-relation of the proof deletes exactly one arc of the cycle (there are ways, and Lean does not say which); deleting gives , a five-coloring, as the theorem predicts for .
Two rows can be done by hand. with : suppose every edge has exactly one direction and every directed path has at most vertices. A vertex with both an incoming and an outgoing arc would have them on two different edges, and its two neighbors would be joined through it into a directed path with vertices; so every vertex either only sends or only receives. Each arc runs from a sender to a receiver, so around the pentagon the two kinds must alternate, and is odd: a contradiction. By the first reading the same holds with two-way arcs allowed; this is “the pentagon is not -colorable” translated through the theorem. : its four vertices are pairwise adjacent, so with three colors two of them would share a color, and is not -colorable; by the theorem every orientation of has a directed path with at least , hence exactly all , vertices, as all orientations in the table do. Replacing by the complete graph on vertices, the same manual derivation shows that every orientation of has a directed path through all of its vertices.
Literature result, not formalized in this book. Theorem 26.11 is an equivalence between two existence statements and says nothing about computational complexity. How hard colorings are to find is recorded in the external literature:
- Whether a finite graph is -colorable can be decided in linear time: run a breadth-first search in each connected component and color by the parity of the level; two neighbors receive the same color exactly when the graph contains an odd cycle (a graph is -colorable if and only if it has no odd cycle, D. Kőnig, 1936).
- Given a graph and a positive integer , deciding whether is -colorable is -complete (R. M. Karp, Reducibility among combinatorial problems, 1972); for fixed it remains -complete even for planar graphs of maximum degree at most (M. R. Garey, D. S. Johnson & L. Stockmeyer, Theor. Comput. Sci. 1, 237–267, 1976). Consequently -coloring has a polynomial-time algorithm if and only if , while remains an open conjecture (Conjecture 20.11).
- The equivalence between colorings and orientations was published independently by T. Gallai, M. Hasse, B. Roy and L. M. Vitaver in the 1960s; its special case for complete graphs, that every tournament has a directed path through all of its vertices, was proved earlier by L. Rédei (1934).
26.2.3 Hairy-Ball Curl () as a Geometric Analogy for : Why One Line Cannot Hold Up a Field
A guiding field turns blind search into flow only if its flow reaches the global minimum from every start, and a conservative gradient alone does not ensure this: for the gradient flow from stays at the stationary value , while (manual derivation). Why is it so difficult to construct such a polynomial-time guiding field for -complete problems like 3-SAT? Expressed as a continuous differential-geometric analogy (MODEL, intended as geometric intuition rather than a formal proof of Conjecture 20.11):
-
A conservative gradient field that slides without frustration to a global minimum satisfies the vanishing exterior-curl condition:
-
The author uses three-body clauses to evoke loop frustration. Clause width alone defines neither a continuous configuration manifold nor a vector field or its curl;
-
A line can thread the seam, while a field must tear: this is the author’s geometric aphorism about witnesses and guidance. The hairy ball theorem guarantees a zero of a tangent field on specified spheres, not exponentially many zeros or search traps; zero curl does not guarantee easy optimization either. These continuous geometric facts do not directly yield algorithmic lower bounds for 3-SAT.
| Perspective | Core Maxim | Geometric Relation Between Line () and Field () (MODEL) | Complexity & Proof-Theoretic Meaning |
|---|---|---|---|
| Global Static Time Field | All lines coexisting are the field (Author’s aphorism; resource models in Remark 26.1) | The satisfying subspace may be zero or contain multiple assignment witnesses; static coexistence does not select or prepare a witness | Describing satisfaction does not account for solution cost; extra resources need separate specification |
| Finite Observer in the Field | Having a line does not yield a field (Author’s aphorism; standard conjecture Conjecture 20.11 is OPEN) | Checking witnesses and finding them efficiently are different tasks, and ; zero cross-section and curl are analogies | “Constructing the field is hard as scaling heaven; following the thread sees through in a single step”: checking cost depends on encoding and verifier; formal proof checking has its own costs |
This distills the book’s philosophy of computation and formal proof into a single couplet: “Constructing the field is hard as scaling heaven; following the thread sees through in a single step.”
Interactive laboratory ORTHO//CAUSAL: four scenes on one sphere. The window: two cosines fix the range of the third, and is the squared volume the three vectors span; the pages: on a finite clock all pages exist at once, and conditioning picks one; the field: a gradient flow has a slope everywhere except at the target and the opposite point, and the potential it loses equals the dissipation it pays; the thread: amplitude amplification turns only per step and arrives after about steps. Reading these as “choice”, “pages”, “field” and “thread” is this book’s interpretation (MODEL); whether remains an open problem, and nothing drawn on the page settles it.