14.5 Closing the Braid: Markov Stabilization and Coloring Counts
Item 2 of Remark 14.10 says that a trefoil in three-dimensional space stays knotted, and that colorings are the classical tool for telling it apart. How is the tool used? Corollary 14.9 is about a piece of braid: a row of loose ends on top, a row below, and colors carried from one row to the other. A knot has no loose ends. Bend the braid around and join the -th bottom end to the -th top end; only then do the strands form closed loops. This is the closure of the braid. Once the ends are joined, “the color at the top” and “the color at the bottom” are colors of one and the same piece of string, so a coloring of the closed braid has a single condition left to meet: carried once through the braid, the colors must come back unchanged. A coloring of a closed braid is a fixed point of the coloring transport.
Close it up, and the colors must come back. One exchange , then each top end is led back along an arc on the right to the bottom end in the same place. The colors reach the top as , and both arcs clash (magenta). Of the nine colorings only , and come back.
The module D5/S3/Topology/QuandleMarkovColoring turns this sentence into a definition. It does not speak of strings drawn on paper: a braid is an element of a group given by generators and relations, and the coloring transport is the action of that group on sequences of colors.
Let , let be a type with [Rack Q], and let be its rack operation.
-
The Artin braid group
Artinis the group given by generators and the set of relatorsartinRelators(aPresentedGroup: the free group modulo the normal subgroup generated by the relators), with relationsIn Lean the generators are indexed by , that is ; this book writes . Subtraction of natural numbers truncates, so for there are no generators and the group is trivial.
-
A coloring is an element of
Colors, written (so is the component with Lean index ). -
The coloring action
braidActionis a group homomorphism from to the group of permutations (Equiv.Perm) of , determined by its values on the generators: replaces the components in positions and by and leaves every other component alone. Write ; the product of permutations is composition, . -
The closed colorings of are
ClosedColorings. -
A braid with positive strand count
PositiveBraidis a pair with and (the name refers to the number of strands, not to the signs of the crossings). If moreover[Finite Q], the coloring countcoloringCountis .
“Determined by its values on the generators” in item 3 does not come for free: the images of the generators must satisfy the Artin relations before the action can descend from the free group to the quotient. The adjacent relation is exactly where Corollary 14.9 is used (in Lean this step is the private lemma generator_adjacent); two crossings that are not adjacent change different components and therefore commute (generator_distant).
Counting the fixed points looks like counting a property of the closed loop itself. But a braid carries information the loop does not need: where it was cut open, and how many strands were used. This surplus is exhausted by exactly three rewriting steps: that is Markov’s theorem, a literature result recorded in Remark 14.19. The Lean file defines these three steps as a purely algebraic relation between braids.
Keep the notation of Definition 14.14.
-
The strand inclusion
strandInclusion, written , is the group homomorphism sending each generator to the generator of the same name (Lean does not claim that it is injective). -
The last generator
lastGenerator(with ) is in : the crossing between strand and the newly added strand . -
A Markov step
MarkovStepis an inductive relation between braids with positive strand count, with exactly three constructors: for and , -
Markov equivalence
MarkovEquivalentisRelation.EqvGen MarkovStep: the smallest equivalence relation containing the Markov steps.
In a picture: conjugation cuts the closed loop open at a different place; stabilization adds one new strand on the far right and lets it cross the old last strand exactly once, so that the closure gains one small loop that disappears with a single twist (these two sentences are geometric pictures; their precise form belongs to Markov’s theorem in Remark 14.19). The algebraic question is: does the number of fixed points survive these three steps?
Conjugation is easy: carry all the colors along. Stabilization is the hard one, because it changes even the number of strands. Let the new strand have color . By the product convention of Definition 14.14, lets act first, turning the last two strands into ; after that touches only the first strands. The new strand meets no further crossing, so it comes back unchanged only if . Strand therefore receives . Is that equal to ? No rack axiom says so. A rack with the additional axiom is called a quandle (Quandle Q in Mathlib). With that axiom the small loop has no effect on the colors at all: the new strand merely copies , and the condition on the first strands is untouched. This hand computation is the central step of the Lean proof, and the module turns it into an explicit one-to-one correspondence.
Add a strand: it merely copies the last color. On the left, on two strands; closed up, the colors match (cyan). On the right a strand is added on the far right and first crosses the old last strand once, which is : the new strand’s color just copies the last one, , and passes the crossing unchanged as . Colorings that come back: on the left, and on the right too.
Let be a type with [Quandle Q] (not assumed finite), and . The module defines three equivalences (Lean’s Equiv: a pair of maps together with the proofs that they are mutually inverse):
positiveStabilizationEquiv(with ): . The forward map copies the last color once more, ; the backward map deletes the last component.negativeStabilizationEquiv(with ): , with the same forward and backward maps as in item 1.conjugationEquiv(with ): . The forward map is , the backward map .
Let be a type with [Quandle Q] and [Finite Q], and let be two braids with positive strand count (PositiveBraid). If and are Markov equivalent (MarkovEquivalent β β'), then
MarkovEquivalent is a Relation.EqvGen, and the proof is by induction on how the equivalence was generated. The reflexive, symmetric and transitive cases follow from reflexivity, symmetry and transitivity of equality. What remains is a single MarkovStep, split by its three constructors; each case applies Nat.card_congr to the corresponding equivalence of Definition 14.16.
The two stabilization equivalences rest on two private lemmas (positive_fixed_iff and negative_fixed_iff): for and ,
Positive sign: sends to , and acts as on the first components and leaves the last one alone (checked on generators and extended to the whole group by PresentedGroup.ext). Comparing last components gives ; substituting back, (Quandle.fix) reduces the condition on the first components to . Negative sign: sends the same tuple to ; the last component gives (Quandle.fix_inv), and cancelling (Rack.left_cancel_inv) gives ; the rest is the same. Hence “copy the last color” and “delete the last component” are mutually inverse. The conjugation case uses only that the coloring action is a group homomorphism: if , then . The full proof is checked by the Lean kernel.
Three boundaries apply whenever Theorem 14.17 is cited:
- It is a theorem of algebra, not of geometry. Its statement contains only the group , defined by generators and relations, and the inductive relation
MarkovStep; the geometric sentence “these two braids close up to the same link” does not occur in Lean. Reading the count as an invariant of knots and links takes the three literature theorems of Remark 14.19. - An invariant can only say “different”. If the counts differ, the two braids are not Markov equivalent; if the counts agree, nothing follows.
- The idempotence axiom cannot be dropped.
coloringCountis defined for every finite rack, but the theorem asks for[Quandle Q]. The last step of Example 14.18 exhibits a rack with three elements whose count drops from to under a single stabilization.
A rack that is not a quandle: add a strand and nothing comes back. The color rule is now . On the left, one strand and no crossing: all three colorings come back. On the right a strand is added with one crossing: the copied passes the crossing as , the arcs clash (magenta), and none of the nine colorings comes back.
Literature result, not formalized in this book. The column “closure, as a picture” in the table below (which braid closes up to which knot or link) is a geometric identification and belongs to classical knot theory. Every count in this example comes from exhaustive enumeration (each one can be checked by hand); it is a manual derivation, not a Lean result. What Lean verifies is the equality asserted by Theorem 14.17.
Colors and rule. Take with (Mathlib’s Quandle.Dihedral 3). Modulo one has , so the operation is symmetric in and and the rule reads: two equal colors give the same color again; two different colors give the third. Checking all triples confirms self-distributivity; every left translation is an involution; and . The three colors , , involved in a crossing are either all equal or pairwise different: this is Fox’s three-coloring rule.
Two strands. modulo . The nine colorings fall into five orbits:
The three one-color colorings are fixed and the other six form two -cycles. So and have fixed points each, and returns all nine colorings to themselves. In the table, is the identity element (the braid without crossings).
| Braid | Coloring count | Closed colorings | Closure, as a picture (geometric identification) |
|---|---|---|---|
| all | unknot | ||
| all | two unlinked circles | ||
| unknot | |||
| Hopf link | |||
| all | trefoil |
Adding a strand. For with , enumerate all colorings of three strands:
| on two strands | Count of | Count of | Count of | Closed colorings on three strands |
|---|---|---|---|---|
| all |
In every row the three counts agree, and the closed colorings on three strands are exactly the closed colorings on two strands with the last color copied once more, as items 1 and 2 of Definition 14.16 say. The two unknots of the first table are the same phenomenon: is the positive stabilization of , and . One conjugation for good measure: with and , the count of is still .
Reading the numbers. Feed the enumerated counts into Theorem 14.17 (this substitution is a manual derivation). Since , the contrapositive of the theorem shows that and are not Markov equivalent; likewise (count ) and (count ) are not Markov equivalent. The counts of and are both , and nothing follows from that: three colors cannot tell them apart.
The idempotence axiom cannot be dropped. Take with . It is a rack: every left translation is a bijection, and both sides of the self-distributive law equal . But , so it is not a quandle. The braid has closed colorings; its positive stabilization sends to , and a fixed point would need and : there is none. The count drops from to .
and count differently. on the left, on the right, both starting from : the left one clashes when closed up (magenta), the right one matches (cyan). Colorings that come back: on the left, on the right; since , by Theorem 14.17 the two are not Markov equivalent.
Literature result, not formalized in this book. The statement of Theorem 14.17 contains no geometric object. Reading it as an invariant of links takes three classical theorems (braids and links below are smooth or piecewise linear):
- Artin’s theorem (E. Artin, Theorie der Zöpfe, Abh. Math. Sem. Univ. Hamburg 4, 47–72, 1925; Theory of braids, Ann. of Math. 48, 101–126, 1947): the group of isotopy classes of geometric braids on strands is isomorphic to the group of Definition 14.14, given by generators and relations ().
- Alexander’s theorem (J. W. Alexander, A lemma on systems of knotted curves, Proc. Natl. Acad. Sci. USA 9, 93–95, 1923): every oriented link in is isotopic to the closure of some braid.
- Markov’s theorem (A. Markoff, Über die freie Äquivalenz der geschlossenen Zöpfe, Mat. Sbornik 1(43), 73–78, 1936; for a complete proof see J. S. Birman, Braids, Links, and Mapping Class Groups, Princeton University Press, 1974): the closures of two braids are isotopic as oriented links if and only if the two braids are related by a finite sequence of conjugations, positive and negative stabilizations, and their inverses, that is, after the isomorphism of item 1, if and only if they are Markov equivalent in the sense of Definition 14.15. The easy direction is the pair of pictures in the main text: neither conjugation nor stabilization changes the isotopy class of the closure.
Taken together: the closed-coloring count of a finite quandle is an isotopy invariant of oriented links. Combined with the counts of Example 14.18 and the geometric identification “the closure of is the trefoil, the closure of is the unknot”, this shows that the trefoil is not isotopic to the unknot; in the same way, the Hopf link is not isotopic to two unlinked circles. Closed colorings can also be described without braids: they correspond to the homomorphisms from the fundamental quandle of the link to (D. Joyce, A classifying invariant of knots, the knot quandle, J. Pure Appl. Algebra 23, 37–65, 1982; S. V. Matveev, Distributive groupoids in knot theory, Mat. Sb. 119(161), 78–88, 1982), and for they are Fox’s three-colorings. For a rack that fails the idempotence axiom, the coloring count is only an invariant of framed links (R. Fenn and C. Rourke, Racks and links in codimension two, J. Knot Theory Ramifications 1, 343–406, 1992).
A braid has a beginning and an end; a knot has neither. Once the ends are joined, the colors have to come back unchanged; as long as the colors come from a quandle, add a strand, or cut the loop open somewhere else, and exactly as many colorings come back as before. That half is verified by Lean.
The full braiding lab: add crossings on top, change the number of strands, click the numbers at the bottom to change colors, and watch the colors ride up the world lines; close the braid and count the colorings that come back, or switch to the non-idempotent rack for comparison.
Let us now work through the four-part numerical and matrix calculation connecting no-cloning, the three-qubit bit-flip code, local Bloch expectations, and orthogonal syndrome recovery.
With literature context. Steps 1, 2, and 4 below instantiate this chapter’s kernel-verified Theorem 14.1, Lemma 14.6, and Proposition 14.7, whereas the general criterion in Step 3 for single-qubit marginals of stabilizer codes satisfying the conditions stated there and the single-error-correcting five-qubit, seven-qubit Steane, and nine-qubit Shor codes contrasted at the end of Step 4 belong to the quantum error-correction literature (see Remark 14.21 below) and are not formalized in this book.
This example verifies the four concrete calculations of Chapter 14:
Step 1: Numerical no-cloning gap at versus exact CNOT copying of an orthogonal pair. In , choose , , and . The input inner product is
whereas the target cloned states and have inner product
The nonzero gap violates in Theorem 14.1, so no linear isometry can clone both and . By contrast, for the orthogonal pair (), with exactly achieves and — covering only that specific orthogonal basis pair.
Step 2: Three-qubit bit-flip repetition code and binary symplectic parity checks. Set , and define the logical encoding isometry by and , stabilized by
In PauliWord 3 2, and have shift vector and binary -check rows and . For the four candidate bit-flip errors with and binary -vectors , the mod- dot products from Lemma 14.6 uniquely identify each error:
| Error | Binary -Vector | Mod- Parity | Eigenvalue Syndrome | Shifted Basis Pair |
|---|---|---|---|---|
Step 3: Local Bloch vectors of encoded states (special versus general ). For the specific logical state , all three single-qubit marginals equal , so . However, for a general logical state , the local expectation is
which is nonzero whenever ! One must therefore never claim that “every stabilizer code drains every local Bloch direction on all logical states”; here can be nonzero because the three-qubit bit-flip code has -distance ( is already a logical operator). A sufficient condition is that the stabilizer code has distance and no weight- element in the full stabilizer group . The whole group, including products of generators, must be checked, not just the chosen generator list. Under these conditions every single-qubit Pauli operator anticommutes with at least one generator , forcing and for every logical state. Pure codes of distance at least satisfy these conditions, but purity is generally stronger and is not necessary; adding a fixed ancilla instead puts , violating the absence of weight- elements.
Step 4: Explicit verification of Proposition 14.7 and phase-error boundary.
Set , , , and define the four syndrome embeddings (). Because the four shifted basis pairs in Step 2 partition the basis vectors of into mutually orthogonal -dimensional subspaces, (OrthogonalSyndromes S). Taking () and , Proposition 14.7 gives
Note the scope of this code: it corrects only single bit-flip errors; a single phase flip commutes with both and and acts as an undetected logical phase error , so this code does not correct arbitrary single-qubit noise (correcting arbitrary single-qubit errors requires at least the five-qubit code, or the seven-qubit Steane or nine-qubit Shor code; cf. Remark 14.21).
Flip two, and the lights point the wrong way. In the logical state the first and second qubits flip together (two magenta X’s): only lights up, exactly as if the third qubit alone had flipped. The decoder follows the light and flips the third qubit back (amber); together that is , a logical flip, and the cyan bar lands on while the dashed outline stands on . This code corrects at most one flip.
A phase flip fails in a different way: commutes with both and , so neither check lights up, yet has been turned into .
Flip a phase: no light, yet the state has changed. In the logical state the first qubit has its phase flipped (the magenta Z): commutes with both and , neither light goes on, the bars never leave the code space and the decoder does nothing; yet the cyan bar on has flipped below the axis, exactly opposite the dashed outline, and the state has become the orthogonal .
This chapter also contains the finite rectangular Kraus sufficiency theorem Theorem 14.8. It turns scalar products for a given finite error family into a normalized recovery family covering the whole physical input. The following items retain the classical literature boundaries for the full if-and-only-if picture, stabilizer-code structure, and anyonic physics:
- The Knill–Laflamme error-correction conditions (E. Knill and R. Laflamme, Theory of quantum error-correcting codes, Phys. Rev. A 55, 900–911, 1997, 10.1103/PhysRevA.55.900): The classical literature statement is that a code projector admits exact CPTP recovery from a set of error operators if and only if for a Hermitian matrix independent of the logical state. Diagonalizing yields the orthogonal-syndrome condition of Proposition 14.7 on the correctable subspace while ensuring that syndrome extraction leaks zero information about logical amplitudes. The finite rectangular sufficiency direction is the formal theorem Theorem 14.8; for a nonempty logical space, necessity for a recovery already given by a finite Kraus family, normalized on the whole physical space and acting as a left inverse on all complex logical matrices, can be read directly in the frozen source
left_inverse_error_products, which this chapter cites as source context rather than adding another theorem box. - Stabilizer codes (D. Gottesman, Stabilizer Codes and Quantum Error Correction, Caltech Ph.D. thesis, 1997, arXiv:quant-ph/9705052): An Abelian subgroup of cardinality generated by independent commuting Pauli operators and not containing defines a -dimensional code space via its joint eigenspace. Pauli errors anticommuting with at least one generator of are diagnosed via the binary symplectic inner product; quotienting out the central scalar phase subgroup , operators in represent nontrivial logical classes in (excluding central scalar multiples such as of weight ), and the code distance is the minimum Pauli weight among all .
- Configuration-space braid groups in 2D versus 3D (J. M. Leinaas and J. Myrheim, On the theory of identical particles, Nuovo Cimento B 37, 1–23, 1977, 10.1007/BF02727953): For indistinguishable non-colliding point particles in , the fundamental group of configuration space is the symmetric group for (whose one-dimensional unitary exchange representations allow only the bosonic or fermionic exchange sign), and the Artin braid group for .
- Non-Abelian anyons and physical limits of topological protection (C. Nayak, S. H. Simon, A. Stern, M. Freedman, and S. Das Sarma, Non-Abelian anyons and topological quantum computation, Rev. Mod. Phys. 80, 1083–1159, 2008, 10.1103/RevModPhys.80.1083): In gapped 2D topological phases, braiding non-Abelian anyons induces unitary transformations on degenerate fusion spaces protected against local perturbations up to exponentially small splitting . This gate regime requires well-separated anyons, motion adiabatic relative to the bulk gap, and an operation duration that does not resolve the residual energy splitting at finite separation. As emphasized in the text, the triviality of point-particle double exchange in does not mean closed -dimensional knots in untie themselves, nor does topological protection imply strictly zero error in finite-temperature hardware subject to thermally excited quasiparticles.
The full syndrome-decoding lab: click qubits on the stage to add or errors and watch which of the two checks light up, which qubit the decoder flips back, and whether the bars land back on the dashed outline; you can also change the logical state or switch to the four-branch mixture .
With our logical states shielded inside higher-dimensional error-correcting subspaces, we are ready to put those fault-tolerant registers to work. How do flagship quantum algorithms harness invariant-plane rotations and Fourier phase gears to find targets and hidden periods across exponentially large state spaces? Let us proceed to Chapter 15.