The Spectre Knot theorems and their proof
A reader’s guide to the proof that the Spectre Knot has no closed loop in any spectre tiling whose supertiles fill the plane, and is one endless strand in the nest tiling, grown outwards from a single tile, each block sitting in the same place (child number 1) inside the next. These pages show what is proved, by which route, and how the results of the paper hang together; every result has a page with its statement and proof from the paper, what it cites, what cites it, and the Lean that formalises it. The paper has not been peer reviewed.
Read the paper
The whole proof as the paper sets it out: the PDF, or here, result by result, each with its statement and proof.
Follow the argument
Ten steps, one for each section of the paper, each with its results and a small graph of how they depend on each other.
See the structure
Every result in one graph: what rests on what, and which are argued, computed, cited or also in Lean.
Read the Lean
The statement file line by line, beside a plain reading of each piece; then every file of the formalisation, in full.
Get the code
The programs the computations use, with their logs, and the Lean: where they are, and how to build and run them.
What is proved
Theorem A · the Daedalus Theorem argued Lean, in part
In every homochiral tiling of the plane by $\Tile$ whose supertile hierarchy covers the plane, with every tile carrying the decoration of Figure 1 (Definition 3.1), there is no closed strand: every strand is a two-way infinite path of ribbon pieces.
Theorem B · the Ariadne Theorem argued Lean, in part
In the nest tiling $\N$, with every tile carrying the decoration of Figure 1 (Definition 3.1), all the ribbon pieces of all the tiles form a single strand. It is a two-way infinite path that passes through every tile. More precisely, for every $b\ge 1$, all the pieces of the block $N_b$ lie on a single arc of $N_{b+3}$ if $b$ is even, and of $N_{b+4}$ if $b$ is odd.
In Lean 4, the two main theorems. Their claims, TheoremA_strand and TheoremB_strand, are written out in the statement file in a combinatorial form, with patches and tilings described by which edges are glued:
theorem theoremA_strand : TheoremA_strand theorem theoremB_strand : TheoremB_strand
The build, lean/build.sh, runs #print axioms on the main theorems (lean/Axioms.lean) and fails unless the answer is among Lean’s standard three, propext, Classical.choice and Quot.sound: no sorryAx, no Lean.ofReduceBool. It also fails if a main theorem no longer proves exactly its claim in the statement file, if the statement file or a file it imports has changed since its SHA-256 was recorded, or if leanchecker, replaying every declaration through the kernel, finds a problem. The public repository’s checks also run comparator, the Lean developers’ tool for judging whether proofs prove exactly the statements of a trusted file: it confirms that the main theorems prove exactly the claims of the statement file (lean/tools/comparator.sh).
That actual spectre tilings are glued as the formal statements assume is argued in the paper, not formalised: what the Lean does not cover.
The proofs and their Lean were generated by an AI system at Justin Roughley’s instruction, and the paper has not been peer reviewed: how this was made, and what has been checked.
The route
The proof climbs the supertile hierarchy. First it shows that every supertile, of every kind and level, looks the same from outside; then it follows the ribbons up the nest. Step 1 sets out the two theorems and the method; steps 2–7 prove the Daedalus Theorem; steps 8 and 9 add the Ariadne Theorem; step 10 says what is covered. The ten steps are those of the public site’s Prove page, which explains each with pictures, and step n follows section n of the paper.
The route: ten steps, each with its results →
The numbers
What the Lean checks, and what it does not
What it checks
The Lean formalisation proves the results marked Lean about patches described by which edges are glued: every supertile has the signature (Theorem 7.6); in the union of any chain of supertiles in which every edge is eventually glued, every strand is two-way infinite (Theorem A), and the nest is such a chain; the nest tiling, as the union of its blocks, is one two-way infinite strand (Theorem B), with the bounds of Theorem 9.1, which are exact; and every vertex of a tile of a block of the nest is surrounded by the block two levels up (Lemma 8.3, at the vertices of tiles). Its kernel also re-runs the finite computations these use (Computation 7.5 on the level-1 supertiles that exact.py computes, taken as input).
Its statement file, lean/SpectreKnot/Statement.lean, with the three files it imports, holds every definition the main theorems use, so whether the right thing has been proved comes down to reading them: the statement file, line by line.
What it does not cover
From lean/README.md.
- The link with tilings of the plane: assumption (M), written out at the top of
Statement.leanin three parts. The formal statements are about patches and tilings described by their gluing; each part is argued in the paper and none is formalised.- (M1) Supertiles. That the supertiles of an actual tiling are glued like
super m K. It rests on the spectre paper and on the paper's §2 and §7.1: Thm 2.1 (the hierarchy, from the spectre paper), Prop 2.4 (the composition pattern holds at every level), Remark 2.5 (its cross-checks on actual supertiles, evidence not used in the proof), Lemma 2.6 (rigidity), Def 2.2 (own orientation, built intocompose) and step (ii) of §7.1 (two children meet only in the sides they share). In Lean, Tables 1–4 are simply data. - (M2) Theorem A for tilings.
TheoremA_strandis about the union of a chain of supertiles that covers, that is, in which every edge is eventually glued. That a tiling whose hierarchy covers the plane is such a union is the first step of the proof in §7.4, about points of the plane. - (M3) Theorem B for the nest tiling of the plane.
TheoremB_strandis aboutnestTiling, the union of the blockssuper b .Delta. That this is the nest tiling of the paper, and that it covers the plane, is Prop 8.2 and Prop 8.4, which are geometric. Lemma 8.3(a), which Prop 8.4 uses, is formalised for the vertices of tiles (Grandparent); the step from those to points of the plane is part of (M3).
- (M1) Supertiles. That the supertiles of an actual tiling are glued like
- Lemma 4.1 for a general patch. Only patches with the signature are given a box (
Patch.HasSig.box); following a ribbon (Follow) plays the role of π_P. - The corner A at level 1. The paper defines the corner A of a level-1 supertile as v₀ of the first tile of its Mystic. The Lean takes its position from the data (vertex 0, or for Σ the point d₁ along side 5), and does not pick out the Mystic among the tiles of the level-1 supertiles; above level 1, A is the Γ child's (
cornerA_succ). - The second routes of Appendix A. The skeletons, and the label states with certified inequalities, are not formalised.
- Exact counts. The last two rows of Table 5 are proved (
TheoremB_exact); the rows for each b (such as 10, 37, 146, 613 arcs one level up) are computed by the tests for small b, not proved for every b. - The drawing, and §10. The drawing itself; the three strands along another chain (the tests compute its first counts); and faults.
- Data are input. Tables 1–4 come from
combin.js(the composition pattern computed from the geometry, and checked against the spectre paper's figures by the paper's scripts); the level-1 supertiles come fromexact.py. The Lean checks the level-1 supertiles' signature itself (good_one), but not that they are the spectre paper's clusters.
Marks
- argued proved in words in the paper; computed a finite check done by program; cited from the spectre paper; Lean also checked by the Lean proof assistant (Lean, in part where it checks part).
- Rests on counts everything below a result in the graph; depth is the length of a shortest chain of citations from it up to Theorem A or B.
- Search, in the top bar, finds a result by number or name, a step of the route, a Lean file or declaration, and these pages.
The route of the proof, step by step
The ten steps of the public site’s Prove page, one page each, with the exact statements of the results each step is made of and how they depend on each other. Step n follows section n of the paper. Step 1 sets out the two theorems and the method; steps 2–7 prove the Daedalus Theorem; steps 8 and 9 add the Ariadne Theorem; step 10 says what is covered. The one-sentence summaries are an AI-generated paraphrase; where they and the paper differ, the paper is right. The method, as the paper’s introduction states it, is on step 1’s page.
1The setting, the two theorems and the method
no results of its own
2Spectre tilings and their supertiles
3 results
3The decoration and its strands
1 result, 3 definitions · 1 in Lean
4Boxes and the signature
3 results, 1 definition · 3 in Lean
5The Zigzag Lemma
1 result · 1 in Lean
6Side lengths
5 results · 5 in Lean
7The signature at every level, and the Daedalus Theorem
7 results · 7 in Lean
8The nest tiling
4 results · 1 in Lean
9Merging, and the Ariadne Theorem
5 results · 5 in Lean
10What is covered
no results of its own
1. The setting, the two theorems and the method
Every tile carries the same decoration, fourteen ribbon pieces with one crossing; the Daedalus Theorem says that no strand closes in any tiling whose supertile hierarchy covers the plane, the Ariadne Theorem that the nest tiling has a single strand, and the proof rests on three ideas, black boxes, zigzags and fixed parities, with merging up the nest for the Ariadne Theorem.
An AI-generated paraphrase; the statements below are the paper’s.
← The route2. Spectre tilings and their supertiles →
The two theorems
As the paper’s introduction states them; they are proved in steps 7 and 9.
Theorem A The Daedalus Theorem argued Lean, in part
In every homochiral tiling of the plane by $\Tile$ whose supertile hierarchy covers the plane, with every tile carrying the decoration of Figure 1 (Definition 3.1), there is no closed strand: every strand is a two-way infinite path of ribbon pieces.
Theorem B The Ariadne Theorem argued Lean, in part
In the nest tiling $\N$, with every tile carrying the decoration of Figure 1 (Definition 3.1), all the ribbon pieces of all the tiles form a single strand. It is a two-way infinite path that passes through every tile. More precisely, for every $b\ge 1$, all the pieces of the block $N_b$ lie on a single arc of $N_{b+3}$ if $b$ is even, and of $N_{b+4}$ if $b$ is odd.
The method, as the paper’s introduction states it
The proof has three ideas.
- 1.Black boxes. Seen from outside, a supertile is just a list of which ribbon end on its boundary is joined to which. Every supertile of every kind and level $m\ge1$ has the same signature as a single tile: a hook at every tile vertex on its boundary but two adjacent ones, the crossover corners $A$ and $B$, where two ribbons cross over; and no closed strand inside (Definition 4.3, Theorem 7.6, Figure 5).
- 2.Zigzags. When two such boxes are glued along a common boundary path with no crossover corner inside it, the ribbons zigzag along it, and how they join the two ends of the path depends only on the parity of its length (Lemma 5.1). So lengthening a shared path by two edges changes nothing (Lemma 7.1).
- 3.Fixed parities. The supertiles are combinatorially hexagons and compose by the substitution of [Smith et al., A chiral aperiodic monotile, Fig. 5.1]. Their side lengths are given by Fibonacci numbers (Proposition 6.2), grow with the level and never change parity. So the side lengths at any level are reached from those at level $1$ by lengthening, two edges at a time (Lemma 7.2). By induction on the level, a supertile is glued from children that already have the signature, so its box is that of a composition of boxes, fixed by its kind, the side lengths and where the children's corners $A$ and $B$ lie (Section 7.1); the $18$ compositions at the level-$1$ lengths (nine kinds, $B$ on either side of $A$), computed once, give the signature at every level.
A closed strand is finite, so when the hierarchy covers the plane it lies in one supertile, where the signature forbids
it; this gives Theorem A. The single strand (Theorem B) follows the same pattern. Unlike the signature, this
uses how each block sits in the next (as child $1$). In the next block up, every arc of a block lies on a hook (an arc
with both ends at one boundary vertex), and which hook depends only on where the arc meets the boundary; for vertices
well inside five of the six sides, only on the side (Lemma 9.3, Table 6). This junction
map is computed at level $1$ and carried to every level by the same lengthening. Followed three or four levels up, it
puts all the arcs of a block on one arc (Theorem 9.1).
The finite computations (the level-$1$ data and Computation 7.5; Computation 7.3 on the $18$ compositions at the
level-$1$ lengths, and Computation 9.2 on two of them) are exact; Computation 7.3 and Computation 9.2 are repeated in the
kernel of the Lean proof assistant, and so is Computation 7.5, on the level-$1$ supertiles of exact.py, with their corner
$A$, taken as input. The agreement with [Smith et al., A chiral aperiodic monotile, Figs. 4.1, 5.1] is
checked by scripts, against a render of Fig. 4.1, whose labels were transcribed from the figure, and against an
encoding of Fig. 5.1 (Appendix A). Figure 2 shows how the steps fit together, and which of them Lean checks.

exact.py, with their corner $A$, taken as input). Dashed: the
link with actual tilings, cited from [Smith et al., A chiral aperiodic monotile] or argued in words. Shaded and dashed: Lean checks the
combinatorial part, and the link with actual tilings is argued in words (Appendix B).2. Spectre tilings and their supertiles
Every homochiral tiling by $\Tile$ groups uniquely into supertiles of nine kinds, level above level, and every level is assembled by the same tables (cited from the spectre paper); two supertiles of the same kind and level are copies of each other.
An AI-generated paraphrase; the statements below are the paper’s.
← 1. The setting, the two theorems and the method3. The decoration and its strands →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (3 results)
Theorem 2.1 The spectre hierarchy cited
Let $\T$ be a homochiral tiling by $\Tile$.
- (a)[Smith et al., A chiral aperiodic monotile, Thms. 2.2, 3.1, 4.1, §5, Fig. 2.1] The tiles of $\T$ group uniquely into level-$1$ supertiles, each the image under a rotation and a translation of one of the clusters of Figure 3 (those of [Smith et al., A chiral aperiodic monotile, Fig. 2.1], reflected). Each contains one Mystic, in the position shown in [Smith et al., A chiral aperiodic monotile, Fig. 2.1]; this Mystic and the other tiles, taken singly, are the level-$0$ supertiles inside it. For every $m\ge1$ the level-$m$ supertiles of $\T$ group uniquely into level-$(m+1)$ supertiles. Each tile lies in a unique nested sequence $X_0\subset X_1\subset\cdots$ with $X_m$ a level-$m$ supertile.
- (b)[Smith et al., A chiral aperiodic monotile, Thms. 3.1, 4.1, 5.1, §5, Fig. 4.1] For every $m\ge 1$, the tiling of the plane by the level-$m$ supertiles of $\T$ is combinatorially equivalent (homeomorphic as a topological complex [Smith et al., A chiral aperiodic monotile, §2.2]) to a tiling by regular hexagons. Each level-$m$ supertile of kind $K$ corresponds to a hexagon marked as the hexagon $K$ of [Smith et al., A chiral aperiodic monotile, Fig. 4.2] if $m$ is even, and as its mirror image if $m$ is odd; adjacent supertiles correspond to hexagons that share an edge, and the labels on that edge match. The grouping into level-$(m+1)$ supertiles corresponds, up to reflection, to the grouping of hexagons shown in [Smith et al., A chiral aperiodic monotile, Fig. 5.1], and the six points where a level-$(m+1)$ supertile of kind $T$ meets two others correspond to the six points marked on the outline of the panel $T$. At level $1$, the six points where a supertile meets two others correspond to the dots marked on its cluster in [Smith et al., A chiral aperiodic monotile, Fig. 4.1], the points by which the proof of [Smith et al., A chiral aperiodic monotile, Thm. 4.1] tells the clusters apart.
Proposition 2.4 The pattern holds at every level argued
Let $\T$ be a homochiral tiling by $\Tile$, let $m\ge1$, and let $Y$ be one of its level-$(m+1)$ supertiles, of kind $T$, with children $X_0,\dots,X_{n_T-1}$. Then:
- (a)
- (b)side $j$ of $X_c$ is the same path of tile edges as side $j'$ of $X_{c'}$, traversed in the opposite direction, whenever Table 2 lists $c'.j'$, and it lies on the rim of $Y$ when the table lists $\rim$;
- (c)side $J$ of $Y$ is the concatenation of the children's sides listed in Table 3, and vertex $J$ of $Y$ is vertex $j+1$ of the child $c$ whose side $c.j$ is listed first for side $J$;
- (d)the crossover corner $A$ of $Y$ is vertex $0$ of its $\Gamma$ child, which is vertex $0$ of $Y$ if $T\neq\Sigma$, and lies inside side $5$ of $Y$ if $T=\Sigma$.
Lemma 2.6 Rigidity argued
Any two level-$m$ supertiles of the same kind, in possibly different homochiral tilings, are related by exactly one proper motion that maps descendants to descendants with the same numbers (children, their children, and so on, down to the tiles, and the first tile of a Mystic to the first tile). For $m\ge1$ this motion maps the six vertices, the sides and the corner $A$ of one supertile onto those of the other.
Also in §2 (2 definitions, 1 remark)
Definition 2.2 Own orientation definition
The own orientation of a level-$m$ supertile is anticlockwise if $m$ is even and clockwise if $m$ is odd. We write $\omega_m=(-1)^m$. Its own order is the cyclic order in which this orientation runs round its rim.
Definition 2.3 Composition pattern definition
The composition pattern gives, for each parent kind $T$, the kinds $K_0,\dots,K_{n_T-1}$ of the children (Table 1); for each side of each child, the sibling's side across it, or $\rim$ if it lies on the parent's rim (Table 2); and for each side of the parent, the children's sides that make it up, in the parent's own order (Table 3). Figure 4 draws it.
Remark 2.5 Computer cross-checks of the pattern remark
Since the proof uses Table 1, Table 2 and Table 3 as transcriptions of [Smith et al., A chiral aperiodic monotile, Fig. 5.1],
they were also checked by computer on actual supertiles (evidence, not used in the proof). The patterns of the actual
compositions $m\to m+1$, $m\le7$, equal the tables (in exact arithmetic for $m\le3$; from level $5$ on, the vertices are
placed by Proposition 2.4(c), so that part is used rather than tested, though at levels $5$ and $6$ they agree with
the vertices observed there); and Kaplan's implementation of
the substitution [Smith et al., A chiral aperiodic monotile] gives Table 1 and, tile for tile up to level $4$, the same
supertiles as exact.py (Appendix A).
From the running text of §2
What the paper gives between its numbered items, and the results above use or cite.
The tile and homochiral tilings §2.1, the paper’s running text
Let $\rho=e^{i\pi/6}$. The polygon $\Tile$ has fourteen unit edges; we label its vertices $v_0,\dots,v_{13}$ anticlockwise (Figure 5, left) and its edges $e_i=v_iv_{i+1}$ (indices mod $14$), with $v_0=0$ and
All vertices lie in $\ZZ[\rho]$. $\Tile$ is the equilateral member of the family $\mathrm{Tile}(a,b)$ [Smith et al., A chiral aperiodic monotile, §§1–2], with its long side split into the collinear edges $e_9,e_{10}$. It is the mirror image of the polygon drawn in [Smith et al., A chiral aperiodic monotile, Fig. 1.1] and has the handedness of the single Spectre and of the Mystic in [Smith et al., A chiral aperiodic monotile, Fig. 2.1]. A tiling by $\Tile$ is homochiral if any two of its tiles are related by a proper motion (a rotation followed by a translation). Spectres are tiles whose tilings correspond exactly to the homochiral tilings by $\Tile$, each Spectre placed by the same isometry as the corresponding copy of $\Tile$ [Smith et al., A chiral aperiodic monotile, §2, Lemma 2.1]; one is obtained by replacing every edge of $\Tile$ by a suitable curve. So what [Smith et al., A chiral aperiodic monotile] proves for tilings by Spectres holds for homochiral tilings by $\Tile$ [Smith et al., A chiral aperiodic monotile, p. 5]. Such tilings exist [Smith et al., A chiral aperiodic monotile, Thm. 2.2], and in each, tiles meet full edge to full edge [Smith et al., A chiral aperiodic monotile, proof of Lemma 2.1]. Reflecting the plane if necessary, we assume that every tile is the image of $\Tile$ under a rotation and a translation; a reflection carries the decoration of each tile (Definition 3.1) to that of its image, and so strands to strands. The tile has no non-trivial symmetry, proper or improper (its turning angles at $v_1,\dots,v_{13},v_0$, in units of $30^\circ$, are $-2,3,2,-3,2,3,2,-3,2,0,2,3,-2,3$; the only $0$ is at $v_{10}$, and the sequence is not symmetric about it), so an isometry between two tiles is unique.
Supertiles: kinds, levels and children §2.2, the paper’s running text
We use the hierarchy of [Smith et al., A chiral aperiodic monotile], with nine kinds $\Gamma,\Delta,\Theta,\Lambda,\Xi,\Pi,\Sigma,\Phi,\Psi$. A level-$0$ supertile of kind $K\neq\Gamma$ is a single tile; one of kind $\Gamma$ is a Mystic [Smith et al., A chiral aperiodic monotile, Fig. 2.1] (the darker pair of tiles in Figure 3): a pair of tiles $\{h(\Tile),\ h(g(\Tile))\}$, where $g(z)=\rho z+v_8$ and $h$ is a proper motion, with first tile $h(\Tile)$. The first tile is determined by the pair, since the Mystic has no non-trivial proper symmetry: a symmetry exchanging its tiles would be an involution taking $\Tile$ to $g(\Tile)$, but the only proper motion doing so is $g$, a rotation by $30^\circ$. A level-$(m+1)$ supertile of kind $T$ is the union of level-$m$ supertiles, its $n_T$ children, of the kinds listed in Table 1, where $n_\Gamma=7$ and $n_T=8$ for $T\neq\Gamma$. A level-$1$ supertile has the kind of its cluster in [Smith et al., A chiral aperiodic monotile, Fig. 4.1]; the positions of its six vertices (Figure 3) determine that kind [Smith et al., A chiral aperiodic monotile, proof of Thm. 4.1]; a level-$(m+1)$ supertile, $m\ge1$, has kind $T$ if its children form the panel $T$ of [Smith et al., A chiral aperiodic monotile, Fig. 5.1] (described below). The children of a level-$1$ supertile are numbered as in Figure 3, and those of a supertile of level $\ge2$ by their places in [Smith et al., A chiral aperiodic monotile, Fig. 5.1], as listed in the last two rows of Table 1 (the match is unique: each panel has one $\Gamma$, one $\Delta$ and one $\Sigma$, and every other hexagon is told apart from those of its kind by which of these three it touches; Table 1 and Table 2). A level-$0$ supertile that is a single tile gets the kind listed in Table 1 for its child number in its level-$1$ supertile (so a level-$0$ $\Delta$ is a child $1$); beyond that, only the distinction between $\Gamma$ and the other kinds is used at level $0$. Child $1$ of every supertile is a $\Delta$ and the last child a $\Gamma$, and a $\Delta$ of level $m\ge1$ occurs only as child $1$.
Rim, vertices and sides of a supertile §2.2, the paper’s running text
By Theorem 2.1(b), every level-$m$ supertile ($m\ge1$) is a closed topological disc whose boundary, its rim, is a simple closed polygon made of tile edges. Its vertices are the six points of the rim where it meets two other level-$m$ supertiles, and its sides are the six arcs of the rim between consecutive vertices. (The tile vertices on a rim are called rim vertices; for a supertile of level $\ge1$, “vertex” alone always means one of the six.) If a vertex of one level-$m$ supertile lies on the rim of another, it is a vertex of the other too, since exactly three level-$m$ supertiles meet there. Each side is shared, as a path of tile edges, with exactly one neighbouring supertile.
The crossover corners A and B §2.3, the paper’s running text
Thus a child and its parent are always oriented oppositely. Each supertile of level $m\ge1$ has a distinguished rim vertex $A$, its crossover corner, defined recursively: for a level-$1$ supertile, $A$ is the vertex $v_0$ of the first tile of its Mystic; for a level-$(m+1)$ supertile, $m\ge1$, $A$ is the crossover corner of its $\Gamma$ child. (That this point lies on the rim is computed at level $1$ and follows from Proposition 2.4(d) at higher levels.) The second corner $B$ is the rim vertex next to $A$ anticlockwise (the sense in which $v_1$ follows $v_0$ on $\Tile$); as own order alternates with $m$, this is $B=A+\omega_m$ in its own order. We call $A$ and $B$ the crossover corners, since the supertile's two crossover arcs run between them (Theorem 7.6), as a tile's two crossover pieces run between $v_0$ and $v_1$ (Definition 3.1). The vertices of a level-$m$ supertile ($m\ge1$) are numbered $0,\dots,5$ in its own order, starting with the first vertex at or after $A$; side $j$ runs from vertex $j$ to vertex $j+1$ (Figure 3).
← 1. The setting, the two theorems and the method3. The decoration and its strands →
3. The decoration and its strands
Every tile carries the same fourteen ribbon pieces and ribbons run straight through each edge, so every strand is a closed loop or a two-way infinite path.
An AI-generated paraphrase; the statements below are the paper’s.
← 2. Spectre tilings and their supertiles4. Boxes and the signature →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (1 result, 3 definitions · 1 in Lean)
Definition 3.1 The decoration definition
The decoration pairs the $28$ ports of $\Tile$ by fourteen pieces:
Every tile of a homochiral tiling carries the image of this decoration.
Definition 3.2 Straight-through rule definition
The port of $t$ on $e$ near $x$ is joined to the port of $t'$ on $e$ near $y$, and the port of $t$ near $y$ to the port of $t'$ near $x$.
Definition 3.3 Strand graph definition
Let $\T$ be a homochiral tiling. The strand graph $\G(\T)$ is the multigraph with one vertex for each piece of each tile and, for each pair of ports joined by the straight-through rule, one edge between the two pieces that end at these ports. A strand is a connected component of $\G(\T)$; a strand is closed if it is finite.
Lemma 3.4 Strands are cycles or lines argued Lean
Every vertex of $\G(\T)$ has degree $2$. Hence every strand is either a finite cycle (a closed strand) or a two-way infinite path.
From the running text of §3
What the paper gives between its numbered items, and the results above use or cite.
Ports §3.1, the paper’s running text
Let $t$ be a tile and $e$ one of its edges, with endpoints $x$ and $y$. The tile has two ports on $e$, the port near $x$ and the port near $y$; formally, they are the triples $(t,e,x)$ and $(t,e,y)$. In the drawing (Figure 5), $e$ carries one crossing point, where two ribbon ends of $t$ meet; followed from there into $t$, one piece runs towards $x$ and the other towards $y$. These ends are the two ports. For a vertex $v_i$ of $\Tile$, write
the ports just after and just before the vertex $v_i$ in anticlockwise order. Each of the $28$ ports is $\Rp(v_i)$ or $\Lp(v_i)$ for exactly one $i$.
← 2. Spectre tilings and their supertiles4. Boxes and the signature →
4. Boxes and the signature
Seen from outside, a patch is a box, a pairing of the ports on its rim, and boxes glue by following ports; the signature is a hook at every rim vertex but two adjacent ones, where the ribbons cross over, and no closed strand inside, and a tile has it.
An AI-generated paraphrase; the statements below are the paper’s.
← 3. The decoration and its strands5. The Zigzag Lemma →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (3 results, 1 definition · 3 in Lean)
Lemma 4.1 The box of a patch argued Lean, in part
Start at a rim port of $P$ and follow the pieces of the tiles of $P$, crossing interior edges of $P$ by the straight-through rule. The path ends at a different rim port. This defines a fixed-point-free involution $\pi_P$ of the set of rim ports. The pieces of $P$ that are not reached from any rim port form finitely many cycles, the closed strands of $P$.
Lemma 4.2 Gluing argued Lean, in part
Let a patch $P$ be the union of patches $P_1,\dots,P_n$ with pairwise disjoint interiors. Then the box of $P$ is determined by the boxes of the $P_i$ together with the identification of their shared rim edges. More precisely, $\pi_P$ is computed by alternately applying the $\pi_{P_i}$ and the straight-through rule across shared edges, until a rim port of $P$ is reached. The closed strands of $P$ are those of the $P_i$ together with the cycles of this alternation that contain no rim port of $P$.
Definition 4.3 Signature definition
Let $A$ and $B$ be adjacent rim vertices of a patch $P$. We say that $P$ has the signature at $(A,B)$ if
- (i)$\pi_P(\Lp(u))=\Rp(u)$ for every rim vertex $u\notin\{A,B\}$ (a hook at $u$; we also say that $u$ is a hook of $P$, and call the arc of $P$ from $\Lp(u)$ to $\Rp(u)$ its hook arc at $u$);
- (ii)$\pi_P(\Rp(A))=\Rp(B)$ and $\pi_P(\Lp(A))=\Lp(B)$ (the crossover);
- (iii)$P$ has no closed strand: the ribbon followed from any port of $P$ reaches the rim.
Lemma 4.4 Signature of the tile argued Lean
A tile has the signature at $(v_0,v_1)$.
From the running text of §4
What the paper gives between its numbered items, and the results above use or cite.
Patches and their rim ports §4.1, the paper’s running text
A patch is a finite set $P$ of tiles of a homochiral tiling whose union is a closed disc with a simple polygonal boundary, the rim $\rim P$. Every supertile of level $\ge1$ is a patch (Theorem 2.1), and so is a tile. Every rim edge belongs to exactly one tile of $P$. Every other edge of a tile of $P$ is an interior edge, shared by two tiles of $P$: its relative interior lies inside the disc, so the tile across it is in $P$. Let $E=E(P)$ be the number of rim edges, and number the rim vertices $u_0,\dots,u_{E-1}$ in a chosen orientation of the rim, indices mod $E$; for a supertile we use its own orientation unless we say otherwise. For a rim vertex $u_k$ define the rim ports
where the port belongs to the tile of $P$ containing that edge. There are $2E$ rim ports. For a single tile, in its own (anticlockwise) orientation, these are the ports $\Rp(v_i),\Lp(v_i)$ of Section 3. Reversing the orientation exchanges $\Rp$ and $\Lp$ at every rim vertex.
Arcs and boxes §4.1, the paper’s running text
We call the paths of Lemma 4.1 the arcs of $P$; there are exactly $E$ of them. The rim of $P$ with the pairing $\pi_P$ is the box of $P$. All we need to know about the inside of $P$ is its box and whether $P$ has a closed strand; the next lemma computes both from smaller patches.
Boxes taken abstractly §4.1, the paper’s running text
We use Lemma 4.2 in two ways: to define the box of a composition, glued from boxes alone (Section 7.1), and to compute the box of a supertile from those of its children. For the first, a box is taken abstractly: a cyclically ordered set of rim vertices $u$, each with two ports $\Lp(u),\Rp(u)$, together with a fixed-point-free involution $\pi$ of these ports; conditions (i) and (ii) of Definition 4.3 make sense for any box.
5. The Zigzag Lemma
Where two boxes with hooks are glued along a path, the ribbons zigzag along it and come out according to the parity of its length alone, so lengthening a shared path by two edges changes nothing.
An AI-generated paraphrase; the statements below are the paper’s.
← 4. Boxes and the signature6. Side lengths →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (1 result · 1 in Lean)
Lemma 5.1 Zigzag Lemma argued Lean
Let $u_0u_1\cdots u_n$ ($n\ge1$) be a path of $n$ edges lying on the rims of two distinct children $X_c$ and $X_{c'}$, traversed by $X_c$ from $u_0$ to $u_n$. Suppose that none of the interior vertices $u_1,\dots,u_{n-1}$ is a crossover corner of $X_c$ or of $X_{c'}$. Then alternately applying the straight-through rule across the edges $u_ku_{k+1}$ and the hooks of $X_c$ and $X_{c'}$ at $u_1,\dots,u_{n-1}$ connects the ports of $X_c$ and $X_{c'}$ near $u_0$ on $u_0u_1$ and near $u_n$ on $u_{n-1}u_n$ in pairs as follows:
These two connections use every port on the edges of the path.
6. Side lengths
Side lengths depend only on their letters and are Fibonacci forms that only grow and never change parity; the crossover corner is vertex 0, or for $\Sigma$ an even number of edges along side 5, and every side has at least five edges.
An AI-generated paraphrase; the statements below are the paper’s.
← 5. The Zigzag Lemma7. The signature at every level, and the Daedalus Theorem →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (5 results · 5 in Lean)
Proposition 6.1 Lengths by letter argued Lean
For every $m\ge1$ the length $\ell_m(K,j)$ depends only on the letter of side $j$ of $K$. Write $x_m$ for the common length of the level-$m$ sides with letter $x$. Then
with $(\alpha_1,\beta_1,\gamma_1,\delta_1,\epsilon_1,\zeta_1,\eta_1,\theta_1)=(7,5,10,10,8,6,10,11)$.
Proposition 6.2 Fibonacci side lengths argued Lean
For every $m\ge1$,
Corollary 6.3 Parities are constant argued Lean
For every $m\ge1$ the lengths $\alpha_m$, $\beta_m$, $\theta_m$ are odd and $\gamma_m$, $\delta_m$, $\epsilon_m$, $\zeta_m$, $\eta_m$ are even.
Lemma 6.4 Position of A argued Lean
Let $m\ge1$. For $K\neq\Sigma$, the crossover corner $A$ of a level-$m$ $K$-supertile is its vertex $0$. For $K=\Sigma$, $A$ lies inside side $5$ (letter $\delta$), $d_m$ edges along it from vertex $5$ and $\delta_m-d_m=2\Fib_{3m}$ edges from vertex $0$, where
Lemma 6.5 Lower bounds argued Lean
For every $m\ge1$: every side has length at least $5$; $d_m\ge6$; and $\delta_m-d_m\ge4$.
From the running text of §6
What the paper gives between its numbered items, and the results above use or cite.
Side lengths §6, the paper’s running text
For $m\ge1$, write $\ell_m(K,j)$ for the number of edges of side $j$ of a level-$m$ supertile of kind $K$; by Lemma 2.6 it is well defined.
Letters §6.1, the paper’s running text
By ($\ast$) in the proof of Proposition 2.4, every side of a level-$m$ supertile ($m\ge1$) carries the edge label of [Smith et al., A chiral aperiodic monotile, Fig. 4.2] that Table 4 lists. The letter of a side is its label without the sign; there are eight letters, $\alpha,\beta,\gamma,\delta,\epsilon,\zeta,\eta,\theta$. By the matching rule (Section 2.2), two sides glued to each other have the same letter; for sides glued inside a supertile this can also be read off Table 1, Table 2 and Table 4.
← 5. The Zigzag Lemma7. The signature at every level, and the Daedalus Theorem →
7. The signature at every level, and the Daedalus Theorem
Every composition is reached from its level-1 form by lengthening two edges at a time, which changes nothing, so the 18 level-1 compositions, computed, give every supertile the signature; a closed strand would lie inside one supertile, so a tiling whose hierarchy covers the plane has none: the Daedalus Theorem.
An AI-generated paraphrase; the statements below are the paper’s.
← 6. Side lengths8. The nest tiling →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (7 results · 7 in Lean)
Lemma 7.1 Lengthening argued Lean
If $C_T(L,d,\omega)$ has the signature, then so does $C_T(L',d',\omega)$, for every move $(L,d)\to(L',d')$.
Lemma 7.2 Reachability argued Lean
(a) For every $m\ge1$, the pair $(\ell_m,d_m)$ is admissible. (b) Every admissible $(L,d)\neq(\ell_1,d_1)$ arises by a move from an admissible pair $(\bar L,\bar d)$ with $\sum_{c,j}\bar L(c,j)<\sum_{c,j}L(c,j)$. The move can be chosen so that its edge $e$ lies at least two edges from both ends of its side (at least two edges of the side precede $e$ and at least two follow it), in each child that contains it, unless that side is side $5$ of the $\Sigma$ child or is glued to it. (This is used only for the junction map of Section 9.2.)
Hence a property of pairs that holds at $(\ell_1,d_1)$ and is kept by the moves of (b) holds at every admissible pair, in particular at $(\ell_m,d_m)$ for every $m\ge1$.
Computation 7.3 The compositions at the level-1 lengths computed Lean
For each of the nine kinds $T$ and both signs $\omega$, the composition $C_T(\ell_1,d_1,\omega)$ has the signature.
Proposition 7.4 Compositions at every level argued Lean
For every $m\ge1$, every kind $T$ and both signs $\omega$, the composition $C_T(\ell_m,d_m,\omega)$ has the signature.
Computation 7.5 Base case computed Lean, in part
Each of the nine level-$1$ supertiles of Figure 3, and so by Lemma 2.6 every level-$1$ supertile, has the side lengths $\ell_1(K,j)=x_1$, where $x$ is the letter of side $j$ (Table 4) and $(\alpha_1,\dots,\theta_1)=(7,5,10,10,8,6,10,11)$; its crossover corner $A$ is vertex $0$ if its kind is not $\Sigma$, and for $\Sigma$ lies inside side $5$, $d_1=6$ edges along it from vertex $5$; and it has the signature at $(A,B)$, where $B=A+\omega_1$ in its own order.
Theorem 7.6 Signature Theorem argued Lean
In every homochiral tiling by $\Tile$, for every $m\ge1$, every level-$m$ supertile of every kind has the signature at $(A,B)$, where $A$ is its crossover corner (Section 2.3), placed as in Lemma 6.4, and $B=A+\omega_m$ in its own order. In particular no such supertile contains a closed strand.
Theorem A The Daedalus Theorem argued Lean, in part
In every homochiral tiling of the plane by $\Tile$ whose supertile hierarchy covers the plane, with every tile carrying the decoration of Figure 1 (Definition 3.1), there is no closed strand: every strand is a two-way infinite path of ribbon pieces.
From the running text of §7
What the paper gives between its numbered items, and the results above use or cite.
Compositions §7.1, the paper’s running text
Compositions. Fix a parent kind $T$, with children $c=0,\dots,n_T-1$ of kinds $K_c$ (Table 1), exactly one of which, $c_\Sigma$, is a $\Sigma$, and exactly one, the last, a $\Gamma$. Let $L$ assign to each child $c$ and side $j\in\{0,\dots,5\}$ a positive integer $L(c,j)$, with equal values on sides glued by Table 2; let $d$ be an integer with $2\le d\le L(c_\Sigma,5)-2$; and let $\omega\in\{\pm1\}$. The composition $C_T(L,d,\omega)$ is the following abstract patch of boxes. Child $c$ has $E_c=\sum_jL(c,j)$ rim vertices, numbered $0,\dots,E_c-1$ in its own order; its vertex $j$ (one of the six) is rim vertex $V_c(j)=\sum_{i<j}L(c,i)$, and side $j$ runs from $V_c(j)$ to $V_c(j+1)$. Its crossover corner $A_c$ is rim vertex $0$, or, for $c=c_\Sigma$, rim vertex $V_c(5)+d$, at distance $d$ from vertex $5$ along side $5$; $B_c=A_c+\omega$ (as $2\le d\le L(c_\Sigma,5)-2$, the corners $A_\Sigma=A_{c_\Sigma}$ and $B_{c_\Sigma}$ lie strictly inside side $5$); and it is a box satisfying (i) and (ii) of Definition 4.3 at $(A_c,B_c)$. Sides are glued in pairs as in Table 2, reversing direction: the $r$-th edge of side $j$ of $c$ is the $r$-th edge from the end of side $j'$ of $c'$. The sides marked $\rim$ form the rim of the composition, in the order of Table 3 reversed (the table follows the parent's own orientation; the composition, like its children, has the opposite one); the ports of a rim vertex are those of the children on its two rim edges. Following ribbons alternately through a child, by its pairing, and straight across a glued edge, as in Lemma 4.2, defines the box of the composition and its closed strands, the cycles of this alternation that contain no rim port of the composition. The Zigzag Lemma and its proof apply unchanged to compositions, since they use only the pairings of the children and the straight-through rule. We say that $C_T(L,d,\omega)$ has the signature if the crossover corners $A_\Gamma,B_\Gamma$ of its $\Gamma$ child are adjacent rim vertices of the composition and it has the signature at $(A_\Gamma,B_\Gamma)$ (Definition 4.3, applied to its box and its closed strands).
Write $\ell_m$ also for the function $(c,j)\mapsto\ell_m(K_c,j)$; by Section 6 and Lemma 6.5, $C_T(\ell_m,d_m,\omega)$ is defined.
The Reduction: a supertile is its composition §7.1, the paper’s running text
Reduction (A supertile is its composition). Let $m\ge1$, and let $Y$ be a level-$(m+1)$ supertile of kind $T$ whose children $X_c$ have the signature at $(A_c,A_c+\omega_m)$ in their own orientation. Then the children of $Y$, with their rims, sides, corners $A_c,B_c$ and the gluing of their sides, and the rim of $Y$ read in the children's order, match those of $C_T(\ell_m,d_m,\omega_m)$. So the box of $Y$ is the box of the composition, and $Y$ has a closed strand if and only if the composition has one.
Indeed: (i) by Proposition 2.4(a),(b) and Proposition 6.1 the children have the kinds and side lengths of the composition, and side $j$ of $X_c$ is side $j'$ of $X_{c'}$ traversed oppositely; (ii) two children meet only along the closed sides they share: at a point inside a side of a child, the rim edges there are shared with the partner across that side, so the child and its partner fill a neighbourhood; and at a vertex exactly three level-$m$ supertiles meet, any two of them sharing a side that ends there (Theorem 2.1(b)); (iii) so each side of a child is wholly shared with one sibling or wholly on the rim, as in Table 2; (iv) $A_c$ is placed by Lemma 6.4, and $B_c=A_c+\omega_m$ by hypothesis; (v) the rim of the parent is given by Table 3 (Proposition 2.4(c)). By Lemma 4.2, the strands of the supertile are then those of the composition, and its box is the box of $C_T(\ell_m,d_m,\omega_m)$. Step (ii) is the one geometric step, argued here: it ensures that the children touch only along the gluings of (i), so that no other edges join their ribbons. With Theorem 2.1, Proposition 2.4 and Lemma 2.6 it makes up part (M1) of the link with actual tilings, which the formalisation does not prove but takes as given (Appendix B). The compositions themselves are built from the tables alone, and the tables are consistent: Table 3 lists exactly once each side that Table 2 puts on the rim, and turning about the end vertex of each entry, across sides that Table 2 glues, leads to the start of the next entry (a finite check, made in the formalisation). For instance, $7.5$ ends at vertex $5$ of child $7$; side $4$ of child $7$ is side $5$ of child $6$, so this is vertex $5$ of child $6$, whose side $4$ lies on the rim and is the next entry, $6.4$.
Moves §7.2, the paper’s running text
Let $(L,d)$ be as above. A move lengthens one side of one child by two edges, together with the side glued to it if there is one. In the composition, an edge $e$ of that side is replaced by a path of three edges through two new vertices; $e$ must be neither the first nor the last edge of its side (in each child that contains it), nor one of the two edges at $A_\Sigma$. This ensures that the edge between $A_c$ and $B_c$ is never cut, as the proof of Lemma 7.1 needs: for a child other than the $\Sigma$ child, $A_c$ is vertex $0$, the end of side $5$ and the start of side $0$, and $B_c$ is next to it. The result is $(L',d')$: $L'$ is $L$ with the side, and its partner, two edges longer; $d'=d+2$ if $e$ lies on side $5$ of the $\Sigma$ child between its vertex $5$ and $A_\Sigma$, and $d'=d$ otherwise.
Admissible pairs §7.2, the paper’s running text
Call $(L,d)$ admissible if sides glued by Table 2 have the same length; $L(c,j)\ge\ell_1(c,j)$ and $L(c,j)\equiv\ell_1(c,j)\pmod2$ for all $c$ and $j$; $d\ge d_1$ and $d\equiv d_1\pmod2$; and $L(c_\Sigma,5)-d\ge\ell_1(c_\Sigma,5)-d_1=4$. Then $d\ge6$ and $L(c_\Sigma,5)-d\ge4$, so the composition $C_T(L,d,\omega)$ is defined. Every admissible pair is reached from $(\ell_1,d_1)$ by moves (Lemma 7.2), which only lengthen sides, two edges at a time. Admissible pairs need not be the side lengths of actual supertiles, since $L$ may give different lengths to sides with the same letter.
8. The nest tiling
The nest tiling is grown from one tile, each block child 1 of the next; each block lies strictly inside the block two levels up, so the blocks cover the plane.
An AI-generated paraphrase; the statements below are the paper’s.
← 7. The signature at every level, and the Daedalus Theorem9. Merging, and the Ariadne Theorem →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (4 results · 1 in Lean)
Construction 8.1 The nest argued
Let $\T$ be a homochiral tiling (one exists [Smith et al., A chiral aperiodic monotile, Thm. 2.2]). For each $h\ge0$, let $Y^{(h)}$ be a level-$h$ $\Delta$-supertile of $\T$; one exists, for instance child $1$ of any level-$(h+1)$ supertile. Let $Y^{(h)}=Y^{(h)}_h\supset Y^{(h)}_{h-1}\supset\cdots\supset Y^{(h)}_0$ be its chain of descendants, $Y^{(h)}_b$ being child $1$ of $Y^{(h)}_{b+1}$ for $b<h$. Let $g_h$ be the proper motion taking the tile $Y^{(h)}_0$ onto $\Tile$ (whose vertex $v_0$ is the origin), and put $N^{(h)}_b=g_h(Y^{(h)}_b)$ for $b\le h$.
Proposition 8.2 The blocks are well defined argued
$N^{(h)}_b$ depends neither on $h\ge b$ nor on the choices made. Write $N_b$ for it; then $N_0=\{\Tile\}$, and $N_b$ is child $1$ of $N_{b+1}$ for every $b$.
Lemma 8.3 Grandparent Lemma argued Lean, in part
Let $b\ge1$. (a) The block $N_b$ does not meet the rim of $N_{b+2}$. (b) Every edge of a tile of $N_b$ is shared by two tiles of $N_{b+2}$.
Proposition 8.4 The nest tiles the plane argued
$\N$ is a homochiral tiling of the plane, and any finitely many of its tiles lie in a common block $N_b$ with $b\ge1$.
From the running text of §8
What the paper gives between its numbered items, and the results above use or cite.
The nest tiling and its blocks §8, the paper’s running text
The nest tiling is $\N=\bigcup_{b\ge0}N_b$, a set of tiles; we call the $N_b$ its blocks.
The nest tiling has no closed strand, and its hierarchy is its chain of blocks §8, the paper’s running text
For every $h\ge b$, the block $N_b$ is a level-$b$ $\Delta$-supertile of the homochiral tiling $g_h(\T)$ (Construction 8.1 and Proposition 8.2), so Theorem 7.6 applies to it if $b\ge1$. By Proposition 8.2 and Proposition 8.4 and Lemma 8.3(b), the chain $N_1\subset N_2\subset\cdots$, whose union is the tiling $\N$, satisfies the hypothesis of Step 2 of the proof of Theorem A; so $\N$ has no closed strand. Moreover, for each $m\ge1$ the level-$m$ descendants of the blocks $N_b$, $b\ge m$, partition the tiles of $\N$ (they agree for different $b$, since $N_b$ is child $1$ of $N_{b+1}$), and each level is grouped into the next as in $g_h(\T)$ for large $h$. So this grouping has the properties of Theorem 2.1(a): its level-$1$ groups are clusters of Figure 3, each with its Mystic, and each group of level $m+1$ is a supertile of some $g_h(\T)$, made of groups of level $m$. By the uniqueness in Theorem 2.1(a), these are the supertiles of $\N$; those containing $N_0$ are the blocks, whose union is the plane (Proposition 8.4). So the hierarchy of $\N$ covers the plane: $\N$ has no fault, and Theorem A applies to it.
← 7. The signature at every level, and the Daedalus Theorem9. Merging, and the Ariadne Theorem →
9. Merging, and the Ariadne Theorem
The junction map, computed at level 1 and carried up by the same lengthening, puts every arc of $N_b$ on one arc of $N_{b+4}$ (of $N_{b+3}$ for $b$ even), so the ribbon pieces of the nest tiling form one strand: the Ariadne Theorem.
An AI-generated paraphrase; the statements below are the paper’s.
← 8. The nest tiling10. What is covered →
How the results of this step depend on each other
Solid cards are the results of this step; dashed cards are results of neighbouring steps they connect to. Premises above conclusions; an arrow may pass through results not drawn here. Click a card for its page.
The results of this step (5 results · 5 in Lean)
Theorem 9.1 Merging argued Lean
For every $b\ge1$, $\mathcal P_4(b)$ has a single class; if $b$ is even, so does $\mathcal P_3(b)$. These bounds are exact: $\mathcal P_2(b)$ has two classes, and so does $\mathcal P_3(b)$ if $b$ is odd.
Computation 9.2 The junction map at the level-1 lengths computed Lean
Let $\omega=\pm1$. In $C_\Delta(\ell_1,d_1,\omega)$, put child $1$ in the place of $N_m$, and define indices and junctions as above. Then the ribbon from every port $p$ of child $1$, except the ports at rim vertices strictly inside its side $2$, followed from $p$ through child $1$ and on, reaches the rim of the composition at junction $q$, where $q$ is given by Table 6 with $\omega_m=\omega$.
Lemma 9.3 The junction map argued Lean
Let $m\ge1$. In $N_{m+1}$, the hook arc of $N_m$ at each rim vertex strictly inside side $2$ of $N_m$ is a hook arc of $N_{m+1}$, and every other arc of $N_m$ lies on the hook $H_q$ of $N_{m+1}$, where $q$ is given by Table 6.
Lemma 9.4 Where the junctions lie argued Lean
Let $m\ge1$. The junctions $9$, $12$, $16$, $17$ and $21$ of $N_{m+1}$ lie on its sides $2$, $3$, $4$, $4$ and $5$ respectively, at least two edges from both ends of the side. Every rim vertex strictly inside side $2$ of $N_m$ lies on side $4$ of $N_{m+1}$, at least two edges from both ends.
Theorem B The Ariadne Theorem argued Lean, in part
In the nest tiling $\N$, with every tile carrying the decoration of Figure 1 (Definition 3.1), all the ribbon pieces of all the tiles form a single strand. It is a two-way infinite path that passes through every tile. More precisely, for every $b\ge 1$, all the pieces of the block $N_b$ lie on a single arc of $N_{b+3}$ if $b$ is even, and of $N_{b+4}$ if $b$ is odd.
From the running text of §9
What the paper gives between its numbered items, and the results above use or cite.
Merging: classes of arcs §9.1, the paper’s running text
For $b\ge0$ and $k\ge0$, every arc of $N_b$ lies on a unique arc of $N_{b+k}$, because $N_{b+k}$ has no closed strand. Let $\mathcal P_k(b)$ be the partition of the arcs of $N_b$ in which two arcs are in the same class if they lie on the same arc of $N_{b+k}$. The classes only merge as $k$ increases; Table 5 gives their number.
Junctions and their hooks §9.2, the paper’s running text
Let $m\ge1$. The rim of $N_{m+1}$, read in its own order from its corner $A$, is the concatenation of the $22$ sides of children at positions $q=0,\dots,21$ in the eight-children part of Table 3, and the $\Delta$ row gives the first position of each side of $N_{m+1}$. The junction $q$ is the rim vertex of $N_{m+1}$ at which the side at position $q$ starts (Figure 4, left). Junctions are where the rim passes from one of these sides to the next. Every other rim vertex of $N_{m+1}$ lies strictly inside one child's side, and by Theorem 7.6 an arc of $N_{m+1}$ with an end there is an arc of that child alone (its hook there or, at $B$, a crossover arc of the $\Gamma$ child, the only child with crossover corners on the rim, as noted after Computation 7.3); so an arc of $N_{m+1}$ that runs through more than one child, such as one continuing an arc of $N_m$ into its siblings, has both its ends at junctions. The junctions $9,12,16,17,21$ lie inside sides $2,3,4,4,5$ of $N_{m+1}$, at least two edges from their ends (Lemma 9.4 below, which uses only Table 3 and Lemma 6.5), so they are hooks of $N_{m+1}$ (Theorem 7.6); we write $H_q$ for the hook arc of $N_{m+1}$ at junction $q$. The side at position $16$ is $1.2$, side $2$ of $N_m$, so junctions $16$ and $17$ are its two ends, vertices $3$ and $2$ of $N_m$ respectively. The rim vertices of $N_m$ are indexed $0,\dots,E-1$, where $E=E(N_m)$ is their number, in its own order from its corner $A$, so that its vertices $0,\dots,5$ have indices $0=V_0<V_1<\dots<V_5<E$; its corner $B=A+\omega_m$ has index $1$ if $m$ is even and $E-1$ if $m$ is odd.
10. What is covered
The single strand is proved for the nest tiling only; along another chain the pieces appear to form three strands, which is computed, not claimed, and tilings with faults are not covered.
An AI-generated paraphrase; the statements below are the paper’s.
← 9. Merging, and the Ariadne TheoremThe route →
What is covered, as the paper’s §10 states it
The whole section.
The theorems use only the pairing of ports (Definition 3.1) and the straight-through rule (Definition 3.2), so they hold for any drawing that realises these, including drawings on the curved Spectre, whose tilings correspond to the homochiral tilings by $\Tile$ (Section 2). For a decoration with its crossover at another pair of adjacent vertices, the same finite computations can be run; their outcome may differ.
In a tiling with a fault, the union of the supertiles containing a tile, an infinite supertile [Tatham, Finite-state transducers for substitution tilings, §5], is only part of the plane, and two or more infinite supertiles meet along the fault; Tatham [Tatham, Finite-state transducers for substitution tilings, §7.3] gives an example. A closed strand inside one infinite supertile is ruled out by Theorem 7.6: its finitely many tiles lie in one supertile, and every edge it crosses is shared by two of them, so it is a closed strand of that supertile. The argument does not reach a closed strand that crosses the fault, and whether one can occur is open. Theorem B is not affected, since the nest tiling has no fault (Section 8).
The nest tiling follows the chain $\Delta\subset\Delta\subset\cdots$, with child number $1$ at every step. It is not
the only chain of constant kind and child number, since $\Gamma$, $\Sigma$, $\Phi$ and $\Psi$ each have a child of their
own kind (Table 1); the others are not treated here. In any tiling
whose hierarchy covers the plane, the supertiles $X_1\subset X_2\subset\cdots$ containing a tile give a chain
$(K_m,c_m)_{m\ge1}$: $X_m$ has kind $K_m$ and is child $c_m$ of $X_{m+1}$. The induction of Section 7 does
not depend on the chain, but the merging of Section 9 does, and computations, not used in the proofs, indicate
that the number of strands does too. Take $(K_m,c_m)=(\Theta,2)$ for odd $m$ and $(\Gamma,7)$ for even $m$. This chain
is built as in Construction 8.1 and covers the plane by the argument of Lemma 8.3 and Proposition 8.4: by
Table 2 and Table 3, a $\Theta$ that is child $2$ of a $\Gamma$ meets the rim of its parent only at the parent's
vertex $3$ and inside the parent's sides $2$ and $3$, and a $\Gamma$ that is child $7$ of a $\Theta$ only at the
parent's vertex $0$ and inside the parent's sides $5$ and $0$; one level up, these sides face siblings. Along this
chain, the arcs of $X_1$ lie on exactly three arcs of $X_m$ for
$3\le m\le8$ (exact arithmetic), and still on three at $m=20$ (a symbolic count); we have not proved that this
persists. In all but five of $90{,}000$ chains chosen at random ($30{,}000$ for each $b=1,2,3$; $X_b$ of a random kind,
and each parent drawn uniformly from the pairs $(T,c)$ of Table 1 whose child $c$ has the current kind),
the arcs of $X_b$ lie on a single arc of $X_m$ for some $m\le20$ (folder paper/code/experiments/ of the
repository in Appendix A). It is open which tilings whose hierarchy covers the plane carry a single
strand, and which numbers of strands occur.
The results and how they depend on each other
The 28 results of the paper that the argument is made of. Premises above, conclusions below; click a result for its page.
An arrow runs from a result to one whose statement or proof cites it, or an equation in it, by number (for a result stated without a proof, the sentence that leads into it counts); an arrow is left out when a longer chain of arrows already joins the two. Each result’s page lists everything it cites, including definitions, remarks and tables. Uses described only in words are not drawn. On a narrow screen, scroll sideways. The route pages carry one smaller graph per step.
Not cited by number in any statement or proof: Lemma 4.4 Signature of the tile.
The results as a table
Step: the step of the route. Rests on: the results below it in the graph. Depth: the length of a shortest chain of citations from it up to Theorem A or B.
| result | step | rests on | depth | marks |
|---|---|---|---|---|
| Theorem A The Daedalus Theorem | 7 | 18 | 0 | argued Lean, in part |
| Theorem B The Ariadne Theorem | 9 | 26 | 0 | argued Lean, in part |
| Theorem 2.1 The spectre hierarchy | 2 | 0 | 4 | cited |
| Proposition 2.4 The pattern holds at every level | 2 | 1 | 3 | argued |
| Lemma 2.6 Rigidity | 2 | 2 | 3 | argued |
| Lemma 3.4 Strands are cycles or lines | 3 | 0 | 1 | argued Lean |
| Lemma 4.1 The box of a patch | 4 | 0 | 3 | argued Lean, in part |
| Lemma 4.2 Gluing | 4 | 1 | 2 | argued Lean, in part |
| Lemma 5.1 Zigzag Lemma | 5 | 0 | 3 | argued Lean |
| Proposition 6.1 Lengths by letter | 6 | 4 | 4 | argued Lean |
| Proposition 6.2 Fibonacci side lengths | 6 | 5 | 3 | argued Lean |
| Corollary 6.3 Parities are constant | 6 | 6 | 4 | argued Lean |
| Lemma 6.4 Position of A | 6 | 6 | 2 | argued Lean |
| Lemma 6.5 Lower bounds | 6 | 6 | 3 | argued Lean |
| Lemma 7.1 Lengthening | 7 | 1 | 3 | argued Lean |
| Lemma 7.2 Reachability | 7 | 9 | 3 | argued Lean |
| Computation 7.3 The compositions at the level-1 lengths | 7 | 0 | 3 | computed Lean |
| Proposition 7.4 Compositions at every level | 7 | 13 | 2 | argued Lean |
| Computation 7.5 Base case | 7 | 3 | 2 | computed Lean, in part |
| Theorem 7.6 Signature Theorem | 7 | 16 | 1 | argued Lean |
| Construction 8.1 The nest | 8 | 0 | 2 | argued |
| Proposition 8.2 The blocks are well defined | 8 | 4 | 2 | argued |
| Lemma 8.3 Grandparent Lemma | 8 | 5 | 2 | argued Lean, in part |
| Proposition 8.4 The nest tiles the plane | 8 | 6 | 1 | argued |
| Theorem 9.1 Merging | 9 | 20 | 1 | argued Lean |
| Computation 9.2 The junction map at the level-1 lengths | 9 | 0 | 3 | computed Lean |
| Lemma 9.3 The junction map | 9 | 19 | 2 | argued Lean |
| Lemma 9.4 Where the junctions lie | 9 | 7 | 2 | argued Lean |
The paper
The Spectre Knot: one endless strand on an aperiodic monotile, of 22 October 2026: the proof in full, in 28 pages, with an appendix on the computations, whose programs and logs are in paper/code/.
Read the PDF (28 pages, 1.5 MB) → the argument in ten steps the programs and the Lean the works it cites
Organisation
As the paper’s introduction gives it.
Section 2 recalls the hierarchy of [Smith et al., A chiral aperiodic monotile], in our numbering. Section 3 defines the decoration and its strands, and Section 4 introduces boxes and the signature. Section 5 proves the Zigzag Lemma, Section 6 finds the side lengths, and Section 7 proves the Signature Theorem and Theorem A. Section 8 constructs the nest tiling and shows that it covers the plane, and Section 9 proves Theorem B. Section 10 discusses scope and open questions; Appendix A describes the computations, and Appendix B the use of AI, the formal verification and the tools.
Contents
Every section of the paper, and every numbered result, definition and remark, in the paper’s order. Each has a page here with its statement and proof as the paper gives them; the page number beside it opens the PDF there. Also listed: the passages of running text, between the numbered items, that proofs cite or whose terms statements use; each is shown in full on its step’s page. The graph shows only the results the argument is made of.
§1 Introduction p. 1
- Theorem A The Daedalus Theorem argued Lean, in part p. 2
- Theorem B The Ariadne Theorem argued Lean, in part p. 2
§2 Spectre tilings p. 4
2.1 The tile p. 5
- The tile and homochiral tilings running text
2.2 Supertiles p. 5
- Supertiles: kinds, levels and children running text
- Theorem 2.1 The spectre hierarchy cited p. 7
- Rim, vertices and sides of a supertile running text
2.3 Own orientation, side numbering and the crossover corner p. 7
- Definition 2.2 Own orientation definition p. 7
- The crossover corners A and B running text
2.4 The composition pattern p. 8
- Definition 2.3 Composition pattern definition p. 8
- Proposition 2.4 The pattern holds at every level argued p. 8
- Remark 2.5 Computer cross-checks of the pattern remark p. 10
- Lemma 2.6 Rigidity argued p. 10
§3 The decoration and its strands p. 11
3.1 Ports and pieces p. 11
- Ports running text
- Definition 3.1 The decoration definition p. 11
3.2 The straight-through rule p. 12
- Definition 3.2 Straight-through rule definition p. 12
3.3 Strands p. 12
- Definition 3.3 Strand graph definition p. 12
- Lemma 3.4 Strands are cycles or lines argued Lean p. 12
§4 Boxes and the signature p. 12
4.1 Patches and boxes p. 12
- Patches and their rim ports running text
- Lemma 4.1 The box of a patch argued Lean, in part p. 12
- Arcs and boxes running text
- Lemma 4.2 Gluing argued Lean, in part p. 13
- Boxes taken abstractly running text
4.2 The signature p. 13
- Definition 4.3 Signature definition p. 13
- Lemma 4.4 Signature of the tile argued Lean p. 13
§5 The Zigzag Lemma p. 13
§6 Side lengths p. 14
- Side lengths running text
6.1 Letters p. 14
- Letters running text
- Proposition 6.1 Lengths by letter argued Lean p. 15
- Proposition 6.2 Fibonacci side lengths argued Lean p. 15
- Corollary 6.3 Parities are constant argued Lean p. 15
6.2 The crossover corner p. 15
§7 The signature at every level p. 16
7.1 Compositions as a function of side lengths p. 16
- Compositions running text
- The Reduction: a supertile is its composition running text
7.2 Lengthening p. 17
- Moves running text
- Lemma 7.1 Lengthening argued Lean p. 17
- Admissible pairs running text
- Lemma 7.2 Reachability argued Lean p. 18
- Computation 7.3 The compositions at the level-1 lengths computed Lean p. 18
- Proposition 7.4 Compositions at every level argued Lean p. 19
7.3 The induction p. 19
- Computation 7.5 Base case computed Lean, in part p. 19
- Theorem 7.6 Signature Theorem argued Lean p. 19
7.4 No closed strands p. 19
§8 The nest tiling p. 20
- Construction 8.1 The nest argued p. 20
- Proposition 8.2 The blocks are well defined argued p. 20
- The nest tiling and its blocks running text
- Lemma 8.3 Grandparent Lemma argued Lean, in part p. 20
- Proposition 8.4 The nest tiles the plane argued p. 21
- The nest tiling has no closed strand, and its hierarchy is its chain of blocks running text
§9 Merging and the single strand p. 21
9.1 Merging p. 21
- Merging: classes of arcs running text
- Theorem 9.1 Merging argued Lean p. 21
9.2 Junctions p. 22
- Junctions and their hooks running text
- Computation 9.2 The junction map at the level-1 lengths computed Lean p. 22
- Lemma 9.3 The junction map argued Lean p. 23
- Lemma 9.4 Where the junctions lie argued Lean p. 24
9.3 One strand p. 24
§10 Scope and open questions p. 25
Appendix A The computations p. 25
Appendix B Use of AI, formal verification and tools p. 26
Figures
- Figure 1 Left: the tile $\Tile$ with its fourteen ribbon pieces. p. 2
- Figure 2 The route of the proof. p. 4
- Figure 3 The nine level-$1$ supertiles, with tiles of the handedness of $\Tile$ ([Smith et al., A chiral aperiodic monotile, Fig. 2.1] draws their mirror images). p. 6
- Figure 4 The composition pattern for $\Delta$ (left) and for $\Gamma$ (right), in the layout of [Smith et al., A chiral aperiodic monotile, Fig. 5.1]. p. 8
- Figure 5 Left: the decoration (centre lines of the ribbons of Figure 1). p. 11
- Figure 6 The Zigzag Lemma. p. 14
Cited works, and where
Every work the paper cites, with the places that cite it: a result’s page, or the section. The spectre paper is listed by what is cited from it.
David Smith, Joseph Samuel Myers, Craig S. Kaplan and Chaim Goodman-Strauss, A chiral aperiodic monotile, Combinatorial Theory 4(2) (2024), Paper No. 13, https://doi.org/10.5070/C64264241; arXiv:2305.17743. Theorem, figure, section and page numbers refer to the published version. (cited 61 times)
| the paper as a whole | §1, §2, §2.1, §2.2, Theorem 2.1, Appendix B |
|---|---|
| Thm. 2.2 | §1, §2.1, §2.2, Construction 8.1 |
| Thms. 2.2, 3.1, 4.1, §5, Fig. 2.1 | Theorem 2.1 |
| Thms. 3.1, 4.1, 5.1, §5, Fig. 4.1 | Theorem 2.1 |
| Thm. 4.1 | Theorem 2.1, §2.2 |
| Thm. 5.1 | §2.2 |
| proof of Lemma 2.1 | §2.1, §3.2 |
| proof of Thm. 4.1 | §2.2 |
| §§1–2 | §2.1 |
| §2.2 | Theorem 2.1 |
| §2, Lemma 2.1 | §2.1 |
| §3 | Proposition 2.4 |
| §4 | §2.2 |
| §5 | §2.2 |
| Fig. 1.1 | §2.1 |
| Fig. 2.1 | §2.1, §2.2, Theorem 2.1 |
| Figs. 2.1, 4.1 | §2.2 |
| Fig. 4.1 | §2.2, Theorem 2.1, Proposition 2.4, Lemma 2.6, Appendix A |
| Figs. 4.1, 5.1 | §1 |
| Fig. 4.2 | §2.2, Theorem 2.1, §2.4, §6.1 |
| Fig. 5.1 | §1, §2.2, Theorem 2.1, §2.4, Proposition 2.4, Remark 2.5, Appendix A |
| p. 5 | §2.1 |
Simon Tatham, Finite-state transducers for substitution tilings, 2025, arXiv:2512.16595v2. (cited 3 times)
| §2.8 | §1 |
|---|---|
| §5 | §10 |
| §7.3 | §10 |
Michael Baake and Uwe Grimm, Aperiodic Order. Volume 1: A Mathematical Invitation, Encyclopedia of Mathematics and its Applications 149, Cambridge University Press, Cambridge, 2013. (cited 2 times)
Cited in §1.
Paulus Gerdes, Lunda Geometry: Mirror Curves, Designs, Knots, Polyominoes, Patterns, Symmetries, Lulu, Morrisville, NC, second edition, 2007. (cited 2 times)
Cited in §1.
George Bain, Celtic Art: The Methods of Construction, William MacLellan, Glasgow, 1951. (cited 1 time)
Cited in §1.
Joseph I. Cline, Interlace patterns emerging in a Penrose-type Islamic design, in Proceedings of Bridges 2024: Mathematics, Art, Music, Architecture, Culture, 2024, 163–170. (cited 1 time)
Cited in §1.
Joseph I. Cline, Knotted strapwork strands in a Penrose-type girih pattern, in Proceedings of Bridges 2025: Mathematics, Art, Music, Architecture, Culture, 2025, 61–68. (cited 1 time)
Cited in §1.
Peter R. Cromwell, Celtic knotwork: Mathematical art, The Mathematical Intelligencer 15(1) (1993), 36–47. (cited 1 time)
Cited in §1.
Peter R. Cromwell, Knots and Links, Cambridge University Press, Cambridge, 2004. (cited 1 time)
Cited in §1.
Gwen Fisher and Blake Mellor, On the topology of Celtic knot designs, in Bridges: Mathematical Connections in Art, Music, and Science, Winfield, Kansas, 2004, 37–44. (cited 1 time)
Cited in §1.
Felix Flicker, Steven H. Simon and S. A. Parameswaran, Classical dimers on Penrose tilings, Physical Review X 10 (2020), 011005, https://doi.org/10.1103/PhysRevX.10.011005. (cited 1 time)
Cited in §1.
Uli Gaenshirt, Ammann grid and knot structure of a quasiperiodic girih pattern, in Proceedings of Bridges 2024: Mathematics, Art, Music, Architecture, Culture, 2024, 155–162. (cited 1 time)
Cited in §1.
Martin Gardner, Penrose Tiles to Trapdoor Ciphers, W. H. Freeman, New York, 1989. (cited 1 time)
| Ch. 1 | §1 |
|---|
Chaim Goodman-Strauss, Aperiodic hierarchical tilings, in Foams and Emulsions, NATO Science Series E 354, Kluwer Academic Publishers, Dordrecht, 1999, 481–496, https://doi.org/10.1007/978-94-015-9157-7_28. (cited 1 time)
Cited in §1.
Jonathan L. Gross and Thomas W. Tucker, A Celtic framework for knots and links, Discrete & Computational Geometry 46 (2011), 86–99, https://doi.org/10.1007/s00454-010-9257-0. (cited 1 time)
Cited in §1.
Branko Grünbaum and G. C. Shephard, Tilings and Patterns, Dover, second edition, 2016. (cited 1 time)
Cited in §1.
W. Patrick Hooper, Truchet tilings and renormalization, 2011, arXiv:1103.6046. (cited 1 time)
Cited in §1.
W. Patrick Hooper, Renormalization of polygon exchange maps arising from corner percolation, Inventiones Mathematicae 191(2) (2013), 255–320, https://doi.org/10.1007/s00222-012-0393-4; arXiv:1105.6137. (cited 1 time)
Cited in §1.
Slavik Jablan, Ljiljana Radović, Radmila Sazdanović and Ana Zeković, Knots in art, Symmetry 4(2) (2012), 302–328, https://doi.org/10.3390/sym4020302. (cited 1 time)
Cited in §1.
Lean FRO, leanchecker, part of the Lean 4 toolchain from version 4.28.0, https://github.com/leanprover/lean4;
formerly https://github.com/leanprover/lean4checker. (cited 1 time)
Cited in Appendix B.
Lean FRO, Comparator: A trustworthy judge for Lean proofs, https://github.com/leanprover/comparator, tag v4.34.0. (cited 1 time)
Cited in Appendix B.
Lucy Liu, Gary P. T. Choi and L. Mahadevan, Quasicrystal kirigami, Physical Review Research 4(3) (2022), 033114, https://doi.org/10.1103/PhysRevResearch.4.033114; arXiv:2104.13399. (cited 1 time)
Cited in §1.
Samuel J. Lomonaco and Louis H. Kauffman, Quantum knots and mosaics, Quantum Information Processing 7 (2008), 85–115, https://doi.org/10.1007/s11128-008-0076-7; arXiv:0805.0339. (cited 1 time)
Cited in §1.
Stefan Pautze, Space-filling, self-similar curves of regular pentagons, heptagons and other $n$-gons, in Proceedings of Bridges 2021: Mathematics, Art, Music, Architecture, Culture, 2021, 157–164. (cited 1 time)
Cited in §1.
Gábor Pete, Corner percolation on $\mathbb Z^2$ and the square root of 17, Annals of Probability 36(5) (2008), 1711–1747, https://doi.org/10.1214/07-AOP373. (cited 1 time)
Cited in §1.
Shobhna Singh, Jerome Lloyd and Felix Flicker, Hamiltonian cycles on Ammann–Beenker tilings, Physical Review X 14 (2024), 031005, https://doi.org/10.1103/PhysRevX.14.031005. (cited 1 time)
Cited in §1.
David Smith, Joseph Samuel Myers, Craig S. Kaplan and Chaim Goodman-Strauss, A chiral aperiodic monotile, 2023, Project page with the interactive implementation spectre.js,
https://cs.uwaterloo.ca/~csk/spectre/ (accessed 15 October 2026). (cited 1 time)
Cited in Remark 2.5.
David Smith, Joseph Samuel Myers, Craig S. Kaplan and Chaim Goodman-Strauss, An aperiodic monotile, Combinatorial Theory 4(1) (2024), Paper No. 6, https://doi.org/10.5070/C64163843; arXiv:2303.10798. (cited 1 time)
Cited in §1.
Joshua E. S. Socolar and Joan M. Taylor, An aperiodic hexagonal tile, Journal of Combinatorial Theory, Series A 118(8) (2011), 2207–2231, https://doi.org/10.1016/j.jcta.2011.05.001; arXiv:1003.4279. (cited 1 time)
Cited in §1.
bohemian-miser, Spectre: Playing with the spectre tiling, 2026, https://github.com/bohemian-miser/Spectre, file docs/FASS_THEOREM.md at commit
f1a946c (accessed 8 October 2026). (cited 1 time)
Cited in §1.
Leonardo de Moura and Sebastian Ullrich, The Lean 4 theorem prover and programming language, in Automated Deduction – CADE 28, Lecture Notes in Computer Science 12699, Springer, 2021, 625–635, https://doi.org/10.1007/978-3-030-79876-5_37. (cited 1 time)
Cited in Appendix B.
Theorem A The Daedalus Theorem
argued Lean, in partPaper §1 Introduction, page 2 of the PDF, line 135 of spectre_knot.tex · rests on 18 results · cites 3 · cited by 0 · depth 0
Explained with pictures: step 7 of the Prove page →
Statement
In every homochiral tiling of the plane by $\Tile$ whose supertile hierarchy covers the plane, with every tile carrying the decoration of Figure 1 (Definition 3.1), there is no closed strand: every strand is a two-way infinite path of ribbon pieces.
Terms defined in the paper’s running text: homochiral tilings (§2.1).
Proof of Theorem A
Let $\T$ be a homochiral tiling whose hierarchy covers the plane: for some tile $t$, the supertiles $X_0(t)\subset X_1(t)\subset\cdots$ containing $t$ have union $\RR^2$. Write $X_m=X_m(t)$.
Step 1 (in the plane). Every tile $t'$ lies in some $X_m$, and every edge of $t'$ is shared by two tiles of some $X_m$. Indeed, a point $x$ of the interior of $t'$ lies in $X_m$ for some $m$, hence in some tile $s$ of $X_m$. Every neighbourhood of $x$ meets the interior of $s$, so the interiors of $s$ and $t'$ meet, and $s=t'$. An edge of $t'$ is shared with exactly one other tile (tiles meet full edge to full edge, Section 2; see the proof of Lemma 3.4), and since the $X_m$ are nested, both tiles lie in one $X_m$.
Step 2 (combinatorial). Let $X_1\subset X_2\subset\cdots$ be any supertiles, each a child of the next, such that every edge of every tile of their union is shared by two tiles of some $X_m$; we show that every strand of the union is a two-way infinite path. A closed strand has finitely many pieces and is joined across finitely many edges, so there is an $m$ such that $X_m$ contains all its tiles and each of these edges is shared by two tiles of $X_m$. It is then a closed strand of $X_m$, contradicting Theorem 7.6. So there is no closed strand, and by the argument of Lemma 3.4 every strand of the union is a two-way infinite path.
By Step 1, $X_1(t)\subset X_2(t)\subset\cdots$ is such a chain, and its union is $\T$; this proves Theorem A. Step 2 is Theorem A as the formalisation states it (Appendix B).
∎Figures


exact.py, with their corner $A$, taken as input). Dashed: the
link with actual tilings, cited from [Smith et al., A chiral aperiodic monotile] or argued in words. Shaded and dashed: Lean checks the
combinatorial part, and the link with actual tilings is argued in words (Appendix B).



Where it sits
Cites
- Definition 3.1 The decoration
- Lemma 3.4 Strands are cycles or lines
- Theorem 7.6 Signature Theorem
Also cites Figure 1, Section 2, Appendix B.
This
Theorem A
Cited by
- none
In Lean
What the Lean covers here: In combinatorial form: for any chain of supertiles whose union has every edge glued; the nest is one. That a tiling whose hierarchy covers the plane is such a union is assumption (M2).
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Theorem A (the Daedalus Theorem) · proof
For any chain of supertiles, each a child of the next: its union, with its tiles numbered so that every block keeps its own numbering, is a tiling containing every block (ChainModel; a Tiling that contains every block exists, its gluing chosen with Classical.choice). If the chain covers (every edge is eventually glued), every such tiling glues every edge, and every strand of the union is a two-way infinite path (TheoremA_strand): a closed strand would visit finitely many tiles, whose edges are all glued in one block (all_glued_at), and that block has no closed strand. The nest, as a chain, covers (NestCovers, from no_boundary), so the theorem applies to at least one chain.
Differs from the paper: other form: the second step of the paper's proof, for the union of a chain of supertiles that covers (every edge eventually glued); that a tiling whose hierarchy covers the plane is such a union, the first step, is (M2).
Statement.chainModel lean/SpectreKnot/ProofChain.lean, line 635
theorem chainModel : ChainModelThe claim Statement.ChainModel (lean/SpectreKnot/Statement.lean, line 448)
def ChainModel : Prop := ∀ X : Chain, (∀ g, g < (X.block (g + 1)).tiles) ∧ (∀ m t, 1 ≤ m → t < (X.block m).tiles → X.gid m t < (X.block m).tiles ∧ X.loc m (X.gid m t) = t) ∧ (∀ m g, 1 ≤ m → g < (X.block m).tiles → X.loc m g < (X.block m).tiles ∧ X.gid m (X.loc m g) = g) ∧ (∀ m t, 1 ≤ m → t < (X.block m).tiles → X.gid (m + 1) (X.up m 1 t) = X.gid m t) ∧ (∃ T : Tiling, X.Contains T) ∧ (X.Covers → ∀ T : Tiling, X.Contains T → ∀ g i, i < 14 → ∃ g' j, T.glue g i = some (g', j) ∧ g' ≠ g ∧ j < 14 ∧ T.glue g' j = some (g, i))
Statement.theoremA_strand lean/SpectreKnot/ProofChain.lean, line 648
theorem theoremA_strand : TheoremA_strandThe claim Statement.TheoremA_strand (lean/SpectreKnot/Statement.lean, line 465)
def TheoremA_strand : Prop := ∀ (X : Chain) (T : Tiling), X.Covers → X.Contains T → ∀ p : Port, p.2.1 < 14 → (∀ i j, iter T.forward i p = iter T.forward j p → i = j) ∧ (∀ a a', iter T.backward a p = iter T.backward a' p → a = a') ∧ (∀ a b, iter T.backward a p = iter T.forward b p → a = 0 ∧ b = 0) ∧ (∀ i j, iter T.forward j p ≠ pieceEnd (iter T.forward i p))
Statement.nestCovers lean/SpectreKnot/ProofChain.lean, line 710
theorem nestCovers : NestCoversThe claim Statement.NestCovers (lean/SpectreKnot/Statement.lean, line 474)
def NestCovers : Prop := ∃ X : Chain, (∀ m, X.K m = .Delta ∧ X.c m = 1) ∧ X.Covers
Theorem B The Ariadne Theorem
argued Lean, in partPaper §1 Introduction, page 2 of the PDF, line 149 of spectre_knot.tex · rests on 26 results · cites 4 · cited by 0 · depth 0
Explained with pictures: step 9 of the Prove page →
Statement
In the nest tiling $\N$, with every tile carrying the decoration of Figure 1 (Definition 3.1), all the ribbon pieces of all the tiles form a single strand. It is a two-way infinite path that passes through every tile. More precisely, for every $b\ge 1$, all the pieces of the block $N_b$ lie on a single arc of $N_{b+3}$ if $b$ is even, and of $N_{b+4}$ if $b$ is odd.
Terms defined in the paper’s running text: arcs (§4.1).
Proof of Theorem B
By Lemma 3.4, every component of the strand graph $\G(\N)$ is a cycle or a two-way infinite path, and there are no cycles, as shown in the paragraph after Proposition 8.4. It remains to show that $\G(\N)$ is connected. Let $p,p'$ be pieces of tiles $t,t'$ of $\N$. By Proposition 8.4 both tiles lie in some $N_b$ with $b\ge1$. Since $N_b$ has no closed strand, $p$ and $p'$ lie on arcs of $N_b$. By Theorem 9.1 these arcs lie on one arc of $N_{b+4}$, so $p$ and $p'$ are on the same strand. The strand passes through every tile, since every tile has pieces. Finally, every piece of $N_b$ lies on an arc of $N_b$, and by Theorem 9.1 these arcs lie on one arc of $N_{b+3}$ if $b$ is even, and of $N_{b+4}$ if $b$ is odd.
∎From the running text
§8 · The nest tiling has no closed strand, and its hierarchy is its chain of blocks
For every $h\ge b$, the block $N_b$ is a level-$b$ $\Delta$-supertile of the homochiral tiling $g_h(\T)$ (Construction 8.1 and Proposition 8.2), so Theorem 7.6 applies to it if $b\ge1$. By Proposition 8.2 and Proposition 8.4 and Lemma 8.3(b), the chain $N_1\subset N_2\subset\cdots$, whose union is the tiling $\N$, satisfies the hypothesis of Step 2 of the proof of Theorem A; so $\N$ has no closed strand. Moreover, for each $m\ge1$ the level-$m$ descendants of the blocks $N_b$, $b\ge m$, partition the tiles of $\N$ (they agree for different $b$, since $N_b$ is child $1$ of $N_{b+1}$), and each level is grouped into the next as in $g_h(\T)$ for large $h$. So this grouping has the properties of Theorem 2.1(a): its level-$1$ groups are clusters of Figure 3, each with its Mystic, and each group of level $m+1$ is a supertile of some $g_h(\T)$, made of groups of level $m$. By the uniqueness in Theorem 2.1(a), these are the supertiles of $\N$; those containing $N_0$ are the blocks, whose union is the plane (Proposition 8.4). So the hierarchy of $\N$ covers the plane: $\N$ has no fault, and Theorem A applies to it.
The paper’s running text, cited in the proof above; its place in step 8.
Figures


exact.py, with their corner $A$, taken as input). Dashed: the
link with actual tilings, cited from [Smith et al., A chiral aperiodic monotile] or argued in words. Shaded and dashed: Lean checks the
combinatorial part, and the link with actual tilings is argued in words (Appendix B).



Where it sits
Cites
- Definition 3.1 The decoration
- Lemma 3.4 Strands are cycles or lines
- Proposition 8.4 The nest tiles the plane
- Theorem 9.1 Merging
Also cites Figure 1.
This
Theorem B
Cited by
- none
In Lean
What the Lean covers here: In combinatorial form: for the union of the blocks $N_b$. That this union is the nest tiling of the plane is Prop 8.2 and Prop 8.4, which are geometric and not formalised (assumption (M3)); Lemma 8.3(a), which Prop 8.4 uses, is formalised at the vertices of tiles.
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Thm 9.1, then Theorem B (combinatorial form) · proof
Every port of N_b lies, in N_{b+3} (b even) or N_{b+4} (b odd), on the strand of the hook at junction 12; with symmetry, any two ports of N_b are on one strand there (TheoremB_sharp). With no_boundary and Theorem A, TheoremB.
Differs from the paper: same: the bounds of Thm 9.1, for every b ≥ 1; Theorem B here is for the blocks N_b, and its final form is the row below.
Statement.chain_even lean/SpectreKnot/ProofB.lean, line 318
theorem chain_even {b : Nat} (b_pos : 1 ≤ b) (even : b % 2 = 0) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 3)).Linked (upPort b 3 x) (Zp (b + 2))Statement.chain_odd lean/SpectreKnot/ProofB.lean, line 340
theorem chain_odd {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 4)).Linked (upPort b 4 x) (Zp (b + 3))Statement.theoremB_sharp lean/SpectreKnot/ProofB.lean, line 380
theorem theoremB_sharp : TheoremB_sharpThe claim Statement.TheoremB_sharp (lean/SpectreKnot/Statement.lean, line 283)
def TheoremB_sharp : Prop := ∀ b p q, 1 ≤ b → (N b).IsPort p → (N b).IsPort q → (N (b + 4)).Linked (upPort b 4 p) (upPort b 4 q) ∧ (b % 2 = 0 → (N (b + 3)).Linked (upPort b 3 p) (upPort b 3 q))
Statement.theoremB lean/SpectreKnot/ProofB.lean, line 532
theorem theoremB : TheoremBThe claim Statement.TheoremB (lean/SpectreKnot/Statement.lean, line 276)
def TheoremB : Prop := (∀ b, 1 ≤ b → ∀ t i, t < (N b).tiles → i < 14 → ((N (b + 2)).glue (up b 2 t) i).isSome) ∧ (∀ b, (N b).NoClosedStrand) ∧ (∀ b p q, (N b).IsPort p → (N b).IsPort q → ∃ k, (N (b + k)).Linked (upPort b k p) (upPort b k q))
Theorem B (the Ariadne Theorem), final form · proof + kernel computation
The nest tiling (nestTiling, a Tiling): its tiles numbered so that every block keeps its own numbering, and a gluing that contains every block's and glues every edge, to an edge of another tile, which is glued back (NestModel). Its ports form a StrandSystem. No strand is closed, since a closed strand would stay in one block, which has none (Theorem A); any two ports lie on one strand, since they do in a large enough block (TheoremB_sharp). So by Lemma 3.4 the strand through R(v₀) of the original tile is two-way infinite, never meets a port or a piece twice, and runs through every port (TheoremB_strand).
Differs from the paper: other form: for nestTiling, the union of the blocks; that it is the paper's nest tiling and covers the plane is (M3).
Statement.nestModel lean/SpectreKnot/ProofStrand.lean, line 398
theorem nestModel : NestModelThe claim Statement.NestModel (lean/SpectreKnot/Statement.lean, line 361)
def NestModel : Prop := (∀ g, g < (N (g + 1)).tiles) ∧ (∀ b t, t < (N b).tiles → gid b t < (N b).tiles ∧ loc b (gid b t) = t) ∧ (∀ b g, g < (N b).tiles → loc b g < (N b).tiles ∧ gid b (loc b g) = g) ∧ (∀ b t, t < (N b).tiles → gid (b + 1) (up b 1 t) = gid b t) ∧ (∀ b t i t' j, t < (N b).tiles → i < 14 → (N b).glue t i = some (t', j) → nestGlue (gid b t) i = some (gid b t', j)) ∧ (∀ g i, i < 14 → ∃ g' j, nestGlue g i = some (g', j) ∧ g' ≠ g ∧ j < 14 ∧ nestGlue g' j = some (g, i))
Statement.theoremB_strand lean/SpectreKnot/ProofStrand.lean, line 706
theorem theoremB_strand : TheoremB_strandThe claim Statement.TheoremB_strand (lean/SpectreKnot/Statement.lean, line 378)
def TheoremB_strand : Prop := (∀ i j, iter nestTiling.forward i (0, 0, true) = iter nestTiling.forward j (0, 0, true) → i = j) ∧ (∀ a a', iter nestTiling.backward a (0, 0, true) = iter nestTiling.backward a' (0, 0, true) → a = a') ∧ (∀ a b, iter nestTiling.backward a (0, 0, true) = iter nestTiling.forward b (0, 0, true) → a = 0 ∧ b = 0) ∧ (∀ i j, iter nestTiling.forward j (0, 0, true) ≠ pieceEnd (iter nestTiling.forward i (0, 0, true))) ∧ (∀ q : Port, q.2.1 < 14 → ∃ k, q = iter nestTiling.forward k (0, 0, true) ∨ q = iter nestTiling.backward k (0, 0, true) ∨ q = pieceEnd (iter nestTiling.forward k (0, 0, true)) ∨ q = pieceEnd (iter nestTiling.backward k (0, 0, true)))
← Theorem A (The Daedalus Theorem)In the contentsTheorem 2.1 (The spectre hierarchy) →
Theorem 2.1 Smith, Myers, Kaplan, Goodman-Strauss [Smith et al., A chiral aperiodic monotile]
citedPaper §2.2 Supertiles, page 7 of the PDF, line 421 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 2 · depth 4
Explained with pictures: step 2 of the Prove page →
Everything the paper cites from the spectre paper, and where: the works it cites.
Statement
Let $\T$ be a homochiral tiling by $\Tile$.
- (a)[Smith et al., A chiral aperiodic monotile, Thms. 2.2, 3.1, 4.1, §5, Fig. 2.1] The tiles of $\T$ group uniquely into level-$1$ supertiles, each the image under a rotation and a translation of one of the clusters of Figure 3 (those of [Smith et al., A chiral aperiodic monotile, Fig. 2.1], reflected). Each contains one Mystic, in the position shown in [Smith et al., A chiral aperiodic monotile, Fig. 2.1]; this Mystic and the other tiles, taken singly, are the level-$0$ supertiles inside it. For every $m\ge1$ the level-$m$ supertiles of $\T$ group uniquely into level-$(m+1)$ supertiles. Each tile lies in a unique nested sequence $X_0\subset X_1\subset\cdots$ with $X_m$ a level-$m$ supertile.
- (b)[Smith et al., A chiral aperiodic monotile, Thms. 3.1, 4.1, 5.1, §5, Fig. 4.1] For every $m\ge 1$, the tiling of the plane by the level-$m$ supertiles of $\T$ is combinatorially equivalent (homeomorphic as a topological complex [Smith et al., A chiral aperiodic monotile, §2.2]) to a tiling by regular hexagons. Each level-$m$ supertile of kind $K$ corresponds to a hexagon marked as the hexagon $K$ of [Smith et al., A chiral aperiodic monotile, Fig. 4.2] if $m$ is even, and as its mirror image if $m$ is odd; adjacent supertiles correspond to hexagons that share an edge, and the labels on that edge match. The grouping into level-$(m+1)$ supertiles corresponds, up to reflection, to the grouping of hexagons shown in [Smith et al., A chiral aperiodic monotile, Fig. 5.1], and the six points where a level-$(m+1)$ supertile of kind $T$ meets two others correspond to the six points marked on the outline of the panel $T$. At level $1$, the six points where a supertile meets two others correspond to the dots marked on its cluster in [Smith et al., A chiral aperiodic monotile, Fig. 4.1], the points by which the proof of [Smith et al., A chiral aperiodic monotile, Thm. 4.1] tells the clusters apart.
Terms defined in the paper’s running text: homochiral tilings (§2.1), supertiles, kinds and children (§2.2).
Figure

Where it sits
This
Theorem 2.1
Cited by
- Proposition 2.4 The pattern holds at every level
- Lemma 2.6 Rigidity
In Lean
Not formalised. It is part of the link to real tilings: assumption (M1) of the statement file.
Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the six vertices of every kind (points where three supertiles meet): observed at levels 1-4, and at levels 5-6 to check the propagated ones
← Theorem B (The Ariadne Theorem)In the contentsDefinition 2.2 (Own orientation) →
Definition 2.2 Own orientation
Paper §2.3 Own orientation, side numbering and the crossover corner, page 7 of the PDF, line 465 of spectre_knot.tex · cites 0 · cited by 0
Statement
The own orientation of a level-$m$ supertile is anticlockwise if $m$ is even and clockwise if $m$ is odd. We write $\omega_m=(-1)^m$. Its own order is the cyclic order in which this orientation runs round its rim.
Terms defined in the paper’s running text: supertiles, kinds and children (§2.2).
Where it sits
Cites
- none
This
Definition 2.2
Cited by
- none
← Theorem 2.1 (The spectre hierarchy)In the contentsDefinition 2.3 (Composition pattern) →
Definition 2.3 Composition pattern
Paper §2.4 The composition pattern, page 8 of the PDF, line 483 of spectre_knot.tex · cites 0 · cited by 0
Statement
The composition pattern gives, for each parent kind $T$, the kinds $K_0,\dots,K_{n_T-1}$ of the children (Table 1); for each side of each child, the sibling's side across it, or $\rim$ if it lies on the parent's rim (Table 2); and for each side of the parent, the children's sides that make it up, in the parent's own order (Table 3). Figure 4 draws it.
Terms defined in the paper’s running text: supertiles, kinds and children (§2.2).
Figure

Where it sits
← Definition 2.2 (Own orientation)In the contentsProposition 2.4 (The pattern holds at every level) →
Proposition 2.4 The pattern holds at every level
arguedPaper §2.4 The composition pattern, page 8 of the PDF, line 615 of spectre_knot.tex · rests on 1 result · cites 1 · cited by 4 · depth 3
Explained with pictures: step 2 of the Prove page →
Statement
Let $\T$ be a homochiral tiling by $\Tile$, let $m\ge1$, and let $Y$ be one of its level-$(m+1)$ supertiles, of kind $T$, with children $X_0,\dots,X_{n_T-1}$. Then:
- (a)
- (b)side $j$ of $X_c$ is the same path of tile edges as side $j'$ of $X_{c'}$, traversed in the opposite direction, whenever Table 2 lists $c'.j'$, and it lies on the rim of $Y$ when the table lists $\rim$;
- (c)side $J$ of $Y$ is the concatenation of the children's sides listed in Table 3, and vertex $J$ of $Y$ is vertex $j+1$ of the child $c$ whose side $c.j$ is listed first for side $J$;
- (d)the crossover corner $A$ of $Y$ is vertex $0$ of its $\Gamma$ child, which is vertex $0$ of $Y$ if $T\neq\Sigma$, and lies inside side $5$ of $Y$ if $T=\Sigma$.
Terms defined in the paper’s running text: homochiral tilings (§2.1), supertiles, kinds and children (§2.2), rim, vertices and sides (§2.2), crossover corners (§2.3).
Proof
By Theorem 2.1(b), the level-$m$ supertiles inside $Y$ are combinatorially the hexagons of the panel $T$ of [Smith et al., A chiral aperiodic monotile, Fig. 5.1], with hexagon edges as sides and hexagon vertices as vertices. We use the dictionary
- ($\ast$)side $j$ of a level-$m$ supertile of kind $K$ carries the label of the edge of hexagon $K$ in direction W, SW, SE, E, NE, NW for $j=0,\dots,5$ (Table 4; for odd $m$ the supertile corresponds to the mirror image of hexagon $K$, and own order, then clockwise, meets its labels in the same order); its crossover corner $A$ is vertex $0$ if $K\neq\Sigma$; if $K=\Sigma$, $A$ is not a vertex, and lies in the relative interior of side $5$,
and show ($\ast$) by induction on $m$. For $m=1$ it is a comparison of the level-$1$ supertiles, whose vertices and corner $A$ are marked in Figure 3, with [Smith et al., A chiral aperiodic monotile, Fig. 4.1]. Drawn with the edges in odd directions lengthened to $\sqrt3$, which turns the tiles into hats and turtles [Smith et al., A chiral aperiodic monotile, §3], and in the handedness of that figure, they coincide with its nine marked clusters: the same outlines, with the vertices at the marked dots. In each cluster our vertex $0$ is at the leftmost dot, and, read anticlockwise from it, the sides of cluster $K$ carry the labels of row $K$ of Table 4; $A$ is that dot (for $\Sigma$, a point of the NW side, which ends there), on the light tile of the Mystic. A script checks this against a render of the figure, with the labels transcribed from the figure (Appendix A). Suppose ($\ast$) holds for the children of $Y$. The panel names the kind of each inner hexagon but does not show its edge labels; the matching rule fixes the rotation of each. By Table 4, $\delta$ occurs only on side $3$ of $\Gamma$ and side $5$ of $\Sigma$, and $\zeta$ only on side $5$ of $\Delta$ and side $0$ of $\Sigma$. The $\Sigma$ child has one side on the panel's rim, and the two sides next to it face siblings other than the $\Gamma$ and the $\Delta$ child. Its adjacent sides $5$ and $0$ carry $\delta^+$ and $\zeta^+$, so a sibling facing side $5$ is the $\Gamma$ child, and one facing side $0$ the $\Delta$ child. Hence neither of them is the rim side, as the other would then be next to it and face some other sibling, and neither is next to the rim side; so they face the $\Gamma$ and the $\Delta$ child, which fixes the rotations of these three. Every other child meets one of them along a side that the latter labels $\alpha^+$ or $\gamma^-$, and no kind has two sides labelled $\alpha^-$, or two labelled $\gamma^+$, which fixes its rotation too (a script confirms that there is no other choice; Appendix A). With these rotations, Table 1, Table 2 and Table 3 transcribe the panel, including its six marked vertices; this gives (a)–(c). The crossover corner of $Y$ is that of its $\Gamma$ child, the child's vertex $0$ by ($\ast$), which Table 3 places at the start of the parent's side $0$ if $T\neq\Sigma$ and inside side $5$ if $T=\Sigma$; this is (d). Finally, with the parent's sides numbered as in Section 2.3, the labels that the panel assigns to them are those of Table 4 for every $T$. So ($\ast$) holds for $Y$, and in particular $A$ lies on the rim.
∎Figure

Where it sits
Cites
- Theorem 2.1 The spectre hierarchy
Also cites Table 1, Table 2, Table 3, Table 4, Figure 3, Appendix A, Section 2.3.
This
Proposition 2.4
Cited by
- Remark 2.5 Computer cross-checks of the pattern
- Lemma 2.6 Rigidity
- Proposition 6.1 Lengths by letter
- Lemma 6.4 Position of A
In Lean
Not formalised. It is part of the link to real tilings: assumption (M1) of the statement file.
For the supertiles it builds from the tables, the Lean proves that the parent's rim, read from Table 3, is the rim of the glued children (Statement.rim_edgeAt, Statement.own_rot, Statement.parent_vtx): step (v) of the Reduction in Section 7.1. That actual supertiles are glued as the tables say is this proposition, part of assumption (M1).
Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the six vertices of every kind (points where three supertiles meet): observed at levels 1-4, and at levels 5-6 to check the propagated ones
the composition pattern C of m -> m+1, m = 1..7, all identical (exact for m <= 3); vertices propagated for m >= 5 and checked against observation at 5-6
the level-1 supertiles as hat/turtle clusters (odd edges lengthened to sqrt 3), fitted to a 300-dpi render of the spectre paper's Fig. 4.1: six dots found per cluster, proper similarity with residual < 1% of an edge (other matchings and other kinds >= 40 times worse), rim on the printed outline, first Mystic tile on the lighter shading, labels (read by hand,
crosscheck/fig41_labels.json) = Table 4. Needs the spectre paper's PDFthe same clusters drawn for comparison by eye
Table 1 and every tile of every supertile, levels 0-4 (in order, with the kinds of the tiles), against Kaplan's implementation of the substitution (
spectre.jsfrom the spectre authors' page, SHA-256 checked, run in a context of its own with no access to node); from its tiles alone, the six vertices of every kind at level 1 (points where three level-1 supertiles meet), the side lengths l_1 and the Sigma offset d_1, againsthierarchy/combin_8.jsonandletters.json; two altered copies (two children of Delta exchanged; one placement rule changed) rejected. Downloadsspectre.jsC agrees with a hand encoding of the spectre paper's Fig. 5.1, all nine kinds, including the parent side labels (dictionary (*) in the proof of Prop. 2.4)
crosscheck/fig51_compare.py(encodingcrosscheck/fig51_encoding.json)
← Definition 2.3 (Composition pattern)In the contentsRemark 2.5 (Computer cross-checks of the pattern) →
Remark 2.5 Computer cross-checks of the pattern
Paper §2.4 The composition pattern, page 10 of the PDF, line 665 of spectre_knot.tex · cites 1 · cited by 0
Statement
Since the proof uses Table 1, Table 2 and Table 3 as transcriptions of [Smith et al., A chiral aperiodic monotile, Fig. 5.1],
they were also checked by computer on actual supertiles (evidence, not used in the proof). The patterns of the actual
compositions $m\to m+1$, $m\le7$, equal the tables (in exact arithmetic for $m\le3$; from level $5$ on, the vertices are
placed by Proposition 2.4(c), so that part is used rather than tested, though at levels $5$ and $6$ they agree with
the vertices observed there); and Kaplan's implementation of
the substitution [Smith et al., A chiral aperiodic monotile] gives Table 1 and, tile for tile up to level $4$, the same
supertiles as exact.py (Appendix A).
Where it sits
Cites
- Proposition 2.4 The pattern holds at every level
Also cites Table 1, Table 2, Table 3, Appendix A.
This
Remark 2.5
Cited by
- none
Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the composition pattern C of m -> m+1, m = 1..7, all identical (exact for m <= 3); vertices propagated for m >= 5 and checked against observation at 5-6
C agrees with a hand encoding of the spectre paper's Fig. 5.1, all nine kinds, including the parent side labels (dictionary (*) in the proof of Prop. 2.4)
crosscheck/fig51_compare.py(encodingcrosscheck/fig51_encoding.json)two deliberately corrupted encodings (
crosscheck/neg_swap/,crosscheck/neg_label/) are rejectedthe vertex dots and Gamma centres used by
fig51_compare.pyre-found on a 400-dpi render of Fig. 5.1 (within 2 px). Needs the spectre paper's PDFtiles of every supertile, levels 1-7, have disjoint interiors and fill the rim
crosscheck/overlap.js(levels 1-5; levels 6-7 take ~15 min)
← Proposition 2.4 (The pattern holds at every level)In the contentsLemma 2.6 (Rigidity) →
Lemma 2.6 Rigidity
arguedPaper §2.4 The composition pattern, page 10 of the PDF, line 674 of spectre_knot.tex · rests on 2 results · cites 2 · cited by 2 · depth 3
Explained with pictures: step 2 of the Prove page →
Statement
Any two level-$m$ supertiles of the same kind, in possibly different homochiral tilings, are related by exactly one proper motion that maps descendants to descendants with the same numbers (children, their children, and so on, down to the tiles, and the first tile of a Mystic to the first tile). For $m\ge1$ this motion maps the six vertices, the sides and the corner $A$ of one supertile onto those of the other.
Terms defined in the paper’s running text: homochiral tilings (§2.1), supertiles, kinds and children (§2.2), rim, vertices and sides (§2.2), crossover corners (§2.3).
Proof
Induction on $m$. For $m=0$ this is clear, since a tile and a Mystic have no non-trivial proper symmetry. For $m=1$, the level-$1$ supertiles are images under proper motions of the clusters of Figure 3 (Theorem 2.1(a)), with their vertices at the points marked in [Smith et al., A chiral aperiodic monotile, Fig. 4.1] (Theorem 2.1(b)), their children numbered as in Figure 3, and $A$ determined by the Mystic. Let $m\ge1$ and let $Y,Y'$ be level-$(m+1)$ supertiles of kind $T$. By induction, child $c$ of $Y$ is mapped onto child $c$ of $Y'$ (both of kind $K_c$, by Proposition 2.4(a)), with its numbered vertices, by a unique proper motion $g_c$. If side $j$ of child $c$ is glued to side $j'$ of child $c'$, then by Proposition 2.4(b), in $Y$ and in $Y'$, vertices $j$ and $j+1$ of $c$ are vertices $j'+1$ and $j'$ of $c'$; so $g_c$ and $g_{c'}$ agree at two distinct points, and hence are equal. The children's adjacency graph is connected, so all the $g_c$ are one motion $g$; it maps descendants to descendants with their numbers and, by Proposition 2.4(c),(d), the vertices, sides and corner $A$ of $Y$ onto those of $Y'$. A proper motion that maps descendants to descendants maps the first tile of the Mystic at the bottom of the chain of last ($\Gamma$) children to its counterpart, so it equals $g$, since a tile has no symmetry.
∎Figure

Where it sits
Cites
- Theorem 2.1 The spectre hierarchy
- Proposition 2.4 The pattern holds at every level
Also cites Figure 3.
This
Lemma 2.6
Cited by
- Computation 7.5 Base case
- Proposition 8.2 The blocks are well defined
In Lean
Not formalised. It is part of the link to real tilings: assumption (M1) of the statement file.
← Remark 2.5 (Computer cross-checks of the pattern)In the contentsDefinition 3.1 (The decoration) →
Definition 3.1 The decoration
Paper §3.1 Ports and pieces, page 11 of the PDF, line 709 of spectre_knot.tex · cites 0 · cited by 3
Explained with pictures: step 3 of the Prove page →
Statement
The decoration pairs the $28$ ports of $\Tile$ by fourteen pieces:
Every tile of a homochiral tiling carries the image of this decoration.
Terms defined in the paper’s running text: ports (§3.1).
Where it sits
Cites
- none
This
Definition 3.1
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Def 3.1, Def 3.2 · definitions
The decoration, as the other end of the piece at each port: the crossover R(v₀) ↔ R(v₁), L(v₀) ↔ L(v₁), and a hook L(vᵢ) ↔ R(vᵢ) at every other vertex (pieceEnd); and the straight-through rule across a glued edge (straightThrough).
Differs from the paper: same: definitions, as in the paper.
Statement.pieceEnd lean/SpectreKnot/Statement.lean, line 47
def pieceEnd : Port → Port -- The crossover: R(v_0) ↔ R(v_1) and L(v_0) ↔ L(v_1), two pieces that cross inside the tile. | (t, 0, s) => (t, 1, s) | (t, 1, s) => (t, 0, s) -- Every other vertex: a hook round the corner, L(v_i) ↔ R(v_i). | (t, i, s) => (t, i, !s)
Statement.straightThrough lean/SpectreKnot/Statement.lean, line 68
def straightThrough (glue : Nat → Nat → Option (Nat × Nat)) : Port → Option Port -- R(v_i) is on e_i. If e_i is e_j of t', the ribbon continues as R(v_j) of t'. | (t, i, true) => (glue t i).map fun (t', j) => (t', j, true) -- L(v_i) is on e_{i-1} (`(i + 13) % 14` is i - 1, round 14). If that is e_j of t', it continues as L(v_{j+1}). | (t, i, false) => (glue t ((i + 13) % 14)).map fun (t', j) => (t', (j + 1) % 14, false)
Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the tile's 14 pieces = 12 hooks + crossover at v0 v1 (and the Mystic has the signature)
← Lemma 2.6 (Rigidity)In the contentsDefinition 3.2 (Straight-through rule) →
Definition 3.2 Straight-through rule
Paper §3.2 The straight-through rule, page 12 of the PDF, line 765 of spectre_knot.tex · cites 0 · cited by 0
Explained with pictures: step 3 of the Prove page →
Statement
The port of $t$ on $e$ near $x$ is joined to the port of $t'$ on $e$ near $y$, and the port of $t$ near $y$ to the port of $t'$ near $x$.
Terms defined in the paper’s running text: homochiral tilings (§2.1), ports (§3.1).
Where it sits
Cites
- none
This
Definition 3.2
Cited by
- none
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Def 3.1, Def 3.2 · definitions
The decoration, as the other end of the piece at each port: the crossover R(v₀) ↔ R(v₁), L(v₀) ↔ L(v₁), and a hook L(vᵢ) ↔ R(vᵢ) at every other vertex (pieceEnd); and the straight-through rule across a glued edge (straightThrough).
Differs from the paper: same: definitions, as in the paper.
Statement.pieceEnd lean/SpectreKnot/Statement.lean, line 47
def pieceEnd : Port → Port -- The crossover: R(v_0) ↔ R(v_1) and L(v_0) ↔ L(v_1), two pieces that cross inside the tile. | (t, 0, s) => (t, 1, s) | (t, 1, s) => (t, 0, s) -- Every other vertex: a hook round the corner, L(v_i) ↔ R(v_i). | (t, i, s) => (t, i, !s)
Statement.straightThrough lean/SpectreKnot/Statement.lean, line 68
def straightThrough (glue : Nat → Nat → Option (Nat × Nat)) : Port → Option Port -- R(v_i) is on e_i. If e_i is e_j of t', the ribbon continues as R(v_j) of t'. | (t, i, true) => (glue t i).map fun (t', j) => (t', j, true) -- L(v_i) is on e_{i-1} (`(i + 13) % 14` is i - 1, round 14). If that is e_j of t', it continues as L(v_{j+1}). | (t, i, false) => (glue t ((i + 13) % 14)).map fun (t', j) => (t', (j + 1) % 14, false)
← Definition 3.1 (The decoration)In the contentsDefinition 3.3 (Strand graph) →
Definition 3.3 Strand graph
Paper §3.3 Strands, page 12 of the PDF, line 784 of spectre_knot.tex · cites 0 · cited by 0
Explained with pictures: step 3 of the Prove page →
Statement
Let $\T$ be a homochiral tiling. The strand graph $\G(\T)$ is the multigraph with one vertex for each piece of each tile and, for each pair of ports joined by the straight-through rule, one edge between the two pieces that end at these ports. A strand is a connected component of $\G(\T)$; a strand is closed if it is finite.
Terms defined in the paper’s running text: homochiral tilings (§2.1).
Where it sits
Cites
- none
This
Definition 3.3
Cited by
- none
← Definition 3.2 (Straight-through rule)In the contentsLemma 3.4 (Strands are cycles or lines) →
Lemma 3.4
argued LeanPaper §3.3 Strands, page 12 of the PDF, line 788 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 2 · depth 1
Explained with pictures: step 3 of the Prove page →
Statement
Every vertex of $\G(\T)$ has degree $2$. Hence every strand is either a finite cycle (a closed strand) or a two-way infinite path.
Proof
A piece has two ends, each a port of its tile on some edge $e$. Tiles meet full edge to full edge (Section 2), so in a tiling of the plane $e$ is an edge of exactly one other tile, and each end is joined to exactly one port, an end of one of that neighbour's pieces. Hence every vertex has degree exactly $2$; joins always link pieces of different tiles, so $\G(\T)$ has no self-loops. A connected, locally finite multigraph with all degrees $2$ and no self-loops is a finite cycle (possibly of length $2$) or a two-way infinite path.
∎Where it sits
This
Lemma 3.4
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 3.4 · proof
Strands are modelled as two fixed-point-free involutions on ports: inside (the pieces) and across (the straight-through rule). A strand is either closed, or a two-way infinite path that never passes a port or a piece twice.
Differs from the paper: other form: for strands given as two fixed-point-free involutions on ports, the description at the end of §3.3, not the strand graph of Def 3.3; that every port is joined to exactly one other (degree 2) is built into this model, and proved for the nest tiling and for chains.
StrandSystem.closed_or_path lean/SpectreKnot/Strands.lean, line 176
theorem closed_or_path (p : P) :
S.Closed p ∨
((∀ i j, S.walk p i = S.walk p j → i = j) ∧
(∀ a a', iter S.prev a p = iter S.prev a' p → a = a') ∧
(∀ a b, iter S.prev a p = S.walk p b → a = 0 ∧ b = 0) ∧
(∀ i j, S.walk p j ≠ S.inside (S.walk p i)))← Definition 3.3 (Strand graph)In the contentsLemma 4.1 (The box of a patch) →
Lemma 4.1 The box of a patch
argued Lean, in partPaper §4.1 Patches and boxes, page 12 of the PDF, line 821 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 1 · depth 3
Explained with pictures: step 4 of the Prove page →
Statement
Start at a rim port of $P$ and follow the pieces of the tiles of $P$, crossing interior edges of $P$ by the straight-through rule. The path ends at a different rim port. This defines a fixed-point-free involution $\pi_P$ of the set of rim ports. The pieces of $P$ that are not reached from any rim port form finitely many cycles, the closed strands of $P$.
Terms defined in the paper’s running text: patches and rim ports (§4.1).
Proof
The pieces of $P$, joined across interior edges, form a finite graph in which a piece has one neighbour for each of its ends that is not a rim port. Its components are therefore cycles, and paths (possibly a single piece) with exactly two free ends, which are distinct rim ports. Every rim port is a free end of exactly one such path, so sending each rim port to the other free end of its path is a fixed-point-free involution, $\pi_P$.
∎Where it sits
In Lean
What the Lean covers here: For the patches with the signature, the only ones the proof uses: following the ribbon pairs their rim ports without fixed points. The box of a general patch is not formalised.
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 4.1 · proof
For a patch with the signature: the ribbon from each rim port leaves the patch at the rim port that the signature pairs it with (btau), and that pairing is an involution on the rim ports without fixed points.
Differs from the paper: part: for the patches with the signature, the only ones the proof uses; the box of a general patch is not formalised, following a ribbon (Follow) playing the role of π_P.
Statement.Patch.HasSig.box lean/SpectreKnot/PatchSig.lean, line 106
theorem HasSig.box {o : Bool} {A B : Nat} (has_sig : P.HasSig o A B) (A_lt : A < P.E) (B_lt : B < P.E)
(A_ne_B : A ≠ B) (k : Nat) (s : Bool) (k_lt : k < P.E) :
P.Follow (P.bport o (k, s)) (P.bport o (btau A B (k, s))) ∧ (btau A B (k, s)).1 < P.E ∧
btau A B (btau A B (k, s)) = (k, s) ∧ btau A B (k, s) ≠ (k, s)← Lemma 3.4 (Strands are cycles or lines)In the contentsLemma 4.2 (Gluing) →
Lemma 4.2 Gluing
argued Lean, in partPaper §4.1 Patches and boxes, page 13 of the PDF, line 840 of spectre_knot.tex · rests on 1 result · cites 1 · cited by 1 · depth 2
Explained with pictures: step 4 of the Prove page →
Statement
Let a patch $P$ be the union of patches $P_1,\dots,P_n$ with pairwise disjoint interiors. Then the box of $P$ is determined by the boxes of the $P_i$ together with the identification of their shared rim edges. More precisely, $\pi_P$ is computed by alternately applying the $\pi_{P_i}$ and the straight-through rule across shared edges, until a rim port of $P$ is reached. The closed strands of $P$ are those of the $P_i$ together with the cycles of this alternation that contain no rim port of $P$.
Terms defined in the paper’s running text: patches and rim ports (§4.1), arcs (§4.1).
Proof
Every arc of $P$ (Lemma 4.1) is a concatenation of arcs of the $P_i$ joined across edges shared by two of the $P_i$; every closed strand of $P$ is either a closed strand of some $P_i$ or a cyclic concatenation of such arcs. The rim edges of $P$ are the rim edges of the $P_i$ that are not shared by two of them.
∎Where it sits
In Lean
What the Lean covers here: In the two forms the proof uses: for compositions, glued from boxes, and for supertiles glued from their children.
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 4.2 · definitions + proof
The two uses that §4 names. For compositions, the box glued from boxes is the full walk, alternately through a child by its signature (tau) and straight across a glued edge (sigma), a relation defined by rules (FullReach). For supertiles glued from their children (the row for §7.1 below): every walk of the composition is a strand of the parent, and the parent has no closed strand when the composition has none.
Differs from the paper: part: the two forms the proof uses, not the lemma for any union of patches.
Gluing lean/SpectreKnot/Gluing.lean, line 41
structure Gluing where n : Nat E : Nat → Nat A : Nat → Nat B : Nat → Nat mate : Nat → Nat → Option (Nat × Nat)
Gluing.FullReach lean/SpectreKnot/Gluing.lean, line 136
def FullReach (x r : GPort) : Prop := ∃ k, G.FReach k x r
Statement.Kids.follow_of_reach lean/SpectreKnot/Bridge.lean, line 347
theorem follow_of_reach : ∀ k x r, (Comp.ofLens T L d ω).toGluing.FReach k x r →
(Comp.ofLens T L d ω).toGluing.Valid x → (compose T child).Follow (ιP child o x) (ιP child o r)Statement.Kids.noClosed lean/SpectreKnot/Bridge.lean, line 402
theorem noClosed : (compose T child).NoClosedStrand§7.1, the Reduction (a supertile is its composition), with Lemma 4.2 · proof
In compose T child, if the children have the signature with the corners and side lengths of Comp.ofLens: across a child's rim edge, compose glues exactly what Comp.mate says; every walk of the composition is a strand of the parent; and the parent has no closed strand when the composition has none. So, at every level, compose never falls back on a default: an unglued edge of a child is found at its one place on the child's rim, and sides that Table 2 glues have equal lengths (compose_no_default).
Differs from the paper: other form: at tile level, for the supertiles that compose builds; that actual supertiles are built so is (M1).
Statement.Kids.follow_of_reach lean/SpectreKnot/Bridge.lean, line 347
theorem follow_of_reach : ∀ k x r, (Comp.ofLens T L d ω).toGluing.FReach k x r →
(Comp.ofLens T L d ω).toGluing.Valid x → (compose T child).Follow (ιP child o x) (ιP child o r)Statement.Kids.noClosed lean/SpectreKnot/Bridge.lean, line 402
theorem noClosed : (compose T child).NoClosedStrandStatement.glue_rim lean/SpectreKnot/ComposeTiles.lean, line 233
theorem glue_rim (len_pos : ∀ c, c < nk T → ∀ j, j < 6 → 1 ≤ L c j) (pair_len : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j) (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧ (child c).E = pos (L c) 6) {c k : Nat} (c_lt : c < nk T) (k_lt : k < pos (L c) 6) (unglued : (child c).glue ((child c).edgeAt k).1 ((child c).edgeAt k).2 = none) (rim_inj : ∀ k', k' < (child c).E → (child c).edgeAt k' = (child c).edgeAt k → k' = k) : glueAt T child c ((child c).edgeAt k).1 ((child c).edgeAt k).2 = ((Comp.ofLens T L d ω).mate c k).map fun (c', k') => (((child c').edgeAt k').1 + offC child c', ((child c').edgeAt k').2)
Statement.compose_no_default lean/SpectreKnot/ProofA.lean, line 181
theorem compose_no_default {m : Nat} (m_pos : 1 ≤ m) (T : Kind) {c t i : Nat} (c_lt : c < nk T)
(ht : t < (super m (kidAt T c)).tiles) (hi : i < 14) (unglued : (super m (kidAt T c)).glue t i = none) :
(∃ k, (super m (kidAt T c)).rim.findIdx? (· == (t, i)) = some k ∧ (super m (kidAt T c)).edgeAt k = (t, i)) ∧
∀ j c' j', j < 6 → adjAt T c j = some (c', j') →
((super m (kidAt T c')).side j').length = ((super m (kidAt T c)).side j).length← Lemma 4.1 (The box of a patch)In the contentsDefinition 4.3 (Signature) →
Definition 4.3 Signature
Paper §4.2 The signature, page 13 of the PDF, line 859 of spectre_knot.tex · cites 0 · cited by 0
Explained with pictures: step 4 of the Prove page →
Statement
Let $A$ and $B$ be adjacent rim vertices of a patch $P$. We say that $P$ has the signature at $(A,B)$ if
- (i)$\pi_P(\Lp(u))=\Rp(u)$ for every rim vertex $u\notin\{A,B\}$ (a hook at $u$; we also say that $u$ is a hook of $P$, and call the arc of $P$ from $\Lp(u)$ to $\Rp(u)$ its hook arc at $u$);
- (ii)$\pi_P(\Rp(A))=\Rp(B)$ and $\pi_P(\Lp(A))=\Lp(B)$ (the crossover);
- (iii)$P$ has no closed strand: the ribbon followed from any port of $P$ reaches the rim.
Terms defined in the paper’s running text: patches and rim ports (§4.1).
Where it sits
Cites
- none
This
Definition 4.3
Cited by
- none
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Def 4.3 · definitions
The signature of a patch at rim vertices A and B, its rim listed in a given orientation (HasSig): the rim list holds exactly the unglued edges, each once; no strand is closed; and following the ribbon from each rim port leads to the port that btau pairs it with: a hook at every rim vertex but A and B, and the crossover R(A) ↔ R(B), L(A) ↔ L(B).
Differs from the paper: same: as Def 4.3 words it, with A and B given by their positions on the rim.
Statement.btau lean/SpectreKnot/Statement.lean, line 154
def btau (A B : Nat) : Nat × Bool → Nat × Bool | (k, s) => if k = A then (B, s) else if k = B then (A, s) else (k, !s)
Statement.Patch.HasSig lean/SpectreKnot/Statement.lean, line 160
structure Patch.HasSig (P : Patch) (o : Bool) (A B : Nat) : Prop where tiles_pos : 0 < P.tiles /-- the rim edges are edges of actual tiles, and are not glued -/ rim_ok : ∀ k, k < P.E → (P.edgeAt k).1 < P.tiles ∧ (P.edgeAt k).2 < 14 ∧ P.glue (P.edgeAt k).1 (P.edgeAt k).2 = none /-- no edge is listed twice -/ rim_inj : ∀ k k', k < P.E → k' < P.E → P.edgeAt k = P.edgeAt k' → k = k' /-- every unglued edge is listed -/ rim_all : ∀ t i, t < P.tiles → i < 14 → P.glue t i = none → ∃ k, k < P.E ∧ P.edgeAt k = (t, i) /-- glued edges are edges of actual tiles -/ glue_ok : ∀ t i t' j, t < P.tiles → i < 14 → P.glue t i = some (t', j) → t' < P.tiles ∧ j < 14 noClosed : P.NoClosedStrand /-- following the ribbon from a rim port leads to the port the signature pairs it with -/ sig : ∀ k s, k < P.E → P.Follow (P.bport o (k, s)) (P.bport o (btau A B (k, s)))
← Lemma 4.2 (Gluing)In the contentsLemma 4.4 (Signature of the tile) →
Lemma 4.4
argued LeanPaper §4.2 The signature, page 13 of the PDF, line 873 of spectre_knot.tex · rests on 0 results · cites 1 · cited by 0
Explained with pictures: step 4 of the Prove page →
Statement
A tile has the signature at $(v_0,v_1)$.
Terms defined in the paper’s running text: patches and rim ports (§4.1).
Proof
A tile has no interior edge, so $\pi$ is the pairing of Definition 3.1, and every piece has both ends on the rim.
∎Where it sits
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 4.4 · kernel computation
A tile has the signature at (v₀, v₁), its rim listed counter-clockwise (tile.HasSig true 0 1, checked by the kernel).
Differs from the paper: same.
Statement.tile_hasSig lean/SpectreKnot/PatchSig.lean, line 151
theorem tile_hasSig : tile.HasSig true 0 1Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the tile's 14 pieces = 12 hooks + crossover at v0 v1 (and the Mystic has the signature)
← Definition 4.3 (Signature)In the contentsLemma 5.1 (Zigzag Lemma) →
Lemma 5.1 Zigzag Lemma
argued LeanPaper §5 The Zigzag Lemma, page 14 of the PDF, line 896 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 2 · depth 3
Explained with pictures: step 5 of the Prove page →
Statement
Let $u_0u_1\cdots u_n$ ($n\ge1$) be a path of $n$ edges lying on the rims of two distinct children $X_c$ and $X_{c'}$, traversed by $X_c$ from $u_0$ to $u_n$. Suppose that none of the interior vertices $u_1,\dots,u_{n-1}$ is a crossover corner of $X_c$ or of $X_{c'}$. Then alternately applying the straight-through rule across the edges $u_ku_{k+1}$ and the hooks of $X_c$ and $X_{c'}$ at $u_1,\dots,u_{n-1}$ connects the ports of $X_c$ and $X_{c'}$ near $u_0$ on $u_0u_1$ and near $u_n$ on $u_{n-1}u_n$ in pairs as follows:
These two connections use every port on the edges of the path.
Proof
Start at $\Rp_c(u_0)$, the port of $X_c$ on $u_0u_1$ near $u_0$ (orange in Figure 6). The straight-through rule takes it to the port of $X_{c'}$ on $u_0u_1$ near $u_1$. In the orientation of $X_{c'}$, which runs from $u_1$ to $u_0$ along this edge, that port is $\Rp_{c'}(u_1)$. If $n=1$ we have reached $\Rp_{c'}(u_n)$. Otherwise $u_1$ is a hook of $X_{c'}$, which leads to $\Lp_{c'}(u_1)$, the port of $X_{c'}$ on $u_1u_2$ near $u_1$. Crossing $u_1u_2$ leads to the port of $X_c$ on $u_1u_2$ near $u_2$, which is $\Lp_c(u_2)$. If $n=2$ we stop. Otherwise the hook of $X_c$ at $u_2$ leads to $\Rp_c(u_2)$, and the pattern repeats with all indices shifted by two. So this connection visits the hooks of $X_{c'}$ at odd $k$ and those of $X_c$ at even $k$, and ends at $\Lp_c(u_n)$ if $n$ is even and at $\Rp_{c'}(u_n)$ if $n$ is odd. The second connection starts at $\Lp_{c'}(u_0)$, the port of $X_{c'}$ on $u_0u_1$ near $u_0$. By the same argument with $X_c,X_{c'}$ exchanged and $\Lp,\Rp$ exchanged, it passes $\Lp_c(u_1)$, $\Rp_c(u_1)$, $\Rp_{c'}(u_2)$, $\Lp_{c'}(u_2)$, …, visits the hooks of $X_c$ at odd $k$ and those of $X_{c'}$ at even $k$, and ends at $\Rp_{c'}(u_n)$ if $n$ is even and at $\Lp_c(u_n)$ if $n$ is odd. Each connection crosses each of the $n$ edges once, using two of its four ports, and the two connections use different ports, so together they use all of them.
∎Figure

Where it sits
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 5.1 (the Zigzag Lemma) · proof, any n
Along a shared path of n edges whose inner vertices are hooks of both children, alternately crossing and turning back joins the ports at its two ends as the paper says, and the two connections use every port on the edges of the path (zigzag). The lengthening uses it with n = 3, along an edge cut into three (cross_three).
Differs from the paper: same: for every length n.
Zigzag.zigzag lean/SpectreKnot/Zigzag.lean, line 88
theorem zigzag (len_pos : 1 ≤ n) (across_R : ∀ k, k < n → σ (ι (.c .R k)) = some (ι (.d .R (k + 1)))) (across_L : ∀ k, k < n → σ (ι (.d .L k)) = some (ι (.c .L (k + 1)))) (hook_c : ∀ k, 0 < k → k < n → τ (ι (.c .L k)) = ι (.c .R k)) (hook_d : ∀ k, 0 < k → k < n → τ (ι (.d .R k)) = ι (.d .L k)) : -- the connection through R_c(u_0) Chain σ τ (ι (.c .R 0)) (if n % 2 = 0 then ι (.c .L n) else ι (.d .R n)) ∧ -- the connection through L_{c'}(u_0) Chain σ τ (ι (.d .L 0)) (if n % 2 = 0 then ι (.d .R n) else ι (.c .L n)) ∧ -- every port on the edges of the path is used (∀ k, k < n → Chain σ τ (ι (.c .R 0)) (if k % 2 = 0 then ι (.d .R (k + 1)) else ι (.c .L (k + 1))) ∧ Chain σ τ (ι (.d .L 0)) (if k % 2 = 0 then ι (.c .L (k + 1)) else ι (.d .R (k + 1))))
Gluing.cross_three lean/SpectreKnot/Subdivide.lean, line 253
theorem cross_three {G : Gluing} {a ea b eb : Nat} (a_room : ea + 3 < G.E a)
(glued_a : ∀ i, i ≤ 2 → G.mate a (ea + i) = some (b, eb + 2 - i))
(glued_b : ∀ i, i ≤ 2 → G.mate b (eb + i) = some (a, ea + 2 - i))
(hook_a : ∀ i, 1 ≤ i → i ≤ 2 → G.corner a (ea + i) = false)
(hook_b : ∀ i, 1 ≤ i → i ≤ 2 → G.corner b (eb + i) = false) :
G.Cross (a, ea, true) (b, eb, true) ∧ G.Cross (b, eb + 3, false) (a, ea + 3, false)← Lemma 4.4 (Signature of the tile)In the contentsProposition 6.1 (Lengths by letter) →
Proposition 6.1 Lengths by letter
argued LeanPaper §6.1 Letters, page 15 of the PDF, line 968 of spectre_knot.tex · rests on 4 results · cites 2 · cited by 2 · depth 4
Explained with pictures: step 6 of the Prove page →
Statement
For every $m\ge1$ the length $\ell_m(K,j)$ depends only on the letter of side $j$ of $K$. Write $x_m$ for the common length of the level-$m$ sides with letter $x$. Then
with $(\alpha_1,\beta_1,\gamma_1,\delta_1,\epsilon_1,\zeta_1,\eta_1,\theta_1)=(7,5,10,10,8,6,10,11)$.
Terms defined in the paper’s running text: side lengths (§6), letters (§6.1).
Proof
For $m=1$ this is a direct count on the level-$1$ supertiles (Figure 3), recorded in Computation 7.5. By Proposition 2.4(c), $\ell_{m+1}(T,J)$ is the sum of the lengths of the children's sides listed in Table 3. Inspection of the $54$ parent sides in Table 1, Table 3 and Table 4 (also checked by a script; Appendix A) shows that the multiset of letters of these children's sides depends only on the letter of side $J$ of $T$, and is the one in (1). For example, side $0$ of $\Delta$ (letter $\gamma$) is made of $7.5,6.4,6.3,6.2,5.4$, with letters $\beta,\eta,\epsilon,\epsilon,\theta$. The claim follows by induction on $m$.
∎Figure

Where it sits
Cites
- Computation 7.5 Base case
- Proposition 2.4 The pattern holds at every level
Also cites Figure 3, Table 3, Table 1, Table 4, Appendix A, Equation (1).
This
Proposition 6.1
Cited by
- Proposition 6.2 Fibonacci side lengths
- Lemma 7.2 Reachability
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Prop 6.1 · proof + decide on Tables 1, 3, 4
ℓ_m(K, j) depends only on the letter, for every m ≥ 1, with the recursion (1) (sideLen_eq_letterLen, for the lengths that Prop 2.4(c) gives from the level-1 counts); and side j of super m K has as many edges as that (super_side_length), the paper's definition of ℓ_m as a count.
Differs from the paper: same: for the supertiles built from the tables (super m K); that actual supertiles are glued so is (M1).
sideLen_eq_letterLen lean/SpectreKnot/Lengths.lean, line 73
theorem sideLen_eq_letterLen (m : Nat) (level_pos : 1 ≤ m) (K : Kind) (j : Nat) (side_lt : j < 6) :
sideLen m K j = letterLen m (letterOf K j)Statement.super_side_length lean/SpectreKnot/ProofA.lean, line 144
theorem super_side_length {m : Nat} (m_pos : 1 ≤ m) (K : Kind) {j : Nat} (j_lt : j < 6) :
((super m K).side j).length = letterLen m (letterOf K j) ∧ letterLen m (letterOf K j) = sideLen m K jComputed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
side lengths by letter at levels 1-8, the recurrence, the Fibonacci closed forms, parities, the Sigma offset
← Lemma 5.1 (Zigzag Lemma)In the contentsProposition 6.2 (Fibonacci side lengths) →
Proposition 6.2 Fibonacci side lengths
argued LeanPaper §6.1 Letters, page 15 of the PDF, line 992 of spectre_knot.tex · rests on 5 results · cites 1 · cited by 4 · depth 3
Explained with pictures: step 6 of the Prove page →
Statement
For every $m\ge1$,
Proof
For $m=1$, $(\Fib_4,\Fib_5,\Fib_6,\Fib_7)=(3,5,8,13)$ gives the initial values. For the induction step put $a=\Fib_{3m+1}$ and $b=\Fib_{3m+2}$, so that $\Fib_{3m+3}=a+b$, $\Fib_{3m+4}=a+2b$, $\Fib_{3m+5}=2a+3b$, $\Fib_{3m+6}=3a+5b$ and $\Fib_{3m+7}=5a+8b$. By the induction hypothesis, $\alpha_m=b+2$, $\beta_m=a+2$, $\gamma_m=\delta_m=\eta_m=2b$, $\epsilon_m=a+b$, $\zeta_m=2a$ and $\theta_m=a+2b-2$. Substituting into (1):
Where it sits
This
Proposition 6.2
Cited by
- Corollary 6.3 Parities are constant
- Lemma 6.4 Position of A
- Lemma 6.5 Lower bounds
- Lemma 7.2 Reachability
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Prop 6.2 · proof
The Fibonacci closed forms.
Differs from the paper: same.
letterLen_fib lean/SpectreKnot/Lengths.lean, line 148
theorem letterLen_fib (m : Nat) (level_pos : 1 ≤ m) :
letterLen m .alpha = fib (3 * m + 2) + 2 ∧
letterLen m .beta = fib (3 * m + 1) + 2 ∧
letterLen m .gamma = 2 * fib (3 * m + 2) ∧
letterLen m .delta = 2 * fib (3 * m + 2) ∧
letterLen m .epsilon = fib (3 * m + 3) ∧
letterLen m .zeta = 2 * fib (3 * m + 1) ∧
letterLen m .eta = 2 * fib (3 * m + 2) ∧
letterLen m .theta = fib (3 * m + 4) - 2Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
side lengths by letter at levels 1-8, the recurrence, the Fibonacci closed forms, parities, the Sigma offset
← Proposition 6.1 (Lengths by letter)In the contentsCorollary 6.3 (Parities are constant) →
Corollary 6.3 Parities are constant
argued LeanPaper §6.1 Letters, page 15 of the PDF, line 1017 of spectre_knot.tex · rests on 6 results · cites 1 · cited by 1 · depth 4
Explained with pictures: step 6 of the Prove page →
Statement
In the paper, the sentence before it: Since $\Fib_n$ is even exactly when $3\mid n$ (the parities of $\Fib_1,\Fib_2,\dots$ run odd, odd, even, and repeat), Proposition 6.2 gives:
For every $m\ge1$ the lengths $\alpha_m$, $\beta_m$, $\theta_m$ are odd and $\gamma_m$, $\delta_m$, $\epsilon_m$, $\zeta_m$, $\eta_m$ are even.
Where it sits
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Cor 6.3 · proof
Parities are the same at every level ≥ 1 (for the letters, and for the sides).
Differs from the paper: same.
letterLen_parity lean/SpectreKnot/Lengths.lean, line 172
theorem letterLen_parity (m : Nat) (level_pos : 1 ≤ m) :
letterLen m .alpha % 2 = 1 ∧ letterLen m .beta % 2 = 1 ∧ letterLen m .gamma % 2 = 0 ∧
letterLen m .delta % 2 = 0 ∧ letterLen m .epsilon % 2 = 0 ∧ letterLen m .zeta % 2 = 0 ∧
letterLen m .eta % 2 = 0 ∧ letterLen m .theta % 2 = 1sideLen_parity lean/SpectreKnot/Lengths.lean, line 186
theorem sideLen_parity (m m' : Nat) (level_pos : 1 ≤ m) (level_pos' : 1 ≤ m') (K : Kind) (j : Nat) (side_lt : j < 6) :
sideLen m K j % 2 = sideLen m' K j % 2Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
side lengths by letter at levels 1-8, the recurrence, the Fibonacci closed forms, parities, the Sigma offset
← Proposition 6.2 (Fibonacci side lengths)In the contentsLemma 6.4 (Position of A) →
Lemma 6.4 Position of $A$
argued LeanPaper §6.2 The crossover corner, page 15 of the PDF, line 1019 of spectre_knot.tex · rests on 6 results · cites 3 · cited by 2 · depth 2
Explained with pictures: step 6 of the Prove page →
Statement
Let $m\ge1$. For $K\neq\Sigma$, the crossover corner $A$ of a level-$m$ $K$-supertile is its vertex $0$. For $K=\Sigma$, $A$ lies inside side $5$ (letter $\delta$), $d_m$ edges along it from vertex $5$ and $\delta_m-d_m=2\Fib_{3m}$ edges from vertex $0$, where
Terms defined in the paper’s running text: rim, vertices and sides (§2.2), crossover corners (§2.3).
Proof
For $m=1$ the lemma is part of Computation 7.5: $A$ is vertex $0$ if $K\neq\Sigma$, and $d_1=6=2\Fib_4$. For $m\ge2$ and $K\neq\Sigma$ it is Proposition 2.4(d). For $K=\Sigma$: by Table 3, which lists the children's sides in the parent's own order, side $5$ of a level-$(m+1)$ $\Sigma$-supertile begins, at its vertex $5$, with the children's sides $0.2$, $0.1$, $7.0$, and by Proposition 2.4(d) its crossover corner comes right after them. Child $0$ is a $\Xi$ and child $7$ a $\Gamma$, so these sides have letters $\theta,\epsilon,\alpha$, and by Proposition 6.2 $d_{m+1}=\theta_m+\epsilon_m+\alpha_m=(\Fib_{3m+4}-2)+\Fib_{3m+3}+(\Fib_{3m+2}+2)=2\Fib_{3m+4}$. Finally, $\delta_m-d_m=2\Fib_{3m+2}-2\Fib_{3m+1}=2\Fib_{3m}$ by Proposition 6.2.
∎Where it sits
Cites
- Computation 7.5 Base case
- Proposition 2.4 The pattern holds at every level
- Proposition 6.2 Fibonacci side lengths
Also cites Table 3.
This
Lemma 6.4
Cited by
- Lemma 7.2 Reachability
- Theorem 7.6 Signature Theorem
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 6.4 · proof
d_m = 2F_{3m+1}, and δ_m − d_m = 2F_{3m}. Here d_m is defined from Table 3 (the children's sides 0.2, 0.1, 7.0). The crossover corner of super m K lies at vertex 0, or for Σ at the point 2F_{3m+1} along side 5 (cornerA, in SignatureTheorem), where the induction puts it (cornerA_eq_aPos).
Differs from the paper: same: for super m K; that actual supertiles are so is Prop 2.4(d), part of (M1).
dOff_fib lean/SpectreKnot/Lengths.lean, line 226
theorem dOff_fib (m : Nat) (level_pos : 1 ≤ m) :
dOff m = 2 * fib (3 * m + 1) ∧ letterLen m .delta = dOff m + 2 * fib (3 * m)Statement.cornerA lean/SpectreKnot/Statement.lean, line 252
def cornerA (m : Nat) (K : Kind) : Nat := if K = .Sigma then (super m K).vtx.getD 5 0 + 2 * fib (3 * m + 1) else 0
Statement.cornerA_eq_aPos lean/SpectreKnot/ProofA.lean, line 150
theorem cornerA_eq_aPos {m : Nat} (m_pos : 1 ≤ m) (K : Kind) : cornerA m K = aPos m KComputed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
side lengths by letter at levels 1-8, the recurrence, the Fibonacci closed forms, parities, the Sigma offset
← Corollary 6.3 (Parities are constant)In the contentsLemma 6.5 (Lower bounds) →
Lemma 6.5 Lower bounds
argued LeanPaper §6.2 The crossover corner, page 16 of the PDF, line 1041 of spectre_knot.tex · rests on 6 results · cites 1 · cited by 2 · depth 3
Explained with pictures: step 6 of the Prove page →
Statement
For every $m\ge1$: every side has length at least $5$; $d_m\ge6$; and $\delta_m-d_m\ge4$.
Terms defined in the paper’s running text: rim, vertices and sides (§2.2), side lengths (§6).
Proof
By Proposition 6.2 all letter lengths increase with $m$, and at $m=1$ the smallest is $\beta_1=5$. Also $d_m\ge d_1=6$ and $\delta_m-d_m=2\Fib_{3m}\ge 2\Fib_3=4$.
∎Where it sits
Cites
- Proposition 6.2 Fibonacci side lengths
This
Lemma 6.5
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 6.5 · proof
Every side ≥ 5, d_m ≥ 6, δ_m − d_m ≥ 4.
Differs from the paper: same.
bounds lean/SpectreKnot/Lengths.lean, line 244
theorem bounds (m : Nat) (level_pos : 1 ≤ m) :
(∀ x, 5 ≤ letterLen m x) ∧ 6 ≤ dOff m ∧ dOff m + 4 ≤ letterLen m .delta← Lemma 6.4 (Position of A)In the contentsLemma 7.1 (Lengthening) →
Lemma 7.1 Lengthening
argued LeanPaper §7.2 Lengthening, page 17 of the PDF, line 1127 of spectre_knot.tex · rests on 1 result · cites 1 · cited by 2 · depth 3
Explained with pictures: step 7 of the Prove page →
Statement
If $C_T(L,d,\omega)$ has the signature, then so does $C_T(L',d',\omega)$, for every move $(L,d)\to(L',d')$.
Terms defined in the paper’s running text: compositions (§7.1), moves (§7.2).
Proof
The idea: on a shared edge, cutting $e$ replaces one crossing by a zigzag along three edges, which joins the same ports (Lemma 5.1); on the rim it adds two hooks. Write $C=C_T(L,d,\omega)$ and $C'=C_T(L',d',\omega)$, and let $e=u_0u_1$. Then $C'$ is $C$ with $e$ cut into three: in each child that contains it, $e$ is replaced by the path $u_0w_1w_2u_1$, and every vertex of $C$ has an image vertex in $C'$ (the numbers of the rim vertices after $e$ go up by two). This is only a relabelling: the side and its partner gain the two new edges, every other side keeps its length, and the $r$-th edge of a side is still glued to the $r$-th from the end of its partner. The conditions on $e$ make the crossover corners of $C'$ the images of those of $C$: for $A_\Sigma$ by the choice of $d'$, and $B_c=A_c\pm1$ stays next to $A_c$ because the edge between them (the first edge of side $0$, the last of side $5$, or an edge at $A_\Sigma$) is never cut. In particular $w_1$ and $w_2$ are not crossover corners. Let $\varphi$ map each port of $C$ to the port of $C'$ of the same child and the same hand ($\Rp$ or $\Lp$) at the image vertex. Then $\varphi$ commutes with the pairings inside the children, since the crossover corners correspond, and with the straight-through rule across every glued edge other than $e$. If $e$ is shared by children $c$ and $c'$, with $c$ traversing it from $u_0$ to $u_1$, crossing it joins $\Rp_c(u_0)$ to $\Rp_{c'}(u_1)$ and $\Lp_c(u_1)$ to $\Lp_{c'}(u_0)$ (Lemma 5.1 with $n=1$); in $C'$, by Lemma 5.1 with $n=3$, the ribbons run along the new path from $\varphi(\Rp_c(u_0))$ to $\varphi(\Rp_{c'}(u_1))$ and from $\varphi(\Lp_c(u_1))$ to $\varphi(\Lp_{c'}(u_0))$. If $e$ lies on the rim, $w_1$ and $w_2$ are new rim vertices of $C'$, and hooks of the child, so hooks of $C'$.
Hence, by induction along the ribbon (each of its steps in $C$, through a child or across a glued edge, is matched in $C'$, across $e$ by the path along $u_0w_1w_2u_1$), for every port $x$ of $C$, the ribbon of $C'$ from $\varphi(x)$ passes through the images of the ports that the ribbon of $C$ from $x$ meets, and reaches the rim at the image of the rim port reached in $C$. So $C'$ has a hook at the image of every rim vertex of $C$ other than $A_\Gamma$ and $B_\Gamma$, and at each new rim vertex. As before, $A_\Gamma$ and $B_\Gamma$ are adjacent; they are still rim vertices, since the rim edges of the $\Gamma$ child at them stay on the rim, and they carry the crossover. Finally, $C'$ has no closed strand. Every port of $C'$ at the image of a vertex of $C$ is some $\varphi(x)$, whose ribbon reaches the rim. A port at $w_1$ or $w_2$ lies on the hook there if $e$ is on the rim, and otherwise on one of the two connections of Lemma 5.1 along $u_0w_1w_2u_1$; these use every port on these edges and end at ports at $u_0$ and $u_1$, so its ribbon too reaches the rim.
∎Where it sits
Cites
- Lemma 5.1 Zigzag Lemma
This
Lemma 7.1
Cited by
- Proposition 7.4 Compositions at every level
- Lemma 9.3 The junction map
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 7.1 (lengthening) · proof
Cutting one edge into three (shared by two children, or on the parent's rim) maps every walk to a walk with the same ends (sim), the new path being crossed as the Zigzag Lemma with n = 3 says (cross_three); the ribbon from a port at a new vertex reaches an old vertex, so no strand closes (noLoops); so cutting keeps the signature (sig). Lengthening a glued pair of sides by two edges (and d by two if the cut lies before the Σ corner) gives the same gluing, port for port, as cutting one edge (equiv); so a move keeps the signature (keep).
Differs from the paper: same: and the identification of a move with a cut, which the paper only sketches, is proved.
Gluing.cross_three lean/SpectreKnot/Subdivide.lean, line 253
theorem cross_three {G : Gluing} {a ea b eb : Nat} (a_room : ea + 3 < G.E a)
(glued_a : ∀ i, i ≤ 2 → G.mate a (ea + i) = some (b, eb + 2 - i))
(glued_b : ∀ i, i ≤ 2 → G.mate b (eb + i) = some (a, ea + 2 - i))
(hook_a : ∀ i, 1 ≤ i → i ≤ 2 → G.corner a (ea + i) = false)
(hook_b : ∀ i, 1 ≤ i → i ≤ 2 → G.corner b (eb + i) = false) :
G.Cross (a, ea, true) (b, eb, true) ∧ G.Cross (b, eb + 3, false) (a, ea + 3, false)Gluing.Cut.OK.sim lean/SpectreKnot/Subdivide.lean, line 722
theorem sim : Sim G (subdiv G κ) κ.port where valid x x_valid
Gluing.Cut.OK.noLoops lean/SpectreKnot/NewWalk.lean, line 292
theorem noLoops (no_loops : ∀ x, G.Valid x → ∃ r, G.FullReach x r) :
∀ x, (subdiv G κ).Valid x → ∃ r, (subdiv G κ).FullReach x rGluing.Cut.OK.sig lean/SpectreKnot/Signature.lean, line 266
theorem sig {g : Nat} (has_sig : Sig G g) : Sig (subdiv G κ) g where wf
Compose.Move.OK.equiv lean/SpectreKnot/Move.lean, line 699
theorem equiv : Gluing.Equiv (G₁) (Gs) where n
Compose.Move.OK.keep lean/SpectreKnot/Parity.lean, line 259
theorem OK.keep {ω : Bool} (move_ok : μ.OK T L d ω) (has_sig : Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)) :
Sig (Comp.ofLens T (μ.lens T L) (μ.d' T L d) ω).toGluing (nk T - 1)← Lemma 6.5 (Lower bounds)In the contentsLemma 7.2 (Reachability) →
Lemma 7.2 Reachability
argued LeanPaper §7.2 Lengthening, page 18 of the PDF, line 1166 of spectre_knot.tex · rests on 9 results · cites 5 · cited by 2 · depth 3
Explained with pictures: step 7 of the Prove page →
Statement
(a) For every $m\ge1$, the pair $(\ell_m,d_m)$ is admissible. (b) Every admissible $(L,d)\neq(\ell_1,d_1)$ arises by a move from an admissible pair $(\bar L,\bar d)$ with $\sum_{c,j}\bar L(c,j)<\sum_{c,j}L(c,j)$. The move can be chosen so that its edge $e$ lies at least two edges from both ends of its side (at least two edges of the side precede $e$ and at least two follow it), in each child that contains it, unless that side is side $5$ of the $\Sigma$ child or is glued to it. (This is used only for the junction map of Section 9.2.)
Hence a property of pairs that holds at $(\ell_1,d_1)$ and is kept by the moves of (b) holds at every admissible pair, in particular at $(\ell_m,d_m)$ for every $m\ge1$.
Terms defined in the paper’s running text: side lengths (§6), moves (§7.2), admissible pairs (§7.2).
Proof
(a) Glued sides have the same letter (Section 6), so by Proposition 6.1 the same length. By Proposition 6.2 the letter lengths do not decrease with $m$, and by Corollary 6.3 their parities do not change. By Lemma 6.4, $d_m=2\Fib_{3m+1}$ is even, and by Lemma 6.5, $d_m\ge6=d_1$ and $\ell_m(c_\Sigma,5)-d_m=\delta_m-d_m\ge4$.
(b) If $L=\ell_1$, then $L(c_\Sigma,5)=\delta_1=10$ and $d_1\le d\le 10-4=d_1$, so $(L,d)=(\ell_1,d_1)$, which is excluded. Hence $L\neq\ell_1$, and by the parity condition some side $j$ of some child $c$ has $L(c,j)\ge\ell_1(c,j)+2$; we undo a move on that side. If the side is neither side $5$ of the $\Sigma$ child nor glued to it, take $\bar d=d$ and the move whose edge is the third edge of the side (the third from the end in the partner): before the move the side has length at least $\ell_1(c,j)\ge5$ (Lemma 6.5), so this edge lies at least two edges from both ends, in either child. Otherwise, measure distances along side $5$ of the $\Sigma$ child from its vertex $5$. If $d\ge d_1+2$, take $\bar d=d-2$ and the move whose edge is the second edge of the side, before $A_\Sigma$; it does not touch $A_\Sigma$, since $\bar d\ge6$. If $d=d_1$, take $\bar d=d$ and the move whose edge is the second edge after $A_\Sigma$: since $L(c_\Sigma,5)\ge\ell_1(c_\Sigma,5)+2$ by the choice of the side, before the move it has $L(c_\Sigma,5)-2-d\ge\ell_1(c_\Sigma,5)-d_1=4$ edges after $A_\Sigma$, so this edge is at least two edges from the end of the side. In each case $(\bar L,\bar d)$ is admissible: the side, and the side glued to it if there is one, are two edges shorter, so still equal, at least $\ell_1$ and of its parity, as $L(c,j)\ge\ell_1(c,j)+2$; $\bar d\ge d_1$ and $\bar d\equiv d_1\pmod2$; and $\bar L(c_\Sigma,5)-\bar d$ is $L(c_\Sigma,5)-d\ge4$ in the first two cases and at least $4$ in the third, as shown. And $\sum\bar L=\sum L-2$ or $\sum L-4$. The final assertion of the lemma follows by induction on $\sum_{c,j}L(c,j)$.
∎Where it sits
Cites
- Proposition 6.1 Lengths by letter
- Proposition 6.2 Fibonacci side lengths
- Corollary 6.3 Parities are constant
- Lemma 6.4 Position of A
- Lemma 6.5 Lower bounds
Also cites Section 9.2, Section 6.
This
Lemma 7.2
Cited by
- Proposition 7.4 Compositions at every level
- Lemma 9.3 The junction map
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 7.2 (reachability) · proof
The admissible pairs (L, d) are those of the paper; (ℓ_m, d_m) is admissible for every m ≥ 1 (adm_level, part (a)); and a property that holds at (ℓ₁, d₁), depends only on the sides, and is kept by the moves of (b) holds at every admissible pair (adm_induct): by induction on the excess over ℓ₁, undoing at each step a move chosen as in the paper's proof (the third edge of a long side; on the Σ child's side 5, the second edge before the corner, or the second after it).
Differs from the paper: other form: (a) as stated; (b) is the step of the induction principle that ends the lemma (adm_induct), not stated on its own.
Compose.Adm lean/SpectreKnot/Parity.lean, line 122
structure Adm (T : Kind) (L : Nat → Nat → Nat) (d : Nat) : Prop where len : ∀ c, c < nk T → ∀ j, j < 6 → L₁ T c j ≤ L c j ∧ (L c j - L₁ T c j) % 2 = 0 pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j d_ge : dOff 1 ≤ d d_par : (d - dOff 1) % 2 = 0 sig : ∀ c, c < nk T → kidAt T c = .Sigma → d + L₁ T c 5 ≤ L c 5 + dOff 1
Compose.adm_level lean/SpectreKnot/Parity.lean, line 548
theorem adm_level (T : Kind) (m : Nat) (m_pos : 1 ≤ m) : Adm T (fun c j => letterLen m (letterOf (kidAt T c) j)) (dOff m) where len c _ j _
Compose.adm_induct lean/SpectreKnot/Parity.lean, line 309
theorem adm_induct (T : Kind) (ω : Bool) (P : (Nat → Nat → Nat) → Nat → Prop) (congr : ∀ L L' d d', (∀ c, c < nk T → ∀ j, j < 6 → L c j = L' c j) → (∀ c, c < nk T → kidAt T c = .Sigma → d = d') → P L' d' → P L d) (base : P (L₁ T) (dOff 1)) (step : ∀ (μ : Move) (L : Nat → Nat → Nat) (d : Nat), μ.OK T L d ω → ((2 ≤ μ.r₀ ∧ μ.r₀ + 3 ≤ L μ.c₀ μ.j₀) ∨ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5)) → P L d → P (μ.lens T L) (μ.d' T L d)) : ∀ L d, Adm T L d → P L d
Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
corroboration: the moves that the proof of Lemma 7.2 chooses, followed from (l_2, d_2) and (l_3, d_3) back to (l_1, d_1) for every kind, each checked to be an allowed move between admissible pairs; from (l_2, d_2) every composition on the way checked to have the signature (both signs) and, for Delta, the junction map
← Lemma 7.1 (Lengthening)In the contentsComputation 7.3 (The compositions at the level-1 lengths) →
Computation 7.3 The compositions at the level-$1$ lengths
computed LeanPaper §7.2 Lengthening, page 18 of the PDF, line 1203 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 1 · depth 3
Explained with pictures: step 7 of the Prove page →
Statement
For each of the nine kinds $T$ and both signs $\omega$, the composition $C_T(\ell_1,d_1,\omega)$ has the signature.
Terms defined in the paper’s running text: boxes taken abstractly (§4.1), compositions (§7.1).
The paper gives no proof in words: this is a finite check, done by the programs below.
Where it sits
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Comp 7.3 · kernel computation + proof
The 18 compositions C_T(ℓ₁, d₁, ±1), built from Tables 1–4 and ℓ₁, d₁, glued port by port (Lemma 4.2). For each, the checker Comp.check returns true, and Comp.check_sound turns that into statements: the walk from every port ends on the rim, every parent rim vertex but the Γ child's corners is a hook, and the corners are adjacent and carry the crossover. comp_7_3 states it as the paper words it (CompSig), and sig_base as Gluing.Sig, the form the induction carries (sig_of_check).
Differs from the paper: same: and the checker's true is proved to mean the signature (Comp.check_sound, sig_of_check).
Compose.compositions_level1 lean/SpectreKnot/CompFull.lean, line 54
theorem compositions_level1 : ∀ (T : Kind) (ω : Bool), (Comp.ofPattern T (letterLen 1) (dOff 1) ω).check ω = true
| .Gamma, true => check_Gamma_plus
| .Gamma, false => check_Gamma_minus
| .Delta, true => check_Delta_plus
| .Delta, false => check_Delta_minus
| .Theta, true => check_Theta_plus
| .Theta, false => check_Theta_minus
| .Lambda, true => check_Lambda_plus
| .Lambda, false => check_Lambda_minus
| .Xi, true => check_Xi_plus
| .Xi, false => check_Xi_minus
| .Pi, true => check_Pi_plus
| .Pi, false => check_Pi_minus
| .Sigma, true => check_Sigma_plus
…Compose.compositions_level1_signature lean/SpectreKnot/CompFull.lean, line 78
theorem compositions_level1_signature (T : Kind) (ω : Bool) : let C := Comp.ofPattern T (letterLen 1) (dOff 1) ω let G := C.toGluing let n := C.rimVertexPorts.length G.WF ∧ (∀ x, G.Valid x → ∃ r, G.FullReach x r) ∧ (∀ t, t < n → t ≠ C.tA → t ≠ C.tB → G.FullReach (C.vtx t).1 (C.vtx t).2) ∧ C.tA < n ∧ C.tB < n ∧ C.tB = (if ω then (C.tA + 1) % n else (C.tA + n - 1) % n) ∧ G.FullReach (C.vtx C.tA).2 (C.vtx C.tB).2 ∧ G.FullReach (C.vtx C.tA).1 (C.vtx C.tB).1
Compose.comp_7_3 lean/SpectreKnot/CompSig.lean, line 608
theorem comp_7_3 (T : Kind) (ω : Bool) : CompSig T (fun c j => letterLen 1 (letterOf (kidAt T c) j)) (dOff 1) ω
Compose.sig_base lean/SpectreKnot/CompSig.lean, line 602
theorem sig_base (T : Kind) (ω : Bool) : Sig (Comp.ofPattern T (letterLen 1) (dOff 1) ω).toGluing (nk T - 1)Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the 18 compositions C_T(l_1, d_1, ±1), built from Tables 1-4 and l_1, d_1 alone (no geometry, no skeleton): every port followed, the signature checked as worded; negative control (each child's corners two apart: all 18 fail)
hierarchy/compositions.py(also the Lean kernel:CompFull.lean)
← Lemma 7.2 (Reachability)In the contentsProposition 7.4 (Compositions at every level) →
Proposition 7.4 Compositions at every level
argued LeanPaper §7.2 Lengthening, page 19 of the PDF, line 1219 of spectre_knot.tex · rests on 13 results · cites 3 · cited by 1 · depth 2
Explained with pictures: step 7 of the Prove page →
Statement
For every $m\ge1$, every kind $T$ and both signs $\omega$, the composition $C_T(\ell_m,d_m,\omega)$ has the signature.
Terms defined in the paper’s running text: compositions (§7.1).
Proof
Fix $T$ and $\omega$, and consider the property of $(L,d)$ that $C_T(L,d,\omega)$ has the signature. It holds at $(\ell_1,d_1)$ by Computation 7.3, and every move keeps it by Lemma 7.1; so by Lemma 7.2 it holds at $(\ell_m,d_m)$.
∎Where it sits
Cites
- Computation 7.3 The compositions at the level-1 lengths
- Lemma 7.1 Lengthening
- Lemma 7.2 Reachability
This
Proposition 7.4
Cited by
- Theorem 7.6 Signature Theorem
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Prop 7.4 · proof + kernel computation
For every m ≥ 1, every kind and both signs: C_T(ℓ_m, d_m, ω) has the signature, as the paper words it (prop_7_4): no strand closes up, every parent rim vertex is a hook except the Γ child's corners A and B, which are adjacent rim vertices and carry the crossover. The proof is the paper's: the signature holds at (ℓ₁, d₁) by Computation 7.3 and is kept by every move by Lemma 7.1, so by Lemma 7.2 it holds at every admissible pair (adm_sig), in particular at (ℓ_m, d_m) (parity_lemma). It carries the form Gluing.Sig, which finds each parent rim vertex by turning about a child's vertex, and reads it at Table 3's positions at the end (compSig_of_sig); parity_lemma_adj states the adjacency in that form.
Differs from the paper: same: for every m ≥ 1, every kind and both signs.
Compose.adm_sig lean/SpectreKnot/Parity.lean, line 497
theorem adm_sig (T : Kind) (ω : Bool) : ∀ L d, Adm T L d → Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)Compose.parity_lemma lean/SpectreKnot/Parity.lean, line 575
theorem parity_lemma (m : Nat) (m_pos : 1 ≤ m) (T : Kind) (ω : Bool) :
Sig (Comp.ofPattern T (letterLen m) (dOff m) ω).toGluing (nk T - 1)Compose.prop_7_4 lean/SpectreKnot/Parity.lean, line 581
theorem prop_7_4 (m : Nat) (m_pos : 1 ≤ m) (T : Kind) (ω : Bool) : Statement.CompSig T (fun c j => letterLen m (letterOf (kidAt T c) j)) (dOff m) ω
Compose.parity_lemma_adj lean/SpectreKnot/Parity.lean, line 626
theorem parity_lemma_adj (m : Nat) (m_pos : 1 ≤ m) (T : Kind) (ω : Bool) : let G := (Comp.ofPattern T (letterLen m) (dOff m) ω).toGluing let g := nk T - 1 if ω then G.Rot (g, nxt (G.E g) (G.A g)) (g, G.B g) else G.Rot (g, nxt (G.E g) (G.B g)) (g, G.A g)
Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
corroboration: the compositions and the junction map at (l_m, d_m, ±1) for m = 2..4; every single move from (l_1, d_1), with both signs, keeps the signature (1,792 moves) and, on Delta with any cut on child 1 two edges clear of the ends of its side, the junction map (190 moves)
← Computation 7.3 (The compositions at the level-1 lengths)In the contentsComputation 7.5 (Base case) →
Computation 7.5 Base case
computed Lean, in partPaper §7.3 The induction, page 19 of the PDF, line 1225 of spectre_knot.tex · rests on 3 results · cites 1 · cited by 3 · depth 2
Explained with pictures: step 7 of the Prove page →
Statement
Each of the nine level-$1$ supertiles of Figure 3, and so by Lemma 2.6 every level-$1$ supertile, has the side lengths $\ell_1(K,j)=x_1$, where $x$ is the letter of side $j$ (Table 4) and $(\alpha_1,\dots,\theta_1)=(7,5,10,10,8,6,10,11)$; its crossover corner $A$ is vertex $0$ if its kind is not $\Sigma$, and for $\Sigma$ lies inside side $5$, $d_1=6$ edges along it from vertex $5$; and it has the signature at $(A,B)$, where $B=A+\omega_1$ in its own order.
Terms defined in the paper’s running text: crossover corners (§2.3), side lengths (§6).
The paper gives no proof in words: this is a finite check, done by the programs below.
Figure

Where it sits
This
Computation 7.5
Cited by
- Proposition 6.1 Lengths by letter
- Lemma 6.4 Position of A
- Theorem 7.6 Signature Theorem
In Lean
What the Lean covers here: On the nine level-1 supertiles computed by exact.py, taken as input: their geometry, and that $A$ is $v_0$ of the first tile of the Mystic (the paper's definition of $A$ at level 1), are not checked; the Lean has no Mystic.
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Comp 7.5 · kernel computation
The nine level-1 supertiles (from exact.py) have the side lengths ℓ₁ and the signature, with A and B where the induction expects them.
Differs from the paper: part: on the level-1 supertiles computed by exact.py, which are input data, with A at vertex 0 (for Σ, d₁ along side 5) and B = A + ω₁. The clause placing A, that this vertex is v₀ of the Mystic's first tile (the paper's definition of A at level 1), is input, not checked: the Lean has no Mystic.
Statement.good_one lean/SpectreKnot/PatchSig.lean, line 190
theorem good_one (K : Kind) : Good 1 KComputed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
signature of the level-1 supertiles, exact (also levels 2-3 and 4, corroboration); the same in floating point
← Proposition 7.4 (Compositions at every level)In the contentsTheorem 7.6 (Signature Theorem) →
Theorem 7.6 Signature Theorem
argued LeanPaper §7.3 The induction, page 19 of the PDF, line 1245 of spectre_knot.tex · rests on 16 results · cites 4 · cited by 2 · depth 1
Explained with pictures: step 7 of the Prove page →
Statement
In every homochiral tiling by $\Tile$, for every $m\ge1$, every level-$m$ supertile of every kind has the signature at $(A,B)$, where $A$ is its crossover corner (Section 2.3), placed as in Lemma 6.4, and $B=A+\omega_m$ in its own order. In particular no such supertile contains a closed strand.
Terms defined in the paper’s running text: homochiral tilings (§2.1), crossover corners (§2.3).
Proof
For $m=1$ this is Computation 7.5. Assume the theorem for level $m\ge1$ and let $Y$ be a level-$(m+1)$ supertile of kind $T$. By the induction hypothesis its children have the signature at $(A_c,A_c+\omega_m)$. So, by the Reduction (Section 7.1, with Lemma 4.2), the box of $Y$ is that of $C_T(\ell_m,d_m,\omega_m)$, and $Y$ has a closed strand only if this composition has one; the composition has the signature by Proposition 7.4. Hence $Y$ has no closed strand, and it has a hook at every rim vertex except the adjacent crossover corners $A_\Gamma,B_\Gamma$ of its $\Gamma$ child, which carry the crossover. By definition $A_\Gamma$ is the crossover corner of $Y$, placed as in Lemma 6.4. Finally $B_\Gamma=A_\Gamma+\omega_m$ in the child's own order, which is opposite to that of $Y$; so $B=A-\omega_m=A+\omega_{m+1}$ in the own order of $Y$.
∎From the running text
§7.1 · The Reduction: a supertile is its composition
Reduction (A supertile is its composition). Let $m\ge1$, and let $Y$ be a level-$(m+1)$ supertile of kind $T$ whose children $X_c$ have the signature at $(A_c,A_c+\omega_m)$ in their own orientation. Then the children of $Y$, with their rims, sides, corners $A_c,B_c$ and the gluing of their sides, and the rim of $Y$ read in the children's order, match those of $C_T(\ell_m,d_m,\omega_m)$. So the box of $Y$ is the box of the composition, and $Y$ has a closed strand if and only if the composition has one.
Indeed: (i) by Proposition 2.4(a),(b) and Proposition 6.1 the children have the kinds and side lengths of the composition, and side $j$ of $X_c$ is side $j'$ of $X_{c'}$ traversed oppositely; (ii) two children meet only along the closed sides they share: at a point inside a side of a child, the rim edges there are shared with the partner across that side, so the child and its partner fill a neighbourhood; and at a vertex exactly three level-$m$ supertiles meet, any two of them sharing a side that ends there (Theorem 2.1(b)); (iii) so each side of a child is wholly shared with one sibling or wholly on the rim, as in Table 2; (iv) $A_c$ is placed by Lemma 6.4, and $B_c=A_c+\omega_m$ by hypothesis; (v) the rim of the parent is given by Table 3 (Proposition 2.4(c)). By Lemma 4.2, the strands of the supertile are then those of the composition, and its box is the box of $C_T(\ell_m,d_m,\omega_m)$. Step (ii) is the one geometric step, argued here: it ensures that the children touch only along the gluings of (i), so that no other edges join their ribbons. With Theorem 2.1, Proposition 2.4 and Lemma 2.6 it makes up part (M1) of the link with actual tilings, which the formalisation does not prove but takes as given (Appendix B). The compositions themselves are built from the tables alone, and the tables are consistent: Table 3 lists exactly once each side that Table 2 puts on the rim, and turning about the end vertex of each entry, across sides that Table 2 glues, leads to the start of the next entry (a finite check, made in the formalisation). For instance, $7.5$ ends at vertex $5$ of child $7$; side $4$ of child $7$ is side $5$ of child $6$, so this is vertex $5$ of child $6$, whose side $4$ lies on the rim and is the next entry, $6.4$.
The paper’s running text, cited in the proof above; its place in step 7.
Where it sits
Cites
- Lemma 6.4 Position of A
- Computation 7.5 Base case
- Lemma 4.2 Gluing
- Proposition 7.4 Compositions at every level
Also cites Section 2.3, Section 7.1.
This
Theorem 7.6
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Thm 7.6 · proof + kernel computation
Every supertile super m K of level m ≥ 1 has the signature at tile level (Patch.HasSig): its rim list is exactly its unglued edges, each once; no strand closes; following the ribbon from each rim port leads to the other port at the same rim vertex, except at the corners A and B (vertex 0, or for Σ the point d_m along side 5), which cross over (corners_nonSigma, corners_sigma); B = A + ω_m in own order. The corner A of a supertile of level m + 1 is that of its Γ child (cornerA_succ), as the paper defines it. The claim SignatureTheorem states this in the statement file, with A and B written out (cornerA, cornerB) and every supertile a disc at its rim (RimChains). Hence TheoremA: no supertile of any level or kind contains a closed strand.
Differs from the paper: other form: for the supertiles built from the tables (super m K, m ≥ 1); that actual supertiles are glued so is (M1).
Statement.signatureTheorem lean/SpectreKnot/ProofGrand.lean, line 443
theorem signatureTheorem : SignatureTheoremThe claim Statement.SignatureTheorem (lean/SpectreKnot/Statement.lean, line 263)
def SignatureTheorem : Prop := ∀ m K, 1 ≤ m → cornerA m K < (super m K).E ∧ (super m K).RimChains (m % 2 == 0) ∧ (super m K).HasSig (m % 2 == 0) (cornerA m K) (cornerB m K)
Statement.good lean/SpectreKnot/ProofA.lean, line 132
theorem good : ∀ m K, 1 ≤ m → Good m KStatement.Kids.parent_sig lean/SpectreKnot/ParentSig.lean, line 243
theorem parent_sig : (compose T child).HasSig (!o) (cA T L) (cB T L ω)Statement.cornerA_succ lean/SpectreKnot/ProofA.lean, line 160
theorem cornerA_succ {m : Nat} (m_pos : 1 ≤ m) (T : Kind) : (super (m + 1) T).bport (ori (m + 1)) (cornerA (m + 1) T, false) = shiftP (fun c => super m (kidAt T c)) (nk T - 1) ((super m .Gamma).bport (ori m) (cornerA m .Gamma, true))
Statement.theoremA lean/SpectreKnot/ProofA.lean, line 214
theorem theoremA : TheoremAThe claim Statement.TheoremA (lean/SpectreKnot/Statement.lean, line 270)
def TheoremA : Prop := ∀ m K, (super m K).NoClosedStrand
← Computation 7.5 (Base case)In the contentsConstruction 8.1 (The nest) →
Construction 8.1 The nest
arguedPaper §8 The nest tiling, page 20 of the PDF, line 1293 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 3 · depth 2
Explained with pictures: step 8 of the Prove page →
Statement
Let $\T$ be a homochiral tiling (one exists [Smith et al., A chiral aperiodic monotile, Thm. 2.2]). For each $h\ge0$, let $Y^{(h)}$ be a level-$h$ $\Delta$-supertile of $\T$; one exists, for instance child $1$ of any level-$(h+1)$ supertile. Let $Y^{(h)}=Y^{(h)}_h\supset Y^{(h)}_{h-1}\supset\cdots\supset Y^{(h)}_0$ be its chain of descendants, $Y^{(h)}_b$ being child $1$ of $Y^{(h)}_{b+1}$ for $b<h$. Let $g_h$ be the proper motion taking the tile $Y^{(h)}_0$ onto $\Tile$ (whose vertex $v_0$ is the origin), and put $N^{(h)}_b=g_h(Y^{(h)}_b)$ for $b\le h$.
Terms defined in the paper’s running text: homochiral tilings (§2.1).
Where it sits
Cites
- none
This
Construction 8.1
Cited by
- Proposition 8.2 The blocks are well defined
- Lemma 8.3 Grandparent Lemma
- Proposition 8.4 The nest tiles the plane
In Lean
Not formalised. It is part of the link to real tilings: assumption (M3) of the statement file.
← Theorem 7.6 (Signature Theorem)In the contentsProposition 8.2 (The blocks are well defined) →
Proposition 8.2
arguedPaper §8 The nest tiling, page 20 of the PDF, line 1302 of spectre_knot.tex · rests on 4 results · cites 2 · cited by 2 · depth 2
Explained with pictures: step 8 of the Prove page →
Statement
$N^{(h)}_b$ depends neither on $h\ge b$ nor on the choices made. Write $N_b$ for it; then $N_0=\{\Tile\}$, and $N_b$ is child $1$ of $N_{b+1}$ for every $b$.
Proof
Let $h,h'\ge b$, with $Y^{(h)}$, $Y^{(h')}$, $g_h$, $g_{h'}$ as in Construction 8.1. By Lemma 2.6 there is a proper motion $f$ with $f(Y^{(h)}_b)=Y^{(h')}_b$ that maps descendants to descendants with their numbers; hence $f(Y^{(h)}_{b'})=Y^{(h')}_{b'}$ for all $b'\le b$, in particular $f(Y^{(h)}_0)=Y^{(h')}_0$. So $g_{h'}f$ and $g_h$ both take the tile $Y^{(h)}_0$ onto $\Tile$; since a tile has no non-trivial symmetry, $g_{h'}f=g_h$. Thus $N^{(h')}_b=g_{h'}f(Y^{(h)}_b)=N^{(h)}_b$. As $f$ maps descendants onto descendants with their numbers, vertices and corners $A$ (Lemma 2.6), the children, vertices and corner $A$ of $N_b$, and of its descendants, do not depend on $h$ either. Taking $h>b$, $N_b=g_h(Y^{(h)}_b)$ is child $1$ of $g_h(Y^{(h)}_{b+1})=N_{b+1}$, and $N_0=g_h(Y^{(h)}_0)=\{\Tile\}$.
∎Where it sits
Cites
- Construction 8.1 The nest
- Lemma 2.6 Rigidity
This
Proposition 8.2
Cited by
- Lemma 8.3 Grandparent Lemma
- Proposition 8.4 The nest tiles the plane
In Lean
Not formalised. It is part of the link to real tilings: assumption (M3) of the statement file.
← Construction 8.1 (The nest)In the contentsLemma 8.3 (Grandparent Lemma) →
Lemma 8.3 Grandparent Lemma
argued Lean, in partPaper §8 The nest tiling, page 20 of the PDF, line 1318 of spectre_knot.tex · rests on 5 results · cites 2 · cited by 1 · depth 2
Explained with pictures: step 8 of the Prove page →
Statement
Let $b\ge1$. (a) The block $N_b$ does not meet the rim of $N_{b+2}$. (b) Every edge of a tile of $N_b$ is shared by two tiles of $N_{b+2}$.
Terms defined in the paper’s running text: rim, vertices and sides (§2.2), the nest tiling and its blocks (§8).
Proof
(a) Work in the tiling $g_h(\T)$ for some $h\ge b+2$, of which $N_b$, $N_{b+1}$ and $N_{b+2}$ are supertiles (Construction 8.1 and Proposition 8.2). $N_b$ is child $1$ of $N_{b+1}$ (Proposition 8.2). By Table 2, sides $0,1,3,4,5$ of child $1$ face siblings $7,0,2,3,4$ respectively, and side $2$ lies on the parent's rim. We show first that every point of $N_b$ off its closed side $2$ is an interior point of $N_{b+1}$. This is clear for interior points of $N_b$, and for points in the relative interior of the other sides, where $N_b$ and one sibling together fill a neighbourhood, as in step (ii) of the Reduction (Section 7.1). At each of the vertices $0,1,4,5$ of $N_b$ exactly three level-$b$ supertiles meet: $N_b$ and the siblings across its two sides there, which are distinct; together they fill a neighbourhood. It remains to treat the closed side $2$ of $N_b$. By Table 3 (the $\Delta$ row: positions $14$ to $18$), side $4$ of the parent is the concatenation of $2.2,2.1,1.2,0.4,0.3$. Since $1.2$ is neither first nor last, the closed side $2$ of $N_b$ lies in the relative interior of side $4$ of $N_{b+1}$. In $N_{b+2}$, side $4$ of its child $N_{b+1}$ faces sibling $3$, so, by the same argument one level up, every point in the relative interior of that side is an interior point of $N_{b+2}$. Hence every point of $N_b$ is an interior point of $N_{b+2}$. Figure 4 (left) shows both facts: side $2$ of child $1$ lies inside the parent's side $4$, and side $4$ of child $1$ faces child $3$.
(b) An edge of a tile of $N_b$ that is not on the rim of $N_b$ is shared by two tiles of $N_b$. A rim edge on a side $j\ne2$ of $N_b$ is shared with a tile of the sibling facing that side inside $N_{b+1}$. A rim edge on side $2$ lies on side $4$ of $N_{b+1}$ (position $16$ of Table 3), which faces sibling $3$ inside $N_{b+2}$ (Table 2), so it is shared with a tile of that sibling.
∎Figure

Where it sits
Cites
- Construction 8.1 The nest
- Proposition 8.2 The blocks are well defined
Also cites Table 2, Section 7.1, Table 3, Figure 4.
This
Lemma 8.3
Cited by
- Proposition 8.4 The nest tiles the plane
In Lean
What the Lean covers here: In combinatorial form: every edge of $N_b$ is glued in $N_{b+2}$ (part (b)), and every vertex of every tile of $N_b$ is surrounded by tiles of $N_{b+2}$ (part (a) at the vertices of tiles). The step from tile vertices to points of the plane is part of assumption (M3).
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 8.3 (the Grandparent Lemma), in combinatorial form · proof + kernel computation + table check
(b) Every edge of N_b (b ≥ 1) is glued in N_{b+2} (no_boundary). (a) Every vertex of every tile of N_b is surrounded by tiles of N_{b+2}: turning about it (turn, crossing the edge that ends there) comes back to it (Grandparent). Every supertile is a disc at its rim (RimChains: turning about each rim vertex runs from the tile beside one rim edge to the tile beside the other; the nine level-1 clusters by the kernel, then level by level, Kids.rimChains); every vertex is surrounded or on such a chain (surrounded_or_chain, by counting); in the Δ composition, turning about a vertex of child 1 off its side 2 comes round (two steps inside a side, three at a vertex by Table 2, delta_cycles), and so does turning about a vertex inside child 1's side 4, glued to child 3; child 1's side 2 lies inside side 4 of the parent.
Differs from the paper: part: (b) from the tables, as in the paper; (a) at the vertices of tiles, by the paper's argument, the step from those to points of the plane being (M3).
Statement.no_boundary lean/SpectreKnot/ProofB.lean, line 431
theorem no_boundary {b : Nat} (b_pos : 1 ≤ b) {t i : Nat} (ht : t < (N b).tiles) (hi : i < 14) :
((N (b + 2)).glue (up b 2 t) i).isSomeStatement.grandparent lean/SpectreKnot/ProofGrand.lean, line 407
theorem grandparent : GrandparentThe claim Statement.Grandparent (lean/SpectreKnot/Statement.lean, line 303)
def Grandparent : Prop := ∀ b, 1 ≤ b → ∀ t i, t < (N b).tiles → i < 14 → (N (b + 2)).Surrounded (up b 2 t) i
Statement.chains_super lean/SpectreKnot/ProofGrand.lean, line 44
theorem chains_super : ∀ m K, 1 ≤ m → (super m K).RimChains (ori m)Statement.Patch.surrounded_or_chain lean/SpectreKnot/Turn.lean, line 150
theorem surrounded_or_chain {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {t i : Nat}
(t_lt : t < P.tiles) (i_lt : i < 14) :
P.Surrounded t i ∨ ∃ k, k < P.E ∧ ∃ n, P.turns n (P.sC o k) = some (t, i)Statement.delta_cycles lean/SpectreKnot/ProofGrand.lean, line 73
theorem delta_cycles : ∀ o, ∀ j ∈ [0, 1, 4, 5], tsteps .Delta o 3 (1, j) = some (1, j)← Proposition 8.2 (The blocks are well defined)In the contentsProposition 8.4 (The nest tiles the plane) →
Proposition 8.4
arguedPaper §8 The nest tiling, page 21 of the PDF, line 1348 of spectre_knot.tex · rests on 6 results · cites 3 · cited by 1 · depth 1
Explained with pictures: step 8 of the Prove page →
Statement
$\N$ is a homochiral tiling of the plane, and any finitely many of its tiles lie in a common block $N_b$ with $b\ge1$.
Terms defined in the paper’s running text: homochiral tilings (§2.1), the nest tiling and its blocks (§8).
Proof
The blocks are nested (Proposition 8.2), so any finitely many tiles of $\N$ lie in a common block; in particular any two have disjoint interiors and are related by a proper motion, being tiles of the homochiral tiling $g_h(\T)$ for large $h$. We show that the tiles cover the plane. Fix $h$ and work in the homochiral tiling $\T_h=g_h(\T)$ of Construction 8.1, which contains $N_0,\dots,N_h$ (Proposition 8.2). Call two tiles of $\T_h$ neighbours if they share a point, and measure distance in the resulting graph. We claim that every tile at distance at most $k$ from $N_1$ lies in $N_{1+2k}$, provided $1+2k\le h$. For $k=0$ there is nothing to prove. A tile $t$ at distance $k+1$ shares a point $p$ with a tile at distance $k$, which lies in $N_{1+2k}$ by induction. By Lemma 8.3(a), $p$ is an interior point of $N_{3+2k}$, so the interior of $t$ meets the interior of a tile of $N_{3+2k}$ (the points of $t$ near $p$ lie in the finite union $N_{3+2k}$); hence $t$ is that tile. Now let $x\in\RR^2$ and let $D$ be the disc of radius $r=|x|+1$ about the origin. Every tile has diameter $3+\sqrt3<5$ and area $3+3\sqrt3>8$, so the tiles of $\T_h$ meeting $D$ lie in the disc of radius $r+5$, and there are at most $k_0=\lfloor\pi(r+5)^2/8\rfloor$ of them. They cover the connected set $D$, so their neighbour graph is connected: two groups with no common point would split $D$ into two disjoint non-empty closed sets. One of them is the tile $\Tile$ of $N_0\subset N_1$, since the origin is its vertex $v_0$. So every tile of $\T_h$ meeting $D$ is joined to $\Tile$ by a path of fewer than $k_0$ steps in this graph, and lies in $N_{1+2k_0}$ as soon as $h\ge 1+2k_0$; in particular, so does a tile containing $x$. Since $N_{1+2k_0}$ does not depend on $h$, $x$ is covered by $\N$.
∎From the running text
§8 · The nest tiling has no closed strand, and its hierarchy is its chain of blocks
For every $h\ge b$, the block $N_b$ is a level-$b$ $\Delta$-supertile of the homochiral tiling $g_h(\T)$ (Construction 8.1 and Proposition 8.2), so Theorem 7.6 applies to it if $b\ge1$. By Proposition 8.2 and Proposition 8.4 and Lemma 8.3(b), the chain $N_1\subset N_2\subset\cdots$, whose union is the tiling $\N$, satisfies the hypothesis of Step 2 of the proof of Theorem A; so $\N$ has no closed strand. Moreover, for each $m\ge1$ the level-$m$ descendants of the blocks $N_b$, $b\ge m$, partition the tiles of $\N$ (they agree for different $b$, since $N_b$ is child $1$ of $N_{b+1}$), and each level is grouped into the next as in $g_h(\T)$ for large $h$. So this grouping has the properties of Theorem 2.1(a): its level-$1$ groups are clusters of Figure 3, each with its Mystic, and each group of level $m+1$ is a supertile of some $g_h(\T)$, made of groups of level $m$. By the uniqueness in Theorem 2.1(a), these are the supertiles of $\N$; those containing $N_0$ are the blocks, whose union is the plane (Proposition 8.4). So the hierarchy of $\N$ covers the plane: $\N$ has no fault, and Theorem A applies to it.
The paper’s running text right after this proposition, cited in the proof of Theorem B; its place in step 8.
Where it sits
Cites
- Proposition 8.2 The blocks are well defined
- Construction 8.1 The nest
- Lemma 8.3 Grandparent Lemma
This
Proposition 8.4
Cited by
- Theorem B The Ariadne Theorem
In Lean
Not formalised. It is part of the link to real tilings: assumption (M3) of the statement file.
← Lemma 8.3 (Grandparent Lemma)In the contentsTheorem 9.1 (Merging) →
Theorem 9.1 Merging
argued LeanPaper §9.1 Merging, page 21 of the PDF, line 1394 of spectre_knot.tex · rests on 20 results · cites 2 · cited by 1 · depth 1
Explained with pictures: step 9 of the Prove page →
Statement
For every $b\ge1$, $\mathcal P_4(b)$ has a single class; if $b$ is even, so does $\mathcal P_3(b)$. These bounds are exact: $\mathcal P_2(b)$ has two classes, and so does $\mathcal P_3(b)$ if $b$ is odd.
Terms defined in the paper’s running text: arcs (§4.1), classes of arcs (§9.1).
Proof of Theorem 9.1
In this proof a rim vertex, and the hook at it, lie inside a side if the vertex is at least two edges from both ends of that side. A rim vertex of $N_m$ inside its side $j$ is not a crossover corner, and by Lemma 9.3 its hook lies on the hook of $N_{m+1}$ that Table 6 names for side $j$: for $j=0,1,3,4,5$, the hook $H_q$ with $q=17,17,16,12,9$ if $m$ is even and $q=21,17,16,16,16$ if $m$ is odd; for $j=2$, its hook is itself a hook of $N_{m+1}$. By Lemma 9.4, the junctions $9,12,16,17,21$ lie inside sides $2,3,4,4,5$ of $N_{m+1}$, and the rim vertices strictly inside side $2$ of $N_m$ inside side $4$. So each of these hooks of $N_{m+1}$ lies inside a side of $N_{m+1}$, and the same rule applies to it one level up; for $j=0,\dots,5$ that side is $4,4,4,4,3,2$ if $m$ is even and $5,4,4,4,4,4$ if $m$ is odd.
Let $b\ge1$ be even, so that $\omega_b=+1$. By Lemma 9.3 every arc of $N_b$ lies on $H_{17}$, $H_{16}$, $H_{12}$ or $H_9$ of $N_{b+1}$, or on a hook of $N_{b+1}$ strictly inside side $2$ of $N_b$; by Lemma 9.4 these are hooks inside sides $4$, $4$, $3$, $2$ and $4$ of $N_{b+1}$. Since $b+1$ is odd, the hooks inside sides $3$ and $4$ lie on $H_{16}$ of $N_{b+2}$, and those inside side $2$ are hooks of $N_{b+2}$ inside its side $4$. All are inside side $4$ of $N_{b+2}$, and since $b+2$ is even they lie on $H_{12}$ of $N_{b+3}$. So $\mathcal P_3(b)$ has a single class.
Let $b\ge1$ be odd. By Lemma 9.3 and Lemma 9.4, every arc of $N_b$ lies on $H_{21}$, $H_{17}$ or $H_{16}$ of $N_{b+1}$, or on a hook of $N_{b+1}$ strictly inside side $2$ of $N_b$: hooks inside sides $5$, $4$, $4$ and $4$ of $N_{b+1}$. Since $b+1$ is even, those inside side $4$ lie on $H_{12}$ of $N_{b+2}$, inside its side $3$, and the one inside side $5$ lies on $H_9$ of $N_{b+2}$, inside its side $2$. Since $b+2$ is odd, this $H_{12}$ lies on $H_{16}$ of $N_{b+3}$, and this $H_9$ is a hook of $N_{b+3}$ inside its side $4$. Both are inside side $4$ of $N_{b+3}$, and since $b+3$ is even they lie on $H_{12}$ of $N_{b+4}$. So $\mathcal P_4(b)$ has a single class. In both cases, once $\mathcal P_k(b)$ has a single class, so does $\mathcal P_{k'}(b)$ for every $k'\ge k$.
The same steps give the exactness. For even $b$, the arcs of $N_b$ lie on two arcs of $N_{b+2}$: $H_{16}$, and the hook of $N_{b+2}$ at junction $9$ of $N_{b+1}$. That vertex lies strictly inside side $2$ of $N_{b+1}$, and junction $16$ of $N_{b+2}$ is an end of that side, so the two hooks are at different rim vertices. For odd $b$, they lie on two arcs of $N_{b+2}$, $H_{12}$ and $H_9$, and on two arcs of $N_{b+3}$: $H_{16}$, and the hook of $N_{b+3}$ at junction $9$ of $N_{b+2}$, a vertex that for the same reason is not junction $16$ of $N_{b+3}$. In each case both arcs are reached (for instance from vertices inside sides $4$ and $5$ of $N_b$ if $b$ is even, and sides $4$ and $0$ if $b$ is odd), and hooks at distinct rim vertices are distinct arcs.
∎Where it sits
This
Theorem 9.1
Cited by
- Theorem B The Ariadne Theorem
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Thm 9.1, then Theorem B (combinatorial form) · proof
Every port of N_b lies, in N_{b+3} (b even) or N_{b+4} (b odd), on the strand of the hook at junction 12; with symmetry, any two ports of N_b are on one strand there (TheoremB_sharp). With no_boundary and Theorem A, TheoremB.
Differs from the paper: same: the bounds of Thm 9.1, for every b ≥ 1; Theorem B here is for the blocks N_b, and its final form is the row below.
Statement.chain_even lean/SpectreKnot/ProofB.lean, line 318
theorem chain_even {b : Nat} (b_pos : 1 ≤ b) (even : b % 2 = 0) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 3)).Linked (upPort b 3 x) (Zp (b + 2))Statement.chain_odd lean/SpectreKnot/ProofB.lean, line 340
theorem chain_odd {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 4)).Linked (upPort b 4 x) (Zp (b + 3))Statement.theoremB_sharp lean/SpectreKnot/ProofB.lean, line 380
theorem theoremB_sharp : TheoremB_sharpThe claim Statement.TheoremB_sharp (lean/SpectreKnot/Statement.lean, line 283)
def TheoremB_sharp : Prop := ∀ b p q, 1 ≤ b → (N b).IsPort p → (N b).IsPort q → (N (b + 4)).Linked (upPort b 4 p) (upPort b 4 q) ∧ (b % 2 = 0 → (N (b + 3)).Linked (upPort b 3 p) (upPort b 3 q))
Statement.theoremB lean/SpectreKnot/ProofB.lean, line 532
theorem theoremB : TheoremBThe claim Statement.TheoremB (lean/SpectreKnot/Statement.lean, line 276)
def TheoremB : Prop := (∀ b, 1 ≤ b → ∀ t i, t < (N b).tiles → i < 14 → ((N (b + 2)).glue (up b 2 t) i).isSome) ∧ (∀ b, (N b).NoClosedStrand) ∧ (∀ b p q, (N b).IsPort p → (N b).IsPort q → ∃ k, (N (b + k)).Linked (upPort b k p) (upPort b k q))
Thm 9.1: the bound is exact (Table 5, last two rows) · proof
For b ≥ 1 the ports of N_b lie on exactly two strands of N_{b+2}, and for odd b of N_{b+3} (TheoremB_exact): every port reaches one of two hooks (junction 16 and the hook at junction 9 of N_{b+1} for even b; junctions 12 and 9 for odd b, then junction 16 and the hook at junction 9 of N_{b+2}), each is reached from a hook well inside a chosen side of N_b, and hooks at different rim vertices lie on different strands, since along a strand its two ends stay the same (Linked.ends).
Differs from the paper: same: the last two rows of Table 5, for every b ≥ 1; the rows for single values of b are computed by the tests, not proved.
Statement.Patch.Linked.ends lean/SpectreKnot/ProofExact.lean, line 86
theorem Linked.ends {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {p q a b : Port}
(linked : P.Linked p q) (p_port : P.IsPort p) (ends : P.Ends p a b) : P.Ends q a b ∨ P.Ends q b aStatement.hooks_apart lean/SpectreKnot/ProofExact.lean, line 174
theorem hooks_apart {m : Nat} (m_pos : 1 ≤ m) {v w : Nat} (two_le_v : 2 ≤ v) (v_le : v + 2 ≤ pos (Lk m .Delta 1) 6)
(two_le_w : 2 ≤ w) (w_le : w + 2 ≤ pos (Lk m .Delta 1) 6) (v_ne_w : v ≠ w) :
¬ (N m).Linked (hookAt m v) (hookAt m w)Statement.theoremB_exact lean/SpectreKnot/ProofExact.lean, line 414
theorem theoremB_exact : TheoremB_exactThe claim Statement.TheoremB_exact (lean/SpectreKnot/Statement.lean, line 298)
def TheoremB_exact : Prop := ∀ b, 1 ≤ b → TwoStrands b 2 ∧ (b % 2 = 1 → TwoStrands b 3)
← Proposition 8.4 (The nest tiles the plane)In the contentsComputation 9.2 (The junction map at the level-1 lengths) →
Computation 9.2 The junction map at the level-$1$ lengths
computed LeanPaper §9.2 Junctions, page 22 of the PDF, line 1461 of spectre_knot.tex · rests on 0 results · cites 0 · cited by 1 · depth 3
Explained with pictures: step 9 of the Prove page →
Statement
Let $\omega=\pm1$. In $C_\Delta(\ell_1,d_1,\omega)$, put child $1$ in the place of $N_m$, and define indices and junctions as above. Then the ribbon from every port $p$ of child $1$, except the ports at rim vertices strictly inside its side $2$, followed from $p$ through child $1$ and on, reaches the rim of the composition at junction $q$, where $q$ is given by Table 6 with $\omega_m=\omega$.
Terms defined in the paper’s running text: compositions (§7.1), junctions and their hooks (§9.2).
The paper gives no proof in words: this is a finite check, done by the programs below.
Where it sits
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Comp 9.2 · kernel computation
In C_Δ(ℓ₁, d₁, ±1), the walk from every port of child 1, except those at rim vertices strictly inside its side 2, ends at a port of the parent hook at the junction that tgt names (the paper's Table 6).
Differs from the paper: same.
Statement.step_base lean/SpectreKnot/StepMap.lean, line 124
theorem step_base (ω : Bool) : StepOK (L₁ .Delta) (dOff 1) ωComputed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
the junction map (Table 6) in C_Delta(l_1, d_1, ±1): every port of child 1 followed to its junction; negative control (junctions 12 and 16 exchanged: both signs fail)
← Theorem 9.1 (Merging)In the contentsLemma 9.3 (The junction map) →
Lemma 9.3 The junction map
argued LeanPaper §9.2 Junctions, page 23 of the PDF, line 1497 of spectre_knot.tex · rests on 19 results · cites 6 · cited by 1 · depth 2
Explained with pictures: step 9 of the Prove page →
Statement
Let $m\ge1$. In $N_{m+1}$, the hook arc of $N_m$ at each rim vertex strictly inside side $2$ of $N_m$ is a hook arc of $N_{m+1}$, and every other arc of $N_m$ lies on the hook $H_q$ of $N_{m+1}$, where $q$ is given by Table 6.
Terms defined in the paper’s running text: arcs (§4.1), junctions and their hooks (§9.2).
Proof
The first part needs no computation. Side $2$ of $N_m$ is the side at position $16$ of Table 3, so it lies on the rim of $N_{m+1}$, and a rim vertex $u$ of $N_m$ strictly inside it is a rim vertex of $N_{m+1}$, with the same two rim ports. By Lemma 9.4, $u$ lies inside side $4$ of $N_{m+1}$, so it is not a crossover corner, and by Theorem 7.6 it is a hook of $N_{m+1}$; this hook is the hook of $N_m$ at $u$.
For the rest, say that $(L,d)$ has the junction property if the statement of Computation 9.2 holds for $C_\Delta(L,d,\omega)$ for both $\omega$. By Theorem 7.6 and the Reduction of Section 7.1, $N_{m+1}$ is glued from its children as $C_\Delta(\ell_m,d_m,\omega_m)$ is, with $N_m$ as child $1$. In this gluing, the ribbon from a port $p$ of child $1$ runs along the arc of $N_m$ that ends at $p$ and then on along the arc of $N_{m+1}$ that contains that arc, to one of its ends. The two ends of an arc of $N_m$ lie in the same row of Table 6 (a hook arc has both its ends at one rim vertex, and each crossover arc has a row), so if the ribbons from both reach the rim at junction $q$, both ends of that arc of $N_{m+1}$ are at $q$, and it is the hook $H_q$. So the rest of the lemma follows once $(\ell_m,d_m)$ has the junction property. By Computation 9.2, $(\ell_1,d_1)$ has it, so by Lemma 7.2 it suffices to show that the moves of Lemma 7.2(b) keep it. Since child $1$ is a $\Delta$, and the side glued to side $5$ of the $\Sigma$ child (child $4$) belongs to child $7$ (Table 2), such a move, when its edge lies on the rim of child $1$, has that edge at least two edges from both ends of its side (Lemma 7.2(b)).
Let $C$, $C'$ and $\varphi$ be as in the proof of Lemma 7.1. Junctions and the vertices $V_j$ of child $1$ are vertices of children, so those of $C'$ are the images of those of $C$, and $\varphi$ keeps the order of the rim vertices of child $1$. For a port $x$ of child $1$ at an old vertex, the ribbon from $\varphi(x)$ reaches the rim at the image of the rim port reached from $x$, and $\varphi(x)$ lies in the same row of Table 6 as $x$. It remains to consider the new vertices $w_1,w_2$ when the edge $e=u_0u_1$ lies on the rim of child $1$. Then $w_1,w_2,u_0,u_1$ lie strictly inside the same side of child $1$, at least two edges from its ends, so in the same row of Table 6, and none of them is a crossover corner. If that side is side $2$, the property says nothing about $w_1$ and $w_2$. Otherwise $e$ is shared with a sibling; let child $1$ run from $u_0$ to $u_1$, with rim ports $\Rp_1,\Lp_1$. By Lemma 5.1 with $n=3$, as in the proof of Lemma 7.1, every port of child $1$ at $w_1$ or $w_2$ lies on the arc of $C'$ through $\varphi(\Rp_1(u_0))$ or on the arc through $\varphi(\Lp_1(u_1))$. The first arc also passes through $\varphi(\Lp_1(u_0))$, by the hook of child $1$ at $u_0$, and the ribbons from these two ports run along it in opposite directions; so both its ends are at the junction that Table 6 gives for the row of $u_0$. Likewise both ends of the second arc are at the junction for the row of $u_1$, which is the row of $w_1$ and $w_2$, so the property holds at $w_1$ and $w_2$ too.
∎From the running text
§7.1 · The Reduction: a supertile is its composition
Reduction (A supertile is its composition). Let $m\ge1$, and let $Y$ be a level-$(m+1)$ supertile of kind $T$ whose children $X_c$ have the signature at $(A_c,A_c+\omega_m)$ in their own orientation. Then the children of $Y$, with their rims, sides, corners $A_c,B_c$ and the gluing of their sides, and the rim of $Y$ read in the children's order, match those of $C_T(\ell_m,d_m,\omega_m)$. So the box of $Y$ is the box of the composition, and $Y$ has a closed strand if and only if the composition has one.
Indeed: (i) by Proposition 2.4(a),(b) and Proposition 6.1 the children have the kinds and side lengths of the composition, and side $j$ of $X_c$ is side $j'$ of $X_{c'}$ traversed oppositely; (ii) two children meet only along the closed sides they share: at a point inside a side of a child, the rim edges there are shared with the partner across that side, so the child and its partner fill a neighbourhood; and at a vertex exactly three level-$m$ supertiles meet, any two of them sharing a side that ends there (Theorem 2.1(b)); (iii) so each side of a child is wholly shared with one sibling or wholly on the rim, as in Table 2; (iv) $A_c$ is placed by Lemma 6.4, and $B_c=A_c+\omega_m$ by hypothesis; (v) the rim of the parent is given by Table 3 (Proposition 2.4(c)). By Lemma 4.2, the strands of the supertile are then those of the composition, and its box is the box of $C_T(\ell_m,d_m,\omega_m)$. Step (ii) is the one geometric step, argued here: it ensures that the children touch only along the gluings of (i), so that no other edges join their ribbons. With Theorem 2.1, Proposition 2.4 and Lemma 2.6 it makes up part (M1) of the link with actual tilings, which the formalisation does not prove but takes as given (Appendix B). The compositions themselves are built from the tables alone, and the tables are consistent: Table 3 lists exactly once each side that Table 2 puts on the rim, and turning about the end vertex of each entry, across sides that Table 2 glues, leads to the start of the next entry (a finite check, made in the formalisation). For instance, $7.5$ ends at vertex $5$ of child $7$; side $4$ of child $7$ is side $5$ of child $6$, so this is vertex $5$ of child $6$, whose side $4$ lies on the rim and is the next entry, $6.4$.
The paper’s running text, cited in the proof above; its place in step 7.
Where it sits
Cites
- Lemma 9.4 Where the junctions lie
- Theorem 7.6 Signature Theorem
- Computation 9.2 The junction map at the level-1 lengths
- Lemma 7.2 Reachability
- Lemma 7.1 Lengthening
- Lemma 5.1 Zigzag Lemma
Also cites Table 6, Table 3, Section 7.1, Table 2.
This
Lemma 9.3
Cited by
- Theorem 9.1 Merging
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 9.3 · proof
The same at the level-m lengths, every m ≥ 1, both signs: carried from ℓ₁ by the moves of Lemma 7.2(b) (adm_induct), with cuts on child 1 two edges from the ends of its sides; the ports at the two vertices a cut adds are followed to the old vertices beside them (NewWalk.lean), as in the paper's proof. At tile level: a rim port of N_m lies, in N_{m+1}, on the strand of the hook at that junction; strictly inside N_m's side 2 the rim port is a hook of N_{m+1} itself (stretch_eq).
Differs from the paper: same: for every m ≥ 1 and both signs.
Statement.step_level lean/SpectreKnot/StepMap.lean, line 591
theorem step_level (m : Nat) (m_pos : 1 ≤ m) (ω : Bool) : StepOK (Lk m .Delta) (dOff m) ωStatement.StepOK.move lean/SpectreKnot/StepMap.lean, line 379
theorem StepOK.move (clear₀ : μ.c₀ = 1 → 2 ≤ μ.r₀ ∧ μ.r₀ + 3 ≤ L 1 μ.j₀)
(clear₁ : μ.two .Delta = true → μ.c₁ .Delta = 1 → 2 ≤ μ.r₁ L ∧ μ.r₁ L + 3 ≤ L 1 (μ.j₁ .Delta))
(old_map : StepOK L d ω) : StepOK (μ.lens .Delta L) (μ.d' .Delta L d) ωStatement.step_tile lean/SpectreKnot/NestStep.lean, line 227
theorem step_tile {m : Nat} (m_pos : 1 ≤ m) {u : Nat} (hu : u < pos (Lk m .Delta 1) 6) {s : Bool} {q : Nat}
(tgt_eq : tgt (ori m) (Lk m .Delta 1) u s = some q) :
(N (m + 1)).Linked (upPort m 1 ((N m).bport (ori m) (u, s)))
((N (m + 1)).bport (ori (m + 1)) (jpos (Lk m .Delta) q, true))Statement.stretch_eq lean/SpectreKnot/ProofB.lean, line 46
theorem stretch_eq {m : Nat} (m_pos : 1 ≤ m) {u : Nat} (after_two : pos (Lk m .Delta 1) 2 < u)
(before_three : u < pos (Lk m .Delta 1) 3) (s : Bool) :
upPort m 1 ((N m).bport (ori m) (u, s)) = (N (m + 1)).bport (ori (m + 1)) (stp (Lk m .Delta) u, !s)Computed by
From the table “Which script checks which statement” of paper/code/README.md, the map the paper’s Appendix A points to. The programs are in paper/code/, their logs in paper/code/logs/: the code.
corroboration: the compositions and the junction map at (l_m, d_m, ±1) for m = 2..4; every single move from (l_1, d_1), with both signs, keeps the signature (1,792 moves) and, on Delta with any cut on child 1 two edges clear of the ends of its side, the junction map (190 moves)
← Computation 9.2 (The junction map at the level-1 lengths)In the contentsLemma 9.4 (Where the junctions lie) →
Lemma 9.4 Where the junctions lie
argued LeanPaper §9.2 Junctions, page 24 of the PDF, line 1537 of spectre_knot.tex · rests on 7 results · cites 1 · cited by 2 · depth 2
Explained with pictures: step 9 of the Prove page →
Statement
Let $m\ge1$. The junctions $9$, $12$, $16$, $17$ and $21$ of $N_{m+1}$ lie on its sides $2$, $3$, $4$, $4$ and $5$ respectively, at least two edges from both ends of the side. Every rim vertex strictly inside side $2$ of $N_m$ lies on side $4$ of $N_{m+1}$, at least two edges from both ends.
Terms defined in the paper’s running text: rim, vertices and sides (§2.2), junctions and their hooks (§9.2).
Proof
By Table 3, side $2$ of a $\Delta$ is made of the children's sides at positions $7$ to $10$, side $3$ of those at $11$ to $13$, side $4$ of those at $14$ to $18$, and side $5$ of those at $19$ to $21$. Junction $q$ lies between the sides at positions $q-1$ and $q$, which lie in the same side of $N_{m+1}$ for $q=9,12,16,17,21$; and side $2$ of $N_m$ is the side at position $16$. Every side of a supertile of level $\ge1$ has at least five edges (Lemma 6.5), so each of these junctions is at least five edges from both ends of its side of $N_{m+1}$, and so is every point of side $2$ of $N_m$, which lies between the sides at positions $15$ and $17$.
∎Where it sits
This
Lemma 9.4
Cited by
- Theorem 9.1 Merging
- Lemma 9.3 The junction map
In Lean
From the paper-to-Lean table of lean/README.md; statements quoted from the Lean files.
Lemma 9.4 · proof
The junctions 9, 12, 16, 17, 21 lie inside sides 2, 3, 4, 4, 5 of N_{m+1}, and the inside of N_m's side 2 inside side 4, at least two edges from the ends (Inside).
Differs from the paper: same.
Statement.inside_9 lean/SpectreKnot/ProofB.lean, line 124
theorem inside_9 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 2 (jpos (Lk n .Delta) 9)Statement.inside_12 lean/SpectreKnot/ProofB.lean, line 127
theorem inside_12 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 3 (jpos (Lk n .Delta) 12)Statement.inside_16 lean/SpectreKnot/ProofB.lean, line 130
theorem inside_16 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 4 (jpos (Lk n .Delta) 16)Statement.inside_17 lean/SpectreKnot/ProofB.lean, line 133
theorem inside_17 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 4 (jpos (Lk n .Delta) 17)Statement.inside_21 lean/SpectreKnot/ProofB.lean, line 136
theorem inside_21 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 5 (jpos (Lk n .Delta) 21)Statement.inside_stp lean/SpectreKnot/ProofB.lean, line 140
theorem inside_stp {n : Nat} (n_pos : 1 ≤ n) {u : Nat} (after_two : pos (Lk n .Delta 1) 2 < u)
(before_three : u < pos (Lk n .Delta 1) 3) : Inside (n + 1) 4 (stp (Lk n .Delta) u)Figure 1
Paper, page 2; cut from the built PDF

Shown with
Figure 2
Paper, page 4; cut from the built PDF

exact.py, with their corner $A$, taken as input). Dashed: the
link with actual tilings, cited from [Smith et al., A chiral aperiodic monotile] or argued in words. Shaded and dashed: Lean checks the
combinatorial part, and the link with actual tilings is argued in words (Appendix B).Shown with
Figure 3
Paper, page 6; cut from the built PDF

Shown with
- Theorem A The Daedalus Theorem
- Theorem B The Ariadne Theorem
- Theorem 2.1 The spectre hierarchy
- Proposition 2.4 The pattern holds at every level
- Lemma 2.6 Rigidity
- Proposition 6.1 Lengths by letter
- Computation 7.5 Base case
Figure 4
Paper, page 8; cut from the built PDF

Shown with
- Theorem A The Daedalus Theorem
- Theorem B The Ariadne Theorem
- Definition 2.3 Composition pattern
- Lemma 8.3 Grandparent Lemma
Figure 5
Paper, page 11; cut from the built PDF

Shown with
Figure 6
Paper, page 14; cut from the built PDF

Shown with
The Lean formalisation
39 files of Lean 4, with the core library only. Start with the statement file: it states the main theorems as claims, and with the three files it imports it holds every definition they use. Every file can be read here in full, and every declaration has its own page.
Statement.lean, line by line
Whether the right thing has been proved comes down to reading the statement file. The line-by-line reading shows all 476 lines beside a plain reading of each piece, in 77 pieces, with a short introduction to Lean.
Every file, in full
All 39 files in reading order: the statements, the six files that prove them, then what those rest on in the paper’s order. Each name links to where it is declared; a note marks the declarations that formalise a numbered result of the paper.
The files, in reading order
Start here
Statement.lean476 linesThe statements of Theorems A and BAxioms.lean128 linesPrints the axioms each main theorem depends on.
The main theorems
ProofA.lean248 linesTheorem A (theoremA): no supertile of any level or kind contains a closed strand.ProofB.lean550 linesTheorem B (theoremB,theoremB_sharp): the nest has no boundary, no closed strand, and any two ports of a block lie on one strand of the block three levels up (beven) or four (bodd).ProofStrand.lean749 linesTheorem B, final form (theoremB_strand): the ribbons of the nest tiling form one two-way infinite strand.ProofChain.lean717 linesTheorem A in strand form (theoremA_strand): in a tiling whose hierarchy covers the plane, every strand is a two-way infinite path.ProofExact.lean420 linesThe bound is exact (theoremB_exact, the last two rows of the paper's Table 5): forb ≥ 1, the ports ofN_blie on exactly two strands ofN_{b+2}, and, ifbis odd, on exactly two strands ofN_{b+3}.ProofGrand.lean475 linesThe Grandparent Lemma (grandparent, the paper's Lemma 8.3(a), at the vertices of tiles): forb ≥ 1, every vertex of every tile ofN_bis surrounded by tiles ofN_{b+2}.
Strands, boxes and gluing (§§3–5)
Basic.lean52 linesBasic types and helpers.Strands.lean189 linesStrands (paper §3.3, Def 3.3 and Lemma 3.4), in the "two involutions" model.Box.lean67 linesThe two hands of a rim port (Hand), used throughout.Gluing.lean162 linesA patch glued from children (the paper's §4 and §7.1): the setting of Lemma 4.2, for compositions.Zigzag.lean126 linesThe zigzag lemma (paper Lemma 5.1), for every lengthn.
Side lengths (§6)
Lengths.lean286 linesSide lengths (paper §6): Prop 6.1 (lengths by letter), Prop 6.2 (Fibonacci side lengths), Cor 6.3 (parities are constant), Lemma 6.4 (position of A on the Σ side), Lemma 6.5 (lower bounds).
Compositions and lengthening (§7)
Compose.lean184 linesThe abstract composition of paper §7.1, built in Lean from the tables, and its box computed by gluing (Lemma 4.2), port by port, with no reduction.CompFull.lean99 linesComputation 7.3, from the tables alone: the unreduced abstract compositions of §7.1, glued port by port in the Lean kernel.Subdivide.lean893 linesSimulations between gluings, and subdivision of an edge (paper Lemma 7.1, lengthening: the engine of the parity lemma).Lens.lean183 linesCompositions with given side lengths (Comp.ofLens): positions, the side containing an edge, and the gluing formula.Move.lean710 linesA move: lengthen sidej₀of childc₀by 2, together with the side of the sibling glued to it (Table 2), or alone if it lies on the parent's rim.Signature.lean298 linesThe signature of a composition (the conclusion of the induction step), stated without lists: a parent rim vertex is found by turning about a vertex of a child (Rot).CompSig.lean612 lines"A composition has the signature", as the paper's §7.1 words it, and Computation 7.3 in that form.Parity.lean632 linesThe parity lemma (the paper's Prop 7.4, by Lemmas 7.1 and 7.2).
Supertiles and Theorem A (§7)
PatchSig.lean197 linesThe signature of a patch of tiles (Def 4.3 at tile level), for the proof of Theorem A.ComposeTiles.lean277 linescompose(the statement file's supertile construction) read in terms of the abstract compositionComp.ofLens: which child a tile belongs to, what is glued across a child's rim edge (glue_rim: exactly whatComp.matesays), and the parent's rim as a list of children's rim edges (rim_edgeAt, viaownGo).ParentRim.lean516 linesThe parent's rim, read from Table 3: positionpof the rim ofcompose T childis edgekof childc's rim (ownGo).Reverse.lean178 linesTwo facts about gluings used to read the parent's signature offGluing.Sig: a walk between rim ports can be followed backwards (FReach.reverse), and turning about a vertex is injective on vertices reached along the rim (Rot.inj).Bridge.lean438 linesLemma 4.2 at tile level.ParentSig.lean399 linesThe induction step of Thm 7.6, at tile level.
The nest and Theorem B (§§8–9)
NewWalk.lean362 linesWalks through the two new vertices of a cut edge (paper Lemma 7.1: a cut creates no closed strand; Lemma 9.3: the new vertices).StepMap.lean615 linesThe junction map of the nest (the paper's Computation 9.2 and Lemma 9.3), one level at a time.Linked.lean218 linesStrands as an equivalence relation.NestStep.lean273 linesThe junction map at tile level.Turn.lean513 linesTurning about a point, for the Grandparent Lemma (ProofGrand.lean).
Tests
Tests.lean261 linesTests of statements on concrete cases (evaluated by the interpreter, not the kernel).TestsSlow.lean19 linesSlower tests: the level-5 entries of the paper's Table 5 and of the chain of its §10 (about 6 minutes), and the conclusion of the parity lemma (the paper's Prop 7.4) at level 2, computed directly.
Generated data, and the root file
Data/Pattern.lean76 linesGENERATED by tools/gen_pattern.py from paper/code/hierarchy/combin_8.json and letters.json.Data/Clusters.lean59 linesGENERATED by tools/gen_clusters.py from paper/code/exact/exact.py (exact arithmetic).Data/Level2.lean33 linesGENERATED by tools/gen_clusters.py from paper/code/exact/exact.py (exact arithmetic).SpectreKnot.lean33 linesThe root of the library: it imports the files of the formalisation.
By result of the paper
| paper | Lean | kind | differs from the paper |
|---|---|---|---|
| Def 3.1, Def 3.2 | Statement.pieceEnd, Statement.straightThrough | definitions | same: definitions, as in the paper |
| Lemma 3.4 | StrandSystem.closed_or_path | proof | other form: for strands given as two fixed-point-free involutions on ports, the description at the end of §3.3, not the strand graph of Def 3.3; that every port is joined to exactly one other (degree 2) is built into this model, and proved for the nest tiling and for chains |
| Lemma 4.1 | Statement.Patch.HasSig.box | proof | part: for the patches with the signature, the only ones the proof uses; the box of a general patch is not formalised, following a ribbon (Follow) playing the role of π_P |
| Lemma 4.2 | Gluing, Gluing.FullReach, Statement.Kids.follow_of_reach, Statement.Kids.noClosed | definitions + proof | part: the two forms the proof uses, not the lemma for any union of patches |
| Def 4.3 | Statement.btau, Statement.Patch.HasSig | definitions | same: as Def 4.3 words it, with A and B given by their positions on the rim |
| Lemma 4.4 | Statement.tile_hasSig | kernel computation | same |
| — | tilePiece, tileBox_proper, tile_signature | decide | not in the paper: an earlier model of Def 3.1 and Lemma 4.4, kept from the pilot |
| Lemma 5.1 (the Zigzag Lemma) | Zigzag.zigzag, Gluing.cross_three | proof, any n | same: for every length n |
| Prop 6.1 | sideLen_eq_letterLen, Statement.super_side_length | proof + decide on Tables 1, 3, 4 | same: for the supertiles built from the tables (super m K); that actual supertiles are glued so is (M1) |
| Prop 6.2 | letterLen_fib | proof | same |
| Cor 6.3 | letterLen_parity, sideLen_parity | proof | same |
| Lemma 6.4 | dOff_fib, Statement.cornerA, Statement.cornerA_eq_aPos | proof | same: for super m K; that actual supertiles are so is Prop 2.4(d), part of (M1) |
| Lemma 6.5 | bounds | proof | same |
| §7.1, the compositions | Compose.Comp.ofLens, Compose.Comp.toGluing, Compose.Comp.check, Statement.CompSig, Statement.rimTablesOk_all | definitions + table check | same: definitions, as in §7.1, with its check of the tables |
| Lemma 7.1 (lengthening) | Gluing.cross_three, Gluing.Cut.OK.sim, Gluing.Cut.OK.noLoops, Gluing.Cut.OK.sig, Compose.Move.OK.equiv, Compose.Move.OK.keep | proof | same: and the identification of a move with a cut, which the paper only sketches, is proved |
| Lemma 7.2 (reachability) | Compose.Adm, Compose.adm_level, Compose.adm_induct | proof | other form: (a) as stated; (b) is the step of the induction principle that ends the lemma (adm_induct), not stated on its own |
| Comp 7.3 | Compose.compositions_level1, Compose.compositions_level1_signature, Compose.comp_7_3, Compose.sig_base | kernel computation + proof | same: and the checker's true is proved to mean the signature (Comp.check_sound, sig_of_check) |
| Prop 7.4 | Compose.adm_sig, Compose.parity_lemma, Compose.prop_7_4, Compose.parity_lemma_adj | proof + kernel computation | same: for every m ≥ 1, every kind and both signs |
| Comp 7.5 | Statement.good_one | kernel computation | part: on the level-1 supertiles computed by exact.py, which are input data, with A at vertex 0 (for Σ, d₁ along side 5) and B = A + ω₁. The clause placing A, that this vertex is v₀ of the Mystic's first tile (the paper's definition of A at level 1), is input, not checked: the Lean has no Mystic |
| §7.1, the Reduction (a supertile is its composition), with Lemma 4.2 | Statement.Kids.follow_of_reach, Statement.Kids.noClosed, Statement.glue_rim, Statement.compose_no_default | proof | other form: at tile level, for the supertiles that compose builds; that actual supertiles are built so is (M1) |
| §7.1, the Reduction, step (v): the parent's rim from Table 3 | Statement.rim_edgeAt, Statement.own_rot, Statement.parent_vtx | proof + table check | other form: at tile level, for the supertiles that compose builds. That actual supertiles are glued as the tables say is Prop 2.4, part of (M1) and not formalised |
| Thm 7.6 | Statement.signatureTheorem, Statement.good, Statement.Kids.parent_sig, Statement.cornerA_succ, Statement.theoremA | proof + kernel computation | other form: for the supertiles built from the tables (super m K, m ≥ 1); that actual supertiles are glued so is (M1) |
| Theorem A (the Daedalus Theorem) | Statement.chainModel, Statement.theoremA_strand, Statement.nestCovers | proof | other form: the second step of the paper's proof, for the union of a chain of supertiles that covers (every edge eventually glued); that a tiling whose hierarchy covers the plane is such a union, the first step, is (M2) |
| Comp 9.2 | Statement.step_base | kernel computation | same |
| Lemma 9.3 | Statement.step_level, Statement.StepOK.move, Statement.step_tile, Statement.stretch_eq | proof | same: for every m ≥ 1 and both signs |
| Lemma 9.4 | Statement.inside_9, Statement.inside_12, Statement.inside_16, Statement.inside_17, Statement.inside_21, Statement.inside_stp | proof | same |
| Lemma 8.3 (the Grandparent Lemma), in combinatorial form | Statement.no_boundary, Statement.grandparent, Statement.chains_super, Statement.Patch.surrounded_or_chain, Statement.delta_cycles | proof + kernel computation + table check | part: (b) from the tables, as in the paper; (a) at the vertices of tiles, by the paper's argument, the step from those to points of the plane being (M3) |
| — | Statement.super_glueSymm, Statement.linked_symm, Statement.super_noSelf | proof + kernel computation | not in the paper: the paper takes these from the geometry |
| Thm 9.1, then Theorem B (combinatorial form) | Statement.chain_even, Statement.chain_odd, Statement.theoremB_sharp, Statement.theoremB | proof | same: the bounds of Thm 9.1, for every b ≥ 1; Theorem B here is for the blocks N_b, and its final form is the row below |
| Thm 9.1: the bound is exact (Table 5, last two rows) | Statement.Patch.Linked.ends, Statement.hooks_apart, Statement.theoremB_exact | proof | same: the last two rows of Table 5, for every b ≥ 1; the rows for single values of b are computed by the tests, not proved |
| Theorem B (the Ariadne Theorem), final form | Statement.nestModel, Statement.theoremB_strand | proof + kernel computation | other form: for nestTiling, the union of the blocks; that it is the paper's nest tiling and covers the plane is (M3) |
| — | Compose.negative_control, Statement.loopPatch_closed | kernel computation / proof | not in the paper: negative controls, so the checks and the definitions are not vacuous |
Every declaration, by file
855 declarations, each with its own page. The figure after a name counts the paper results that rest on it (see its page). thm marks theorems and lemmas.
lean/SpectreKnot/Basic.lean 10
lean/SpectreKnot/Box.lean 9
lean/SpectreKnot/Bridge.lean 23
Statement.shiftP12Statement.pieceEnd_shiftthm 12Statement.pieceEnd_validthm 12Statement.mod14thm 12Statement.Patch.across_validthm 12Statement.Patch.Follow.end_thm 12Statement.Patch.rim_portthm 12Statement.KidsStatement.ιPStatement.Kids.tiles_posthm 12Statement.Kids.E_eqthm 12Statement.Kids.glue_shiftthm 12Statement.Kids.across_inthm 12Statement.Kids.glue_rimEdgethm 12Statement.Kids.across_rimthm 12Statement.Kids.across_in'thm 12Statement.Kids.liftthm 12Statement.Kids.bport_validthm 12Statement.Kids.tau_btauthm 12Statement.Kids.btau_ltthm 12Statement.Kids.follow_of_reachthm 12Statement.Kids.follow_of_fullReachthm 12Statement.Kids.noClosedthm 12
lean/SpectreKnot/CompFull.lean 23
Compose.allKindsCompose.check_Gamma_plusthm 12Compose.check_Gamma_minusthm 12Compose.check_Delta_plusthm 12Compose.check_Delta_minusthm 12Compose.check_Theta_plusthm 12Compose.check_Theta_minusthm 12Compose.check_Lambda_plusthm 12Compose.check_Lambda_minusthm 12Compose.check_Xi_plusthm 12Compose.check_Xi_minusthm 12Compose.check_Pi_plusthm 12Compose.check_Pi_minusthm 12Compose.check_Sigma_plusthm 12Compose.check_Sigma_minusthm 12Compose.check_Phi_plusthm 12Compose.check_Phi_minusthm 12Compose.check_Psi_plusthm 12Compose.check_Psi_minusthm 12Compose.compositions_level1thm 12Compose.compositions_level1_signaturethm 1Compose.Comp.spreadCornersCompose.negative_controlthm
lean/SpectreKnot/CompSig.lean 39
Statement.prv_injthm 12Statement.kid_lastthm 12Statement.last_ltthm 12Statement.pcs_nonSigmathm 12Statement.preS12Statement.pcs_sigmathm 12Statement.preS_eqthm 12Statement.gA_lastthm 12Statement.pos6thm 12Statement.gB_lastthm 12Statement.corners_nonSigmathm 12Statement.corners_sigmathm 12Statement.gR12Statement.gL12Statement.gR_rimLthm 12Statement.gR_rotthm 12Statement.gR_validthmStatement.gL_validthmStatement.gR_sigmathmStatement.gL_sigmathmStatement.cA12Statement.cB12Statement.corners_atthm 12Statement.CompSigStatement.compSig_of_sigthm 12Statement.ownList13Statement.ownList_lengththm 13Statement.ownList_getElem?thmStatement.flatMap_congr_memthm 13Statement.rimEdges_eqthm 13Statement.rimVertexPorts_lengththm 12Statement.vtx_eqthm 13Statement.ofLens_kids_lengththm 12Statement.found_cornerthm 12Statement.sig_of_checkthm 12Compose.letterLen_one_posthm 12Compose.gamma_side0_onethm 1Compose.sig_basethm 12Compose.comp_7_3thm 1
lean/SpectreKnot/Compose.lean 21
Compose.prefixSums15Compose.Kid14Compose.mkKidL15Compose.CompCompose.Comp.ofLens15Compose.Comp.ofPatternCompose.Comp.kid14Compose.Comp.sideIdx13Compose.Comp.sideOf13Compose.Comp.mate13Compose.Comp.toGluing13Compose.Comp.ports12Compose.Comp.mem_portsthm 12Compose.Comp.fuel13Compose.Comp.rimEdges13Compose.Comp.rimVertexPorts13Compose.Comp.vtx13Compose.Comp.tA12Compose.Comp.tB12Compose.Comp.check12Compose.Comp.check_soundthm 12
lean/SpectreKnot/ComposeTiles.lean 17
Statement.mono_of_succthm 12Statement.count_minthm 12Statement.count_eqthm 12Statement.range7_getDthm 12Statement.side_lengththm 12Statement.side_getElem?thmStatement.offC12Statement.offC_succthm 12Statement.owner_existsthm 12Statement.owner_uniquethm 12Statement.ownerCStatement.glueAt12Statement.compose_glue_defthm 12Statement.ownerC_eqthm 12Statement.compose_gluethm 12Statement.findIdx_rimthm 12Statement.glue_rimthm 12
lean/SpectreKnot/Gluing.lean 21
nxt_ltthm 13prv_ltthm 13prv_nxtthm 12nxt_prvthm 12GPort14Hand.isR2Gluing12Gluing.Valid13Gluing.WF12Gluing.wfCheck12Gluing.wfCheck_soundthm 12Gluing.corner14Gluing.tau14Gluing.corner_falsethm 14Gluing.tau_of_not_cornerthm 14Gluing.tau_validthm 13Gluing.sigma13Gluing.FReach13Gluing.FullReach13Gluing.fullWalk13Gluing.fullWalk_soundthm 13
lean/SpectreKnot/Lengths.lean 22
kidAt18letterOf16pieces17sideLen17recLetters17letterLen117letterLen17len1_by_letterthm 15pieces_validthm 15pieces_permthm 15sideLen_eq_letterLenthm 15letterLen_succthm 16fib_add_twothm 13letterLen_fib_auxthm 13letterLen_fibthm 13letterLen_paritythm 13sideLen_paritythm 1sigma_side5_startthmdOff16dOff_succthm 14dOff_fibthm 12boundsthm 14
lean/SpectreKnot/Lens.lean 22
Compose.pos16Compose.pos_succthm 14Compose.pos_monothm 13Compose.pos_lt_of_posthm 13Compose.range6_mapthm 14Compose.prefixSums_getDthm 14Compose.len_getDthm 14Compose.decompthm 13Compose.sideIdx_eqthm 13Compose.nk14Compose.ofLens_nthm 13Compose.ofLens_kidthm 14Compose.ofLens_Ethm 13Compose.ofLens_Uthm 14Compose.ofLens_lenthm 14Compose.ofLens_Athm 13Compose.ofLens_Bthm 13Compose.adjAt14Compose.adjOk13Compose.adj_okthm 13Compose.adj_validthm 13Compose.ofLens_matethm 13
lean/SpectreKnot/Linked.lean 15
Statement.Patch.Linked.transthm 12Statement.Patch.Linked.of_followthm 12Statement.Patch.Linked.validthm 2Statement.Patch.GlueSymmStatement.Patch.pieceEnd_pieceEndthm 3Statement.Patch.across_symmthm 1Statement.Patch.Linked.symmthm 1Statement.Kids.linked_liftthmStatement.Kids.glue_symmthmStatement.tile_glueSymmthm 4Statement.level1Symm4Statement.level1Symm_allthm 4Statement.level1_glueSymmthm 4Statement.super_glueSymmthm 4Statement.linked_symmthm 2
lean/SpectreKnot/Move.lean 49
Compose.Move12Compose.Move.two13Compose.Move.c₁Compose.Move.j₁Compose.Move.Hit13Compose.Move.lens13Compose.Move.r₁Compose.Move.cut13Compose.Move.d'13Compose.Move.OKCompose.Move.adj₀thmCompose.Move.d'_eqthm 13Compose.Move.d'_c₀thmCompose.Move.d'_c₁thmCompose.Move.OK.sibthm 13Compose.Move.OK.L₁thmCompose.Move.OK.hit_c₀thmCompose.Move.OK.hit_c₁thmCompose.Move.OK.hit_otherthm 13Compose.Move.OK.pos_c₀thmCompose.Move.OK.pos_c₁thmCompose.Move.OK.pos_otherthm 13Compose.Move.OK.lens_pos_lenthm 13Compose.Move.OK.cutOKthm 12Compose.Move.OK.sh₀_lethmCompose.Move.OK.sh₀_gtthmCompose.Move.OK.sh₁_lethmCompose.Move.OK.sh₁_gtthmCompose.Move.OK.sh_oththm 13Compose.Move.OK.sh_sidethm 1Compose.Move.OK.side_uniquethm 1Compose.Move.OK.not_hit_partnerthm 1Compose.Move.OK.sE₀thmCompose.Move.OK.sE₁thmCompose.Move.OK.sE_oththmCompose.Move.OK.smate_oldthm 1Compose.Move.OK.smate_new₀thmCompose.Move.OK.smate_new₁thmCompose.Move.OK.E_eqthmCompose.Move.OK.A_eqthm 1Compose.Move.OK.A_clear₀thmCompose.Move.OK.r₁_gethmCompose.Move.OK.r₁_lethmCompose.Move.OK.A_clear₁thmCompose.Move.OK.B_eqthm 1Compose.Move.OK.mate_hit₀thmCompose.Move.OK.mate_hit₁thmCompose.Move.OK.mate_eqthm 1Compose.Move.OK.equivthm 1
lean/SpectreKnot/NestStep.lean 27
Statement.jpos13Statement.pcs_lenthm 13Statement.pcs_getthm 13Statement.jpos_succthm 13Statement.jpos_le_addthm 13Statement.jpos_lethm 13Statement.jpos_fullthm 12Statement.ownGo_jposthm 12Statement.sJ13Statement.pside_takethm 13Statement.vpos_jposthm 13Statement.Par4Statement.kidsD12Statement.N_succthm 12Statement.up_succthm 3Statement.upPort_succthm 2Statement.KDthm 12Statement.len5thm 13Statement.isPort_upthm 12Statement.lift_nestthm 12Statement.E_Nthm 12Statement.corners_Nthm 12Statement.hookthm 12Statement.gR_jposthm 12Statement.jpos_posthm 12Statement.gL_jposthm 12Statement.step_tilethm 12
lean/SpectreKnot/NewWalk.lean 20
Gluing.fullReach_stepthm 13Gluing.fullReach_firstthm 12Gluing.Cut.OK.port_reachthm 13Gluing.Cut.OK.step0_2Fthm 13Gluing.Cut.OK.step0_2Tthm 13Gluing.Cut.OK.step0_1Tthm 13Gluing.Cut.OK.step0_1Fthm 13Gluing.Cut.OK.step1_2Fthm 13Gluing.Cut.OK.step1_2Tthm 13Gluing.Cut.OK.step1_1Tthm 13Gluing.Cut.OK.step1_1Fthm 13Gluing.Cut.OK.nw0_2Fthm 12Gluing.Cut.OK.nw0_2Tthm 12Gluing.Cut.OK.nw0_1Tthm 12Gluing.Cut.OK.nw0_1Fthm 12Gluing.Cut.OK.nw1_2Fthm 12Gluing.Cut.OK.nw1_2Tthm 12Gluing.Cut.OK.nw1_1Tthm 12Gluing.Cut.OK.nw1_1Fthm 12Gluing.Cut.OK.noLoopsthm 13
lean/SpectreKnot/ParentRim.lean 34
Statement.totL14Statement.ownGo13Statement.ConsecStatement.Consec.memthm 12Statement.totL_appendthm 13Statement.ownGo_appendthm 12Statement.ownGo_memthm 12Statement.ownGo_surjthm 12Statement.side_pos_injthm 12Statement.ownGo_injthm 12Statement.ownGo_zerothm 12Statement.ownGo_lastthm 12Statement.ownGo_predthm 12Statement.pcs15Statement.tabRot13Statement.consecOk13Statement.rimTablesOk13Statement.rimTablesOk_allthm 13Statement.consecOk_soundthm 12Statement.pcs_validthm 13Statement.pcs_nodupthm 12Statement.pcs_coverthm 12Statement.pcs_consecthm 12Statement.pcs_nethm 12Statement.pcs_wrapthm 12Statement.nxt_lastthm 12Statement.ofLens_mate_nonethm 12Statement.rot_tabthm 12Statement.rimN13Statement.own_validthm 12Statement.own_matethm 12Statement.own_surjthm 12Statement.own_injthm 12Statement.own_rotthm 12
lean/SpectreKnot/ParentSig.lean 24
Statement.offC_monothm 12Statement.tile_ltthm 12Statement.rimPiece12Statement.compose_rimthm 12Statement.rimPiece_lengththm 12Statement.rimPiece_getDthm 12Statement.pcs_valid'thm 12Statement.compose_Ethm 12Statement.rim_edgeAtthm 12Statement.parentLen13Statement.pside_lengththm 13Statement.totL_takethm 13Statement.sideLens_sumthm 12Statement.parent_vtxthm 12Statement.rimN_eqthm 12Statement.Kids.bport_Rthm 12Statement.Kids.bport_Lthm 12Statement.Kids.gR_rimLthmStatement.Kids.gR_rotthmStatement.Kids.gR_validthmStatement.Kids.gL_validthmStatement.Kids.gR_sigmathmStatement.Kids.gL_sigmathmStatement.Kids.parent_sigthm 12
lean/SpectreKnot/Parity.lean 38
Compose.sigIdx12Compose.sigIdx_specthm 12Compose.sigma_uniquethm 12Compose.pairOk12Compose.pair_okthm 12Compose.pair_letterthm 12Compose.tot12Compose.tot_lethm 12Compose.tot_ltthm 12Compose.tot_ne_zerothm 12Compose.tot_eq_zerothm 12Compose.L₁Compose.Adm12Compose.excess12Compose.L₁_gethmCompose.L₁_sigthmCompose.dOff_onethm 12Compose.ofLens_congrthm 12Compose.Move.shorten12Compose.Move.hit_partner_mpthm 12Compose.Move.hit_partnerthm 12Compose.Move.hit_bigthm 12Compose.Move.lens_shortenthm 12Compose.Move.adm_shortenthm 12Compose.Move.excess_shortenthm 12Compose.Move.OK.keepthm 13Compose.Move.mkOKthm 12Compose.adm_inductthm 12Compose.adm_sigthm 12Compose.fib_le_succthm 12Compose.fib_monothm 12Compose.letterLen_gethm 12Compose.adm_levelthm 12Compose.parity_lemmathm 12Compose.prop_7_4thm 12Compose.ofLens_B'thm 1Compose.sig_adjthm 1Compose.parity_lemma_adjthm 1
lean/SpectreKnot/PatchSig.lean 24
Statement.Patch.follow13Statement.Patch.follow_soundthm 1Statement.Patch.sigCheck1Statement.Patch.sigCheck_soundthm 1Statement.Patch.HasSig.boxthm 1Statement.lenAt14Statement.ori13Statement.vpos14Statement.aPos13Statement.bPos13Statement.GoodStatement.tile_hasSigthm 1Statement.level1Check13Statement.level1Check_Gammathm 13Statement.level1Check_Deltathm 13Statement.level1Check_Thetathm 13Statement.level1Check_Lambdathm 13Statement.level1Check_Xithm 13Statement.level1Check_Pithm 13Statement.level1Check_Sigmathm 13Statement.level1Check_Phithm 13Statement.level1Check_Psithm 13Statement.level1Check_allthm 13Statement.good_onethm 13
lean/SpectreKnot/ProofA.lean 18
Statement.pos_congrthm 13Statement.totL_eqthm 13Statement.Lk13Statement.parentLen_eqthm 13Statement.vpos_eqthm 13Statement.kids_atthm 12Statement.ori_succthm 12Statement.aPos_succthm 12Statement.bPos_succthm 12Statement.good_succthm 12Statement.goodthm 12Statement.super_side_lengththm 1Statement.cornerA_eq_aPosthm 2Statement.cornerA_succthm 1Statement.compose_no_defaultthm 1Statement.theoremAthm 3Statement.loopPatchStatement.loopPatch_closedthm
lean/SpectreKnot/ProofB.lean 38
Statement.stp12Statement.piece16thm 13Statement.jpos17thm 13Statement.ownGo16thm 12Statement.iota1thm 12Statement.stretch_eqthm 12Statement.Inside2Statement.pos_upthm 13Statement.sJ_lethm 13Statement.inside_ofthm 13Statement.inside_9thm 13Statement.inside_12thm 13Statement.inside_16thm 13Statement.inside_17thm 13Statement.inside_21thm 13Statement.inside_stpthm 13Statement.inside_boundsthm 12Statement.adv_somethm 2Statement.adv_nonethm 2Statement.Reach2Statement.reach_somethm 2Statement.reach_nonethm 2Statement.reach_ofthm 12Statement.tgt_nonethm 12Statement.tgt_vals_tthm 12Statement.tgt_vals_fthm 12Statement.firstthm 12Statement.ZpStatement.ori_eventhm 2Statement.ori_oddthm 2Statement.chain_eventhm 2Statement.chain_oddthm 2Statement.isPort_upkthm 2Statement.theoremB_sharpthm 2Statement.glue_upthm 4Statement.mate_somethm 4Statement.no_boundarythm 4Statement.theoremBthm 2
lean/SpectreKnot/ProofChain.lean 45
Statement.Chain.kidsAtStatement.Chain.block_succthmStatement.Chain.kid_eqthmStatement.Chain.shift_eqthmStatement.Chain.kids_okthmStatement.Chain.seven_kidsthmStatement.Chain.tiles_succthmStatement.Chain.level1_twothmStatement.Chain.tiles_gethmStatement.Chain.tiles_monothm 1Statement.Chain.loc_gidthmStatement.Chain.gid_locthmStatement.Chain.gid_injthmStatement.Chain.up_succthmStatement.Chain.gid_up1thmStatement.Chain.gid_upthmStatement.Chain.loc_upthm 1Statement.Chain.glue_lift1thmStatement.Chain.glue_liftthmStatement.Chain.glue_okthm 12Statement.Chain.glue_agreethm 1Statement.Chain.GluedAtStatement.Chain.gluedAt_upthmStatement.Chain.gluedAt_existsthm 1Statement.Chain.exists_commonthmStatement.Chain.all_glued_atthmStatement.IsTilingStatement.tilingAcross_somethm 1Statement.tilingSys1Statement.Chain.chainGlue1Statement.Chain.loc_gid_upthm 1Statement.Chain.chainTiling1Statement.Chain.chainTiling_containsthm 1Statement.Chain.isTilingthm 1Statement.Chain.gPStatement.Chain.pieceEnd_gPthmStatement.Chain.across_gPthmStatement.Chain.follow_staysthmStatement.Chain.not_closedthmStatement.chainModelthm 1Statement.theoremA_strandthm 1Statement.nestChain1Statement.nestChain_shiftthm 1Statement.nestChain_upthm 1Statement.nestCoversthm 1
lean/SpectreKnot/ProofExact.lean 25
Statement.Patch.Follow.uniquethmStatement.Patch.EndsStatement.Patch.Ends.uniquethmStatement.Patch.Ends.piecethm 1Statement.Patch.Ends.edgethm 12Statement.Patch.Linked.endsthm 1Statement.Patch.across_bportthm 1Statement.Patch.bport_isPortthm 1Statement.Patch.bport_injthm 1Statement.hookAt1Statement.hook_endsthm 1Statement.hooks_apartthm 1Statement.twoStrands_ofthm 1Statement.inside_twothm 1Statement.hook_portthm 1Statement.stp_apartthm 1Statement.even_twothm 1Statement.two_eventhm 1Statement.odd_twothm 1Statement.odd_up_12thm 1Statement.odd_up_9thm 1Statement.odd_witnessesthm 1Statement.two_oddthm 1Statement.three_oddthm 1Statement.theoremB_exactthm 1
lean/SpectreKnot/ProofGrand.lean 27
Statement.Patch.chainCheck2Statement.Patch.chainCheck_soundthm 2Statement.level1Chainsthm 2Statement.chains_superthm 2Statement.tstep1Statement.tsteps1Statement.delta_cyclesthm 1Statement.gmatethm 1Statement.side_end_lethm 1Statement.tstep_soundthm 1Statement.tsteps_soundthm 1Statement.side_cyclethm 1Statement.child1_cyclethm 1Statement.side4_cyclethm 1Statement.kidsD_chainsthm 1Statement.upC1Statement.turns_upthm 1Statement.surrounded_upthm 1Statement.surrounded_off_side2thm 1Statement.surrounded_side4thm 1Statement.chain_stretchthm 1Statement.junction_ltthm 12Statement.chain_j16thm 1Statement.chain_j17thm 1Statement.rim_not_surroundedthmStatement.grandparentthm 1Statement.signatureTheoremthm 1
lean/SpectreKnot/ProofStrand.lean 40
StrandSystem.SameStrandSystem.same_orbitthm 1Statement.nestShift_posthm 1Statement.tiles_succthm 1Statement.tiles_gethm 1Statement.loc_gidthm 1Statement.gid_locthm 1Statement.gid_injthm 1Statement.gid_up1thm 1Statement.gid_upthm 1Statement.glue_lift1thm 1Statement.glue_liftthm 1Statement.NoSelfStatement.level1NoSelf2Statement.level1NoSelf_allthm 2Statement.level1_noSelfthm 2Statement.mate_other_childthmStatement.Kids.noSelfthmStatement.super_noSelfthm 2Statement.glue_ok_Nthm 1Statement.nestGlue_extthm 1Statement.nestGlue_somethm 1Statement.nestModelthm 1Statement.NPort2Statement.pieceEnd_nethm 2Statement.nestAcross_somethm 1Statement.nestSys1Statement.gP1Statement.pieceEnd_gPthm 1Statement.across_gPthm 1Statement.across_isSomethm 1Statement.follow_boundedthm 1Statement.not_closedthm 1Statement.linked_samethm 1Statement.toBlock1Statement.toBlock_portthm 1Statement.gP_toBlockthm 1Statement.same_in_blockthm 1Statement.all_samethm 1Statement.theoremB_strandthm 1
lean/SpectreKnot/Reverse.lean 13
lean/SpectreKnot/Signature.lean 13
Gluing.Rot12Gluing.Rot.uniquethm 12Gluing.RimL12Gluing.Sig12Gluing.Equiv.rotthmGluing.Equiv.rimLthmGluing.Equiv.sigthmGluing.Cut.OK.mate_nonethm 1Gluing.Cut.OK.rimL_portthm 1Gluing.Cut.OK.rimL_prethm 1Gluing.Cut.OK.rot_portthm 1Gluing.Cut.OK.new_hookthm 1Gluing.Cut.OK.sigthm 1
lean/SpectreKnot/Statement.lean 60
Statement.Port12Statement.pieceEnd13Statement.Patch12Statement.straightThrough12Statement.Patch.IsPortStatement.Patch.across12Statement.Patch.FollowStatement.Patch.NoClosedStrandStatement.Patch.Linked1Statement.Patch.turn2Statement.Patch.turns2Statement.Patch.SurroundedStatement.Patch.side12Statement.Patch.E15Statement.Patch.edgeAt13Statement.Patch.bport13Statement.Patch.corner2Statement.Patch.sC2Statement.Patch.fC2Statement.Patch.RimChainsStatement.btau14Statement.Patch.HasSigStatement.compose12Statement.tile12Statement.level113Statement.super12Statement.N12Statement.nestShift4Statement.up4Statement.upPort2Statement.cornerA2Statement.cornerB1Statement.SignatureTheorem1Statement.TheoremA3Statement.TheoremB2Statement.TheoremB_sharp2Statement.TwoStrands1Statement.TheoremB_exact1Statement.Grandparent1Statement.Tiling1Statement.Tiling.acrossStatement.Tiling.forward2Statement.Tiling.backward2Statement.gid1Statement.loc1Statement.nestGlue1Statement.nestTilingStatement.NestModel1Statement.TheoremB_strand1Statement.Chain1Statement.Chain.block1Statement.Chain.shift1Statement.Chain.upStatement.Chain.gidStatement.Chain.locStatement.Chain.Covers1Statement.Chain.Contains1Statement.ChainModel1Statement.TheoremA_strand1Statement.NestCovers1
lean/SpectreKnot/StepMap.lean 31
Statement.pieceD14Statement.jR13Statement.jL13Statement.tgt13Statement.sideTgt12Statement.StepOK12Statement.tgt_sidethm 12Statement.stepCheck13Statement.stepCheck_truethm 13Statement.stepCheck_falsethm 13Statement.stepCheck_soundthm 13Statement.step_basethm 13Gluing.Cut.OK.sh_lt_shthm 12Gluing.Cut.OK.sh_lt_iffthm 12Compose.Move.OK.shposthm 12Compose.Move.OK.sh_onethm 12Compose.Move.OK.sh_lastthm 12Statement.tgt_ltthm 12Statement.piece_okthm 12Statement.adj_one_nonethm 12Statement.corner_onethm 12Statement.tgt_mapthm 12Statement.port_jRthm 12Statement.port_jLthm 12Statement.sh_zerothm 12Statement.StepOK.movethm 12Statement.tgt_congrthm 12Statement.StepOK.congrthm 12Statement.kid_onethm 12Statement.sig_partnerthm 12Statement.step_levelthm 12
lean/SpectreKnot/Strands.lean 14
StrandSystemStrandSystem.next3StrandSystem.prev3StrandSystem.prev_nextthm 3StrandSystem.next_prevthm 3StrandSystem.walk1StrandSystem.walk_succthm 3StrandSystem.iter_next_injectivethm 3StrandSystem.Closed3StrandSystem.walk_ne_inside_walkthm 3StrandSystem.walk_injective_of_not_closedthm 3StrandSystem.back_ne_forward_of_not_closedthm 3StrandSystem.prev_injective_of_not_closedthm 3StrandSystem.closed_or_paththm 3
lean/SpectreKnot/Subdivide.lean 59
Gluing.CrossGluing.Cross.reachthm 13Gluing.sigma_validthm 13Gluing.SimGluing.Sim.reachthm 13Gluing.EquivGluing.Equiv.valid'thmGluing.Equiv.tauthmGluing.Equiv.sigmathmGluing.Equiv.wfthm 13Gluing.Equiv.freachthmGluing.Equiv.fullReachthm 12Gluing.Equiv.symmthmGluing.CutGluing.Cut.sh13Gluing.Cut.unsh13Gluing.Cut.port13Gluing.subdiv13Gluing.Cut.OKGluing.sigmaRthm 14Gluing.sigmaLthm 14Gluing.prv_succ'thm 14Gluing.nxt_of_lt'thm 14Gluing.pathPort2Gluing.cross_threethm 2Gluing.Cut.OK.two_matethm 13Gluing.Cut.OK.sh_c₀_lethmGluing.Cut.OK.sh_c₀_gtthmGluing.Cut.OK.sh_c₁_lethmGluing.Cut.OK.sh_c₁_gtthmGluing.Cut.OK.sh_otherthm 13Gluing.Cut.OK.E_c₀thmGluing.Cut.OK.E_c₁thmGluing.Cut.OK.E_otherthm 13Gluing.Cut.OK.sh_casesthm 13Gluing.Cut.OK.sh_injthm 13Gluing.Cut.OK.sh_ltthm 13Gluing.Cut.OK.mate_new₀thmGluing.Cut.OK.mate_new₁thmGluing.Cut.OK.mate_oldthm 13Gluing.Cut.OK.prv_shthm 13Gluing.Cut.OK.nxt_shthm 13Gluing.Cut.OK.target_not_cutthm 13Gluing.Cut.OK.tau_portthm 13Gluing.Cut.OK.corner_new₀thmGluing.Cut.OK.corner_new₁thmGluing.Cut.OK.preimagethm 13Gluing.Cut.OK.two_falsethm 13Gluing.Cut.OK.two_truethm 13Gluing.Cut.OK.mate_cut₀thmGluing.Cut.OK.mate_cut₁thmGluing.Cut.OK.tau_new₀thmGluing.Cut.OK.tau_new₁thmGluing.Cut.OK.prv_cutthm 13Gluing.Cut.OK.prv_cut₁thmGluing.Cut.OK.cross_cut₀thmGluing.Cut.OK.cross_cut₁thmGluing.Cut.OK.simthm 13Gluing.Cut.OK.wf_subdivthm 13
lean/SpectreKnot/Turn.lean 28
Statement.pigeonholethm 1Statement.Patch.turns_addthm 2Statement.Patch.turns_succ'thm 2Statement.Patch.turn_validthm 2Statement.Patch.turnB1Statement.Patch.turnsB1Statement.Patch.turn_turnBthm 1Statement.Patch.turnsB_soundthm 1Statement.Patch.turnsB_stopthm 1Statement.Patch.sC_validthm 2Statement.Patch.surrounded_or_chainthm 1Statement.bstep2Statement.bsteps2Statement.rot_bstepsthm 2Statement.rotB_bstepsthm 2Statement.shiftC2Statement.vS1Statement.Kids.turn_liftthm 2Statement.Kids.turns_liftthm 2Statement.Kids.bstep_validthm 2Statement.Kids.bsteps_validthm 1Statement.Kids.turn_fCthm 2Statement.Kids.chain_stepthm 2Statement.Kids.chain_paththm 2Statement.Kids.surrounded_of_cyclethm 1Statement.Kids.sC_parentthm 1Statement.Kids.on_parent_chainthm 1Statement.Kids.rimChainsthm 2
lean/SpectreKnot/Zigzag.lean 6
Box
structure in lean/SpectreKnot/Box.lean, line 28 · read it in its file
Doc comment
The box of a patch (Lemma 4.1): the pairing of its rim ports by its arcs, and its number κ of closed strands (the count of the paper's long version, 19 October 2026).
Statement
structure Box (E : Nat) where pair : RimPort E → RimPort E closed : Nat
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Box.Proper
def in lean/SpectreKnot/Box.lean, line 33 · read it in its file
Doc comment
A box is proper if its pairing is an involution without fixed points (Lemma 4.1).
Statement
def Box.Proper {E : Nat} (b : Box E) : Prop := ∀ p, b.pair (b.pair p) = p ∧ b.pair p ≠ p instance {E : Nat} (b : Box E) : Decidable b.Proper := by unfold Box.Proper; infer_instance
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Box.Signature
def in lean/SpectreKnot/Box.lean, line 40 · read it in its file
Doc comment
Def 4.3. The box has the signature at (A, B): a hook at every rim vertex other than A and B, the crossover R(A) ↔ R(B), L(A) ↔ L(B), and no closed strand.
Statement
def Box.Signature {E : Nat} (b : Box E) (A B : Fin E) : Prop := (∀ u : Fin E, u ≠ A → u ≠ B → b.pair (u, .L) = (u, .R)) ∧ b.pair (A, .R) = (B, .R) ∧ b.pair (A, .L) = (B, .L) ∧ b.closed = 0 instance {E : Nat} (b : Box E) (A B : Fin E) : Decidable (b.Signature A B) := by unfold Box.Signature; infer_instance
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Adm
structure in lean/SpectreKnot/Parity.lean, line 122 · read it in its file
Formalises Lemma 7.2 Reachability.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Side lengths L and Σ offset d reachable from (ℓ₁, d₁) by moves: every side at least as long as at level 1 and of the same parity, glued sides equally long, d ≥ d₁ of the same parity, and the rest of the Σ child's side 5 past its corner at least as long as at level 1.
Statement
structure Adm (T : Kind) (L : Nat → Nat → Nat) (d : Nat) : Prop where len : ∀ c, c < nk T → ∀ j, j < 6 → L₁ T c j ≤ L c j ∧ (L c j - L₁ T c j) % 2 = 0 pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j d_ge : dOff 1 ≤ d d_par : (d - dOff 1) % 2 = 0 sig : ∀ c, c < nk T → kidAt T c = .Sigma → d + L₁ T c 5 ≤ L c 5 + dOff 1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp
structure in lean/SpectreKnot/Compose.lean, line 51 · read it in its file
Doc comment
A composition: the parent's kind and its children.
Statement
structure Comp where T : Kind kids : List Kid
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.check
def in lean/SpectreKnot/Compose.lean, line 148 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The conclusion of the induction step for this composition (see check_sound for what true means): (1) the gluing is well formed; (2) no closed strand: the walk from every port ends on the parent's rim; (3) a hook at every parent rim vertex except the Γ child's corners A and B; (4) A and B are rim vertices of the parent and adjacent, B after A in the children's sense if ω = +1 and before it if ω = -1 (so B = A + ω_{m+1} in the parent's own order, the opposite sense); (5) the crossover R(A) ↔ R(B), L(A) ↔ L(B).
Statement
def check (ω : Bool) : Bool := let G := C.toGluing let n := C.rimVertexPorts.length G.wfCheck && (C.ports.all fun x => (G.fullWalk C.fuel x).isSome) && ((List.range n).all fun t => t == C.tA || t == C.tB || G.fullWalk C.fuel (C.vtx t).1 == some (C.vtx t).2) && decide (C.tA < n) && decide (C.tB < n) && C.tB == (if ω then (C.tA + 1) % n else (C.tA + n - 1) % n) && G.fullWalk C.fuel (C.vtx C.tA).2 == some (C.vtx C.tB).2 && G.fullWalk C.fuel (C.vtx C.tA).1 == some (C.vtx C.tB).1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.check_sound
theorem in lean/SpectreKnot/Compose.lean, line 160 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
What check establishes, as theorems about the gluing (FullReach x r: the parent's arcs join x to r).
Statement
theorem check_sound {ω : Bool} (checked : C.check ω = true) : let G := C.toGluing let n := C.rimVertexPorts.length G.WF ∧ (∀ x, G.Valid x → ∃ r, G.FullReach x r) ∧ (∀ t, t < n → t ≠ C.tA → t ≠ C.tB → G.FullReach (C.vtx t).1 (C.vtx t).2) ∧ C.tA < n ∧ C.tB < n ∧ C.tB = (if ω then (C.tA + 1) % n else (C.tA + n - 1) % n) ∧ G.FullReach (C.vtx C.tA).2 (C.vtx C.tB).2 ∧ G.FullReach (C.vtx C.tA).1 (C.vtx C.tB).1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by simp only [check, Bool.and_eq_true, decide_eq_true_eq, beq_iff_eq, List.all_eq_true, List.mem_range, Bool.or_eq_true] at checked obtain ⟨⟨⟨⟨⟨⟨⟨wf_checked, all_end⟩, hooks⟩, A_lt⟩, B_lt⟩, adjacent⟩, cross_R⟩, cross_L⟩ := checked refine ⟨Gluing.wfCheck_sound _ wf_checked, fun x x_valid => ?_, fun t t_lt ne_A ne_B => ?_, A_lt, B_lt, adjacent, Gluing.fullWalk_sound _ cross_R, Gluing.fullWalk_sound _ cross_L⟩ · have ends := all_end x (C.mem_ports x_valid) -- the computed walk from `x` ends within the fuel cases walk_eq : C.toGluing.fullWalk C.fuel x with | none => rw [walk_eq] at ends; contradiction | some r => exact ⟨r, Gluing.fullWalk_sound _ walk_eq⟩ · rcases hooks t t_lt with (is_A | is_B) | hook · exact absurd is_A ne_A · exact absurd is_B ne_B · exact Gluing.fullWalk_sound _ hook
Compose.Comp.fuel
def in lean/SpectreKnot/Compose.lean, line 108 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
Enough fuel for any walk: a walk never repeats a port.
Statement
def fuel : Nat := C.ports.length + 1
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.kid
def in lean/SpectreKnot/Compose.lean, line 69 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Child c (a dummy one-vertex child if there is none).
Statement
def kid (c : Nat) : Kid := C.kids.getD c ⟨.Gamma, [], [], 1, 0, 0⟩
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.mate
def in lean/SpectreKnot/Compose.lean, line 83 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 2 with direction reversed: edge k of child c is edge mate c k of a sibling, or on the parent's rim.
Statement
def mate (c k : Nat) : Option (Nat × Nat) := let (j, o) := C.sideOf c k match ((adj C.T).getD c []).getD j none with | none => none | some (c', j') => let k' := C.kid c' some (c', k'.U.getD j' 0 + k'.len.getD j' 0 - 1 - o)
Names in its proof
Named in the proofs of
Statement.Kids.across_rimCompose.Comp.toGluingGluing.WFGluing.wfCheckGluing.sigmaCompose.ofLens_mateStatement.Kids.glue_symmGluing.Cut.OK.nw0_2FGluing.Cut.OK.nw0_1TStatement.rot_tabStatement.Kids.parent_sigStatement.no_boundaryStatement.Kids.noSelfGluing.sigma_symmGluing.RotBGluing.RotGluing.RimLGluing.SigGluing.Equiv.rotGluing.Equiv.rimLGluing.Equiv.sigGluing.Cut.OK.rimL_preGluing.EquivGluing.Equiv.sigmaGluing.Equiv.wfGluing.Equiv.symmGluing.subdivGluing.Cut.OKGluing.Cut.OK.two_mateGluing.Cut.OK.target_not_cutGluing.Cut.OK.two_falseGluing.Cut.OK.two_trueStatement.bstepStatement.Kids.bstep_validStatement.Kids.turn_fC
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.mem_ports
theorem in lean/SpectreKnot/Compose.lean, line 101 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every port of an actual child is in the list ports.
Statement
theorem mem_ports {x : GPort} (x_valid : C.toGluing.Valid x) : x ∈ C.ports
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by obtain ⟨c, u, s⟩ := x obtain ⟨c_lt, u_lt⟩ := x_valid simp only [ports, List.mem_flatMap, List.mem_range] exact ⟨c, c_lt, u, u_lt, by cases s <;> simp⟩
Compose.Comp.ofLens
def in lean/SpectreKnot/Compose.lean, line 57 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The composition of kind T in which side j of child c has L c j edges. (Used for the parity lemma, where sides are lengthened one pair at a time.)
Statement
def Comp.ofLens (T : Kind) (L : Nat → Nat → Nat) (d : Nat) (ω : Bool) : Comp := ⟨T, (List.range (Pattern.kids T).length).map fun c => mkKidL (kidAt T c) ((List.range 6).map (L c)) d ω⟩
Names in its proof
Named in the proofs of
Statement.KidsStatement.Kids.across_rimStatement.Kids.tau_btauStatement.Kids.btau_ltStatement.Kids.follow_of_reachStatement.Kids.noClosedStatement.corners_sigmaStatement.gRStatement.gR_rimLStatement.CompSigStatement.compSig_of_sigStatement.rimEdges_eqStatement.vtx_eqStatement.ofLens_kids_lengthStatement.sig_of_checkCompose.Comp.ofPatternCompose.ofLens_nCompose.ofLens_kidCompose.ofLens_mateStatement.Kids.glue_symmCompose.Move.OKCompose.Move.OK.cutOKCompose.Move.OK.sh₀_leCompose.Move.OK.sh₀_gtCompose.Move.OK.sh₁_leCompose.Move.OK.sh₁_gtCompose.Move.OK.sh_othCompose.Move.OK.mate_hit₀Compose.Move.OK.mate_hit₁Compose.Move.OK.mate_eqCompose.Move.OK.equivStatement.ofLens_mate_noneStatement.rot_tabStatement.Kids.parent_sigCompose.ofLens_congrCompose.adm_inductCompose.adm_sigStatement.kids_atStatement.mate_someStatement.no_boundaryStatement.gmateStatement.chain_j16Statement.chain_j17Statement.mate_other_childStatement.Kids.noSelfStatement.StepOKStatement.stepCheckStatement.Kids.bstep_validStatement.Kids.bsteps_validStatement.Kids.turn_fCStatement.Kids.chain_path
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.ofPattern
def in lean/SpectreKnot/Compose.lean, line 61 · read it in its file
Doc comment
The composition of §7.1: every side with letter x has lam x edges.
Statement
def Comp.ofPattern (T : Kind) (lam : Letter → Nat) (d : Nat) (ω : Bool) : Comp := Comp.ofLens T (fun c j => lam (letterOf (kidAt T c) j)) d ω
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.ports
def in lean/SpectreKnot/Compose.lean, line 96 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
All ports of all children.
Statement
def ports : List GPort := (List.range C.kids.length).flatMap fun c => (List.range (C.kid c).E).flatMap fun u => [(c, u, true), (c, u, false)]
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.rimEdges
def in lean/SpectreKnot/Compose.lean, line 112 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim edges (c, k) in the children's rotational sense, from Table 3 (which lists the parent's sides in the parent's own order, the opposite sense).
Statement
def rimEdges : List (Nat × Nat) := let own := ((pside C.T).flatMap id).flatMap fun (c, j) => let k := C.kid c (List.range (k.len.getD j 0)).map fun i => (c, k.U.getD j 0 + k.len.getD j 0 - 1 - i) own.reverse
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.rimVertexPorts
def in lean/SpectreKnot/Compose.lean, line 120 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim ports at the vertex between consecutive rim edges e₁ = (c₁, k₁) and e₂ = (c₂, k₂): L on e₁ and R on e₂.
Statement
def rimVertexPorts : List (GPort × GPort) := let es := C.rimEdges let n := es.length (List.range n).map fun t => let (c₁, k₁) := es.getD t (0, 0) let (c₂, k₂) := es.getD ((t + 1) % n) (0, 0) ((c₁, nxt (C.kid c₁).E k₁, false), (c₂, k₂, true))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.sideIdx
def in lean/SpectreKnot/Compose.lean, line 72 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
sideIdx U k i: the last j ≤ i with U[j] ≤ k, or 0.
Statement
def sideIdx (U : List Nat) (k : Nat) : Nat → Nat | 0 => 0 | i + 1 => if U.getD (i + 1) 0 ≤ k then i + 1 else sideIdx U k i
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.sideOf
def in lean/SpectreKnot/Compose.lean, line 77 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The side of child c containing edge k, and the offset of k in it.
Statement
def sideOf (c k : Nat) : Nat × Nat := let U := (C.kid c).U let j := sideIdx U k 5 (j, k - U.getD j 0)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.spreadCorners
def in lean/SpectreKnot/CompFull.lean, line 90 · read it in its file
Doc comment
For the negative control: give child c a crossover at two non-adjacent corners (B = A + 2).
Statement
def Comp.spreadCorners (C : Comp) (c : Nat) : Comp := { C with kids := C.kids.modify c fun k => { k with B := (k.A + 2) % k.E } }
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.tA
def in lean/SpectreKnot/Compose.lean, line 132 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The rim indices of the Γ child's crossover corners A and B (the Γ child is the last).
Statement
def tA : Nat := let g := C.kids.length - 1 (C.rimVertexPorts.findIdx? fun (_, pR) => pR == (g, (C.kid g).A, true)).getD C.rimVertexPorts.length
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.tB
def in lean/SpectreKnot/Compose.lean, line 137 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The rim index of the Γ child's crossover corner B (see tA).
Statement
def tB : Nat := let g := C.kids.length - 1 (C.rimVertexPorts.findIdx? fun (_, pR) => pR == (g, (C.kid g).B, true)).getD C.rimVertexPorts.length
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.toGluing
def in lean/SpectreKnot/Compose.lean, line 92 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The composition as a gluing of children with the signature.
Statement
def toGluing : Gluing := ⟨C.kids.length, fun c => (C.kid c).E, fun c => (C.kid c).A, fun c => (C.kid c).B, C.mate⟩
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Comp.vtx
def in lean/SpectreKnot/Compose.lean, line 129 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Rim vertex number t of the parent, as its pair of ports.
Statement
def vtx (t : Nat) : GPort × GPort := C.rimVertexPorts.getD t ((0, 0, false), (0, 0, false))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Kid
structure in lean/SpectreKnot/Compose.lean, line 31 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A child of the composition. Rim vertices and rim edges are numbered 0 … E-1 in the child's own order; edge k runs from vertex k to vertex k+1.
Statement
structure Kid where kind : Kind len : List Nat U : List Nat E : Nat A : Nat B : Nat deriving Repr
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.L₁
abbrev in lean/SpectreKnot/Parity.lean, line 117 · read it in its file
Doc comment
The level-1 side lengths ℓ₁.
Statement
abbrev L₁ (T : Kind) (c j : Nat) : Nat := letterLen 1 (letterOf (kidAt T c) j)
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.L₁_ge
theorem in lean/SpectreKnot/Parity.lean, line 133 · read it in its file
Doc comment
Every level-1 side has at least 5 edges (Lemma 6.5).
Statement
theorem L₁_ge (T : Kind) (c j : Nat) : 5 ≤ L₁ T c j
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
(bounds 1 (by omega)).1 _Compose.L₁_sig
theorem in lean/SpectreKnot/Parity.lean, line 136 · read it in its file
Doc comment
At level 1, side 5 of the Σ child has 10 edges.
Statement
theorem L₁_sig {T : Kind} {c : Nat} (is_sigma : kidAt T c = .Sigma) : L₁ T c 5 = 10
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by show letterLen 1 (letterOf (kidAt T c) 5) = 10; rw [is_sigma]; rfl
Compose.Move
structure in lean/SpectreKnot/Move.lean, line 14 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A move: cut the edge at offset r₀ of side j₀ of child c₀ (and the same edge seen from the sibling).
Statement
structure Move where c₀ : Nat j₀ : Nat r₀ : Nat
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.Hit
def in lean/SpectreKnot/Move.lean, line 31 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Side j of child c is one of the sides lengthened.
Statement
def Hit (c j : Nat) : Prop := (c = μ.c₀ ∧ j = μ.j₀) ∨ (μ.two T = true ∧ c = μ.c₁ T ∧ j = μ.j₁ T) instance (c j : Nat) : Decidable (μ.Hit T c j) := by unfold Hit; infer_instance
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.OK
structure in lean/SpectreKnot/Move.lean, line 51 · read it in its file
Doc comment
When a move can be made.
Statement
structure OK (L : Nat → Nat → Nat) (d : Nat) (ω : Bool) : Prop where /-- the old composition is well formed -/ wf : (Comp.ofLens T L d ω).toGluing.WF /-- every side has an edge -/ pos_len : ∀ c, c < nk T → ∀ j, j < 6 → 1 ≤ L c j /-- glued sides have the same length -/ pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j /-- the child cut is a child -/ c₀ : μ.c₀ < nk T /-- the side cut is one of its six sides -/ j₀ : μ.j₀ < 6 /-- the cut edge is not the first edge of its side -/ r₀ : 1 ≤ μ.r₀ /-- nor the last -/ r₀' : μ.r₀ + 2 ≤ L μ.c₀ μ.j₀ /-- the Σ corner and its neighbours lie inside side 5 of the Σ child -/ sig : ∀ c, c < nk T → kidAt T c = .Sigma → 2 ≤ d ∧ d + 2 ≤ L c 5 /-- there is only one Σ child -/ sig1 : ∀ c c', c < nk T → c' < nk T → kidAt T c = .Sigma → kidAt T c' = .Sigma → c = c' /-- a cut on the Σ child's side 5 is clear of its corners -/ cut₀ : kidAt T μ.c₀ = .Sigma → μ.j₀ = 5 → d + 1 ≤ μ.r₀ ∨ μ.r₀ + 2 ≤ d /-- the same, seen from the sibling -/ cut₁ : μ.two T = true → kidAt T (μ.c₁ T) = .Sigma → μ.j₁ T = 5 → d + 1 ≤ μ.r₁ L ∨ μ.r₁ L + 2 ≤ d
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.OK.A_clear₀
theorem in lean/SpectreKnot/Move.lean, line 463 · read it in its file
Doc comment
The corner A is not at either end of a cut edge (cuts avoid the first and last edge of every side, and the Σ corner).
Statement
theorem A_clear₀ {c : Nat} (c_lt : c < nk T) (is_c₀ : c = μ.c₀) :
(G₀).A c ≠ pos (L μ.c₀) μ.j₀ + μ.r₀ ∧ (G₀).A c ≠ pos (L μ.c₀) μ.j₀ + μ.r₀ + 1
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (20 lines)
by subst is_c₀ rw [ofLens_A c_lt] -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' -- and at least one edge from its start have r₀_ge := move_ok.r₀ -- side `j₀` is one of the six sides have j₀_lt := move_ok.j₀ by_cases is_sigma : kidAt T μ.c₀ = .Sigma · rw [ite_eq_left is_sigma] obtain ⟨d_ge, d_le⟩ := move_ok.sig _ c_lt is_sigma by_cases is_5 : μ.j₀ = 5 -- side `j₀` is side 5, and the cut is clear of the corner · have pos_5 : pos (L μ.c₀) μ.j₀ = pos (L μ.c₀) 5 := by rw [is_5] rcases move_ok.cut₀ is_sigma is_5 with cut_after | cut_before <;> omega -- side `j₀` ends before side 5 begins · have side_ends := pos_mono (L μ.c₀) (show μ.j₀ + 1 ≤ 5 by omega) rw [pos_succ] at side_ends; omega · rw [ite_eq_right is_sigma]; omega
Compose.Move.OK.A_clear₁
theorem in lean/SpectreKnot/Move.lean, line 500 · read it in its file
Doc comment
The sibling's corner A is not at either end of its cut edge.
Statement
theorem A_clear₁ (side_glued : μ.two T = true) {c : Nat} (c_lt : c < nk T) (is_c₁ : c = μ.c₁ T) :
(G₀).A c ≠ pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L ∧ (G₀).A c ≠ pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L + 1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (22 lines)
by subst is_c₁ rw [ofLens_A c_lt] -- the cut edge is not the last edge of the sibling's side have r₁_le := move_ok.r₁_le -- nor the first have r₁_ge := move_ok.r₁_ge -- the two glued sides have the same length have same_len := move_ok.L₁ side_glued -- side `j₁` is one of the six sides have j₁_lt := (move_ok.sib side_glued).2.1 by_cases is_sigma : kidAt T (μ.c₁ T) = .Sigma · rw [ite_eq_left is_sigma] obtain ⟨d_ge, d_le⟩ := move_ok.sig _ c_lt is_sigma by_cases is_5 : μ.j₁ T = 5 -- side `j₁` is side 5, and the cut is clear of the corner · have pos_5 : pos (L (μ.c₁ T)) (μ.j₁ T) = pos (L (μ.c₁ T)) 5 := by rw [is_5] rcases move_ok.cut₁ side_glued is_sigma is_5 with cut_after | cut_before <;> omega -- side `j₁` ends before side 5 begins · have side_ends := pos_mono (L (μ.c₁ T)) (show μ.j₁ T + 1 ≤ 5 by omega) rw [pos_succ] at side_ends; omega · rw [ite_eq_right is_sigma]; omega
Compose.Move.OK.A_eq
theorem in lean/SpectreKnot/Move.lean, line 391 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
Corners agree.
Statement
theorem A_eq {c : Nat} (c_lt : c < nk T) : (G₁).A c = (μ.cut T L).sh c ((G₀).A c)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (69 lines)
by rw [ofLens_A c_lt, ofLens_A c_lt] -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' -- and at least one edge from its start have r₀_ge := move_ok.r₀ -- side `j₀` is one of the six sides have j₀_lt := move_ok.j₀ by_cases is_sigma : kidAt T c = .Sigma · rw [ite_eq_left is_sigma, ite_eq_left is_sigma] obtain ⟨d_ge, d_le⟩ := move_ok.sig c c_lt is_sigma by_cases is_c₀ : c = μ.c₀ · subst is_c₀ -- the sibling is not the Σ child as well have sib_not_sigma : ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma) := fun ⟨side_glued, sib_sigma⟩ => (move_ok.sib side_glued).2.2.1 (move_ok.sig1 _ _ (move_ok.sib side_glued).1 c_lt sib_sigma is_sigma) rw [move_ok.pos_c₀] by_cases is_5 : μ.j₀ = 5 · rw [ite_eq_right (by omega)] -- side `j₀` is side 5 have pos_5 : pos (L μ.c₀) μ.j₀ = pos (L μ.c₀) 5 := by rw [is_5] rw [d'_c₀ is_sigma is_5 (fun ⟨side_glued, sib_sigma, _⟩ => sib_not_sigma ⟨side_glued, sib_sigma⟩)] rcases move_ok.cut₀ is_sigma is_5 with cut_after | cut_before · rw [ite_eq_right (show ¬ μ.r₀ + 2 ≤ d by omega), move_ok.sh₀_le (by omega)]; omega · rw [ite_eq_left cut_before, move_ok.sh₀_gt (by omega)]; omega · rw [ite_eq_left (by omega), d'_eq (fun ⟨_, is_5'⟩ => is_5 is_5') (fun ⟨side_glued, sib_sigma, _⟩ => sib_not_sigma ⟨side_glued, sib_sigma⟩)] -- side `j₀` ends before side 5 begins have side_ends := pos_mono (L μ.c₀) (show μ.j₀ + 1 ≤ 5 by omega) rw [pos_succ] at side_ends rw [move_ok.sh₀_gt (by omega)]; omega · by_cases is_c₁ : μ.two T = true ∧ c = μ.c₁ T · obtain ⟨side_glued, rfl⟩ := is_c₁ -- `c₀` is not the Σ child, since the sibling is have c₀_not_sigma : kidAt T μ.c₀ ≠ .Sigma := fun c₀_sigma => is_c₀ (move_ok.sig1 _ _ c_lt move_ok.c₀ is_sigma c₀_sigma) -- the two glued sides have the same length have same_len := move_ok.L₁ side_glued rw [move_ok.pos_c₁ side_glued] by_cases is_5 : μ.j₁ T = 5 · rw [ite_eq_right (by omega)] -- side `j₁` is side 5 have pos_5 : pos (L (μ.c₁ T)) (μ.j₁ T) = pos (L (μ.c₁ T)) 5 := by rw [is_5] rw [d'_c₁ side_glued is_sigma is_5 (fun ⟨c₀_sigma, _⟩ => c₀_not_sigma c₀_sigma)] rcases move_ok.cut₁ side_glued is_sigma is_5 with cut_after | cut_before · rw [ite_eq_right (show ¬ μ.r₁ L + 2 ≤ d by omega), move_ok.sh₁_le side_glued (by omega)]; omega · rw [ite_eq_left cut_before, move_ok.sh₁_gt side_glued (by omega)]; omega -- side `j₁` is one of the six sides, and not side 5 · have j₁_lt := (move_ok.sib side_glued).2.1 rw [ite_eq_left (by omega)] rw [d'_eq (fun ⟨c₀_sigma, _⟩ => c₀_not_sigma c₀_sigma) (fun ⟨_, _, is_5'⟩ => is_5 is_5')] -- side `j₁` ends before side 5 begins have side_ends := pos_mono (L (μ.c₁ T)) (show μ.j₁ T + 1 ≤ 5 by omega) rw [pos_succ] at side_ends rw [move_ok.sh₁_gt side_glued (by simp only [r₁]; omega)]; omega -- the Σ child is neither `c₀` nor the sibling · have c₀_not_sigma : kidAt T μ.c₀ ≠ .Sigma := fun c₀_sigma => is_c₀ (move_ok.sig1 _ _ c_lt move_ok.c₀ is_sigma c₀_sigma) -- the sibling is not the Σ child have sib_not_sigma : ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma) := fun ⟨side_glued, sib_sigma⟩ => is_c₁ ⟨side_glued, move_ok.sig1 _ _ c_lt (move_ok.sib side_glued).1 is_sigma sib_sigma⟩ rw [move_ok.pos_other is_c₀ is_c₁, d'_eq (fun ⟨c₀_sigma, _⟩ => c₀_not_sigma c₀_sigma) (fun ⟨side_glued, sib_sigma, _⟩ => sib_not_sigma ⟨side_glued, sib_sigma⟩), move_ok.sh_oth is_c₀ is_c₁] · rw [ite_eq_right is_sigma, ite_eq_right is_sigma] by_cases is_c₀ : c = μ.c₀ · subst is_c₀; rw [move_ok.sh₀_le (by omega)] · by_cases is_c₁ : μ.two T = true ∧ c = μ.c₁ T · obtain ⟨side_glued, rfl⟩ := is_c₁; rw [move_ok.sh₁_le side_glued (by omega)] · rw [move_ok.sh_oth is_c₀ is_c₁]
Compose.Move.OK.B_eq
theorem in lean/SpectreKnot/Move.lean, line 525 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
Second corners agree.
Statement
theorem B_eq {c : Nat} (c_lt : c < nk T) : (G₁).B c = (μ.cut T L).sh c ((G₀).B c)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
by -- the corner `A` is a vertex of the child have A_lt := move_ok.wf.A_lt c (by rw [ofLens_n]; exact c_lt) rw [ofLens_B (L := μ.lens T L) (d := μ.d' T L d) c_lt, ofLens_B (L := L) (d := d) c_lt, ← ofLens_E (L := μ.lens T L) (d := μ.d' T L d) (ω := ω) c_lt, ← ofLens_E (L := L) (d := d) (ω := ω) c_lt, move_ok.E_eq c_lt, move_ok.A_eq c_lt] -- `A` is at neither end of the cut edge of `c₀` have not_cut₀ : ∀ i, i ≤ 1 → ¬ (c = (μ.cut T L).c₀ ∧ (G₀).A c = (μ.cut T L).e₀ + i) := by rintro i i_le ⟨is_c₀, at_cut⟩ -- the corner is clear of both ends of the cut edge have clear := move_ok.A_clear₀ c_lt is_c₀ rcases (show i = 0 ∨ i = 1 by omega) with rfl | rfl · exact clear.1 at_cut · exact clear.2 at_cut -- nor at either end of the sibling's cut edge have not_cut₁ : ∀ i, i ≤ 1 → ¬ ((μ.cut T L).two = true ∧ c = (μ.cut T L).c₁ ∧ (G₀).A c = (μ.cut T L).e₁ + i) := by rintro i i_le ⟨side_glued, is_c₁, at_cut⟩ -- the corner is clear of both ends of the cut edge have clear := move_ok.A_clear₁ side_glued c_lt is_c₁ rcases (show i = 0 ∨ i = 1 by omega) with rfl | rfl · exact clear.1 at_cut · exact clear.2 at_cut by_cases B_after_A : ω = true · rw [ite_eq_left B_after_A, ite_eq_left B_after_A] exact move_ok.cutOK.nxt_sh A_lt (not_cut₀ 0 (by omega)) (not_cut₁ 0 (by omega)) · rw [ite_eq_right B_after_A, ite_eq_right B_after_A] exact move_ok.cutOK.prv_sh A_lt (not_cut₀ 1 (by omega)) (not_cut₁ 1 (by omega))
Compose.Move.OK.E_eq
theorem in lean/SpectreKnot/Move.lean, line 379 · read it in its file
Doc comment
Rim lengths agree.
Statement
theorem E_eq {c : Nat} (c_lt : c < nk T) : (G₁).E c = (Gs).E c
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by rw [ofLens_E c_lt] -- side `j₀` is one of the six sides have j₀_lt := move_ok.j₀ by_cases is_c₀ : c = μ.c₀ · subst is_c₀; rw [move_ok.pos_c₀, ite_eq_left (by omega), move_ok.sE₀, ofLens_E c_lt] · by_cases is_c₁ : μ.two T = true ∧ c = μ.c₁ T · obtain ⟨side_glued, rfl⟩ := is_c₁ rw [move_ok.pos_c₁ side_glued, ite_eq_left (move_ok.sib side_glued).2.1, move_ok.sE₁ side_glued, ofLens_E c_lt] · rw [move_ok.pos_other is_c₀ is_c₁, move_ok.sE_oth is_c₀ is_c₁, ofLens_E c_lt]
Compose.Move.OK.L₁
theorem in lean/SpectreKnot/Move.lean, line 135 · read it in its file
Doc comment
The sibling's side j₁ is as long as side j₀ of c₀.
Statement
theorem L₁ (side_glued : μ.two T = true) : L (μ.c₁ T) (μ.j₁ T) = L μ.c₀ μ.j₀
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- Table 2 glues side `j₀` of `c₀` to side `j₁` of `c₁` have glued := adj₀ (T := T) (μ := μ) rw [ite_eq_left side_glued] at glued exact move_ok.pair _ move_ok.c₀ _ move_ok.j₀ _ _ glued
Compose.Move.OK.cutOK
theorem in lean/SpectreKnot/Move.lean, line 210 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The cut can be made.
Statement
theorem cutOK : (μ.cut T L).OK (Comp.ofLens T L d ω).toGluing where wf
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (40 lines)
move_ok.wf c₀ := by simp only [cut]; rw [ofLens_n]; exact move_ok.c₀ e₀ := by show pos (L μ.c₀) μ.j₀ + μ.r₀ + 1 < (Comp.ofLens T L d ω).toGluing.E μ.c₀ rw [ofLens_E move_ok.c₀] -- side `j₀` is one of the six sides have j₀_lt := move_ok.j₀ -- side `j₀` ends where side `j₀ + 1` begins have side_end := pos_lt_of_pos (L μ.c₀) (move_ok.pos_len _ move_ok.c₀) (show μ.j₀ < μ.j₀ + 1 by omega) (by omega) -- side `j₀ + 1` begins no later than the end of the rim have next_le := pos_mono (L μ.c₀) (show μ.j₀ + 1 ≤ 6 by omega) -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' rw [pos_succ] at next_le; omega mate := by show (Comp.ofLens T L d ω).mate μ.c₀ (pos (L μ.c₀) μ.j₀ + μ.r₀) = if μ.two T = true then some (μ.c₁ T, pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L) else none -- the cut edge lies inside side `j₀` have r₀_le := move_ok.r₀' rw [ofLens_mate move_ok.pos_len move_ok.c₀ move_ok.j₀ (by omega), adj₀] by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued, ite_eq_left side_glued] simp only [Option.map_some, move_ok.L₁ side_glued, r₁] congr 2; omega · rw [ite_eq_right side_glued, ite_eq_right side_glued]; rfl ne side_glued := (move_ok.sib side_glued).2.2.1 e₁ side_glued := by obtain ⟨c₁_lt, j₁_lt, _, _⟩ := move_ok.sib side_glued show pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L + 1 < (Comp.ofLens T L d ω).toGluing.E (μ.c₁ T) rw [ofLens_E c₁_lt] -- side `j₁ + 1` begins no later than the end of the rim have next_le := pos_mono (L (μ.c₁ T)) (show μ.j₁ T + 1 ≤ 6 by omega) -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' -- and at least one edge from its start have r₀_ge := move_ok.r₀ -- the two glued sides have the same length have same_len := move_ok.L₁ side_glued simp only [r₁]; rw [pos_succ] at next_le; omega
Compose.Move.OK.equiv
theorem in lean/SpectreKnot/Move.lean, line 699 · read it in its file
Formalises Lemma 7.1 Lengthening.
Doc comment
Lengthening is subdividing: the composition with the lengthened sides is equivalent to the old one with the edge cut.
Statement
theorem equiv : Gluing.Equiv (G₁) (Gs) where n
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by rw [ofLens_n]; show nk T = (Comp.ofLens T L d ω).toGluing.n; rw [ofLens_n] E c c_lt := move_ok.E_eq (by rwa [ofLens_n] at c_lt) A c c_lt := move_ok.A_eq (by rwa [ofLens_n] at c_lt) B c c_lt := move_ok.B_eq (by rwa [ofLens_n] at c_lt) mate c k c_lt k_lt := move_ok.mate_eq (by rwa [ofLens_n] at c_lt) k_lt
Compose.Move.OK.hit_c₀
theorem in lean/SpectreKnot/Move.lean, line 142 · read it in its file
Doc comment
Only one side of each child is hit: of c₀, side j₀.
Statement
theorem hit_c₀ {j : Nat} : μ.Hit T μ.c₀ j ↔ j = μ.j₀
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by
unfold Hit
constructor
· rintro (⟨_, is_j₀⟩ | ⟨side_glued, same, _⟩)
· exact is_j₀
· exact absurd same.symm (move_ok.sib side_glued).2.2.1
· intro is_j₀; exact Or.inl ⟨rfl, is_j₀⟩Compose.Move.OK.hit_c₁
theorem in lean/SpectreKnot/Move.lean, line 151 · read it in its file
Doc comment
Of the sibling c₁, only side j₁ is hit.
Statement
theorem hit_c₁ (side_glued : μ.two T = true) {j : Nat} : μ.Hit T (μ.c₁ T) j ↔ j = μ.j₁ T
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by
unfold Hit
constructor
· rintro (⟨same, _⟩ | ⟨_, _, is_j₁⟩)
· exact absurd same (move_ok.sib side_glued).2.2.1
· exact is_j₁
· intro is_j₁; exact Or.inr ⟨side_glued, rfl, is_j₁⟩Compose.Move.OK.hit_other
theorem in lean/SpectreKnot/Move.lean, line 160 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
No side of any other child is hit.
Statement
theorem hit_other {c j : Nat} (not_c₀ : c ≠ μ.c₀) (not_c₁ : ¬ (μ.two T = true ∧ c = μ.c₁ T)) : ¬ μ.Hit T c j
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
rintro (⟨is_c₀, _⟩ | ⟨side_glued, is_c₁, _⟩)
· exact not_c₀ is_c₀
· exact not_c₁ ⟨side_glued, is_c₁⟩Compose.Move.OK.keep
theorem in lean/SpectreKnot/Parity.lean, line 259 · read it in its file
Formalises Lemma 7.1 Lengthening.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Lemma 7.1: a move keeps the signature.
Statement
theorem OK.keep {ω : Bool} (move_ok : μ.OK T L d ω) (has_sig : Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)) :
Sig (Comp.ofLens T (μ.lens T L) (μ.d' T L d) ω).toGluing (nk T - 1)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.equiv.symm.sig (move_ok.cutOK.sig has_sig)
Compose.Move.OK.lens_pos_len
theorem in lean/SpectreKnot/Move.lean, line 203 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
After the move every side still has an edge.
Statement
theorem lens_pos_len : ∀ c, c < nk T → ∀ j, j < 6 → 1 ≤ μ.lens T L c j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by intro c c_lt j j_lt -- every side had an edge before have := move_ok.pos_len c c_lt j j_lt simp only [lens]; omega
Compose.Move.OK.mate_eq
theorem in lean/SpectreKnot/Move.lean, line 647 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
The gluings agree.
Statement
theorem mate_eq {c k : Nat} (c_lt : c < nk T) (k_lt : k < (G₁).E c) : (G₁).mate c k = (Gs).mate c k
Names in its proof
Compose.Comp.ofLensCompose.Move.HitCompose.Move.OK.lens_pos_lenCompose.Move.OK.not_hit_partnerCompose.Move.OK.sh_sideCompose.Move.OK.sibCompose.Move.OK.side_uniqueCompose.Move.OK.smate_oldCompose.Move.d'Compose.Move.lensCompose.Move.twoCompose.adjAtCompose.adj_validCompose.decompCompose.ofLens_ECompose.ofLens_mateCompose.pos
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (49 lines)
by rw [ofLens_E c_lt] at k_lt obtain ⟨j, o, j_lt, o_lt, rfl⟩ := decomp (μ.lens T L c) 6 (Nat.le_refl _) k k_lt show (Comp.ofLens T (μ.lens T L) (μ.d' T L d) ω).mate c (pos (μ.lens T L c) j + o) = _ rw [ofLens_mate move_ok.lens_pos_len c_lt j_lt o_lt] by_cases side_hit : μ.Hit T c j -- a lengthened side: the offset, against the old length plus 2 · have o_lt_old := o_lt simp only [lens, ite_eq_left side_hit] at o_lt_old rcases side_hit with ⟨rfl, rfl⟩ | ⟨side_glued, rfl, rfl⟩ · exact move_ok.mate_hit₀ o_lt_old · rw [move_ok.L₁ side_glued] at o_lt_old; exact move_ok.mate_hit₁ side_glued o_lt_old -- a side that is not lengthened keeps its length · have unchanged : ∀ c j, ¬ μ.Hit T c j → μ.lens T L c j = L c j := fun c j not_hit => by simp only [lens]; rw [ite_eq_right not_hit, Nat.add_zero] rw [unchanged c j side_hit] at o_lt rw [← move_ok.sh_side c_lt j_lt o_lt side_hit] -- the edge is not the cut edge of `c₀`, which lies in a lengthened side have not_cut₀ : ¬ (c = μ.c₀ ∧ pos (L c) j + o = pos (L μ.c₀) μ.j₀ + μ.r₀) := by rintro ⟨rfl, same⟩ -- the cut edge lies inside side `j₀` have r₀_le := move_ok.r₀' exact side_hit (Or.inl ⟨rfl, move_ok.side_unique c_lt j_lt move_ok.j₀ o_lt (by omega) same⟩) -- nor the sibling's cut edge have not_cut₁ : ¬ (μ.two T = true ∧ c = μ.c₁ T ∧ pos (L c) j + o = pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L) := by rintro ⟨side_glued, rfl, same⟩ -- the cut edge lies inside the sibling's side `j₁` have r₁_le := move_ok.r₁_le -- the two glued sides have the same length have same_len := move_ok.L₁ side_glued exact side_hit (Or.inr ⟨side_glued, rfl, move_ok.side_unique c_lt j_lt (move_ok.sib side_glued).2.1 o_lt (by omega) same⟩) rw [move_ok.smate_old not_cut₀ not_cut₁] show _ = ((Comp.ofLens T L d ω).mate c (pos (L c) j + o)).map _ rw [ofLens_mate move_ok.pos_len c_lt j_lt o_lt] cases glued : adjAt T c j with | none => rfl | some p => obtain ⟨c', j'⟩ := p obtain ⟨c'_lt, j'_lt, _, _⟩ := adj_valid c_lt j_lt glued -- the partner side is not lengthened either have partner_not_hit := move_ok.not_hit_partner c_lt j_lt glued side_hit -- and it has the same length have same_len := move_ok.pair c c_lt j j_lt c' j' glued simp only [Option.map_some] rw [unchanged c' j' partner_not_hit, show pos (L c') j' + L c' j' - 1 - o = pos (L c') j' + (L c' j' - 1 - o) by omega, move_ok.sh_side c'_lt j'_lt (by omega) partner_not_hit] congr 2; omega
Compose.Move.OK.mate_hit₀
theorem in lean/SpectreKnot/Move.lean, line 555 · read it in its file
Doc comment
The gluing along the lengthened side j₀ of c₀.
Statement
theorem mate_hit₀ {o : Nat} (o_lt : o < L μ.c₀ μ.j₀ + 2) : (adjAt T μ.c₀ μ.j₀).map (fun (c', j') => (c', pos (μ.lens T L c') j' + μ.lens T L c' j' - 1 - o)) = (Gs).mate μ.c₀ (pos (μ.lens T L μ.c₀) μ.j₀ + o)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (49 lines)
by -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' -- and at least one edge from its start have r₀_ge := move_ok.r₀ rw [move_ok.pos_c₀, ite_eq_right (Nat.lt_irrefl _), Nat.add_zero] -- `c₀` is not the sibling, so none of its edges is the sibling's cut edge have not_cut₁ : ∀ k, ¬ (μ.two T = true ∧ μ.c₀ = μ.c₁ T ∧ k = pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L) := fun _ ⟨side_glued, same, _⟩ => (move_ok.sib side_glued).2.2.1 same.symm -- an old edge of side `j₀` other than the cut edge is glued as Table 2 says, with positions moved on have old : ∀ q, q < L μ.c₀ μ.j₀ → q ≠ μ.r₀ → (Gs).mate μ.c₀ ((μ.cut T L).sh μ.c₀ (pos (L μ.c₀) μ.j₀ + q)) = if μ.two T = true then some (μ.c₁ T, (μ.cut T L).sh (μ.c₁ T) (pos (L (μ.c₁ T)) (μ.j₁ T) + L μ.c₀ μ.j₀ - 1 - q)) else none := by intro q q_lt not_r₀ rw [move_ok.smate_old (fun ⟨_, same⟩ => not_r₀ (by omega)) (not_cut₁ _)] show ((Comp.ofLens T L d ω).mate μ.c₀ (pos (L μ.c₀) μ.j₀ + q)).map _ = _ rw [ofLens_mate move_ok.pos_len move_ok.c₀ move_ok.j₀ q_lt, adj₀] by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued, ite_eq_left side_glued]; simp only [Option.map_some, move_ok.L₁ side_glued] · rw [ite_eq_right side_glued, ite_eq_right side_glued]; rfl rw [adj₀] rcases (show o < μ.r₀ ∨ (μ.r₀ ≤ o ∧ o ≤ μ.r₀ + 2) ∨ μ.r₀ + 2 < o by omega) with before | at_cut | after · rw [← move_ok.sh₀_le (p := pos (L μ.c₀) μ.j₀ + o) (by omega), old o (by omega) (by omega)] by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued, ite_eq_left side_glued]; simp only [Option.map_some] rw [move_ok.pos_c₁ side_glued, ite_eq_right (Nat.lt_irrefl _), Nat.add_zero, lens, ite_eq_left ((move_ok.hit_c₁ side_glued).mpr rfl), move_ok.L₁ side_glued, move_ok.sh₁_gt side_glued (by simp only [r₁]; omega)] congr 2; omega · rw [ite_eq_right side_glued, ite_eq_right side_glued]; rfl · obtain ⟨i, i_le, rfl⟩ : ∃ i, i ≤ 2 ∧ o = μ.r₀ + i := ⟨o - μ.r₀, by omega, by omega⟩ rw [show pos (L μ.c₀) μ.j₀ + (μ.r₀ + i) = pos (L μ.c₀) μ.j₀ + μ.r₀ + i by omega, move_ok.smate_new₀ i_le] by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued, ite_eq_left side_glued]; simp only [Option.map_some] rw [move_ok.pos_c₁ side_glued, ite_eq_right (Nat.lt_irrefl _), Nat.add_zero, lens, ite_eq_left ((move_ok.hit_c₁ side_glued).mpr rfl), move_ok.L₁ side_glued] simp only [r₁]; congr 2; omega · rw [ite_eq_right side_glued, ite_eq_right side_glued]; rfl · rw [show pos (L μ.c₀) μ.j₀ + o = pos (L μ.c₀) μ.j₀ + (o - 2) + 2 by omega, ← move_ok.sh₀_gt (p := pos (L μ.c₀) μ.j₀ + (o - 2)) (by omega), old (o - 2) (by omega) (by omega)] by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued, ite_eq_left side_glued]; simp only [Option.map_some] rw [move_ok.pos_c₁ side_glued, ite_eq_right (Nat.lt_irrefl _), Nat.add_zero, lens, ite_eq_left ((move_ok.hit_c₁ side_glued).mpr rfl), move_ok.L₁ side_glued, move_ok.sh₁_le side_glued (by simp only [r₁]; omega)] congr 2; omega · rw [ite_eq_right side_glued, ite_eq_right side_glued]; rfl
Compose.Move.OK.mate_hit₁
theorem in lean/SpectreKnot/Move.lean, line 608 · read it in its file
Doc comment
The gluing along the lengthened side j₁ of the sibling c₁.
Statement
theorem mate_hit₁ (side_glued : μ.two T = true) {o : Nat} (o_lt : o < L μ.c₀ μ.j₀ + 2) : (adjAt T (μ.c₁ T) (μ.j₁ T)).map (fun (c', j') => (c', pos (μ.lens T L c') j' + μ.lens T L c' j' - 1 - o)) = (Gs).mate (μ.c₁ T) (pos (μ.lens T L (μ.c₁ T)) (μ.j₁ T) + o)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (35 lines)
by -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' -- and at least one edge from its start have r₀_ge := move_ok.r₀ -- the two glued sides have the same length have same_len := move_ok.L₁ side_glued -- the offset of the cut edge in the sibling's side have r₁_eq : μ.r₁ L = L μ.c₀ μ.j₀ - 1 - μ.r₀ := rfl obtain ⟨c₁_lt, j₁_lt, c₁_ne, glued_back⟩ := move_ok.sib side_glued rw [move_ok.pos_c₁ side_glued, ite_eq_right (Nat.lt_irrefl _), Nat.add_zero, glued_back]; simp only [Option.map_some] rw [move_ok.pos_c₀, ite_eq_right (Nat.lt_irrefl _), Nat.add_zero, lens, ite_eq_left (move_ok.hit_c₀.mpr rfl)] -- the sibling is not `c₀`, so none of its edges is the cut edge of `c₀` have not_cut₀ : ∀ k, ¬ (μ.c₁ T = μ.c₀ ∧ k = pos (L μ.c₀) μ.j₀ + μ.r₀) := fun _ ⟨same, _⟩ => c₁_ne same -- an old edge of side `j₁` other than the cut edge is glued as Table 2 says, with positions moved on have old : ∀ q, q < L μ.c₀ μ.j₀ → q ≠ μ.r₁ L → (Gs).mate (μ.c₁ T) ((μ.cut T L).sh (μ.c₁ T) (pos (L (μ.c₁ T)) (μ.j₁ T) + q)) = some (μ.c₀, (μ.cut T L).sh μ.c₀ (pos (L μ.c₀) μ.j₀ + L μ.c₀ μ.j₀ - 1 - q)) := by intro q q_lt not_r₁ rw [move_ok.smate_old (not_cut₀ _) (fun ⟨_, _, same⟩ => not_r₁ (by omega))] show ((Comp.ofLens T L d ω).mate (μ.c₁ T) (pos (L (μ.c₁ T)) (μ.j₁ T) + q)).map _ = _ rw [ofLens_mate move_ok.pos_len c₁_lt j₁_lt (by omega), glued_back]; simp only [Option.map_some] rcases (show o < μ.r₁ L ∨ (μ.r₁ L ≤ o ∧ o ≤ μ.r₁ L + 2) ∨ μ.r₁ L + 2 < o by omega) with before | at_cut | after · rw [← move_ok.sh₁_le side_glued (p := pos (L (μ.c₁ T)) (μ.j₁ T) + o) (by omega), old o (by simp only [r₁] at before; omega) (by omega), move_ok.sh₀_gt (by simp only [r₁] at before; omega)] congr 2; omega · obtain ⟨i, i_le, rfl⟩ : ∃ i, i ≤ 2 ∧ o = μ.r₁ L + i := ⟨o - μ.r₁ L, by omega, by omega⟩ rw [show pos (L (μ.c₁ T)) (μ.j₁ T) + (μ.r₁ L + i) = pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L + i by omega, move_ok.smate_new₁ side_glued i_le] simp only [r₁]; congr 2; omega · rw [show pos (L (μ.c₁ T)) (μ.j₁ T) + o = pos (L (μ.c₁ T)) (μ.j₁ T) + (o - 2) + 2 by omega, ← move_ok.sh₁_gt side_glued (p := pos (L (μ.c₁ T)) (μ.j₁ T) + (o - 2)) (by omega), old (o - 2) (by simp only [r₁] at after; omega) (by omega), move_ok.sh₀_le (by simp only [r₁] at after; omega)] congr 2; omega
Compose.Move.OK.not_hit_partner
theorem in lean/SpectreKnot/Move.lean, line 325 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
The partner of a side that is not lengthened is not lengthened either.
Statement
theorem not_hit_partner {c j c' j' : Nat} (c_lt : c < nk T) (j_lt : j < 6) (glued : adjAt T c j = some (c', j'))
(not_hit : ¬ μ.Hit T c j) : ¬ μ.Hit T c' j'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by obtain ⟨c'_lt, j'_lt, c'_ne, glued_back⟩ := adj_valid c_lt j_lt glued rintro (⟨rfl, rfl⟩ | ⟨side_glued, rfl, rfl⟩) -- (c', j') = (c₀, j₀): then (c, j) is the partner of (c₀, j₀), which is hit · have partner := adj₀ (T := T) (μ := μ) rw [glued_back] at partner by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued] at partner simp only [Option.some.injEq, Prod.mk.injEq] at partner exact not_hit (Or.inr ⟨side_glued, partner.1, partner.2⟩) · rw [ite_eq_right side_glued] at partner; contradiction -- (c', j') = (c₁, j₁): then (c, j) is the partner of (c₁, j₁), that is (c₀, j₀) · have partner := (move_ok.sib side_glued).2.2.2 rw [glued_back] at partner simp only [Option.some.injEq, Prod.mk.injEq] at partner exact not_hit (Or.inl ⟨partner.1, partner.2⟩)
Compose.Move.OK.pos_c₀
theorem in lean/SpectreKnot/Move.lean, line 166 · read it in its file
Doc comment
Positions of the new composition, on c₀: the sides after j₀ begin two edges later.
Statement
theorem pos_c₀ (j : Nat) : pos (μ.lens T L μ.c₀) j = pos (L μ.c₀) j + if μ.j₀ < j then 2 else 0
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by induction j with | zero => simp [pos] | succ j ih => rw [pos_succ, pos_succ, ih] simp only [lens] by_cases is_j₀ : j = μ.j₀ · rw [ite_eq_left (move_ok.hit_c₀.mpr is_j₀), ite_eq_right (by omega), ite_eq_left (by omega)]; omega · rw [ite_eq_right (fun hit => is_j₀ (move_ok.hit_c₀.mp hit))] by_cases after : μ.j₀ < j · rw [ite_eq_left after, ite_eq_left (by omega)]; omega · rw [ite_eq_right after, ite_eq_right (by omega)]; omega
Compose.Move.OK.pos_c₁
theorem in lean/SpectreKnot/Move.lean, line 180 · read it in its file
Doc comment
Positions of the new composition, on the sibling c₁: the sides after j₁ begin two edges later.
Statement
theorem pos_c₁ (side_glued : μ.two T = true) (j : Nat) : pos (μ.lens T L (μ.c₁ T)) j = pos (L (μ.c₁ T)) j + if μ.j₁ T < j then 2 else 0
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by induction j with | zero => simp [pos] | succ j ih => rw [pos_succ, pos_succ, ih] simp only [lens] by_cases is_j₁ : j = μ.j₁ T · rw [ite_eq_left ((move_ok.hit_c₁ side_glued).mpr is_j₁), ite_eq_right (by omega), ite_eq_left (by omega)]; omega · rw [ite_eq_right (fun hit => is_j₁ ((move_ok.hit_c₁ side_glued).mp hit))] by_cases after : μ.j₁ T < j · rw [ite_eq_left after, ite_eq_left (by omega)]; omega · rw [ite_eq_right after, ite_eq_right (by omega)]; omega
Compose.Move.OK.pos_other
theorem in lean/SpectreKnot/Move.lean, line 195 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Positions of the new composition, on every other child: unchanged.
Statement
theorem pos_other {c : Nat} (not_c₀ : c ≠ μ.c₀) (not_c₁ : ¬ (μ.two T = true ∧ c = μ.c₁ T)) (j : Nat) :
pos (μ.lens T L c) j = pos (L c) j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by induction j with | zero => rfl | succ j ih => rw [pos_succ, pos_succ, ih]; simp only [lens]; rw [ite_eq_right (move_ok.hit_other not_c₀ not_c₁)]; omega
Compose.Move.OK.r₁_ge
theorem in lean/SpectreKnot/Move.lean, line 486 · read it in its file
Doc comment
The cut edge is not the first edge of the sibling's side.
Statement
theorem r₁_ge : 1 ≤ μ.r₁ L
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- the cut edge is not the last edge of side `j₀` have := move_ok.r₀' simp only [r₁]; omega
Compose.Move.OK.r₁_le
theorem in lean/SpectreKnot/Move.lean, line 492 · read it in its file
Doc comment
Nor the last.
Statement
theorem r₁_le : μ.r₁ L + 2 ≤ L μ.c₀ μ.j₀
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- the cut edge is not the first edge of side `j₀` have := move_ok.r₀ -- nor the last have := move_ok.r₀' simp only [r₁]; omega
Compose.Move.OK.sE_oth
theorem in lean/SpectreKnot/Move.lean, line 357 · read it in its file
Doc comment
In the subdivided gluing, every other child keeps its rim length.
Statement
theorem sE_oth {c : Nat} (not_c₀ : c ≠ μ.c₀) (not_c₁ : ¬ (μ.two T = true ∧ c = μ.c₁ T)) : (Gs).E c = (G₀).E c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.E_other not_c₀ not_c₁
Compose.Move.OK.sE₀
theorem in lean/SpectreKnot/Move.lean, line 351 · read it in its file
Doc comment
In the subdivided gluing, c₀ has two more edges.
Statement
theorem sE₀ : (Gs).E μ.c₀ = (G₀).E μ.c₀ + 2
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.E_c₀
Compose.Move.OK.sE₁
theorem in lean/SpectreKnot/Move.lean, line 354 · read it in its file
Doc comment
In the subdivided gluing, the sibling has two more edges.
Statement
theorem sE₁ (side_glued : μ.two T = true) : (Gs).E (μ.c₁ T) = (G₀).E (μ.c₁ T) + 2
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.E_c₁ side_glued
Compose.Move.OK.sh_last
theorem in lean/SpectreKnot/StepMap.lean, line 231 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The last vertex of a child moves with the end of its rim.
Statement
theorem sh_last {c : Nat} (hc : c < nk T) :
(μ.cut T L).sh c (pos (L c) 6 - 1) = pos (μ.lens T L c) 6 - 1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (32 lines)
by -- the last side has an edge, after the move have last_pos := ok.lens_pos_len c hc 5 (by omega) -- and before have last_pos' := ok.pos_len c hc 5 (by omega) -- so the rim has an edge have rim_pos : 1 ≤ pos (L c) 6 := by rw [pos_succ]; omega -- the end of the rim moves to the new end have rim_end := ok.shpos hc (show 6 ≤ 6 by omega) rcases ok.cutOK.sh_cases c (pos (L c) 6 - 1) with ⟨last_stays, last_before₀, last_before₁⟩ | ⟨last_moves, last_after⟩ · rcases ok.cutOK.sh_cases c (pos (L c) 6) with ⟨end_stays, _, _⟩ | ⟨end_moves, end_after⟩ · rw [last_stays]; rw [end_stays] at rim_end; omega · -- the end moves on but the last vertex does not: then the cut edge would be the last edge rcases end_after with ⟨on_c₀, past_e₀⟩ | ⟨shared, on_c₁, past_e₁⟩ · have last_le := last_before₀ on_c₀ -- the last vertex is not past the cut -- the cut edge is not the last edge of `c₀` have cut_lt := ok.cutOK.e₀ rw [← on_c₀, ofLens_E hc] at cut_lt omega · have last_le := last_before₁ ⟨shared, on_c₁⟩ -- the last vertex is not past the cut -- the cut edge is not the last edge of `c₁` have cut_lt := ok.cutOK.e₁ shared rw [← on_c₁, ofLens_E hc] at cut_lt omega · rcases ok.cutOK.sh_cases c (pos (L c) 6) with ⟨end_stays, end_before₀, end_before₁⟩ | ⟨end_moves, _⟩ · -- the last vertex moves on but the end does not: impossible, the end comes after it rcases last_after with ⟨on_c₀, past_e₀⟩ | ⟨shared, on_c₁, past_e₁⟩ · have := end_before₀ on_c₀ -- the end is not past the cut on `c₀` omega · have := end_before₁ ⟨shared, on_c₁⟩ -- the end is not past the cut on `c₁` omega · rw [last_moves]; rw [end_moves] at rim_end; omega
Compose.Move.OK.sh_one
theorem in lean/SpectreKnot/StepMap.lean, line 222 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Vertex 1 stays put (the cut edge is never the first edge of a child).
Statement
theorem sh_one (c : Nat) : (μ.cut T L).sh c 1 = 1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the cut edge is not the first edge of its side have cut_after_start := ok.r₀ -- nor its last have cut_before_end := ok.r₀' unfold Cut.sh rw [ite_eq_right (by simp only [Move.cut]; omega), ite_eq_right (by simp only [Move.cut, Move.r₁]; omega)]
Compose.Move.OK.sh_oth
theorem in lean/SpectreKnot/Move.lean, line 273 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
On every other child, positions stay put.
Statement
theorem sh_oth {c p : Nat} (not_c₀ : c ≠ μ.c₀) (not_c₁ : ¬ (μ.two T = true ∧ c = μ.c₁ T)) :
(μ.cut T L).sh c p = p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.sh_other (G := (Comp.ofLens T L d ω).toGluing) not_c₀ not_c₁
Compose.Move.OK.sh_side
theorem in lean/SpectreKnot/Move.lean, line 278 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
Positions in a side that is not lengthened move with the sides before it.
Statement
theorem sh_side {c j q : Nat} (c_lt : c < nk T) (j_lt : j < 6) (q_lt : q < L c j) (not_hit : ¬ μ.Hit T c j) :
(μ.cut T L).sh c (pos (L c) j + q) = pos (μ.lens T L c) j + q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (34 lines)
by -- the cut edge is at least two edges from the end of side `j₀` have r₀_le := move_ok.r₀' by_cases is_c₀ : c = μ.c₀ · subst is_c₀ -- side `j` is not the side cut have not_j₀ : j ≠ μ.j₀ := fun is_j₀ => not_hit (move_ok.hit_c₀.mpr is_j₀) rw [move_ok.pos_c₀] by_cases before : j < μ.j₀ -- side `j` ends no later than side `j₀` begins · have side_ends := pos_mono (L μ.c₀) (show j + 1 ≤ μ.j₀ by omega) rw [pos_succ] at side_ends rw [move_ok.sh₀_le (by omega), ite_eq_right (by omega)]; omega -- side `j` begins no earlier than side `j₀` ends · have side_begins := pos_mono (L μ.c₀) (show μ.j₀ + 1 ≤ j by omega) rw [pos_succ] at side_begins rw [move_ok.sh₀_gt (by omega), ite_eq_left (by omega)]; omega · by_cases is_c₁ : μ.two T = true ∧ c = μ.c₁ T · obtain ⟨side_glued, rfl⟩ := is_c₁ -- side `j` is not the sibling's side cut have not_j₁ : j ≠ μ.j₁ T := fun is_j₁ => not_hit ((move_ok.hit_c₁ side_glued).mpr is_j₁) -- the two glued sides have the same length have same_len := move_ok.L₁ side_glued rw [move_ok.pos_c₁ side_glued] by_cases before : j < μ.j₁ T -- side `j` ends no later than side `j₁` begins · have side_ends := pos_mono (L (μ.c₁ T)) (show j + 1 ≤ μ.j₁ T by omega) rw [pos_succ] at side_ends rw [move_ok.sh₁_le side_glued (by simp only [r₁]; omega), ite_eq_right (by omega)]; omega -- side `j` begins no earlier than side `j₁` ends · have side_begins := pos_mono (L (μ.c₁ T)) (show μ.j₁ T + 1 ≤ j by omega) rw [pos_succ] at side_begins rw [move_ok.sh₁_gt side_glued (by simp only [r₁]; omega), ite_eq_left (by omega)]; omega · rw [move_ok.sh_oth is_c₀ is_c₁, move_ok.pos_other is_c₀ is_c₁]
Compose.Move.OK.shpos
theorem in lean/SpectreKnot/StepMap.lean, line 181 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The vertices of the children stay put under a move: the cut takes the start of side v of child c to the start of side v with the new lengths.
Statement
theorem shpos {c v : Nat} (hc : c < nk T) (hv : v ≤ 6) :
(μ.cut T L).sh c (pos (L c) v) = pos (μ.lens T L c) v
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (38 lines)
by -- the cut edge is not the last edge of side `j₀` have cut_before_end := ok.r₀' -- nor its first have cut_after_start := ok.r₀ -- `j₀` is a side have j₀_lt := ok.j₀ by_cases on_c₀ : c = μ.c₀ · subst on_c₀ rw [ok.pos_c₀] by_cases after_j₀ : μ.j₀ < v · -- side `v` starts after the cut: -- side `j₀` ends no later than side `v` starts have j₀_end_le := pos_mono (L μ.c₀) (show μ.j₀ + 1 ≤ v by omega) rw [pos_succ] at j₀_end_le rw [ite_eq_left after_j₀, ok.sh₀_gt (by omega)] · -- side `v` starts before the cut: -- side `v` starts no later than side `j₀` have := pos_mono (L μ.c₀) (show v ≤ μ.j₀ by omega) rw [ite_eq_right after_j₀, ok.sh₀_le (by omega), Nat.add_zero] · by_cases on_c₁ : μ.two T = true ∧ c = μ.c₁ T · obtain ⟨shared, rfl⟩ := on_c₁ -- the sibling's side `j₁` is as long as side `j₀` have same_len := ok.L₁ shared -- and `j₁` is a side have j₁_lt := (ok.sib shared).2.1 rw [ok.pos_c₁ shared] by_cases after_j₁ : μ.j₁ T < v · -- side `v` starts after the cut: -- side `j₁` ends no later than side `v` starts have j₁_end_le := pos_mono (L (μ.c₁ T)) (show μ.j₁ T + 1 ≤ v by omega) rw [pos_succ] at j₁_end_le rw [ite_eq_left after_j₁, ok.sh₁_gt shared (by simp only [Move.r₁]; omega)] · -- side `v` starts before the cut: -- side `v` starts no later than side `j₁` have := pos_mono (L (μ.c₁ T)) (show v ≤ μ.j₁ T by omega) rw [ite_eq_right after_j₁, ok.sh₁_le shared (by simp only [Move.r₁]; omega), Nat.add_zero] · rw [ok.sh_oth on_c₀ on_c₁, ok.pos_other on_c₀ on_c₁]
Compose.Move.OK.sh₀_gt
theorem in lean/SpectreKnot/Move.lean, line 259 · read it in its file
Doc comment
On c₀, positions after the cut edge move on by 2.
Statement
theorem sh₀_gt {p : Nat} (p_gt : pos (L μ.c₀) μ.j₀ + μ.r₀ < p) : (μ.cut T L).sh μ.c₀ p = p + 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.sh_c₀_gt (G := (Comp.ofLens T L d ω).toGluing) p_gt
Compose.Move.OK.sh₀_le
theorem in lean/SpectreKnot/Move.lean, line 255 · read it in its file
Doc comment
On c₀, positions up to the cut edge stay put.
Statement
theorem sh₀_le {p : Nat} (p_le : p ≤ pos (L μ.c₀) μ.j₀ + μ.r₀) : (μ.cut T L).sh μ.c₀ p = p
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.sh_c₀_le (G := (Comp.ofLens T L d ω).toGluing) p_le
Compose.Move.OK.sh₁_gt
theorem in lean/SpectreKnot/Move.lean, line 268 · read it in its file
Doc comment
On the sibling, positions after its cut edge move on by 2.
Statement
theorem sh₁_gt (side_glued : μ.two T = true) {p : Nat} (p_gt : pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L < p) :
(μ.cut T L).sh (μ.c₁ T) p = p + 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.sh_c₁_gt (G := (Comp.ofLens T L d ω).toGluing) side_glued p_gt
Compose.Move.OK.sh₁_le
theorem in lean/SpectreKnot/Move.lean, line 263 · read it in its file
Doc comment
On the sibling, positions up to its cut edge stay put.
Statement
theorem sh₁_le (side_glued : μ.two T = true) {p : Nat} (p_le : p ≤ pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L) :
(μ.cut T L).sh (μ.c₁ T) p = p
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.sh_c₁_le (G := (Comp.ofLens T L d ω).toGluing) side_glued p_le
Compose.Move.OK.sib
theorem in lean/SpectreKnot/Move.lean, line 127 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If side j₀ of c₀ is glued, the sibling c₁ is a different child, and its side j₁ is glued back.
Statement
theorem sib (side_glued : μ.two T = true) :
μ.c₁ T < nk T ∧ μ.j₁ T < 6 ∧ μ.c₁ T ≠ μ.c₀ ∧ adjAt T (μ.c₁ T) (μ.j₁ T) = some (μ.c₀, μ.j₀)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- Table 2 glues side `j₀` of `c₀` to side `j₁` of `c₁` have glued := adj₀ (T := T) (μ := μ) rw [ite_eq_left side_glued] at glued exact adj_valid move_ok.c₀ move_ok.j₀ glued
Compose.Move.OK.side_unique
theorem in lean/SpectreKnot/Move.lean, line 315 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
A position determines its side and offset.
Statement
theorem side_unique {c j j' o o' : Nat} (c_lt : c < nk T) (j_lt : j < 6) (j'_lt : j' < 6) (o_lt : o < L c j)
(o'_lt : o' < L c j') (same : pos (L c) j + o = pos (L c) j' + o') : j = j'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the side lookup finds side `j` at the first position have finds_j := sideIdx_eq (L c) (move_ok.pos_len c c_lt) j_lt o_lt -- and side `j'` at the second have finds_j' := sideIdx_eq (L c) (move_ok.pos_len c c_lt) j'_lt o'_lt rw [same] at finds_j rw [finds_j] at finds_j'; exact finds_j'
Compose.Move.OK.smate_new₀
theorem in lean/SpectreKnot/Move.lean, line 368 · read it in its file
Doc comment
In the subdivided gluing, the three new edges of c₀ are glued, in reverse order, to the sibling's (or lie on the rim).
Statement
theorem smate_new₀ {i : Nat} (i_le : i ≤ 2) : (Gs).mate μ.c₀ (pos (L μ.c₀) μ.j₀ + μ.r₀ + i) = if μ.two T = true then some (μ.c₁ T, pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L + 2 - i) else none
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.mate_new₀ i_le
Compose.Move.OK.smate_new₁
theorem in lean/SpectreKnot/Move.lean, line 374 · read it in its file
Doc comment
In the subdivided gluing, the three new edges of the sibling are glued, in reverse order, to those of c₀.
Statement
theorem smate_new₁ (side_glued : μ.two T = true) {i : Nat} (i_le : i ≤ 2) :
(Gs).mate (μ.c₁ T) (pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L + i) = some (μ.c₀, pos (L μ.c₀) μ.j₀ + μ.r₀ + 2 - i)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.mate_new₁ side_glued i_le
Compose.Move.OK.smate_old
theorem in lean/SpectreKnot/Move.lean, line 361 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
In the subdivided gluing, an edge that is not cut is glued as before (with positions moved on).
Statement
theorem smate_old {c k : Nat} (not_cut₀ : ¬ (c = μ.c₀ ∧ k = pos (L μ.c₀) μ.j₀ + μ.r₀)) (not_cut₁ : ¬ (μ.two T = true ∧ c = μ.c₁ T ∧ k = pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L)) : (Gs).mate c ((μ.cut T L).sh c k) = ((G₀).mate c k).map fun (c₂, k₂) => (c₂, (μ.cut T L).sh c₂ k₂)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
move_ok.cutOK.mate_old not_cut₀ not_cut₁
Compose.Move.adj₀
theorem in lean/SpectreKnot/Move.lean, line 78 · read it in its file
Doc comment
Side j₀ of c₀ is glued to side j₁ of the sibling c₁ if two, and lies on the parent's rim otherwise.
Statement
theorem adj₀ : adjAt T μ.c₀ μ.j₀ = if μ.two T = true then some (μ.c₁ T, μ.j₁ T) else none
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
unfold two c₁ j₁
cases adjAt T μ.c₀ μ.j₀ <;> rflCompose.Move.adm_shorten
theorem in lean/SpectreKnot/Parity.lean, line 222 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Undoing a move from admissible lengths gives admissible lengths, with any Σ offset d₀ that suits them.
Statement
theorem adm_shorten (adm : Adm T L d) (c₀_lt : μ.c₀ < nk T) (j₀_lt : μ.j₀ < 6) (long₀ : L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀) {d₀ : Nat} (d₀_ge : dOff 1 ≤ d₀) (d₀_par : (d₀ - dOff 1) % 2 = 0) (sig_room : ∀ c, c < nk T → kidAt T c = .Sigma → d₀ + L₁ T c 5 ≤ μ.shorten T L c 5 + dOff 1) : Adm T (μ.shorten T L) d₀ where len c c_lt j j_lt
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- the side is as long as at level 1 or longer, by an even number of edges have := adm.len c c_lt j j_lt simp only [shorten] by_cases hit : μ.Hit T c j -- a side lengthened is at least two edges longer than at level 1 · have := hit_big adm c₀_lt j₀_lt long₀ hit rw [ite_eq_left hit]; omega · rw [ite_eq_right hit]; omega pair c c_lt j j_lt c' j' glued := by simp only [shorten] rw [adm.pair c c_lt j j_lt c' j' glued] by_cases hit : μ.Hit T c j · rw [ite_eq_left hit, ite_eq_left ((hit_partner c₀_lt j₀_lt c_lt j_lt glued).mp hit)] · rw [ite_eq_right hit, ite_eq_right (fun partner_hit => hit ((hit_partner c₀_lt j₀_lt c_lt j_lt glued).mpr partner_hit))] d_ge := d₀_ge d_par := d₀_par sig := sig_room
Compose.Move.cut
def in lean/SpectreKnot/Move.lean, line 42 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The cut, in the positions of the old composition.
Statement
def cut (L : Nat → Nat → Nat) : Cut :=
⟨μ.c₀, pos (L μ.c₀) μ.j₀ + μ.r₀, μ.c₁ T, pos (L (μ.c₁ T)) (μ.j₁ T) + μ.r₁ L, μ.two T⟩
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.c₁
def in lean/SpectreKnot/Move.lean, line 27 · read it in its file
Doc comment
The sibling and its side (meaningful when two).
Statement
def c₁ : Nat := ((adjAt T μ.c₀ μ.j₀).getD (0, 0)).1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.d'
def in lean/SpectreKnot/Move.lean, line 46 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The new Σ offset: the corner moves on by 2 if the edge cut lies before it on the Σ child's side 5.
Statement
def d' (L : Nat → Nat → Nat) (d : Nat) : Nat := d + (if kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5 ∧ μ.r₀ + 2 ≤ d then 2 else 0) + (if μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma ∧ μ.j₁ T = 5 ∧ μ.r₁ L + 2 ≤ d then 2 else 0)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.d'_c₀
theorem in lean/SpectreKnot/Move.lean, line 96 · read it in its file
Doc comment
If side j₀ of c₀ is side 5 of the Σ child, the Σ offset moves on by 2 exactly when the cut lies before the corner.
Statement
theorem d'_c₀ (is_sigma : kidAt T μ.c₀ = .Sigma) (is_5 : μ.j₀ = 5) (not_sigma₁ : ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma ∧ μ.j₁ T = 5)) : μ.d' T L d = d + if μ.r₀ + 2 ≤ d then 2 else 0
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by unfold d' rw [ite_eq_right (show ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma ∧ μ.j₁ T = 5 ∧ μ.r₁ L + 2 ≤ d) from fun ⟨side_glued, sib_sigma, sib_5, _⟩ => not_sigma₁ ⟨side_glued, sib_sigma, sib_5⟩), Nat.add_zero] by_cases before : μ.r₀ + 2 ≤ d · rw [ite_eq_left ⟨is_sigma, is_5, before⟩, ite_eq_left before] · rw [ite_eq_right (fun ⟨_, _, before'⟩ => before before'), ite_eq_right before]
Compose.Move.d'_c₁
theorem in lean/SpectreKnot/Move.lean, line 108 · read it in its file
Doc comment
If the sibling's side j₁ is side 5 of the Σ child, the Σ offset moves on by 2 exactly when the cut lies before the corner.
Statement
theorem d'_c₁ (side_glued : μ.two T = true) (is_sigma : kidAt T (μ.c₁ T) = .Sigma) (is_5 : μ.j₁ T = 5) (not_sigma₀ : ¬ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5)) : μ.d' T L d = d + if μ.r₁ L + 2 ≤ d then 2 else 0
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by unfold d' rw [ite_eq_right (show ¬ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5 ∧ μ.r₀ + 2 ≤ d) from fun ⟨c₀_sigma, c₀_5, _⟩ => not_sigma₀ ⟨c₀_sigma, c₀_5⟩), Nat.add_zero] by_cases before : μ.r₁ L + 2 ≤ d · rw [ite_eq_left ⟨side_glued, is_sigma, is_5, before⟩, ite_eq_left before] · rw [ite_eq_right (fun ⟨_, _, _, before'⟩ => before before'), ite_eq_right before]
Compose.Move.d'_eq
theorem in lean/SpectreKnot/Move.lean, line 85 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If neither side lengthened is side 5 of the Σ child, the Σ offset does not change.
Statement
theorem d'_eq (not_sigma₀ : ¬ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5))
(not_sigma₁ : ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma ∧ μ.j₁ T = 5)) : μ.d' T L d = d
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by unfold d' rw [ite_eq_right (show ¬ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5 ∧ μ.r₀ + 2 ≤ d) from fun ⟨is_sigma, is_5, _⟩ => not_sigma₀ ⟨is_sigma, is_5⟩), ite_eq_right (show ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma ∧ μ.j₁ T = 5 ∧ μ.r₁ L + 2 ≤ d) from fun ⟨side_glued, is_sigma, is_5, _⟩ => not_sigma₁ ⟨side_glued, is_sigma, is_5⟩)] rfl
Compose.Move.excess_shorten
theorem in lean/SpectreKnot/Parity.lean, line 247 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Undoing a move lowers the excess over the level-1 lengths.
Statement
theorem excess_shorten (adm : Adm T L d) (c₀_lt : μ.c₀ < nk T) (j₀_lt : μ.j₀ < 6)
(long₀ : L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀) : excess T (μ.shorten T L) < excess T L
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by unfold excess -- no side's excess grows have no_growth : ∀ c j, μ.shorten T L c j - L₁ T c j ≤ L c j - L₁ T c j := fun c j => by simp only [shorten]; omega refine tot_lt (fun c _ => tot_le (fun j _ => no_growth c j)) c₀_lt (tot_lt (fun j _ => no_growth _ j) j₀_lt ?_) simp only [shorten] rw [ite_eq_left (show μ.Hit T μ.c₀ μ.j₀ from Or.inl ⟨rfl, rfl⟩)] omega
Compose.Move.hit_big
theorem in lean/SpectreKnot/Parity.lean, line 198 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The sides lengthened are at least two edges longer than at level 1.
Statement
theorem hit_big (adm : Adm T L d) (c₀_lt : μ.c₀ < nk T) (j₀_lt : μ.j₀ < 6) (long₀ : L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀)
{c j : Nat} (hit : μ.Hit T c j) : L₁ T c j + 2 ≤ L c j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by rcases hit with ⟨rfl, rfl⟩ | ⟨side_glued, rfl, rfl⟩ · exact long₀ -- the sibling's side: Table 2 glues side `j₀` of `c₀` to it · have glued := adj₀ (T := T) (μ := μ) rw [ite_eq_left side_glued] at glued rw [adm.pair _ c₀_lt _ j₀_lt _ _ glued] show letterLen 1 (letterOf (kidAt T (μ.c₁ T)) (μ.j₁ T)) + 2 ≤ _ rw [pair_letter c₀_lt j₀_lt glued] exact long₀
Compose.Move.hit_partner
theorem in lean/SpectreKnot/Parity.lean, line 191 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Glued sides are both lengthened or both not.
Statement
theorem hit_partner (c₀_lt : μ.c₀ < nk T) (j₀_lt : μ.j₀ < 6) {c j c' j' : Nat} (c_lt : c < nk T) (j_lt : j < 6)
(glued : adjAt T c j = some (c', j')) : μ.Hit T c j ↔ μ.Hit T c' j'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
⟨hit_partner_mp c₀_lt j₀_lt glued, hit_partner_mp c₀_lt j₀_lt (adj_valid c_lt j_lt glued).2.2.2⟩
Compose.Move.hit_partner_mp
theorem in lean/SpectreKnot/Parity.lean, line 170 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If a side is lengthened, so is the side glued to it.
Statement
theorem hit_partner_mp (c₀_lt : μ.c₀ < nk T) (j₀_lt : μ.j₀ < 6) {c j c' j' : Nat}
(glued : adjAt T c j = some (c', j')) (hit : μ.Hit T c j) : μ.Hit T c' j'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by rcases hit with ⟨rfl, rfl⟩ | ⟨side_glued, rfl, rfl⟩ -- (c, j) = (c₀, j₀): Table 2 glues it to the sibling's side, which is hit · have partner := adj₀ (T := T) (μ := μ) rw [glued] at partner by_cases side_glued : μ.two T = true · rw [ite_eq_left side_glued] at partner simp only [Option.some.injEq, Prod.mk.injEq] at partner exact Or.inr ⟨side_glued, partner.1, partner.2⟩ · rw [ite_eq_right side_glued] at partner; contradiction -- (c, j) = (c₁, j₁): Table 2 glues side `j₀` of `c₀` to it · have sib_glued := adj₀ (T := T) (μ := μ) rw [ite_eq_left side_glued] at sib_glued -- so the sibling's side is glued back to side `j₀` of `c₀` have glued_back := (adj_valid c₀_lt j₀_lt sib_glued).2.2.2 rw [glued] at glued_back simp only [Option.some.injEq, Prod.mk.injEq] at glued_back exact Or.inl ⟨glued_back.1, glued_back.2⟩
Compose.Move.j₁
def in lean/SpectreKnot/Move.lean, line 28 · read it in its file
Statement
def j₁ : Nat := ((adjAt T μ.c₀ μ.j₀).getD (0, 0)).2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.lens
def in lean/SpectreKnot/Move.lean, line 36 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The new side lengths.
Statement
def lens (L : Nat → Nat → Nat) (c j : Nat) : Nat := L c j + if μ.Hit T c j then 2 else 0
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.lens_shorten
theorem in lean/SpectreKnot/Parity.lean, line 211 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Undoing a move and then making it gives back L.
Statement
theorem lens_shorten (adm : Adm T L d) (c₀_lt : μ.c₀ < nk T) (j₀_lt : μ.j₀ < 6)
(long₀ : L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀) : μ.lens T (μ.shorten T L) = L
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by funext c j simp only [lens, shorten] by_cases hit : μ.Hit T c j -- a side lengthened has at least two edges to spare · have := hit_big adm c₀_lt j₀_lt long₀ hit rw [ite_eq_left hit]; omega · rw [ite_eq_right hit]; omega
Compose.Move.mkOK
theorem in lean/SpectreKnot/Parity.lean, line 266 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The conditions of a move from the shortened lengths: a move cutting side j₀ of child c₀ at offset r₀, at least one edge from its start and three from its end (with the lengths after the move), can be made at admissible shortened lengths whose composition is well formed, if it is clear of the Σ corner.
Statement
theorem mkOK {ω : Bool} (hc₀ : μ.c₀ < nk T) (hj₀ : μ.j₀ < 6)
(r₀_pos : 1 ≤ μ.r₀) (r₀_room : μ.r₀ + 4 ≤ L μ.c₀ μ.j₀) {d₀ : Nat} (adm₀ : Adm T (μ.shorten T L) d₀)
(cut₀ : kidAt T μ.c₀ = .Sigma → μ.j₀ = 5 → d₀ + 1 ≤ μ.r₀ ∨ μ.r₀ + 2 ≤ d₀)
(cut₁ : μ.two T = true → kidAt T (μ.c₁ T) ≠ .Sigma ∨ μ.j₁ T ≠ 5)
(wf₀ : (Comp.ofLens T (μ.shorten T L) d₀ ω).toGluing.WF) : μ.OK T (μ.shorten T L) d₀ ω
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (23 lines)
{ wf := wf₀
pos_len := fun c hc j hj => by
-- each side is at least as long as at level 1
have := (adm₀.len c hc j hj).1
-- where it has at least 5 edges
have := L₁_ge T c j
omega
pair := adm₀.pair
c₀ := hc₀
j₀ := hj₀
r₀ := r₀_pos
r₀' := by simp only [shorten]; rw [ite_eq_left (show μ.Hit T μ.c₀ μ.j₀ from Or.inl ⟨rfl, rfl⟩)]; omega
sig := fun c hc is_sigma => by
-- room for the Σ corner on side 5, as at level 1
have := adm₀.sig c hc is_sigma
-- and `d₀ ≥ d₁`
have := adm₀.d_ge
rw [L₁_sig is_sigma, dOff_one] at *
omega
sig1 := fun c c' hc hc' is_sigma is_sigma' => sigma_unique T c hc c' hc' is_sigma is_sigma'
cut₀ := cut₀
cut₁ := fun shared is_sigma side_five => by
rcases cut₁ shared with not_sigma | not_five <;> contradiction }Compose.Move.r₁
def in lean/SpectreKnot/Move.lean, line 39 · read it in its file
Doc comment
The offset of the cut edge in the sibling's side.
Statement
def r₁ (L : Nat → Nat → Nat) : Nat := L μ.c₀ μ.j₀ - 1 - μ.r₀
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.shorten
def in lean/SpectreKnot/Parity.lean, line 167 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The side lengths before the move.
Statement
def shorten (T : Kind) (μ : Move) (L : Nat → Nat → Nat) (c j : Nat) : Nat := L c j - if μ.Hit T c j then 2 else 0
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.Move.two
def in lean/SpectreKnot/Move.lean, line 24 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Is side j₀ of child c₀ glued to a sibling?
Statement
def two : Bool := (adjAt T μ.c₀ μ.j₀).isSome
Names in its proof
Named in the proofs of
Compose.Move.cutCompose.Move.d'Compose.Move.OKCompose.Move.adj₀Compose.Move.d'_eqCompose.Move.d'_c₀Compose.Move.OK.cutOKCompose.Move.OK.sh_sideCompose.Move.OK.not_hit_partnerCompose.Move.OK.E_eqCompose.Move.OK.A_eqCompose.Move.OK.B_eqCompose.Move.OK.mate_hit₀Compose.Move.OK.mate_eqCompose.Move.hit_partner_mpCompose.Move.OK.shpos
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.adjAt
abbrev in lean/SpectreKnot/Lens.lean, line 141 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 2 entry adj T c j.
Statement
abbrev adjAt (T : Kind) (c j : Nat) : Option (Nat × Nat) := ((adj T).getD c []).getD j none
Names in its proof
Named in the proofs of
Statement.KidsStatement.glue_rimCompose.adjOkCompose.ofLens_mateCompose.Move.twoCompose.Move.c₁Compose.Move.j₁Compose.Move.OKCompose.Move.adj₀Compose.Move.OK.mate_eqStatement.tabRotStatement.rimTablesOkStatement.rot_tabStatement.own_surjCompose.pairOkCompose.AdmCompose.adm_inductStatement.mate_someStatement.tstepStatement.tstep_soundStatement.child1_cycleStatement.mate_other_childStatement.StepOK.move
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.adjOk
def in lean/SpectreKnot/Lens.lean, line 144 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 2 is consistent at (c, j): a glued side is glued back, to a side of a different child.
Statement
def adjOk (T : Kind) (c j : Nat) : Bool := match adjAt T c j with | none => true | some (c', j') => decide (c' < nk T) && decide (j' < 6) && c' != c && adjAt T c' j' == some (c, j)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.adj_ok
theorem in lean/SpectreKnot/Lens.lean, line 150 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 2 is consistent at every side of every child of every kind (checked by decide).
Statement
theorem adj_ok : ∀ T : Kind, ∀ c, c < nk T → ∀ j, j < 6 → adjOk T c j = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decideCompose.adj_valid
theorem in lean/SpectreKnot/Lens.lean, line 154 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A side glued by Table 2 is glued to a side of a different child, which is glued back to it.
Statement
theorem adj_valid {T : Kind} {c j c' j' : Nat} (c_lt : c < nk T) (j_lt : j < 6)
(glued : adjAt T c j = some (c', j')) : c' < nk T ∧ j' < 6 ∧ c' ≠ c ∧ adjAt T c' j' = some (c, j)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the table check at `(c, j)` have table := adj_ok T c c_lt j j_lt simp only [adjOk, glued, Bool.and_eq_true, decide_eq_true_eq, bne_iff_ne, ne_eq, beq_iff_eq] at table exact ⟨table.1.1.1, table.1.1.2, table.1.2, table.2⟩
Compose.adm_induct
theorem in lean/SpectreKnot/Parity.lean, line 309 · read it in its file
Formalises Lemma 7.2 Reachability.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Lemma 7.2(b), as an induction principle (with adm_level, Lemma 7.2(a), below). A property of (L, d) that holds at (ℓ₁, d₁), depends only on the lengths of actual sides (and on d only through the Σ child), and is kept by every move whose cut is two edges clear of both ends of its side or lies on the Σ child's side 5, holds at every admissible (L, d).
By induction on the excess over ℓ₁ (the paper's induction on ∑ L): from an admissible (L, d) ≠ (ℓ₁, d₁), undo a move, chosen as in the paper: the third edge of a long side; on the Σ child's side 5, the second edge before the corner if d ≥ d₁ + 2, the second after it if d = d₁. The induction also carries that the composition is well formed (Gluing.WF), which a move needs (Move.OK): at (ℓ₁, d₁) by Computation 7.3 (sig_base), and after a move because the composition is then the old one with an edge cut (Move.OK.equiv).
Statement
theorem adm_induct (T : Kind) (ω : Bool) (P : (Nat → Nat → Nat) → Nat → Prop) (congr : ∀ L L' d d', (∀ c, c < nk T → ∀ j, j < 6 → L c j = L' c j) → (∀ c, c < nk T → kidAt T c = .Sigma → d = d') → P L' d' → P L d) (base : P (L₁ T) (dOff 1)) (step : ∀ (μ : Move) (L : Nat → Nat → Nat) (d : Nat), μ.OK T L d ω → ((2 ≤ μ.r₀ ∧ μ.r₀ + 3 ≤ L μ.c₀ μ.j₀) ∨ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5)) → P L d → P (μ.lens T L) (μ.d' T L d)) : ∀ L d, Adm T L d → P L d
Names in its proof
Compose.AdmCompose.Comp.ofLensCompose.MoveCompose.Move.adm_shortenCompose.Move.d'_eqCompose.Move.excess_shortenCompose.Move.lens_shortenCompose.Move.mkOKCompose.Move.shortenCompose.adjAtCompose.adj_validCompose.dOff_oneCompose.excessCompose.nkCompose.ofLens_congrCompose.pair_letterCompose.sigIdxCompose.sigIdx_specCompose.sig_baseCompose.sigma_uniqueCompose.tot_eq_zeroCompose.tot_ne_zeroGluing.Cut.OK.wf_subdivGluing.Equiv.wfGluing.WFdOffkidAtletterLenletterOf
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (178 lines)
by -- by induction on the excess, carrying along that the composition is well formed suffices carried : ∀ N L d, excess T L < N → Adm T L d → P L d ∧ (Comp.ofLens T L d ω).toGluing.WF from fun L d adm => (carried _ L d (Nat.lt_succ_self _) adm).1 intro N induction N with | zero => intro L d below_zero; omega | succ N ih => intro L d excess_lt adm -- the Σ child is an actual child, of kind Σ obtain ⟨sig_lt, sig_kind⟩ := sigIdx_spec T -- `d₁ = 6` have d₁_eq := dOff_one by_cases at_base : excess T L = 0 · -- the base case: `(L, d) = (ℓ₁, d₁)` -- every side is as long as at level 1 have is_L₁ : ∀ c, c < nk T → ∀ j, j < 6 → L c j = L₁ T c j := fun c hc j hj => by -- no excess on side `j` of child `c` have := tot_eq_zero (tot_eq_zero at_base c hc) j hj -- and the side is at least as long as at level 1 have := (adm.len c hc j hj).1 omega -- and the Σ offset is `d₁` have is_d₁ : d = dOff 1 := by -- room for the Σ corner on side 5 have := adm.sig _ sig_lt sig_kind -- which is as long as at level 1 have := is_L₁ _ sig_lt 5 (by omega) -- and `d ≥ d₁` have := adm.d_ge omega -- so the property holds, and the composition is that of Computation 7.3, which is well formed refine ⟨congr L (L₁ T) d (dOff 1) is_L₁ (fun _ _ _ => is_d₁) base, ?_⟩ rw [ofLens_congr is_L₁ (fun _ _ _ => is_d₁)] exact (sig_base T ω).wf · -- a side longer than at level 1 obtain ⟨c, hc, child_excess⟩ := tot_ne_zero at_base obtain ⟨j, hj, side_excess⟩ := tot_ne_zero child_excess -- side `j` of child `c` is at least two edges longer than at level 1 have longer : L₁ T c j + 2 ≤ L c j := by -- it is at least as long, with the same parity have := adm.len c hc j hj omega -- one step back have back : ∀ μ : Move, μ.c₀ < nk T → μ.j₀ < 6 → L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀ → 1 ≤ μ.r₀ → μ.r₀ + 4 ≤ L μ.c₀ μ.j₀ → ∀ d₀, Adm T (μ.shorten T L) d₀ → (kidAt T μ.c₀ = .Sigma → μ.j₀ = 5 → d₀ + 1 ≤ μ.r₀ ∨ μ.r₀ + 2 ≤ d₀) → (μ.two T = true → kidAt T (μ.c₁ T) ≠ .Sigma ∨ μ.j₁ T ≠ 5) → μ.d' T (μ.shorten T L) d₀ = d → ((2 ≤ μ.r₀ ∧ μ.r₀ + 5 ≤ L μ.c₀ μ.j₀) ∨ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5)) → P L d ∧ (Comp.ofLens T L d ω).toGluing.WF := by intro μ hc₀ hj₀ big r₀_pos r₀_room d₀ adm₀ cut₀ cut₁ d_after clear -- the induction hypothesis: at the shortened lengths, which have less excess, the property holds and the -- composition is well formed obtain ⟨holds₀, wf₀⟩ := ih _ _ (by -- shortening lowers the excess have := Move.excess_shorten adm hc₀ hj₀ big omega) adm₀ -- so the move can be made from the shortened lengths have move_ok : μ.OK T (μ.shorten T L) d₀ ω := Move.mkOK hc₀ hj₀ r₀_pos r₀_room adm₀ cut₀ cut₁ wf₀ -- side `j₀` of `c₀` is two edges shorter before the move have shortened : μ.shorten T L μ.c₀ μ.j₀ = L μ.c₀ μ.j₀ - 2 := by simp only [Move.shorten]; rw [ite_eq_left (show μ.Hit T μ.c₀ μ.j₀ from Or.inl ⟨rfl, rfl⟩)] -- the property survives the move have after := step μ _ _ move_ok (by rw [shortened] rcases clear with clear_ends | on_sigma_five · exact Or.inl ⟨clear_ends.1, by omega⟩ · exact Or.inr on_sigma_five) holds₀ -- and the composition after it is the old one with an edge cut, so it is well formed have wf_after := move_ok.equiv.symm.wf move_ok.cutOK.wf_subdiv rw [Move.lens_shorten adm hc₀ hj₀ big, d_after] at after wf_after exact ⟨after, wf_after⟩ -- the sibling glued to side 5 of the Σ child is not the Σ child have sib_not_sig : ∀ μ : Move, μ.c₀ = sigIdx T → μ.j₀ = 5 → μ.two T = true → kidAt T (μ.c₁ T) ≠ .Sigma := by intro μ on_sigma side_five shared sib_sigma -- Table 2 glues side `j₀` of `c₀` to side `j₁` of `c₁` have sib := Move.adj₀ (T := T) (μ := μ) rw [ite_eq_left shared] at sib -- the sibling is an actual child, other than `c₀` have sib_valid := adj_valid (on_sigma ▸ sig_lt) (by omega) sib exact sib_valid.2.2.1 (sigma_unique T _ sib_valid.1 _ (on_sigma ▸ sig_lt) sib_sigma (on_sigma ▸ sig_kind)) by_cases on_sig_five : (c = sigIdx T ∧ j = 5) ∨ adjAt T c j = some (sigIdx T, 5) · -- a move on the Σ child's side 5 -- that side is at least two edges longer than at level 1 have big : L₁ T (sigIdx T) 5 + 2 ≤ L (sigIdx T) 5 := by rcases on_sig_five with ⟨rfl, rfl⟩ | glued_to · exact longer · rw [adm.pair c hc j hj _ _ glued_to] show letterLen 1 (letterOf (kidAt T (sigIdx T)) 5) + 2 ≤ _ rw [pair_letter hc hj glued_to]; exact longer -- side 5 of the Σ child has 10 edges at level 1 have sig_five := L₁_sig sig_kind -- room for the Σ corner on side 5 have corner_room := adm.sig _ sig_lt sig_kind -- `d ≥ d₁` have d_ge := adm.d_ge -- and `d` has the parity of `d₁` have d_par := adm.d_par by_cases d_big : dOff 1 + 2 ≤ d · -- cut the edge at offset 1, before the Σ corner, which moves back by 2 obtain ⟨μ, μ_c₀, μ_j₀, μ_r₀⟩ : ∃ μ : Move, μ.c₀ = sigIdx T ∧ μ.j₀ = 5 ∧ μ.r₀ = 1 := ⟨⟨_, 5, 1⟩, rfl, rfl, rfl⟩ have hc₀ : μ.c₀ < nk T := μ_c₀ ▸ sig_lt -- the Σ child is an actual child have hj₀ : μ.j₀ < 6 := by omega -- and side 5 is a side -- the side cut is at least two edges longer than at level 1 have big' : L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀ := by rw [μ_c₀, μ_j₀]; exact big -- before the move it is two edges shorter have shortened : μ.shorten T L (sigIdx T) 5 = L (sigIdx T) 5 - 2 := by simp only [Move.shorten]; rw [ite_eq_left (show μ.Hit T (sigIdx T) 5 from Or.inl ⟨μ_c₀.symm, μ_j₀.symm⟩)] -- the shortened lengths, with `d - 2`, are admissible have adm₀ : Adm T (μ.shorten T L) (d - 2) := Move.adm_shorten adm hc₀ hj₀ big' (by omega) (by omega) (fun c' hc' is_sigma => by rw [sigma_unique T _ hc' _ sig_lt is_sigma sig_kind, shortened, sig_five]; omega) refine back μ hc₀ hj₀ big' (by omega) (by rw [μ_c₀, μ_j₀, μ_r₀]; omega) _ adm₀ (fun _ _ => Or.inr (by omega)) (fun shared => Or.inl (sib_not_sig μ μ_c₀ μ_j₀ shared)) ?_ (Or.inr ⟨by rw [μ_c₀]; exact sig_kind, μ_j₀⟩) -- the move puts the Σ corner back at `d` have new_d := Move.d'_c₀ (L := μ.shorten T L) (d := d - 2) (by rw [μ_c₀]; exact sig_kind) μ_j₀ (fun ⟨shared, is_sigma, _⟩ => sib_not_sig μ μ_c₀ μ_j₀ shared is_sigma) rw [ite_eq_left (by omega)] at new_d; omega · -- `d = d₁`: cut the edge just after the Σ corner, which stays put have is_d₁ : d = dOff 1 := by omega -- `d` has the parity of `d₁` obtain ⟨μ, μ_c₀, μ_j₀, μ_r₀⟩ : ∃ μ : Move, μ.c₀ = sigIdx T ∧ μ.j₀ = 5 ∧ μ.r₀ = d + 1 := ⟨⟨_, 5, d + 1⟩, rfl, rfl, rfl⟩ have hc₀ : μ.c₀ < nk T := μ_c₀ ▸ sig_lt -- the Σ child is an actual child have hj₀ : μ.j₀ < 6 := by omega -- and side 5 is a side -- the side cut is at least two edges longer than at level 1 have big' : L₁ T μ.c₀ μ.j₀ + 2 ≤ L μ.c₀ μ.j₀ := by rw [μ_c₀, μ_j₀]; exact big -- before the move it is two edges shorter have shortened : μ.shorten T L (sigIdx T) 5 = L (sigIdx T) 5 - 2 := by simp only [Move.shorten]; rw [ite_eq_left (show μ.Hit T (sigIdx T) 5 from Or.inl ⟨μ_c₀.symm, μ_j₀.symm⟩)] -- the shortened lengths, with the same `d`, are admissible have adm₀ : Adm T (μ.shorten T L) d := Move.adm_shorten adm hc₀ hj₀ big' d_ge d_par (fun c' hc' is_sigma => by rw [sigma_unique T _ hc' _ sig_lt is_sigma sig_kind, shortened, sig_five]; omega) refine back μ hc₀ hj₀ big' (by omega) (by rw [μ_c₀, μ_j₀, μ_r₀]; omega) _ adm₀ (fun _ _ => Or.inl (by omega)) (fun shared => Or.inl (sib_not_sig μ μ_c₀ μ_j₀ shared)) ?_ (Or.inr ⟨by rw [μ_c₀]; exact sig_kind, μ_j₀⟩) -- the move leaves the Σ corner at `d` have new_d := Move.d'_c₀ (L := μ.shorten T L) (d := d) (by rw [μ_c₀]; exact sig_kind) μ_j₀ (fun ⟨shared, is_sigma, _⟩ => sib_not_sig μ μ_c₀ μ_j₀ shared is_sigma) rw [ite_eq_right (by omega)] at new_d; omega · -- a move elsewhere, cutting the third edge of the side obtain ⟨μ, μ_c₀, μ_j₀, μ_r₀⟩ : ∃ μ : Move, μ.c₀ = c ∧ μ.j₀ = j ∧ μ.r₀ = 2 := ⟨⟨c, j, 2⟩, rfl, rfl, rfl⟩ subst μ_c₀ μ_j₀ -- every side has at least 5 edges at level 1 have L₁_five := L₁_ge T μ.c₀ μ.j₀ -- the side cut is not the Σ child's side 5 have not_sig_five₀ : ¬ (kidAt T μ.c₀ = .Sigma ∧ μ.j₀ = 5) := fun ⟨is_sigma, side_five⟩ => on_sig_five (Or.inl ⟨sigma_unique T _ hc _ sig_lt is_sigma sig_kind, side_five⟩) -- nor is the sibling's side glued to it have not_sig_five₁ : ¬ (μ.two T = true ∧ kidAt T (μ.c₁ T) = .Sigma ∧ μ.j₁ T = 5) := by rintro ⟨shared, is_sigma, side_five⟩ -- Table 2 glues side `j₀` of `c₀` to side `j₁` of `c₁` have sib := Move.adj₀ (T := T) (μ := μ) rw [ite_eq_left shared] at sib -- the sibling is an actual child have sib_valid := adj_valid hc hj sib rw [sigma_unique T _ sib_valid.1 _ sig_lt is_sigma sig_kind, side_five] at sib exact on_sig_five (Or.inr sib) -- so the move leaves the Σ child's side 5 alone have sig_not_hit : ¬ μ.Hit T (sigIdx T) 5 := by rintro (⟨is_c₀, is_j₀⟩ | ⟨shared, is_c₁, is_j₁⟩) · exact not_sig_five₀ ⟨is_c₀ ▸ sig_kind, is_j₀.symm⟩ · exact not_sig_five₁ ⟨shared, is_c₁ ▸ sig_kind, is_j₁.symm⟩ -- the Σ child's side 5 is as long before the move as after have unchanged : μ.shorten T L (sigIdx T) 5 = L (sigIdx T) 5 := by simp only [Move.shorten]; rw [ite_eq_right sig_not_hit]; omega -- the shortened lengths, with the same `d`, are admissible have adm₀ : Adm T (μ.shorten T L) d := Move.adm_shorten adm hc hj longer adm.d_ge adm.d_par (fun c' hc' is_sigma => by rw [sigma_unique T _ hc' _ sig_lt is_sigma sig_kind, unchanged]; exact adm.sig _ sig_lt sig_kind) refine back μ hc hj longer (by omega) (by omega) _ adm₀ (fun is_sigma side_five => absurd ⟨is_sigma, side_five⟩ not_sig_five₀) (fun shared => ?_) (Move.d'_eq not_sig_five₀ not_sig_five₁) (Or.inl ⟨by omega, by omega⟩) by_cases is_sigma : kidAt T (μ.c₁ T) = .Sigma · exact Or.inr (fun side_five => not_sig_five₁ ⟨shared, is_sigma, side_five⟩) · exact Or.inl is_sigma
Compose.adm_level
theorem in lean/SpectreKnot/Parity.lean, line 548 · read it in its file
Formalises Lemma 7.2 Reachability.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The level-m lengths (ℓ_m, d_m) are admissible.
Statement
theorem adm_level (T : Kind) (m : Nat) (m_pos : 1 ≤ m) : Adm T (fun c j => letterLen m (letterOf (kidAt T c) j)) (dOff m) where len c _ j _
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
letterLen_ge m m_pos _ pair c c_lt j j_lt c' j' glued := by simp only [pair_letter c_lt j_lt glued] d_ge := by rw [(dOff_fib m m_pos).1, dOff_one] -- `F(3m+1) ≥ F(4)` have := fib_mono (show 4 ≤ 3 * m + 1 by omega) -- `F(4) = 3` have fib4_eq : fib 4 = 3 := rfl omega d_par := by rw [(dOff_fib m m_pos).1, dOff_one]; omega sig c _ is_sigma := by show dOff m + L₁ T c 5 ≤ letterLen m (letterOf (kidAt T c) 5) + dOff 1 rw [L₁_sig is_sigma, is_sigma, dOff_one, show letterOf .Sigma 5 = .delta from rfl, (dOff_fib m m_pos).2] -- `F(3m) ≥ F(3)` have := fib_mono (show 3 ≤ 3 * m by omega) -- `F(3) = 2` have fib3_eq : fib 3 = 2 := rfl omega
Compose.adm_sig
theorem in lean/SpectreKnot/Parity.lean, line 497 · read it in its file
Formalises Proposition 7.4 Compositions at every level.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**Every admissible (L, d) has the signature**: it holds at (ℓ₁, d₁) by Computation 7.3 (sig_base), and a move keeps it by Lemma 7.1 (Move.OK.keep).
Statement
theorem adm_sig (T : Kind) (ω : Bool) : ∀ L d, Adm T L d → Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
adm_induct T ω (fun L d => Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)) (fun _ _ _ _ same_len same_d has_sig => by rw [ofLens_congr same_len same_d]; exact has_sig) (sig_base T ω) (fun _ _ _ move_ok _ has_sig => move_ok.keep has_sig)
Compose.allKinds
def in lean/SpectreKnot/CompFull.lean, line 11 · read it in its file
Doc comment
The nine kinds.
Statement
def allKinds : List Kind := [.Gamma, .Delta, .Theta, .Lambda, .Xi, .Pi, .Sigma, .Phi, .Psi]
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.check_Delta_minus
theorem in lean/SpectreKnot/CompFull.lean, line 22 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Δ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Delta_minus : (Comp.ofPattern .Delta (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Delta_plus
theorem in lean/SpectreKnot/CompFull.lean, line 20 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Δ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Delta_plus : (Comp.ofPattern .Delta (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Gamma_minus
theorem in lean/SpectreKnot/CompFull.lean, line 18 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Γ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Gamma_minus : (Comp.ofPattern .Gamma (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Gamma_plus
theorem in lean/SpectreKnot/CompFull.lean, line 16 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Γ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Gamma_plus : (Comp.ofPattern .Gamma (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Lambda_minus
theorem in lean/SpectreKnot/CompFull.lean, line 30 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Λ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Lambda_minus : (Comp.ofPattern .Lambda (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
decide +kernelCompose.check_Lambda_plus
theorem in lean/SpectreKnot/CompFull.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Λ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Lambda_plus : (Comp.ofPattern .Lambda (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Phi_minus
theorem in lean/SpectreKnot/CompFull.lean, line 47 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Φ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Phi_minus : (Comp.ofPattern .Phi (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Phi_plus
theorem in lean/SpectreKnot/CompFull.lean, line 45 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Φ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Phi_plus : (Comp.ofPattern .Phi (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Pi_minus
theorem in lean/SpectreKnot/CompFull.lean, line 39 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Π, ω = −1: the level-1 composition passes check.
Statement
theorem check_Pi_minus : (Comp.ofPattern .Pi (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Pi_plus
theorem in lean/SpectreKnot/CompFull.lean, line 37 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Π, ω = +1: the level-1 composition passes check.
Statement
theorem check_Pi_plus : (Comp.ofPattern .Pi (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Psi_minus
theorem in lean/SpectreKnot/CompFull.lean, line 51 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Ψ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Psi_minus : (Comp.ofPattern .Psi (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Psi_plus
theorem in lean/SpectreKnot/CompFull.lean, line 49 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Ψ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Psi_plus : (Comp.ofPattern .Psi (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Sigma_minus
theorem in lean/SpectreKnot/CompFull.lean, line 43 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Σ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Sigma_minus : (Comp.ofPattern .Sigma (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Sigma_plus
theorem in lean/SpectreKnot/CompFull.lean, line 41 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Σ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Sigma_plus : (Comp.ofPattern .Sigma (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Theta_minus
theorem in lean/SpectreKnot/CompFull.lean, line 26 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Θ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Theta_minus : (Comp.ofPattern .Theta (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Theta_plus
theorem in lean/SpectreKnot/CompFull.lean, line 24 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Θ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Theta_plus : (Comp.ofPattern .Theta (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Xi_minus
theorem in lean/SpectreKnot/CompFull.lean, line 35 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Ξ, ω = −1: the level-1 composition passes check.
Statement
theorem check_Xi_minus : (Comp.ofPattern .Xi (letterLen 1) (dOff 1) false).check false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.check_Xi_plus
theorem in lean/SpectreKnot/CompFull.lean, line 33 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Ξ, ω = +1: the level-1 composition passes check.
Statement
theorem check_Xi_plus : (Comp.ofPattern .Xi (letterLen 1) (dOff 1) true).check true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelCompose.comp_7_3
theorem in lean/SpectreKnot/CompSig.lean, line 608 · read it in its file
Formalises Computation 7.3 The compositions at the level-1 lengths.
Doc comment
Computation 7.3, as the paper words it: for each of the nine kinds T and both signs ω, the composition C_T(ℓ₁, d₁, ω) has the signature (CompSig).
Statement
theorem comp_7_3 (T : Kind) (ω : Bool) : CompSig T (fun c j => letterLen 1 (letterOf (kidAt T c) j)) (dOff 1) ω
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
compSig_of_sig (fun _ _ => letterLen_one_pos _) (gamma_side0_one T) (sig_base T ω)Compose.compositions_level1
theorem in lean/SpectreKnot/CompFull.lean, line 54 · read it in its file
Formalises Computation 7.3 The compositions at the level-1 lengths.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Computation 7.3 (the kernel's runs, collected).
Statement
theorem compositions_level1 : ∀ (T : Kind) (ω : Bool), (Comp.ofPattern T (letterLen 1) (dOff 1) ω).check ω = true
| .Gamma, true => check_Gamma_plus
| .Gamma, false => check_Gamma_minus
| .Delta, true => check_Delta_plus
| .Delta, false => check_Delta_minus
| .Theta, true => check_Theta_plus
| .Theta, false => check_Theta_minus
| .Lambda, true => check_Lambda_plus
| .Lambda, false => check_Lambda_minus
| .Xi, true => check_Xi_plus
| .Xi, false => check_Xi_minus
| .Pi, true => check_Pi_plus
| .Pi, false => check_Pi_minus
| .Sigma, true => check_Sigma_plus
| .Sigma, false => check_Sigma_minus
| .Phi, true => check_Phi_plus
| .Phi, false => check_Phi_minus
| .Psi, true => check_Psi_plus
| .Psi, false => check_Psi_minus
Names in its proof
Compose.check_Delta_minusCompose.check_Delta_plusCompose.check_Gamma_minusCompose.check_Gamma_plusCompose.check_Lambda_minusCompose.check_Lambda_plusCompose.check_Phi_minusCompose.check_Phi_plusCompose.check_Pi_minusCompose.check_Pi_plusCompose.check_Psi_minusCompose.check_Psi_plusCompose.check_Sigma_minusCompose.check_Sigma_plusCompose.check_Theta_minusCompose.check_Theta_plusCompose.check_Xi_minusCompose.check_Xi_plus
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.compositions_level1_signature
theorem in lean/SpectreKnot/CompFull.lean, line 78 · read it in its file
Formalises Computation 7.3 The compositions at the level-1 lengths.
Doc comment
Computation 7.3, as theorems. For every kind T and both signs ω, in the composition of §7.1 with the level-1 lengths (ℓ₁, d₁), its children carrying the signature: the gluing is well formed; the walk from every port ends on the parent's rim (no closed strand); every parent rim vertex is a hook except the Γ child's corners A and B; these are adjacent in the right order; and they carry the crossover.
Statement
theorem compositions_level1_signature (T : Kind) (ω : Bool) : let C := Comp.ofPattern T (letterLen 1) (dOff 1) ω let G := C.toGluing let n := C.rimVertexPorts.length G.WF ∧ (∀ x, G.Valid x → ∃ r, G.FullReach x r) ∧ (∀ t, t < n → t ≠ C.tA → t ≠ C.tB → G.FullReach (C.vtx t).1 (C.vtx t).2) ∧ C.tA < n ∧ C.tB < n ∧ C.tB = (if ω then (C.tA + 1) % n else (C.tA + n - 1) % n) ∧ G.FullReach (C.vtx C.tA).2 (C.vtx C.tB).2 ∧ G.FullReach (C.vtx C.tA).1 (C.vtx C.tB).1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
exact Comp.check_sound _ (compositions_level1 T ω)Compose.dOff_one
theorem in lean/SpectreKnot/Parity.lean, line 140 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The level-1 Σ offset is d₁ = 6.
Statement
theorem dOff_one : dOff 1 = 6
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Compose.decomp
theorem in lean/SpectreKnot/Lens.lean, line 57 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every position k of a rim with side lengths f (all positive) lies in exactly one side j, at offset o.
Statement
theorem decomp (f : Nat → Nat) : ∀ i, i ≤ 6 → ∀ k, k < pos f i → ∃ j o, j < i ∧ o < f j ∧ k = pos f j + o
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by intro i induction i with | zero => intro _ k k_lt; simp [pos] at k_lt | succ i ih => intro i_le k k_lt by_cases before : k < pos f i · obtain ⟨j, o, j_lt, o_lt, rfl⟩ := ih (by omega) k before exact ⟨j, o, by omega, o_lt, rfl⟩ · rw [pos_succ] at k_lt exact ⟨i, k - pos f i, by omega, by omega, by omega⟩
Compose.excess
def in lean/SpectreKnot/Parity.lean, line 130 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
How far L is from ℓ₁.
Statement
def excess (T : Kind) (L : Nat → Nat → Nat) : Nat := tot (nk T) fun c => tot 6 fun j => L c j - L₁ T c j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.fib_le_succ
theorem in lean/SpectreKnot/Parity.lean, line 505 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Each Fibonacci number is at most the next.
Statement
theorem fib_le_succ (n : Nat) : fib n ≤ fib (n + 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by cases n with | zero => decide | succ n => rw [fib_add_two]; omega
Compose.fib_mono
theorem in lean/SpectreKnot/Parity.lean, line 511 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Fibonacci numbers are monotone.
Statement
theorem fib_mono {a b : Nat} (a_le_b : a ≤ b) : fib a ≤ fib b
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by induction b with | zero => -- only `a = 0` is at most 0 have a_zero : a = 0 := by omega subst a_zero; exact Nat.le_refl _ | succ b ih => by_cases a_eq : a = b + 1 · subst a_eq; exact Nat.le_refl _ · exact Nat.le_trans (ih (by omega)) (fib_le_succ b)
Compose.gamma_side0_one
theorem in lean/SpectreKnot/CompSig.lean, line 597 · read it in its file
Used, through the names in proofs, for Computation 7.3.
Doc comment
The Γ child's side 0 has at least two edges at level 1 (it has 7).
Statement
theorem gamma_side0_one : ∀ T : Kind, 2 ≤ letterLen 1 (letterOf (kidAt T (nk T - 1)) 0)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decideCompose.len_getD
theorem in lean/SpectreKnot/Lens.lean, line 52 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Entry j < 6 of the list of six side lengths is f j.
Statement
theorem len_getD (f : Nat → Nat) {j : Nat} (j_lt : j < 6) : ((List.range 6).map f).getD j 0 = f j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by rw [range6_map] rcases (show j = 0 ∨ j = 1 ∨ j = 2 ∨ j = 3 ∨ j = 4 ∨ j = 5 by omega) with rfl | rfl | rfl | rfl | rfl | rfl <;> rfl
Compose.letterLen_ge
theorem in lean/SpectreKnot/Parity.lean, line 523 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Letter lengths only grow, and keep their parities.
Statement
theorem letterLen_ge (m : Nat) (m_pos : 1 ≤ m) (x : Letter) :
letterLen 1 x ≤ letterLen m x ∧ (letterLen m x - letterLen 1 x) % 2 = 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (22 lines)
by -- the closed forms of the eight letter lengths (Prop 6.2) obtain ⟨len_a, len_b, len_g, len_d, len_e, len_z, len_h, len_t⟩ := letterLen_fib m m_pos -- and their parities (Cor 6.3) obtain ⟨par_a, par_b, par_g, par_d, par_e, par_z, par_h, par_t⟩ := letterLen_parity m m_pos -- `F(3m+1) ≥ F(4)` have fib_3m1 := fib_mono (show 4 ≤ 3 * m + 1 by omega) -- `F(3m+2) ≥ F(5)` have fib_3m2 := fib_mono (show 5 ≤ 3 * m + 2 by omega) -- `F(3m+3) ≥ F(6)` have fib_3m3 := fib_mono (show 6 ≤ 3 * m + 3 by omega) -- `F(3m+4) ≥ F(7)` have fib_3m4 := fib_mono (show 7 ≤ 3 * m + 4 by omega) -- `F(4) = 3` have fib4_eq : fib 4 = 3 := rfl -- `F(5) = 5` have fib5_eq : fib 5 = 5 := rfl -- `F(6) = 8` have fib6_eq : fib 6 = 8 := rfl -- `F(7) = 13` have fib7_eq : fib 7 = 13 := rfl cases x <;> simp only [letterLen, letterLen1] <;> omega
Compose.letterLen_one_pos
theorem in lean/SpectreKnot/CompSig.lean, line 594 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every level-1 letter length is positive (each is at least 5).
Statement
theorem letterLen_one_pos : ∀ x, 1 ≤ letterLen 1 x
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro x; cases x <;> decideCompose.mkKidL
def in lean/SpectreKnot/Compose.lean, line 43 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
A child of kind K whose sides 0 … 5 have the lengths len, with Σ offset d and sign ω (true for +1): its crossover corner A is vertex 0, or for Σ the point of side 5 at distance d from vertex 5, and B = A + ω.
Statement
def mkKidL (K : Kind) (len : List Nat) (d : Nat) (ω : Bool) : Kid := let U := prefixSums len 0 let E := U.getD 6 0 let A := if K = .Sigma then U.getD 5 0 + d else 0 let B := if ω then nxt E A else prv E A ⟨K, len, U, E, A, B⟩
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.negative_control
theorem in lean/SpectreKnot/CompFull.lean, line 95 · read it in its file
Doc comment
Negative control: if one child's crossover corners are not adjacent (for the first child and for the Γ child of a Δ), the parent fails the check.
Statement
theorem negative_control : ([0, 7].all fun c => !((Comp.ofPattern .Delta (letterLen 1) (dOff 1) true).spreadCorners c).check true) = true
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
decide +kernelCompose.nk
abbrev in lean/SpectreKnot/Lens.lean, line 99 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The number of children.
Statement
abbrev nk (T : Kind) : Nat := (Pattern.kids T).length
Names in its proof
Named in the proofs of
Statement.KidsStatement.Kids.across_rimStatement.Kids.follow_of_reachStatement.Kids.noClosedStatement.gB_lastStatement.corners_nonSigmaStatement.corners_sigmaStatement.CompSigStatement.compSig_of_sigStatement.sig_of_checkCompose.adjOkStatement.Kids.glue_symmCompose.Move.OKCompose.Move.OK.equivStatement.isPort_upStatement.step_tileStatement.rimTablesOkStatement.parent_vtxStatement.Kids.parent_sigCompose.AdmCompose.excessCompose.adm_inductCompose.adm_sigCompose.prop_7_4Compose.sig_adjStatement.cornerA_succStatement.stretch_eqStatement.Chain.tiles_succStatement.tiles_succStatement.Kids.noSelfStatement.corner_oneStatement.StepOK.moveStatement.StepOK.congrStatement.Kids.bstep_validStatement.Kids.turn_fCStatement.Kids.on_parent_chain
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.ofLens_A
theorem in lean/SpectreKnot/Lens.lean, line 125 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The corner A of child c: vertex 0, or for the Σ child the point d along its side 5.
Statement
theorem ofLens_A {c : Nat} (c_lt : c < nk T) : (Comp.ofLens T L d ω).toGluing.A c = if kidAt T c = .Sigma then pos (L c) 5 + d else 0
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by simp only [Comp.toGluing, ofLens_kid c_lt, mkKidL, prefixSums_getD _ (show 5 ≤ 6 by omega)]
Compose.ofLens_B
theorem in lean/SpectreKnot/Lens.lean, line 130 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The corner B of child c: the vertex after A if ω, the vertex before it otherwise.
Statement
theorem ofLens_B {c : Nat} (c_lt : c < nk T) : (Comp.ofLens T L d ω).toGluing.B c = if ω then nxt (pos (L c) 6) ((Comp.ofLens T L d ω).toGluing.A c) else prv (pos (L c) 6) ((Comp.ofLens T L d ω).toGluing.A c)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by rw [ofLens_A c_lt] simp only [Comp.toGluing, ofLens_kid c_lt, mkKidL, prefixSums_getD _ (show 5 ≤ 6 by omega), prefixSums_getD _ (show 6 ≤ 6 by omega)]
Compose.ofLens_B'
theorem in lean/SpectreKnot/Parity.lean, line 596 · read it in its file
Used, through the names in proofs, for Proposition 7.4.
Doc comment
The corner B of child c, in terms of the composition's own rim length and corner A: the vertex after A if ω, the vertex before it otherwise.
Statement
theorem ofLens_B' {T : Kind} {L : Nat → Nat → Nat} {d : Nat} {ω : Bool} {c : Nat} (c_lt : c < nk T) : (Comp.ofLens T L d ω).toGluing.B c = if ω then nxt ((Comp.ofLens T L d ω).toGluing.E c) ((Comp.ofLens T L d ω).toGluing.A c) else prv ((Comp.ofLens T L d ω).toGluing.E c) ((Comp.ofLens T L d ω).toGluing.A c)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
rw [ofLens_B c_lt, ofLens_E c_lt]Compose.ofLens_E
theorem in lean/SpectreKnot/Lens.lean, line 111 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The rim of child c has pos (L c) 6 edges: the sum of its six side lengths.
Statement
theorem ofLens_E {c : Nat} (c_lt : c < nk T) : (Comp.ofLens T L d ω).toGluing.E c = pos (L c) 6
Named in the proofs of
Statement.Kids.E_eqStatement.gR_rimLStatement.gL_validStatement.sig_of_checkCompose.Move.OK.cutOKCompose.Move.OK.E_eqCompose.Move.OK.B_eqCompose.Move.OK.mate_eqStatement.gR_jposStatement.step_tileStatement.rot_tabStatement.own_rotStatement.Kids.bport_RCompose.ofLens_B'Statement.stretch_eqStatement.tstep_soundStatement.side_cycleStatement.Kids.noSelfCompose.Move.OK.sh_lastStatement.StepOK.move
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by simp only [Comp.toGluing, ofLens_kid c_lt, mkKidL]; exact prefixSums_getD _ (by omega)
Compose.ofLens_U
theorem in lean/SpectreKnot/Lens.lean, line 115 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Side j of child c begins at pos (L c) j.
Statement
theorem ofLens_U {c j : Nat} (c_lt : c < nk T) (j_le : j ≤ 6) :
((Comp.ofLens T L d ω).kid c).U.getD j 0 = pos (L c) j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp only [ofLens_kid c_lt, mkKidL]; exact prefixSums_getD _ j_leCompose.ofLens_congr
theorem in lean/SpectreKnot/Parity.lean, line 143 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A composition depends only on the lengths of actual sides (and on d only through its Σ child).
Statement
theorem ofLens_congr {T : Kind} {L L' : Nat → Nat → Nat} {d d' : Nat} {ω : Bool}
(same_len : ∀ c, c < nk T → ∀ j, j < 6 → L c j = L' c j)
(same_d : ∀ c, c < nk T → kidAt T c = .Sigma → d = d') :
Comp.ofLens T L d ω = Comp.ofLens T L' d' ω
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by unfold Comp.ofLens congr 1 apply List.map_congr_left intro c c_lt rw [List.mem_range] at c_lt -- the six side lengths of child `c` agree have same_sides : (List.range 6).map (L c) = (List.range 6).map (L' c) := List.map_congr_left (fun j j_mem => same_len c c_lt j (List.mem_range.mp j_mem)) rw [same_sides] by_cases is_sigma : kidAt T c = .Sigma · rw [same_d c c_lt is_sigma] · simp only [mkKidL, is_sigma, ite_false]
Compose.ofLens_kid
theorem in lean/SpectreKnot/Lens.lean, line 106 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Child c of ofLens is the child built from its kind and its side lengths L c.
Statement
theorem ofLens_kid {c : Nat} (c_lt : c < nk T) :
(Comp.ofLens T L d ω).kid c = mkKidL (kidAt T c) ((List.range 6).map (L c)) d ω
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [Comp.ofLens, Comp.kid, List.getD_eq_getElem?_getD, c_lt]Compose.ofLens_len
theorem in lean/SpectreKnot/Lens.lean, line 120 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Side j of child c has length L c j.
Statement
theorem ofLens_len {c j : Nat} (c_lt : c < nk T) (j_lt : j < 6) :
((Comp.ofLens T L d ω).kid c).len.getD j 0 = L c j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp only [ofLens_kid c_lt, mkKidL]; exact len_getD _ j_ltCompose.ofLens_mate
theorem in lean/SpectreKnot/Lens.lean, line 165 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Edge pos j + o of child c (offset o in side j) is glued as Table 2 says: to the edge of side j' of child c' that is o edges from its end.
Statement
theorem ofLens_mate (len_pos : ∀ c, c < nk T → ∀ j, j < 6 → 1 ≤ L c j) {c j o : Nat} (c_lt : c < nk T) (j_lt : j < 6) (o_lt : o < L c j) : (Comp.ofLens T L d ω).mate c (pos (L c) j + o) = (adjAt T c j).map fun (c', j') => (c', pos (L c') j' + L c' j' - 1 - o)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by simp only [Comp.mate, Comp.sideOf] rw [ofLens_kid c_lt] simp only [mkKidL] rw [sideIdx_eq (L c) (len_pos c c_lt) j_lt o_lt, prefixSums_getD _ (by omega), show pos (L c) j + o - pos (L c) j = o by omega] show (match adjAt T c j with | none => none | some (c', j') => some (c', ((Comp.ofLens T L d ω).kid c').U.getD j' 0 + ((Comp.ofLens T L d ω).kid c').len.getD j' 0 - 1 - o)) = _ cases glued : adjAt T c j with | none => rfl | some p => obtain ⟨c', j'⟩ := p obtain ⟨c'_lt, j'_lt, _, _⟩ := adj_valid c_lt j_lt glued simp only [Option.map_some, ofLens_U c'_lt (by omega : j' ≤ 6), ofLens_len c'_lt j'_lt]
Compose.ofLens_n
theorem in lean/SpectreKnot/Lens.lean, line 102 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The composition ofLens has the kind's children.
Statement
theorem ofLens_n : (Comp.ofLens T L d ω).toGluing.n = nk T
Names in its proof
Named in the proofs of
Statement.Kids.across_rimStatement.Kids.btau_ltStatement.Kids.follow_of_reachStatement.Kids.noClosedStatement.gR_rimLStatement.gL_validStatement.sig_of_checkStatement.Kids.glue_symmCompose.Move.OK.cutOKCompose.Move.OK.B_eqCompose.Move.OK.equivStatement.step_tileStatement.Kids.parent_sigCompose.sig_adjStatement.Kids.noSelfStatement.StepOK.moveStatement.Kids.bstep_validStatement.Kids.turn_fCStatement.Kids.on_parent_chainStatement.Kids.rimChains
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [Comp.ofLens, Comp.toGluing]Compose.pairOk
def in lean/SpectreKnot/Parity.lean, line 38 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 2 glues sides with the same letter.
Statement
def pairOk (T : Kind) (c j : Nat) : Bool := match adjAt T c j with | none => true | some (c', j') => letterOf (kidAt T c') j' == letterOf (kidAt T c) j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.pair_letter
theorem in lean/SpectreKnot/Parity.lean, line 48 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Sides glued by Table 2 carry the same letter.
Statement
theorem pair_letter {T : Kind} {c j c' j' : Nat} (c_lt : c < nk T) (j_lt : j < 6)
(glued : adjAt T c j = some (c', j')) : letterOf (kidAt T c') j' = letterOf (kidAt T c) j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the table check at `(c, j)` have table := pair_ok T c c_lt j j_lt simp only [pairOk, glued, beq_iff_eq] at table exact table
Compose.pair_ok
theorem in lean/SpectreKnot/Parity.lean, line 44 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 2 glues sides with the same letter, at every side of every child of every kind (checked by decide).
Statement
theorem pair_ok : ∀ T : Kind, ∀ c, c < nk T → ∀ j, j < 6 → pairOk T c j = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decideCompose.parity_lemma
theorem in lean/SpectreKnot/Parity.lean, line 575 · read it in its file
Formalises Proposition 7.4 Compositions at every level.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parity lemma (the paper's Prop 7.4: Computation 7.3 at every level). For every level m ≥ 1, every kind T and both signs ω: the composition of §7.1 with the level-m lengths (ℓ_m, d_m), its children carrying the signature, has the signature (Sig): it is well formed, no strand closes up, every parent rim vertex is a hook except the Γ child's corners A and B, which lie on the parent's rim and carry the crossover.
Statement
theorem parity_lemma (m : Nat) (m_pos : 1 ≤ m) (T : Kind) (ω : Bool) :
Sig (Comp.ofPattern T (letterLen m) (dOff m) ω).toGluing (nk T - 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
adm_sig T ω _ _ (adm_level T m m_pos)
Compose.parity_lemma_adj
theorem in lean/SpectreKnot/Parity.lean, line 626 · read it in its file
Formalises Proposition 7.4 Compositions at every level.
Doc comment
The parity lemma, adjacency: A and B are adjacent parent rim vertices, B right after A along the parent's rim (in the children's sense) if ω, right before it otherwise.
Statement
theorem parity_lemma_adj (m : Nat) (m_pos : 1 ≤ m) (T : Kind) (ω : Bool) : let G := (Comp.ofPattern T (letterLen m) (dOff m) ω).toGluing let g := nk T - 1 if ω then G.Rot (g, nxt (G.E g) (G.A g)) (g, G.B g) else G.Rot (g, nxt (G.E g) (G.B g)) (g, G.A g)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
sig_adj rfl (parity_lemma m m_pos T ω)
Compose.pos
def in lean/SpectreKnot/Lens.lean, line 15 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
pos f j = f 0 + … + f (j-1): where side j begins, for side lengths f.
Statement
def pos (f : Nat → Nat) : Nat → Nat
| 0 => 0
| j + 1 => pos f j + f j
Names in its proof
none
Named in the proofs of
Statement.KidsStatement.pos6Statement.corners_nonSigmaStatement.corners_sigmaStatement.ownListStatement.ownList_getElem?Statement.side_lengthStatement.side_getElem?Statement.glueAtStatement.glue_rimCompose.decompCompose.sideIdx_eqCompose.ofLens_mateCompose.Move.cutCompose.Move.OK.pos_c₀Compose.Move.OK.pos_c₁Compose.Move.OK.cutOKCompose.Move.OK.A_eqCompose.Move.OK.A_clear₀Compose.Move.OK.A_clear₁Compose.Move.OK.mate_hit₀Compose.Move.OK.mate_hit₁Compose.Move.OK.mate_eqStatement.corners_NStatement.ownGoStatement.ownGo_injStatement.nxt_lastStatement.ofLens_mate_noneStatement.rot_tabStatement.own_rotStatement.rimPiece_getDStatement.vposStatement.compose_no_defaultStatement.stpStatement.stretch_eqStatement.InsideStatement.pos_upStatement.inside_stpStatement.adv_noneStatement.reach_noneStatement.mate_someStatement.no_boundaryStatement.two_evenStatement.odd_witnessesStatement.two_oddStatement.three_oddStatement.gmateStatement.tstep_soundStatement.side_cycleStatement.child1_cycleStatement.side4_cycleStatement.surrounded_side4Statement.chain_j16Statement.chain_j17Statement.grandparentStatement.mate_other_childStatement.jRStatement.jLStatement.tgtStatement.StepOK
and 8 more
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.pos_lt_of_pos
theorem in lean/SpectreKnot/Lens.lean, line 36 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Side a ends no later than any later side b begins.
Statement
theorem pos_lt_of_pos (f : Nat → Nat) (len_pos : ∀ i, i < 6 → 1 ≤ f i) {a b : Nat} (a_lt_b : a < b) (b_le : b ≤ 6) :
pos f a + f a ≤ pos f b
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
rw [← pos_succ]; exact pos_mono f a_lt_bCompose.pos_mono
theorem in lean/SpectreKnot/Lens.lean, line 23 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Later sides begin later: pos f is monotone.
Statement
theorem pos_mono (f : Nat → Nat) {a b : Nat} (a_le_b : a ≤ b) : pos f a ≤ pos f b
Names in its proof
Named in the proofs of
Statement.side_lengthStatement.side_getElem?Compose.pos_lt_of_posCompose.Move.OK.cutOKCompose.Move.OK.sh_sideCompose.Move.OK.A_eqCompose.Move.OK.A_clear₀Compose.Move.OK.A_clear₁Statement.corners_NStatement.own_mateStatement.own_rotStatement.stretch_eqStatement.inside_boundsStatement.side_end_leStatement.child1_cycleStatement.surrounded_side4Statement.chain_stretchStatement.tgt_sideCompose.Move.OK.shposStatement.StepOK.move
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by induction b with | zero => -- only side 0 begins at or before side 0 have a_zero : a = 0 := by omega subst a_zero; exact Nat.le_refl _ | succ b ih => by_cases a_eq : a = b + 1 · subst a_eq; exact Nat.le_refl _ · have := ih (by omega) -- side `a` begins no later than side `b`, which begins before side `b + 1` rw [pos_succ]; omega
Compose.pos_succ
theorem in lean/SpectreKnot/Lens.lean, line 20 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Side j + 1 begins where side j begins, plus the length of side j.
Statement
theorem pos_succ (f : Nat → Nat) (j : Nat) : pos f (j + 1) = pos f j + f j
Names in its proof
none
Named in the proofs of
Statement.pos6Statement.side_lengthStatement.side_getElem?Statement.glue_rimCompose.pos_monoCompose.pos_lt_of_posCompose.decompCompose.Move.OK.pos_c₀Compose.Move.OK.pos_c₁Compose.Move.OK.pos_otherCompose.Move.OK.cutOKCompose.Move.OK.sh_sideCompose.Move.OK.A_eqCompose.Move.OK.A_clear₀Compose.Move.OK.A_clear₁Statement.nxt_lastStatement.own_mateStatement.own_rotStatement.totL_takeStatement.pos_congrStatement.stretch_eqStatement.inside_stpStatement.mate_someStatement.no_boundaryStatement.inside_twoStatement.side_end_leStatement.tstep_soundStatement.child1_cycleStatement.side4_cycleStatement.grandparentStatement.signatureTheoremCompose.Move.OK.shposCompose.Move.OK.sh_lastStatement.StepOK.move
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Compose.prefixSums
def in lean/SpectreKnot/Compose.lean, line 25 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
prefixSums [l₀, …, l₅] 0 = [0, l₀, l₀+l₁, …, E].
Statement
def prefixSums : List Nat → Nat → List Nat
| [], a => [a]
| x :: xs, a => a :: prefixSums xs (a + x)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.prefixSums_getD
theorem in lean/SpectreKnot/Lens.lean, line 45 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The prefix sums of the list of six side lengths, read at j ≤ 6, are pos f j: the list form of a child (mkKidL) puts side j where pos does.
Statement
theorem prefixSums_getD (f : Nat → Nat) {j : Nat} (j_le : j ≤ 6) :
(prefixSums ((List.range 6).map f) 0).getD j 0 = pos f j
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by rw [range6_map] rcases (show j = 0 ∨ j = 1 ∨ j = 2 ∨ j = 3 ∨ j = 4 ∨ j = 5 ∨ j = 6 by omega) with rfl | rfl | rfl | rfl | rfl | rfl | rfl <;> rfl
Compose.prop_7_4
theorem in lean/SpectreKnot/Parity.lean, line 581 · read it in its file
Formalises Proposition 7.4 Compositions at every level.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Prop 7.4, as the paper words it: for every level m ≥ 1, every kind T and both signs ω, the composition C_T(ℓ_m, d_m, ω) has the signature (CompSig): the parity lemma's Sig, read at Table 3's rim positions.
Statement
theorem prop_7_4 (m : Nat) (m_pos : 1 ≤ m) (T : Kind) (ω : Bool) : Statement.CompSig T (fun c j => letterLen m (letterOf (kidAt T c) j)) (dOff m) ω
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
Statement.compSig_of_sig
(fun c j => by
-- every side has at least 5 edges (Lemma 6.5)
have := (bounds m m_pos).1 (letterOf (kidAt T c) j)
omega)
(by
-- so does side 0 of the Γ child
have := (bounds m m_pos).1 (letterOf (kidAt T (nk T - 1)) 0)
omega)
(parity_lemma m m_pos T ω)Compose.range6_map
theorem in lean/SpectreKnot/Lens.lean, line 41 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The six side lengths, as an explicit list.
Statement
theorem range6_map (f : Nat → Nat) : (List.range 6).map f = [f 0, f 1, f 2, f 3, f 4, f 5]
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Compose.sideIdx_eq
theorem in lean/SpectreKnot/Lens.lean, line 70 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The side lookup Comp.sideIdx finds the side: at offset o < f j in side j, it returns j.
Statement
theorem sideIdx_eq (f : Nat → Nat) (len_pos : ∀ i, i < 6 → 1 ≤ f i) {j o : Nat} (j_lt : j < 6) (o_lt : o < f j) :
Comp.sideIdx (prefixSums ((List.range 6).map f) 0) (pos f j + o) 5 = j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (22 lines)
by -- searching down from any side `i ≥ j` finds side `j` have search : ∀ i, i ≤ 5 → j ≤ i → Comp.sideIdx (prefixSums ((List.range 6).map f) 0) (pos f j + o) i = j := by intro i induction i with | zero => intro _ j_le -- only side 0 is left have j_zero : j = 0 := by omega subst j_zero; rfl | succ i ih => intro i_le j_le simp only [Comp.sideIdx] rw [prefixSums_getD f (by omega)] by_cases at_j : j = i + 1 · subst at_j; rw [ite_eq_left (by omega)] -- side `j` ends before side `i + 1` begins · have ends_before := pos_lt_of_pos f len_pos (show j < i + 1 by omega) (by omega) rw [ite_eq_right (by omega)] exact ih (by omega) (by omega) exact search 5 (by omega) (by omega)
Compose.sigIdx
def in lean/SpectreKnot/Parity.lean, line 24 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Σ child of each kind.
Statement
def sigIdx : Kind → Nat
| .Gamma => 3
| _ => 4
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.sigIdx_spec
theorem in lean/SpectreKnot/Parity.lean, line 29 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
sigIdx T is a child of kind T, and it is the Σ child (checked by decide).
Statement
theorem sigIdx_spec : ∀ T : Kind, sigIdx T < nk T ∧ kidAt T (sigIdx T) = .Sigma
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decideCompose.sig_adj
theorem in lean/SpectreKnot/Parity.lean, line 604 · read it in its file
Used, through the names in proofs, for Proposition 7.4.
Doc comment
In a composition with the signature, A and B are adjacent parent rim vertices: B comes right after A along the parent's rim (in the children's sense) if ω, right before it otherwise.
Statement
theorem sig_adj {T : Kind} {L : Nat → Nat → Nat} {d : Nat} {ω : Bool} {G : Gluing} (G_eq : G = (Comp.ofLens T L d ω).toGluing) (has_sig : Sig G (nk T - 1)) : if ω then G.Rot (nk T - 1, nxt (G.E (nk T - 1)) (G.A (nk T - 1))) (nk T - 1, G.B (nk T - 1)) else G.Rot (nk T - 1, nxt (G.E (nk T - 1)) (G.B (nk T - 1))) (nk T - 1, G.A (nk T - 1))
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- the crossover child is a child of the composition have g_lt : nk T - 1 < nk T := by -- the signature says it is a child of `G` have g_lt_G := has_sig.g_lt rw [G_eq, ofLens_n] at g_lt_G; exact g_lt_G -- `B` is the vertex after `A` if `ω`, the vertex before it otherwise have B_eq : G.B (nk T - 1) = if ω then nxt (G.E (nk T - 1)) (G.A (nk T - 1)) else prv (G.E (nk T - 1)) (G.A (nk T - 1)) := by subst G_eq; exact ofLens_B' g_lt cases ω with | true => rw [ite_eq_left rfl] at B_eq ⊢ rw [← B_eq]; exact .stop has_sig.rimB | false => rw [ite_eq_right (by decide)] at B_eq ⊢ rw [B_eq, nxt_prv (has_sig.wf.A_lt _ has_sig.g_lt)]; exact .stop has_sig.rimA
Compose.sig_base
theorem in lean/SpectreKnot/CompSig.lean, line 602 · read it in its file
Formalises Computation 7.3 The compositions at the level-1 lengths.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The base case of the induction: Computation 7.3, the kernel's check (compositions_level1), in the form Sig that the proof of Lemma 7.1 carries through cuts.
Statement
theorem sig_base (T : Kind) (ω : Bool) : Sig (Comp.ofPattern T (letterLen 1) (dOff 1) ω).toGluing (nk T - 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
sig_of_check (L := fun c j => letterLen 1 (letterOf (kidAt T c) j)) (fun _ _ => letterLen_one_pos _) (compositions_level1 T ω)
Compose.sigma_unique
theorem in lean/SpectreKnot/Parity.lean, line 33 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Each kind has only one Σ child.
Statement
theorem sigma_unique : ∀ T : Kind, ∀ c, c < nk T → ∀ c', c' < nk T → kidAt T c = .Sigma → kidAt T c' = .Sigma →
c = c'
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decideCompose.tot
def in lean/SpectreKnot/Parity.lean, line 58 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
tot n f = f 0 + … + f (n-1).
Statement
def tot : Nat → (Nat → Nat) → Nat
| 0, _ => 0
| n + 1, f => tot n f + f n
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Compose.tot_eq_zero
theorem in lean/SpectreKnot/Parity.lean, line 104 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A sum that is zero has only zero terms.
Statement
theorem tot_eq_zero {n : Nat} {f : Nat → Nat} (eq_zero : tot n f = 0) : ∀ i, i < n → f i = 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by induction n with | zero => intro i i_lt; omega | succ n ih => simp only [tot] at eq_zero intro i i_lt by_cases is_last : i = n · subst is_last; omega · exact ih (by omega) i (by omega)
Compose.tot_le
theorem in lean/SpectreKnot/Parity.lean, line 63 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Sums are monotone: if f ≤ g term by term, then tot n f ≤ tot n g.
Statement
theorem tot_le {n : Nat} {f g : Nat → Nat} (le_termwise : ∀ i, i < n → f i ≤ g i) : tot n f ≤ tot n g
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by induction n with | zero => exact Nat.le_refl _ | succ n ih => simp only [tot] -- the first `n` terms have := ih (fun i i_lt => le_termwise i (by omega)) -- the last term have := le_termwise n (by omega) omega
Compose.tot_lt
theorem in lean/SpectreKnot/Parity.lean, line 75 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If f ≤ g term by term, and strictly at one term, then tot n f < tot n g.
Statement
theorem tot_lt {n : Nat} {f g : Nat → Nat} (le_termwise : ∀ i, i < n → f i ≤ g i) {i : Nat} (i_lt : i < n)
(lt_at_i : f i < g i) : tot n f < tot n g
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by induction n with | zero => omega | succ n ih => simp only [tot] by_cases is_last : i = n · subst is_last -- the terms before the strict one have := tot_le (n := i) (fun k k_lt => le_termwise k (by omega)) omega -- the strict term is among the first `n` · have := ih (fun k k_lt => le_termwise k (by omega)) (by omega) -- the last term have := le_termwise n (by omega) omega
Compose.tot_ne_zero
theorem in lean/SpectreKnot/Parity.lean, line 93 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A sum that is not zero has a term that is not zero.
Statement
theorem tot_ne_zero {n : Nat} {f : Nat → Nat} (ne_zero : tot n f ≠ 0) : ∃ i, i < n ∧ f i ≠ 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by induction n with | zero => exact absurd rfl ne_zero | succ n ih => simp only [tot] at ne_zero by_cases last_zero : f n = 0 · obtain ⟨i, i_lt, term_ne⟩ := ih (by omega) exact ⟨i, by omega, term_ne⟩ · exact ⟨n, by omega, last_zero⟩
GPort
abbrev in lean/SpectreKnot/Gluing.lean, line 33 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Rim ports are (c, u, s): R_c(u) if s = true, L_c(u) if false.
Statement
abbrev GPort := Nat × Nat × Bool
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing
structure in lean/SpectreKnot/Gluing.lean, line 41 · read it in its file
Formalises Lemma 4.2 Gluing.
Used, through the names in proofs, for Theorem A, Theorem B, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The data of a patch glued from children.
Statement
structure Gluing where n : Nat E : Nat → Nat A : Nat → Nat B : Nat → Nat mate : Nat → Nat → Option (Nat × Nat)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Cross
abbrev in lean/SpectreKnot/Subdivide.lean, line 24 · read it in its file
Doc comment
Cross p q: from port p, crossing an edge (σ) and then, while not yet at q, going through a piece (τ) and crossing again, leads to q: a connection of the zigzag lemma (Zigzag.Chain) in the gluing.
Statement
abbrev Cross (G : Gluing) : GPort → GPort → Prop := Zigzag.Chain G.sigma G.tau
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Cross.reach
theorem in lean/SpectreKnot/Subdivide.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A forced chain of crossings from p to q extends walks backwards: if the piece at x leads to p, and the walk from q ends at the rim port r, then so does the walk from x.
Statement
theorem Cross.reach {p q : GPort} (cross : G.Cross p q) :
∀ x r, G.tau x = p → G.FullReach q r → G.FullReach x r
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by induction cross with | one crosses => intro x r tau_x reach_q obtain ⟨k, walk⟩ := reach_q exact ⟨k + 1, .step (by rw [tau_x]; exact crosses) walk⟩ | more crosses _ ih => intro x r tau_x reach_q obtain ⟨k, walk⟩ := ih _ r rfl reach_q exact ⟨k + 1, .step (by rw [tau_x]; exact crosses) walk⟩
Gluing.Cut
structure in lean/SpectreKnot/Subdivide.lean, line 179 · read it in its file
Doc comment
A cut: edge e₀ of child c₀ is cut into three edges. If two, it is glued to edge e₁ of child c₁, which is cut too (the same physical edge); otherwise it lies on the parent's rim.
Statement
structure Cut where c₀ : Nat e₀ : Nat c₁ : Nat e₁ : Nat two : Bool
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Cut.OK
structure in lean/SpectreKnot/Subdivide.lean, line 217 · read it in its file
Doc comment
When a cut can be made: the cut edge is not the last edge of its child (so nothing wraps round), and it is glued to an edge of a different child, also not the last, or lies on the rim.
Statement
structure Cut.OK (G : Gluing) (κ : Cut) : Prop where wf : G.WF c₀ : κ.c₀ < G.n e₀ : κ.e₀ + 1 < G.E κ.c₀ mate : G.mate κ.c₀ κ.e₀ = if κ.two = true then some (κ.c₁, κ.e₁) else none ne : κ.two = true → κ.c₁ ≠ κ.c₀ e₁ : κ.two = true → κ.e₁ + 1 < G.E κ.c₁
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Cut.OK.E_c₀
theorem in lean/SpectreKnot/Subdivide.lean, line 330 · read it in its file
Doc comment
The cut child c₀ has two more edges after the cut.
Statement
theorem E_c₀ : (subdiv G κ).E κ.c₀ = G.E κ.c₀ + 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by dsimp only [subdiv] rw [ite_eq_left rfl, ite_eq_right (fun ⟨cut_glued, same⟩ => cut_ok.ne cut_glued same.symm)]
Gluing.Cut.OK.E_c₁
theorem in lean/SpectreKnot/Subdivide.lean, line 335 · read it in its file
Doc comment
The partner child c₁ (when the cut edge is glued) has two more edges after the cut.
Statement
theorem E_c₁ (cut_glued : κ.two = true) : (subdiv G κ).E κ.c₁ = G.E κ.c₁ + 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
dsimp only [subdiv]
rw [ite_eq_right (cut_ok.ne cut_glued), ite_eq_left ⟨cut_glued, rfl⟩]Gluing.Cut.OK.E_other
theorem in lean/SpectreKnot/Subdivide.lean, line 340 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every other child keeps its rim length.
Statement
theorem E_other {c : Nat} (not_c₀ : c ≠ κ.c₀) (not_c₁ : ¬ (κ.two = true ∧ c = κ.c₁)) :
(subdiv G κ).E c = G.E c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
dsimp only [subdiv]
rw [ite_eq_right not_c₀, ite_eq_right not_c₁]; simpGluing.Cut.OK.corner_new₀
theorem in lean/SpectreKnot/Subdivide.lean, line 583 · read it in its file
Doc comment
The new vertices of c₀ are not corners.
Statement
theorem corner_new₀ {i : Nat} (i_ge : 1 ≤ i) (i_le : i ≤ 2) : (subdiv G κ).corner κ.c₀ (κ.e₀ + i) = false
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by simp only [Gluing.corner, Bool.or_eq_false_iff, beq_eq_false_iff_ne, ne_eq] dsimp only [subdiv] constructor <;> intro at_corner <;> · rcases cut_ok.sh_cases κ.c₀ _ with ⟨stays, le₀, _⟩ | ⟨moves, after⟩ · rw [stays] at at_corner -- the corner is at most the cut edge, so it is not a new vertex have := le₀ rfl omega · rw [moves] at at_corner rcases after with ⟨_, _⟩ | ⟨cut_glued, same, _⟩ · omega · exact cut_ok.ne cut_glued same.symm
Gluing.Cut.OK.corner_new₁
theorem in lean/SpectreKnot/Subdivide.lean, line 598 · read it in its file
Doc comment
The new vertices of c₁ (when the cut edge is glued) are not corners.
Statement
theorem corner_new₁ (cut_glued : κ.two = true) {i : Nat} (i_ge : 1 ≤ i) (i_le : i ≤ 2) :
(subdiv G κ).corner κ.c₁ (κ.e₁ + i) = false
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by simp only [Gluing.corner, Bool.or_eq_false_iff, beq_eq_false_iff_ne, ne_eq] dsimp only [subdiv] constructor <;> intro at_corner <;> · rcases cut_ok.sh_cases κ.c₁ _ with ⟨stays, _, le₁⟩ | ⟨moves, after⟩ · rw [stays] at at_corner -- the corner is at most the partner edge, so it is not a new vertex have := le₁ ⟨cut_glued, rfl⟩ omega · rw [moves] at at_corner rcases after with ⟨same, _⟩ | ⟨_, _, _⟩ · exact cut_ok.ne cut_glued same · omega
Gluing.Cut.OK.cross_cut₀
theorem in lean/SpectreKnot/Subdivide.lean, line 697 · read it in its file
Doc comment
The new path of a glued cut edge, read from c₀ (Lemma 7.1 with the zigzag lemma for n = 3): from R_{c₀}(e₀) to R_{c₁}(e₁), and from L_{c₁}(e₁ + 3) to L_{c₀}(e₀ + 3).
Statement
theorem cross_cut₀ (cut_glued : κ.two = true) :
(subdiv G κ).Cross (κ.c₀, κ.e₀, true) (κ.c₁, κ.e₁, true) ∧
(subdiv G κ).Cross (κ.c₁, κ.e₁ + 3, false) (κ.c₀, κ.e₀ + 3, false)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ exact cross_three (by rw [cut_ok.E_c₀]; omega) (fun i i_le => by rw [cut_ok.mate_new₀ i_le, ite_eq_left cut_glued]) (fun i i_le => cut_ok.mate_new₁ cut_glued i_le) (fun i i_ge i_le => cut_ok.corner_new₀ i_ge i_le) (fun i i_ge i_le => cut_ok.corner_new₁ cut_glued i_ge i_le)
Gluing.Cut.OK.cross_cut₁
theorem in lean/SpectreKnot/Subdivide.lean, line 710 · read it in its file
Doc comment
The new path of a glued cut edge, read from c₁: from R_{c₁}(e₁) to R_{c₀}(e₀), and from L_{c₀}(e₀ + 3) to L_{c₁}(e₁ + 3).
Statement
theorem cross_cut₁ (cut_glued : κ.two = true) :
(subdiv G κ).Cross (κ.c₁, κ.e₁, true) (κ.c₀, κ.e₀, true) ∧
(subdiv G κ).Cross (κ.c₀, κ.e₀ + 3, false) (κ.c₁, κ.e₁ + 3, false)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued exact cross_three (by rw [cut_ok.E_c₁ cut_glued]; omega) (fun i i_le => cut_ok.mate_new₁ cut_glued i_le) (fun i i_le => by rw [cut_ok.mate_new₀ i_le, ite_eq_left cut_glued]) (fun i i_ge i_le => cut_ok.corner_new₁ cut_glued i_ge i_le) (fun i i_ge i_le => cut_ok.corner_new₀ i_ge i_le)
Gluing.Cut.OK.mate_cut₀
theorem in lean/SpectreKnot/Subdivide.lean, line 660 · read it in its file
Doc comment
The first new edge of c₀ (where the cut edge began) is glued to the last new edge of c₁, or lies on the rim.
Statement
theorem mate_cut₀ : (subdiv G κ).mate κ.c₀ κ.e₀ = if κ.two = true then some (κ.c₁, κ.e₁ + 2) else none
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- `mate_new₀` at the first new edge have first := cut_ok.mate_new₀ (i := 0) (by omega) simpa using first
Gluing.Cut.OK.mate_cut₁
theorem in lean/SpectreKnot/Subdivide.lean, line 666 · read it in its file
Doc comment
The first new edge of c₁ (where the partner edge began) is glued to the last new edge of c₀.
Statement
theorem mate_cut₁ (cut_glued : κ.two = true) : (subdiv G κ).mate κ.c₁ κ.e₁ = some (κ.c₀, κ.e₀ + 2)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- `mate_new₁` at the first new edge have first := cut_ok.mate_new₁ cut_glued (i := 0) (by omega) simpa using first
Gluing.Cut.OK.mate_new₀
theorem in lean/SpectreKnot/Subdivide.lean, line 392 · read it in its file
Doc comment
The three edges that the cut edge of c₀ becomes: glued, in reverse order, to the three that the partner edge becomes, or on the parent's rim like the cut edge.
Statement
theorem mate_new₀ {i : Nat} (i_le : i ≤ 2) : (subdiv G κ).mate κ.c₀ (κ.e₀ + i) = if κ.two = true then some (κ.c₁, κ.e₁ + 2 - i) else none
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by dsimp only [subdiv] rw [ite_eq_left ⟨rfl, by omega, by omega⟩, show κ.e₀ + i - κ.e₀ = i by omega]
Gluing.Cut.OK.mate_new₁
theorem in lean/SpectreKnot/Subdivide.lean, line 398 · read it in its file
Doc comment
The three edges that the partner edge of c₁ becomes: glued, in reverse order, to the three new edges of c₀.
Statement
theorem mate_new₁ (cut_glued : κ.two = true) {i : Nat} (i_le : i ≤ 2) :
(subdiv G κ).mate κ.c₁ (κ.e₁ + i) = some (κ.c₀, κ.e₀ + 2 - i)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by dsimp only [subdiv] rw [ite_eq_right (fun ⟨same, _⟩ => cut_ok.ne cut_glued same), ite_eq_left ⟨cut_glued, rfl, by omega, by omega⟩, show κ.e₁ + i - κ.e₁ = i by omega]
Gluing.Cut.OK.mate_none
theorem in lean/SpectreKnot/Signature.lean, line 131 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
A rim edge stays a rim edge.
Statement
theorem mate_none {c k : Nat} (on_rim : G.mate c k = none) : (subdiv G κ).mate c (κ.sh c k) = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by
by_cases is_cut₀ : c = κ.c₀ ∧ k = κ.e₀
· obtain ⟨rfl, rfl⟩ := is_cut₀
rw [cut_ok.sh_c₀_le (Nat.le_refl _), cut_ok.mate_cut₀, cut_ok.two_false on_rim]; rfl
· by_cases is_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ k = κ.e₁
· obtain ⟨cut_glued, rfl, rfl⟩ := is_cut₁
rw [(cut_ok.two_mate cut_glued).2.2] at on_rim; contradiction
· rw [cut_ok.mate_old is_cut₀ is_cut₁, on_rim]; rflGluing.Cut.OK.mate_old
theorem in lean/SpectreKnot/Subdivide.lean, line 405 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
An edge that is not cut is glued as before (with positions moved on).
Statement
theorem mate_old {c k : Nat} (not_cut₀ : ¬ (c = κ.c₀ ∧ k = κ.e₀)) (not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ k = κ.e₁)) : (subdiv G κ).mate c (κ.sh c k) = (G.mate c k).map fun (c₂, k₂) => (c₂, κ.sh c₂ k₂)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (40 lines)
by dsimp only [subdiv] -- undoing the shift gives back `k` have unshift : κ.unsh c (κ.sh c k) = k := by unfold Cut.unsh rcases cut_ok.sh_cases c k with ⟨stays, le₀, le₁⟩ | ⟨moves, after⟩ · rw [stays] by_cases is_c₀ : c = κ.c₀ · have k_le := le₀ is_c₀ -- `k` is at most the cut edge rw [ite_eq_right (by omega), ite_eq_right (fun ⟨cut_glued, is_c₁, _⟩ => cut_ok.ne cut_glued (is_c₁ ▸ is_c₀))] · rw [ite_eq_right (fun ⟨on_c₀, _⟩ => is_c₀ on_c₀)] by_cases is_c₁ : κ.two = true ∧ c = κ.c₁ · have k_le := le₁ is_c₁ -- `k` is at most the partner edge rw [ite_eq_right (by omega)] · rw [ite_eq_right (fun ⟨cut_glued, on_c₁, _⟩ => is_c₁ ⟨cut_glued, on_c₁⟩)] · rw [moves] rcases after with ⟨rfl, k_gt⟩ | ⟨cut_glued, rfl, k_gt⟩ · rw [ite_eq_left ⟨rfl, by omega⟩]; omega · rw [ite_eq_right (fun ⟨same, _⟩ => cut_ok.ne cut_glued same), ite_eq_left ⟨cut_glued, rfl, by omega⟩]; omega -- the shifted position is not one of the three new edges of `c₀` have not_new₀ : ¬ (c = κ.c₀ ∧ κ.e₀ ≤ κ.sh c k ∧ κ.sh c k ≤ κ.e₀ + 2) := by rintro ⟨rfl, ge_cut, le_cut⟩ rcases cut_ok.sh_cases κ.c₀ k with ⟨stays, le₀, _⟩ | ⟨moves, after⟩ · have k_le := le₀ rfl -- `k` is at most the cut edge, so it would be the cut edge rw [stays] at ge_cut le_cut; exact not_cut₀ ⟨rfl, by omega⟩ · rw [moves] at ge_cut le_cut rcases after with ⟨_, k_gt⟩ | ⟨cut_glued, same, _⟩ · omega · exact cut_ok.ne cut_glued same.symm -- the shifted position is not one of the three new edges of `c₁` have not_new₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ ≤ κ.sh c k ∧ κ.sh c k ≤ κ.e₁ + 2) := by rintro ⟨cut_glued, rfl, ge_cut, le_cut⟩ rcases cut_ok.sh_cases κ.c₁ k with ⟨stays, _, le₁⟩ | ⟨moves, after⟩ · have k_le := le₁ ⟨cut_glued, rfl⟩ -- `k` is at most the partner edge, so it would be the partner edge rw [stays] at ge_cut le_cut; exact not_cut₁ ⟨cut_glued, rfl, by omega⟩ · rw [moves] at ge_cut le_cut rcases after with ⟨same, _⟩ | ⟨_, _, k_gt⟩ · exact cut_ok.ne cut_glued same · omega rw [ite_eq_right not_new₀, ite_eq_right not_new₁, unshift]
Gluing.Cut.OK.new_hook
theorem in lean/SpectreKnot/Signature.lean, line 253 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
The two new vertices of a cut rim edge are parent rim vertices with a hook.
Statement
theorem new_hook (cut_on_rim : κ.two = false) {i : Nat} (i_ge : 1 ≤ i) (i_le : i ≤ 2) :
(subdiv G κ).Rot (κ.c₀, κ.e₀ + i) (κ.c₀, κ.e₀ + i) ∧
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + i, false) (κ.c₀, κ.e₀ + i, true)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- the new edge starting at the vertex lies on the rim have on_rim : (subdiv G κ).mate κ.c₀ (κ.e₀ + i) = none := by rw [cut_ok.mate_new₀ (by omega), cut_on_rim]; rfl refine ⟨.stop on_rim, 0, ?_⟩ -- the piece at the vertex joins its two ports, and the walk stops at port `R` there have stops := FReach.stop (G := subdiv G κ) (x := (κ.c₀, κ.e₀ + i, false)) (by rw [cut_ok.tau_new₀ i_ge i_le, Bool.not_false, sigmaR, on_rim]; rfl) rw [cut_ok.tau_new₀ i_ge i_le, Bool.not_false] at stops exact stops
Gluing.Cut.OK.noLoops
theorem in lean/SpectreKnot/NewWalk.lean, line 292 · read it in its file
Formalises Lemma 7.1 Lengthening.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A cut creates no closed strand (the end of the proof of Lemma 7.1). If the walk of G from every port reaches the rim, so does the walk of the cut gluing from every port. From a port at an old vertex it is the image of a walk of G (Sim.reach). From a port at a new vertex it follows one of the two connections along the new path, for one or two crossings, to a port at an old vertex (step0_2F, …); or, if the cut edge lies on the rim, it leaves at once, through the new hook.
Statement
theorem noLoops (no_loops : ∀ x, G.Valid x → ∃ r, G.FullReach x r) :
∀ x, (subdiv G κ).Valid x → ∃ r, (subdiv G κ).FullReach x r
Names in its proof
Gluing.Cut.OK.port_reachGluing.Cut.OK.preimageGluing.Cut.OK.step0_1FGluing.Cut.OK.step0_1TGluing.Cut.OK.step0_2FGluing.Cut.OK.step0_2TGluing.Cut.OK.step1_1FGluing.Cut.OK.step1_1TGluing.Cut.OK.step1_2FGluing.Cut.OK.step1_2TGluing.Cut.OK.two_mateGluing.Cut.portGluing.FullReachGluing.ValidGluing.prv_succ'Gluing.sigmaLGluing.sigmaRGluing.subdivGluing.tauStatement.Patch.E
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (66 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_lt := ok.e₀ -- from the image of a port of `G`: the image of its walk have old : ∀ y, G.Valid y → ∃ r, (subdiv G κ).FullReach (κ.port y) r := fun y y_valid => by obtain ⟨r, walk⟩ := no_loops y y_valid exact ⟨κ.port r, ok.port_reach y_valid walk⟩ rintro ⟨c, v, s⟩ ⟨c_lt, v_lt⟩ by_cases new₀ : c = κ.c₀ ∧ κ.e₀ < v ∧ v ≤ κ.e₀ + 2 · obtain ⟨rfl, v_gt, v_le⟩ := new₀ obtain ⟨i, i_ge, i_le, rfl⟩ : ∃ i, 1 ≤ i ∧ i ≤ 2 ∧ v = κ.e₀ + i := ⟨v - κ.e₀, by omega, by omega, by omega⟩ by_cases shared : κ.two = true · -- the mate of the cut edge is an actual edge of an actual child obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared -- and not its last edge have e₁_succ_lt := ok.e₁ shared obtain rfl | rfl : i = 1 ∨ i = 2 := by omega · cases s · -- `L(e₀ + 1)`: to `L_{c₀}` at the old `e₀ + 1` obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀ + 1, false) ⟨ok.c₀, e₀_lt⟩ exact ⟨r, ok.step0_1F shared walk⟩ · -- `R(e₀ + 1)`: to `L_{c₁}` at the old `e₁ + 1` obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁ + 1, false) ⟨c₁_lt, e₁_succ_lt⟩ exact ⟨r, ok.step0_1T shared walk⟩ · cases s · -- `L(e₀ + 2)`: to `R_{c₁}(e₁)` obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁, true) ⟨c₁_lt, e₁_lt⟩ exact ⟨r, ok.step0_2F shared walk⟩ · -- `R(e₀ + 2)`: to `R_{c₀}(e₀)` obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀, true) ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega⟩ exact ⟨r, ok.step0_2T shared walk⟩ · -- the cut edge lies on the rim: through the new hook, onto a new rim edge refine ⟨(subdiv G κ).tau (κ.c₀, κ.e₀ + i, s), 0, .stop ?_⟩ rw [ok.tau_new₀ i_ge i_le] cases s · -- from `L` to `R`, on the new edge `e₀ + i` rw [Bool.not_false, sigmaR, ok.mate_new₀ i_le, ite_eq_right shared]; rfl · -- from `R` to `L`, on the new edge `e₀ + i - 1` rw [Bool.not_true, sigmaL, show κ.e₀ + i = (κ.e₀ + (i - 1)) + 1 by omega, prv_succ', ok.mate_new₀ (by omega), ite_eq_right shared]; rfl · by_cases new₁ : κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ < v ∧ v ≤ κ.e₁ + 2 · obtain ⟨shared, rfl, v_gt, v_le⟩ := new₁ -- the mate of the cut edge is an actual edge of an actual child obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared -- and not its last edge have e₁_succ_lt := ok.e₁ shared obtain rfl | rfl : v = κ.e₁ + 1 ∨ v = κ.e₁ + 2 := by omega · cases s · -- `L(e₁ + 1)`: to `L_{c₁}` at the old `e₁ + 1` obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁ + 1, false) ⟨c₁_lt, e₁_succ_lt⟩ exact ⟨r, ok.step1_1F shared walk⟩ · -- `R(e₁ + 1)`: to `L_{c₀}` at the old `e₀ + 1` obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀ + 1, false) ⟨ok.c₀, e₀_lt⟩ exact ⟨r, ok.step1_1T shared walk⟩ · cases s · -- `L(e₁ + 2)`: to `R_{c₀}(e₀)` obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀, true) ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega⟩ exact ⟨r, ok.step1_2F shared walk⟩ · -- `R(e₁ + 2)`: to `R_{c₁}(e₁)` obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁, true) ⟨c₁_lt, e₁_lt⟩ exact ⟨r, ok.step1_2T shared walk⟩ · -- an old vertex: the image of a port of `G` obtain ⟨u, u_lt, shifted⟩ := ok.preimage v_lt new₀ new₁ obtain ⟨r, walk⟩ := old (c, u, s) ⟨c_lt, u_lt⟩ simp only [Cut.port, shifted] at walk exact ⟨r, walk⟩
Gluing.Cut.OK.nw0_1F
theorem in lean/SpectreKnot/NewWalk.lean, line 223 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 1 of c₀, port L: the walk from L(e₀ + 1) in the cut gluing ends where the walk from the old L(e₀ + 1) ended in G.
Statement
theorem nw0_1F {r : GPort} (old_walk : G.FullReach (κ.c₀, κ.e₀ + 1, false) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 1, false) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- two steps from `L(e₀ + 1)` reach `L_{c₀}` at the old `e₀ + 1`; from there, the old walk exact ok.step0_1F shared (ok.port_reach ⟨ok.c₀, show κ.e₀ + 1 < G.E κ.c₀ by omega⟩ old_walk)
Gluing.Cut.OK.nw0_1T
theorem in lean/SpectreKnot/NewWalk.lean, line 201 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 1 of c₀, port R: the walk from R(e₀ + 1) in the cut gluing ends where the walk from the old R(e₀ + 1) ended in G (when the old e₀ + 1 is not a corner of c₀).
Statement
theorem nw0_1T (not_corner : G.corner κ.c₀ (κ.e₀ + 1) = false) {r : GPort}
(old_walk : G.FullReach (κ.c₀, κ.e₀ + 1, true) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 1, true) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by -- the mate of the cut edge is an actual edge of an actual child obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared -- and not its last edge have e₁_succ_lt := ok.e₁ shared -- in `G`: through the hook at the old `e₀ + 1` to `L`, then across the cut edge to `L_{c₁}(e₁ + 1)` have first_step : G.sigma (G.tau (κ.c₀, κ.e₀ + 1, true)) = some (κ.c₁, κ.e₁ + 1, false) := by rw [tau_of_not_corner not_corner, Bool.not_true, sigmaL, prv_succ'] -- the cut edge is edge `e₁` of `c₁` have cut_mate := ok.mate rw [ite_eq_left shared] at cut_mate rw [cut_mate] simp only [Option.map_some, nxt_of_lt' e₁_succ_lt] -- in the cut gluing, one step from `R(e₀ + 1)` reaches `L_{c₁}` at the old `e₁ + 1` too; then the rest of the old -- walk exact ok.step0_1T shared (ok.port_reach ⟨c₁_lt, show κ.e₁ + 1 < G.E κ.c₁ by omega⟩ (fullReach_first first_step old_walk))
Gluing.Cut.OK.nw0_2F
theorem in lean/SpectreKnot/NewWalk.lean, line 176 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 2 of c₀, port L: the walk from L(e₀ + 2) in the cut gluing ends where the walk from the old L(e₀) ended in G (when e₀ is not a corner of c₀).
Statement
theorem nw0_2F (not_corner : G.corner κ.c₀ κ.e₀ = false) {r : GPort} (old_walk : G.FullReach (κ.c₀, κ.e₀, false) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 2, false) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by -- the mate of the cut edge is an actual edge of an actual child obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared -- in `G`: through the hook at `e₀` to `R_{c₀}(e₀)`, then across the cut edge to `R_{c₁}(e₁)` have first_step : G.sigma (G.tau (κ.c₀, κ.e₀, false)) = some (κ.c₁, κ.e₁, true) := by rw [tau_of_not_corner not_corner, Bool.not_false, sigmaR] -- the cut edge is edge `e₁` of `c₁` have cut_mate := ok.mate rw [ite_eq_left shared] at cut_mate rw [cut_mate]; rfl -- in the cut gluing, one step from `L(e₀ + 2)` reaches `R_{c₁}(e₁)` too; from there, the rest of the old walk exact ok.step0_2F shared (ok.port_reach ⟨c₁_lt, e₁_lt⟩ (fullReach_first first_step old_walk))
Gluing.Cut.OK.nw0_2T
theorem in lean/SpectreKnot/NewWalk.lean, line 192 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 2 of c₀, port R: the walk from R(e₀ + 2) in the cut gluing ends where the walk from the old R(e₀) ended in G.
Statement
theorem nw0_2T {r : GPort} (old_walk : G.FullReach (κ.c₀, κ.e₀, true) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 2, true) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- two steps from `R(e₀ + 2)` reach `R_{c₀}(e₀)`; from there, the old walk exact ok.step0_2T shared (ok.port_reach ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega⟩ old_walk)
Gluing.Cut.OK.nw1_1F
theorem in lean/SpectreKnot/NewWalk.lean, line 274 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 1 of c₁, port L: the walk from L(e₁ + 1) in the cut gluing ends where the walk from the old L(e₁ + 1) ended in G.
Statement
theorem nw1_1F {r : GPort} (old_walk : G.FullReach (κ.c₁, κ.e₁ + 1, false) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 1, false) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the mate of the cut edge is an actual edge of an actual child obtain ⟨c₁_lt, _, _⟩ := ok.two_mate shared -- and not its last edge have e₁_succ_lt := ok.e₁ shared -- two steps from `L(e₁ + 1)` reach `L_{c₁}` at the old `e₁ + 1`; from there, the old walk exact ok.step1_1F shared (ok.port_reach ⟨c₁_lt, show κ.e₁ + 1 < G.E κ.c₁ by omega⟩ old_walk)
Gluing.Cut.OK.nw1_1T
theorem in lean/SpectreKnot/NewWalk.lean, line 256 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 1 of c₁, port R: the walk from R(e₁ + 1) in the cut gluing ends where the walk from the old R(e₁ + 1) ended in G (when the old e₁ + 1 is not a corner of c₁).
Statement
theorem nw1_1T (not_corner : G.corner κ.c₁ (κ.e₁ + 1) = false) {r : GPort}
(old_walk : G.FullReach (κ.c₁, κ.e₁ + 1, true) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 1, true) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- the cut edge's mate is glued back to it obtain ⟨_, _, mate_back⟩ := ok.two_mate shared -- in `G`: through the hook at the old `e₁ + 1` to `L`, then across the cut edge to `L_{c₀}(e₀ + 1)` have first_step : G.sigma (G.tau (κ.c₁, κ.e₁ + 1, true)) = some (κ.c₀, κ.e₀ + 1, false) := by rw [tau_of_not_corner not_corner, Bool.not_true, sigmaL, prv_succ', mate_back] simp only [Option.map_some, nxt_of_lt' e₀_succ_lt] -- in the cut gluing, one step from `R(e₁ + 1)` reaches `L_{c₀}` at the old `e₀ + 1` too; then the rest of the old -- walk exact ok.step1_1T shared (ok.port_reach ⟨ok.c₀, show κ.e₀ + 1 < G.E κ.c₀ by omega⟩ (fullReach_first first_step old_walk))
Gluing.Cut.OK.nw1_2F
theorem in lean/SpectreKnot/NewWalk.lean, line 232 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 2 of c₁, port L: the walk from L(e₁ + 2) in the cut gluing ends where the walk from the old L(e₁) ended in G (when e₁ is not a corner of c₁).
Statement
theorem nw1_2F (not_corner : G.corner κ.c₁ κ.e₁ = false) {r : GPort} (old_walk : G.FullReach (κ.c₁, κ.e₁, false) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 2, false) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- the cut edge's mate is glued back to it obtain ⟨_, _, mate_back⟩ := ok.two_mate shared -- in `G`: through the hook at `e₁` to `R_{c₁}(e₁)`, then across the cut edge to `R_{c₀}(e₀)` have first_step : G.sigma (G.tau (κ.c₁, κ.e₁, false)) = some (κ.c₀, κ.e₀, true) := by rw [tau_of_not_corner not_corner, Bool.not_false, sigmaR, mate_back]; rfl -- in the cut gluing, one step from `L(e₁ + 2)` reaches `R_{c₀}(e₀)` too; from there, the rest of the old walk exact ok.step1_2F shared (ok.port_reach ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega⟩ (fullReach_first first_step old_walk))
Gluing.Cut.OK.nw1_2T
theorem in lean/SpectreKnot/NewWalk.lean, line 247 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 2 of c₁, port R: the walk from R(e₁ + 2) in the cut gluing ends where the walk from the old R(e₁) ended in G.
Statement
theorem nw1_2T {r : GPort} (old_walk : G.FullReach (κ.c₁, κ.e₁, true) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 2, true) (κ.port r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the mate of the cut edge is an actual edge of an actual child obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared -- two steps from `R(e₁ + 2)` reach `R_{c₁}(e₁)`; from there, the old walk exact ok.step1_2T shared (ok.port_reach ⟨c₁_lt, e₁_lt⟩ old_walk)
Gluing.Cut.OK.nxt_sh
theorem in lean/SpectreKnot/Subdivide.lean, line 496 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Going forward one vertex from the start of an edge that is not cut commutes with the shift.
Statement
theorem nxt_sh {c k : Nat} (k_lt : k < G.E c) (not_cut₀ : ¬ (c = κ.c₀ ∧ k = κ.e₀))
(not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ k = κ.e₁)) :
nxt ((subdiv G κ).E c) (κ.sh c k) = κ.sh c (nxt (G.E c) k)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (42 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ by_cases is_c₀ : c = κ.c₀ · subst is_c₀ rw [cut_ok.E_c₀] unfold nxt by_cases before : k < κ.e₀ · rw [cut_ok.sh_c₀_le (p := k) (by omega), ite_eq_right (show ¬ (k + 1 = G.E κ.c₀ + 2) by omega), ite_eq_right (show ¬ (k + 1 = G.E κ.c₀) by omega), cut_ok.sh_c₀_le (p := k + 1) (by omega)] -- `k` is past the cut edge · have k_gt : κ.e₀ < k := by -- by assumption, `k` is not the cut edge have not_cut : ¬ k = κ.e₀ := fun same => not_cut₀ ⟨rfl, same⟩ omega rw [cut_ok.sh_c₀_gt k_gt] by_cases at_end : k + 1 = G.E κ.c₀ · rw [ite_eq_left (show k + 2 + 1 = G.E κ.c₀ + 2 by omega), ite_eq_left at_end, cut_ok.sh_c₀_le (p := 0) (by omega)] · rw [ite_eq_right (show ¬ (k + 2 + 1 = G.E κ.c₀ + 2) by omega), ite_eq_right at_end, cut_ok.sh_c₀_gt (p := k + 1) (by omega)] · by_cases is_c₁ : κ.two = true ∧ c = κ.c₁ · obtain ⟨cut_glued, rfl⟩ := is_c₁ -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued rw [cut_ok.E_c₁ cut_glued] unfold nxt by_cases before : k < κ.e₁ · rw [cut_ok.sh_c₁_le cut_glued (p := k) (by omega), ite_eq_right (show ¬ (k + 1 = G.E κ.c₁ + 2) by omega), ite_eq_right (show ¬ (k + 1 = G.E κ.c₁) by omega), cut_ok.sh_c₁_le cut_glued (p := k + 1) (by omega)] -- `k` is past the partner edge · have k_gt : κ.e₁ < k := by -- by assumption, `k` is not the partner edge have not_cut : ¬ k = κ.e₁ := fun same => not_cut₁ ⟨cut_glued, rfl, same⟩ omega rw [cut_ok.sh_c₁_gt cut_glued k_gt] by_cases at_end : k + 1 = G.E κ.c₁ · rw [ite_eq_left (show k + 2 + 1 = G.E κ.c₁ + 2 by omega), ite_eq_left at_end, cut_ok.sh_c₁_le cut_glued (p := 0) (by omega)] · rw [ite_eq_right (show ¬ (k + 2 + 1 = G.E κ.c₁ + 2) by omega), ite_eq_right at_end, cut_ok.sh_c₁_gt cut_glued (p := k + 1) (by omega)] · rw [cut_ok.E_other is_c₀ is_c₁, cut_ok.sh_other is_c₀ is_c₁, cut_ok.sh_other is_c₀ is_c₁]
Gluing.Cut.OK.port_reach
theorem in lean/SpectreKnot/NewWalk.lean, line 48 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A walk of G from an actual port, carried into the cut gluing: it starts and ends at the same ports, with positions after the cut moved on by 2.
Statement
theorem port_reach {x r : GPort} (x_valid : G.Valid x) (walk : G.FullReach x r) :
(subdiv G κ).FullReach (κ.port x) (κ.port r)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨k, walk_k⟩ := walk
exact Sim.reach ok.wf ok.sim k x r x_valid walk_kGluing.Cut.OK.preimage
theorem in lean/SpectreKnot/Subdivide.lean, line 614 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every position of the subdivided child that is not new comes from an old one.
Statement
theorem preimage {c k : Nat} (k_lt : k < (subdiv G κ).E c) (not_new₀ : ¬ (c = κ.c₀ ∧ κ.e₀ < k ∧ k ≤ κ.e₀ + 2))
(not_new₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ < k ∧ k ≤ κ.e₁ + 2)) : ∃ u, u < G.E c ∧ κ.sh c u = k
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (25 lines)
by by_cases is_c₀ : c = κ.c₀ · subst is_c₀ rw [cut_ok.E_c₀] at k_lt -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ -- `k` is not one of the two new vertices of `c₀` have not_new : ¬ (κ.e₀ < k ∧ k ≤ κ.e₀ + 2) := fun ⟨k_gt, k_le⟩ => not_new₀ ⟨rfl, k_gt, k_le⟩ by_cases before : k ≤ κ.e₀ · exact ⟨k, by omega, cut_ok.sh_c₀_le before⟩ · refine ⟨k - 2, by omega, ?_⟩ rw [cut_ok.sh_c₀_gt (by omega)]; omega · by_cases is_c₁ : κ.two = true ∧ c = κ.c₁ · obtain ⟨cut_glued, rfl⟩ := is_c₁ rw [cut_ok.E_c₁ cut_glued] at k_lt -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued -- `k` is not one of the two new vertices of `c₁` have not_new : ¬ (κ.e₁ < k ∧ k ≤ κ.e₁ + 2) := fun ⟨k_gt, k_le⟩ => not_new₁ ⟨cut_glued, rfl, k_gt, k_le⟩ by_cases before : k ≤ κ.e₁ · exact ⟨k, by omega, cut_ok.sh_c₁_le cut_glued before⟩ · refine ⟨k - 2, by omega, ?_⟩ rw [cut_ok.sh_c₁_gt cut_glued (by omega)]; omega · rw [cut_ok.E_other is_c₀ is_c₁] at k_lt exact ⟨k, k_lt, cut_ok.sh_other is_c₀ is_c₁⟩
Gluing.Cut.OK.prv_cut
theorem in lean/SpectreKnot/Subdivide.lean, line 681 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The vertex before an old vertex is the start of the cut edge only right after the cut edge.
Statement
theorem prv_cut {c p : Nat} (p_lt : p < G.E c) (prev_cut : c = κ.c₀ ∧ prv (G.E c) p = κ.e₀) : p = κ.e₀ + 1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by obtain ⟨rfl, prev_eq⟩ := prev_cut -- the cut edge is not the last edge of `c₀` have := cut_ok.e₀ unfold prv at prev_eq; split at prev_eq <;> omega
Gluing.Cut.OK.prv_cut₁
theorem in lean/SpectreKnot/Subdivide.lean, line 688 · read it in its file
Doc comment
The vertex before an old vertex is the start of the partner edge only right after the partner edge.
Statement
theorem prv_cut₁ (cut_glued : κ.two = true) {c p : Nat} (p_lt : p < G.E c)
(prev_cut : c = κ.c₁ ∧ prv (G.E c) p = κ.e₁) : p = κ.e₁ + 1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by obtain ⟨rfl, prev_eq⟩ := prev_cut -- the partner edge is not the last edge of `c₁` have := cut_ok.e₁ cut_glued unfold prv at prev_eq; split at prev_eq <;> omega
Gluing.Cut.OK.prv_sh
theorem in lean/SpectreKnot/Subdivide.lean, line 449 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Going back one vertex commutes with the shift, except at the old vertex just after a cut edge.
Statement
theorem prv_sh {c p : Nat} (p_lt : p < G.E c) (not_after₀ : ¬ (c = κ.c₀ ∧ p = κ.e₀ + 1))
(not_after₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ p = κ.e₁ + 1)) :
prv ((subdiv G κ).E c) (κ.sh c p) = κ.sh c (prv (G.E c) p)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (43 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ -- going back from vertex 0 wraps round to the last vertex have prv_zero : ∀ E, prv E 0 = E - 1 := fun E => by simp [prv] -- going back from any other vertex subtracts one have prv_pos : ∀ E q, 0 < q → prv E q = q - 1 := fun E q q_pos => by simp [prv]; omega by_cases is_c₀ : c = κ.c₀ · subst is_c₀ rw [cut_ok.E_c₀] by_cases at_zero : p = 0 · subst at_zero; rw [cut_ok.sh_c₀_le (by omega), prv_zero, prv_zero, cut_ok.sh_c₀_gt (by omega)]; omega · rw [prv_pos _ p (by omega)] by_cases before : p ≤ κ.e₀ · rw [cut_ok.sh_c₀_le before, cut_ok.sh_c₀_le (by omega), prv_pos _ p (by omega)] -- `p` is past the vertex just after the cut edge · have p_gt : κ.e₀ + 1 < p := by -- by assumption, `p` is not the vertex just after the cut edge have not_next : ¬ p = κ.e₀ + 1 := fun same => not_after₀ ⟨rfl, same⟩ omega rw [cut_ok.sh_c₀_gt (p := p) (by omega), cut_ok.sh_c₀_gt (p := p - 1) (by omega), prv_pos _ (p + 2) (by omega)] omega · by_cases is_c₁ : κ.two = true ∧ c = κ.c₁ · obtain ⟨cut_glued, rfl⟩ := is_c₁ -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued rw [cut_ok.E_c₁ cut_glued] by_cases at_zero : p = 0 · subst at_zero rw [cut_ok.sh_c₁_le cut_glued (by omega), prv_zero, prv_zero, cut_ok.sh_c₁_gt cut_glued (by omega)]; omega · rw [prv_pos _ p (by omega)] by_cases before : p ≤ κ.e₁ · rw [cut_ok.sh_c₁_le cut_glued before, cut_ok.sh_c₁_le cut_glued (by omega), prv_pos _ p (by omega)] -- `p` is past the vertex just after the partner edge · have p_gt : κ.e₁ + 1 < p := by -- by assumption, `p` is not the vertex just after the partner edge have not_next : ¬ p = κ.e₁ + 1 := fun same => not_after₁ ⟨cut_glued, rfl, same⟩ omega rw [cut_ok.sh_c₁_gt cut_glued (p := p) (by omega), cut_ok.sh_c₁_gt cut_glued (p := p - 1) (by omega), prv_pos _ (p + 2) (by omega)] omega · rw [cut_ok.E_other is_c₀ is_c₁, cut_ok.sh_other is_c₀ is_c₁, cut_ok.sh_other is_c₀ is_c₁]
Gluing.Cut.OK.rimL_port
theorem in lean/SpectreKnot/Signature.lean, line 141 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
The vertex after a rim edge stays the vertex after a rim edge.
Statement
theorem rimL_port {c u : Nat} (rim_vertex : G.RimL c u) : (subdiv G κ).RimL c (κ.sh c u)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by obtain ⟨c_lt, u_lt, prev_on_rim⟩ := rim_vertex refine ⟨c_lt, cut_ok.sh_lt u_lt, ?_⟩ -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ by_cases after_cut₀ : c = κ.c₀ ∧ u = κ.e₀ + 1 · obtain ⟨rfl, rfl⟩ := after_cut₀ rw [prv_succ'] at prev_on_rim -- the cut edge is on the rim, so only it is cut have cut_on_rim := cut_ok.two_false prev_on_rim rw [cut_ok.sh_c₀_gt (by omega), cut_ok.E_c₀, show κ.e₀ + 1 + 2 = (κ.e₀ + 2) + 1 by omega, prv_succ', cut_ok.mate_new₀ (by omega), cut_on_rim]; rfl · by_cases after_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ u = κ.e₁ + 1 · obtain ⟨cut_glued, rfl, rfl⟩ := after_cut₁ rw [prv_succ', (cut_ok.two_mate cut_glued).2.2] at prev_on_rim; contradiction · rw [cut_ok.prv_sh u_lt after_cut₀ after_cut₁] exact cut_ok.mate_none prev_on_rim
Gluing.Cut.OK.rimL_pre
theorem in lean/SpectreKnot/Signature.lean, line 161 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
Every vertex after a rim edge of the subdivided gluing is an old one, or one of the two new vertices of a cut rim edge.
Statement
theorem rimL_pre {c u' : Nat} (rim_vertex : (subdiv G κ).RimL c u') :
(∃ u, G.RimL c u ∧ κ.sh c u = u') ∨ (κ.two = false ∧ c = κ.c₀ ∧ (u' = κ.e₀ + 1 ∨ u' = κ.e₀ + 2))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (49 lines)
by obtain ⟨c_lt, u'_lt, prev_on_rim⟩ := rim_vertex -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ by_cases new₀ : c = κ.c₀ ∧ κ.e₀ < u' ∧ u' ≤ κ.e₀ + 2 · obtain ⟨rfl, u'_gt, u'_le⟩ := new₀ right -- the edge before a new vertex is a new edge have prev_edge : prv ((subdiv G κ).E κ.c₀) u' = κ.e₀ + (u' - 1 - κ.e₀) := by unfold prv; split <;> omega rw [prev_edge, cut_ok.mate_new₀ (by omega)] at prev_on_rim cases cut_glued : κ.two · exact ⟨rfl, rfl, by omega⟩ · rw [cut_glued] at prev_on_rim; simp at prev_on_rim · by_cases new₁ : κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ < u' ∧ u' ≤ κ.e₁ + 2 · exfalso obtain ⟨cut_glued, rfl, u'_gt, u'_le⟩ := new₁ -- the edge before a new vertex is a new edge, which is glued have prev_edge : prv ((subdiv G κ).E κ.c₁) u' = κ.e₁ + (u' - 1 - κ.e₁) := by unfold prv; split <;> omega rw [prev_edge, cut_ok.mate_new₁ cut_glued (by omega)] at prev_on_rim; contradiction · left obtain ⟨u, u_lt, rfl⟩ := cut_ok.preimage u'_lt new₀ new₁ refine ⟨u, ⟨c_lt, u_lt, ?_⟩, rfl⟩ by_cases after_cut₀ : c = κ.c₀ ∧ u = κ.e₀ + 1 · obtain ⟨rfl, rfl⟩ := after_cut₀ rw [cut_ok.sh_c₀_gt (by omega), cut_ok.E_c₀, show κ.e₀ + 1 + 2 = (κ.e₀ + 2) + 1 by omega, prv_succ', cut_ok.mate_new₀ (by omega)] at prev_on_rim rw [prv_succ'] cases cut_glued : κ.two · have cut_mate := cut_ok.mate -- the cut edge lies on the rim rw [cut_glued] at cut_mate; rw [cut_mate]; rfl · rw [cut_glued] at prev_on_rim; simp at prev_on_rim · by_cases after_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ u = κ.e₁ + 1 · exfalso obtain ⟨cut_glued, rfl, rfl⟩ := after_cut₁ -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued rw [cut_ok.sh_c₁_gt cut_glued (by omega), cut_ok.E_c₁ cut_glued, show κ.e₁ + 1 + 2 = (κ.e₁ + 2) + 1 by omega, prv_succ', cut_ok.mate_new₁ cut_glued (by omega)] at prev_on_rim contradiction · rw [cut_ok.prv_sh u_lt after_cut₀ after_cut₁] at prev_on_rim -- the edge before `u` is not the cut edge have not_cut₀ : ¬ (c = κ.c₀ ∧ prv (G.E c) u = κ.e₀) := fun prev_cut => after_cut₀ ⟨prev_cut.1, cut_ok.prv_cut u_lt prev_cut⟩ -- nor the partner edge have not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ prv (G.E c) u = κ.e₁) := fun ⟨cut_glued, is_c₁, prev_eq⟩ => after_cut₁ ⟨cut_glued, is_c₁, cut_ok.prv_cut₁ cut_glued u_lt ⟨is_c₁, prev_eq⟩⟩ rw [cut_ok.mate_old not_cut₀ not_cut₁, Option.map_eq_none_iff] at prev_on_rim exact prev_on_rim
Gluing.Cut.OK.rot_port
theorem in lean/SpectreKnot/Signature.lean, line 213 · read it in its file
Used, through the names in proofs, for Lemma 7.1.
Doc comment
Turning about an old vertex gives the same result, renumbered.
Statement
theorem rot_port {x r : Nat × Nat} (turn : G.Rot x r) :
x.1 < G.n → x.2 < G.E x.1 → (subdiv G κ).Rot (x.1, κ.sh x.1 x.2) (r.1, κ.sh r.1 r.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (37 lines)
by induction turn with | @stop c u on_rim => intro _ _; exact .stop (cut_ok.mate_none on_rim) | @step c u c' k' r glued _ ih => intro c_lt u_lt obtain ⟨c'_lt, k'_lt, _⟩ := cut_ok.wf.mate_valid _ _ _ _ c_lt u_lt glued -- the rest of the turn, renumbered have rest := ih c'_lt (nxt_lt k'_lt) dsimp only at rest ⊢ by_cases is_cut₀ : c = κ.c₀ ∧ u = κ.e₀ · obtain ⟨rfl, rfl⟩ := is_cut₀ obtain ⟨cut_glued, partner⟩ := cut_ok.two_true glued simp only [Prod.mk.injEq] at partner obtain ⟨rfl, rfl⟩ := partner -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued refine .step (c' := κ.c₁) (k' := κ.e₁ + 2) ?_ ?_ · rw [cut_ok.sh_c₀_le (Nat.le_refl _), cut_ok.mate_cut₀, ite_eq_left cut_glued] · rw [cut_ok.E_c₁ cut_glued, nxt_of_lt' (by omega)] rw [nxt_of_lt' e₁_lt, cut_ok.sh_c₁_gt cut_glued (by omega)] at rest exact rest · by_cases is_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ u = κ.e₁ · obtain ⟨cut_glued, rfl, rfl⟩ := is_cut₁ rw [(cut_ok.two_mate cut_glued).2.2] at glued simp only [Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ refine .step (c' := κ.c₀) (k' := κ.e₀ + 2) ?_ ?_ · rw [cut_ok.sh_c₁_le cut_glued (Nat.le_refl _), cut_ok.mate_cut₁ cut_glued] · rw [cut_ok.E_c₀, nxt_of_lt' (by omega)] rw [nxt_of_lt' e₀_lt, cut_ok.sh_c₀_gt (by omega)] at rest exact rest · refine .step (c' := c') (k' := κ.sh c' k') ?_ ?_ · rw [cut_ok.mate_old is_cut₀ is_cut₁, glued]; rfl · obtain ⟨mate_not_cut₀, mate_not_cut₁⟩ := cut_ok.target_not_cut c_lt u_lt glued is_cut₀ is_cut₁ rw [cut_ok.nxt_sh k'_lt mate_not_cut₀ mate_not_cut₁]; exact rest
Gluing.Cut.OK.sh_cases
theorem in lean/SpectreKnot/Subdivide.lean, line 346 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Positions move only forwards, and never onto the new vertices.
Statement
theorem sh_cases (c p : Nat) :
(κ.sh c p = p ∧ (c = κ.c₀ → p ≤ κ.e₀) ∧ (κ.two = true ∧ c = κ.c₁ → p ≤ κ.e₁)) ∨
(κ.sh c p = p + 2 ∧ ((c = κ.c₀ ∧ κ.e₀ < p) ∨ (κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ < p)))
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by by_cases is_c₀ : c = κ.c₀ · subst is_c₀ by_cases after : κ.e₀ < p · exact Or.inr ⟨cut_ok.sh_c₀_gt after, Or.inl ⟨rfl, after⟩⟩ · exact Or.inl ⟨cut_ok.sh_c₀_le (by omega), fun _ => by omega, fun ⟨cut_glued, same⟩ => absurd same.symm (cut_ok.ne cut_glued)⟩ · by_cases is_c₁ : κ.two = true ∧ c = κ.c₁ · obtain ⟨cut_glued, rfl⟩ := is_c₁ by_cases after : κ.e₁ < p · exact Or.inr ⟨cut_ok.sh_c₁_gt cut_glued after, Or.inr ⟨cut_glued, rfl, after⟩⟩ · exact Or.inl ⟨cut_ok.sh_c₁_le cut_glued (by omega), fun same => absurd same is_c₀, fun _ => by omega⟩ · exact Or.inl ⟨cut_ok.sh_other is_c₀ is_c₁, fun same => absurd same is_c₀, fun same => absurd same is_c₁⟩
Gluing.Cut.OK.sh_c₀_gt
theorem in lean/SpectreKnot/Subdivide.lean, line 310 · read it in its file
Doc comment
On c₀, positions after the cut edge move on by 2.
Statement
theorem sh_c₀_gt {p : Nat} (p_gt : κ.e₀ < p) : κ.sh κ.c₀ p = p + 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
unfold Cut.sh; rw [ite_eq_left ⟨rfl, p_gt⟩]Gluing.Cut.OK.sh_c₀_le
theorem in lean/SpectreKnot/Subdivide.lean, line 302 · read it in its file
Doc comment
On c₀, positions up to the cut edge stay put.
Statement
theorem sh_c₀_le {p : Nat} (p_le : p ≤ κ.e₀) : κ.sh κ.c₀ p = p
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by unfold Cut.sh -- `c₀` is not the partner child `c₁` have not_c₁ : ¬ (κ.two = true ∧ κ.c₀ = κ.c₁ ∧ κ.e₁ < p) := fun ⟨cut_glued, same, _⟩ => cut_ok.ne cut_glued same.symm rw [ite_eq_right (by omega), ite_eq_right not_c₁]
Gluing.Cut.OK.sh_c₁_gt
theorem in lean/SpectreKnot/Subdivide.lean, line 319 · read it in its file
Doc comment
On c₁ (when the cut edge is glued), positions after the partner edge move on by 2.
Statement
theorem sh_c₁_gt (cut_glued : κ.two = true) {p : Nat} (p_gt : κ.e₁ < p) : κ.sh κ.c₁ p = p + 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by unfold Cut.sh rw [ite_eq_right (fun ⟨same, _⟩ => cut_ok.ne cut_glued same), ite_eq_left ⟨cut_glued, rfl, p_gt⟩]
Gluing.Cut.OK.sh_c₁_le
theorem in lean/SpectreKnot/Subdivide.lean, line 314 · read it in its file
Doc comment
On c₁ (when the cut edge is glued), positions up to the partner edge stay put.
Statement
theorem sh_c₁_le (cut_glued : κ.two = true) {p : Nat} (p_le : p ≤ κ.e₁) : κ.sh κ.c₁ p = p
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by unfold Cut.sh rw [ite_eq_right (fun ⟨same, _⟩ => cut_ok.ne cut_glued same), ite_eq_right (by omega)]
Gluing.Cut.OK.sh_inj
theorem in lean/SpectreKnot/Subdivide.lean, line 363 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The shift is one to one on each child.
Statement
theorem sh_inj {c p q : Nat} (same : κ.sh c p = κ.sh c q) : p = q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by rcases cut_ok.sh_cases c p with ⟨p_stays, p_le₀, p_le₁⟩ | ⟨p_moves, p_after⟩ <;> rcases cut_ok.sh_cases c q with ⟨q_stays, q_le₀, q_le₁⟩ | ⟨q_moves, q_after⟩ · omega · rw [p_stays, q_moves] at same rcases q_after with ⟨rfl, q_gt⟩ | ⟨cut_glued, rfl, q_gt⟩ · have := p_le₀ rfl -- `p` is at most the cut edge, `q` past it omega · have := p_le₁ ⟨cut_glued, rfl⟩ -- `p` is at most the partner edge, `q` past it omega · rw [p_moves, q_stays] at same rcases p_after with ⟨rfl, p_gt⟩ | ⟨cut_glued, rfl, p_gt⟩ · have := q_le₀ rfl -- `q` is at most the cut edge, `p` past it omega · have := q_le₁ ⟨cut_glued, rfl⟩ -- `q` is at most the partner edge, `p` past it omega · omega
Gluing.Cut.OK.sh_lt
theorem in lean/SpectreKnot/Subdivide.lean, line 382 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A position of child c is still a position of c after the cut.
Statement
theorem sh_lt {c p : Nat} (p_lt : p < G.E c) : κ.sh c p < (subdiv G κ).E c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by rcases cut_ok.sh_cases c p with ⟨stays, _, _⟩ | ⟨moves, after⟩ · rw [stays]; dsimp only [subdiv]; omega · rw [moves] rcases after with ⟨rfl, _⟩ | ⟨cut_glued, rfl, _⟩ · rw [cut_ok.E_c₀]; omega · rw [cut_ok.E_c₁ cut_glued]; omega
Gluing.Cut.OK.sh_lt_iff
theorem in lean/SpectreKnot/StepMap.lean, line 155 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A cut keeps strict order both ways.
Statement
theorem sh_lt_iff {c u v : Nat} : κ.sh c u < κ.sh c v ↔ u < v
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by constructor · intro sh_lt rcases Nat.lt_or_ge u v with u_lt_v | v_le_u · exact u_lt_v · rcases Nat.eq_or_lt_of_le v_le_u with same | v_lt_u · subst same; omega · have := ok.sh_lt_sh (c := c) v_lt_u -- `v < u` would put the moved positions the other way round omega · exact ok.sh_lt_sh
Gluing.Cut.OK.sh_lt_sh
theorem in lean/SpectreKnot/StepMap.lean, line 141 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A cut keeps the order of positions on a child's rim.
Statement
theorem sh_lt_sh {c u v : Nat} (u_lt_v : u < v) : κ.sh c u < κ.sh c v
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by rcases ok.sh_cases c u with ⟨u_stays, u_before₀, u_before₁⟩ | ⟨u_moves, u_after⟩ <;> rcases ok.sh_cases c v with ⟨v_stays, v_before₀, v_before₁⟩ | ⟨v_moves, v_after⟩ · omega · omega · -- `u` moves on, so it lies after the cut; then so does `v`, which cannot stay rcases u_after with ⟨on_c₀, past_e₀⟩ | ⟨shared, on_c₁, past_e₁⟩ · have := v_before₀ on_c₀ -- `v` stays, so it is not past the cut on `c₀` omega · have := v_before₁ ⟨shared, on_c₁⟩ -- `v` stays, so it is not past the cut on `c₁` omega · omega
Gluing.Cut.OK.sh_other
theorem in lean/SpectreKnot/Subdivide.lean, line 324 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
On every other child, positions stay put.
Statement
theorem sh_other {c p : Nat} (not_c₀ : c ≠ κ.c₀) (not_c₁ : ¬ (κ.two = true ∧ c = κ.c₁)) : κ.sh c p = p
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by unfold Cut.sh rw [ite_eq_right (fun ⟨is_c₀, _⟩ => not_c₀ is_c₀), ite_eq_right (fun ⟨cut_glued, is_c₁, _⟩ => not_c₁ ⟨cut_glued, is_c₁⟩)]
Gluing.Cut.OK.sig
theorem in lean/SpectreKnot/Signature.lean, line 266 · read it in its file
Formalises Lemma 7.1 Lengthening.
Doc comment
The signature survives cutting an edge.
Statement
theorem sig {g : Nat} (has_sig : Sig G g) : Sig (subdiv G κ) g where wf
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
cut_ok.wf_subdiv noLoops := cut_ok.noLoops has_sig.noLoops hooks c u' rim_vertex := by rcases cut_ok.rimL_pre rim_vertex with ⟨u, old_rim_vertex, rfl⟩ | ⟨cut_on_rim, rfl, new_vertex⟩ · obtain ⟨c₂, u₂, turn, hook⟩ := has_sig.hooks c u old_rim_vertex refine ⟨c₂, κ.sh c₂ u₂, cut_ok.rot_port turn old_rim_vertex.1 old_rim_vertex.2.1, ?_⟩ rcases hook with ⟨rfl, at_A | at_B⟩ | joins · exact Or.inl ⟨rfl, Or.inl (by rw [at_A]; rfl)⟩ · exact Or.inl ⟨rfl, Or.inr (by rw [at_B]; rfl)⟩ · obtain ⟨k, walk⟩ := joins exact Or.inr (Sim.reach cut_ok.wf cut_ok.sim k _ _ ⟨old_rim_vertex.1, old_rim_vertex.2.1⟩ walk) · obtain ⟨i, i_ge, i_le, rfl⟩ : ∃ i, 1 ≤ i ∧ i ≤ 2 ∧ u' = κ.e₀ + i := by rcases new_vertex with rfl | rfl · exact ⟨1, by omega, by omega, rfl⟩ · exact ⟨2, by omega, by omega, rfl⟩ obtain ⟨turn, joins⟩ := cut_ok.new_hook cut_on_rim i_ge i_le exact ⟨κ.c₀, κ.e₀ + i, turn, Or.inr joins⟩ g_lt := has_sig.g_lt rimA := cut_ok.mate_none has_sig.rimA rimB := cut_ok.mate_none has_sig.rimB crossR := by obtain ⟨k, walk⟩ := has_sig.crossR exact Sim.reach cut_ok.wf cut_ok.sim k _ _ ⟨has_sig.g_lt, has_sig.wf.A_lt g has_sig.g_lt⟩ walk crossL := by obtain ⟨cA, uA, cB, uB, rim_A, turn_A, rim_B, turn_B, ⟨k, walk⟩⟩ := has_sig.crossL exact ⟨cA, κ.sh cA uA, cB, κ.sh cB uB, cut_ok.rimL_port rim_A, cut_ok.rot_port turn_A rim_A.1 rim_A.2.1, cut_ok.rimL_port rim_B, cut_ok.rot_port turn_B rim_B.1 rim_B.2.1, Sim.reach cut_ok.wf cut_ok.sim k _ _ ⟨rim_A.1, rim_A.2.1⟩ walk⟩
Gluing.Cut.OK.sim
theorem in lean/SpectreKnot/Subdivide.lean, line 722 · read it in its file
Formalises Lemma 7.1 Lengthening.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Subdividing an edge is a simulation.
Statement
theorem sim : Sim G (subdiv G κ) κ.port where valid x x_valid
Names in its proof
Gluing.Cut.OK.mate_oldGluing.Cut.OK.nxt_shGluing.Cut.OK.prv_cutGluing.Cut.OK.prv_shGluing.Cut.OK.sh_ltGluing.Cut.OK.target_not_cutGluing.Cut.OK.tau_portGluing.Cut.OK.two_falseGluing.Cut.OK.two_mateGluing.Cut.OK.two_trueGluing.Cut.portGluing.nxt_of_lt'Gluing.prv_succ'Gluing.sigmaLGluing.sigmaRGluing.tauStatement.Patch.Eprvprv_lt
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (112 lines)
⟨x_valid.1, cut_ok.sh_lt x_valid.2⟩ tau x _ := cut_ok.tau_port x rim := by rintro ⟨c, p, s⟩ ⟨c_lt, p_lt⟩ on_rim -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ cases s with | true => simp only [Cut.port] rw [sigmaR] at on_rim ⊢ rw [Option.map_eq_none_iff] at on_rim ⊢ by_cases is_cut₀ : c = κ.c₀ ∧ p = κ.e₀ · obtain ⟨rfl, rfl⟩ := is_cut₀ -- the cut edge is on the rim, so only it is cut have cut_on_rim := cut_ok.two_false on_rim rw [cut_ok.sh_c₀_le (Nat.le_refl _), cut_ok.mate_cut₀, cut_on_rim]; rfl · by_cases is_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ p = κ.e₁ · obtain ⟨cut_glued, rfl, rfl⟩ := is_cut₁ rw [(cut_ok.two_mate cut_glued).2.2] at on_rim; contradiction · rw [cut_ok.mate_old is_cut₀ is_cut₁, on_rim]; rfl | false => simp only [Cut.port] rw [sigmaL] at on_rim ⊢ rw [Option.map_eq_none_iff] at on_rim ⊢ by_cases after_cut₀ : c = κ.c₀ ∧ p = κ.e₀ + 1 · obtain ⟨rfl, rfl⟩ := after_cut₀ rw [prv_succ'] at on_rim -- the cut edge is on the rim, so only it is cut have cut_on_rim := cut_ok.two_false on_rim rw [cut_ok.sh_c₀_gt (by omega), cut_ok.E_c₀, show κ.e₀ + 1 + 2 = (κ.e₀ + 2) + 1 by omega, prv_succ', cut_ok.mate_new₀ (by omega), cut_on_rim]; rfl · by_cases after_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ p = κ.e₁ + 1 · obtain ⟨cut_glued, rfl, rfl⟩ := after_cut₁ rw [prv_succ', (cut_ok.two_mate cut_glued).2.2] at on_rim; contradiction · rw [cut_ok.prv_sh p_lt after_cut₀ after_cut₁] -- the edge before `p` is not the cut edge have not_cut₀ : ¬ (c = κ.c₀ ∧ prv (G.E c) p = κ.e₀) := fun prev_cut => after_cut₀ ⟨prev_cut.1, cut_ok.prv_cut p_lt prev_cut⟩ -- nor the partner edge have not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ prv (G.E c) p = κ.e₁) := fun ⟨cut_glued, is_c₁, prev_eq⟩ => after_cut₁ ⟨cut_glued, is_c₁, cut_ok.prv_cut₁ cut_glued p_lt ⟨is_c₁, prev_eq⟩⟩ rw [cut_ok.mate_old not_cut₀ not_cut₁, on_rim]; rfl cross := by rintro ⟨c, p, s⟩ y ⟨c_lt, p_lt⟩ crosses -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ cases s with | true => simp only [Cut.port] rw [sigmaR] at crosses rw [Option.map_eq_some_iff] at crosses obtain ⟨⟨c', k'⟩, glued, rfl⟩ := crosses by_cases is_cut₀ : c = κ.c₀ ∧ p = κ.e₀ · obtain ⟨rfl, rfl⟩ := is_cut₀ -- the cut edge: across the new path, from R(e₀) of c₀ to R(e₁) of c₁, by the zigzag lemma obtain ⟨cut_glued, partner⟩ := cut_ok.two_true glued simp only [Prod.mk.injEq] at partner obtain ⟨rfl, rfl⟩ := partner rw [cut_ok.sh_c₀_le (Nat.le_refl _), cut_ok.sh_c₁_le cut_glued (Nat.le_refl _)] exact (cut_ok.cross_cut₀ cut_glued).1 · by_cases is_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ p = κ.e₁ · obtain ⟨cut_glued, rfl, rfl⟩ := is_cut₁ -- the partner of the cut edge: across the new path, from R(e₁) of c₁ to R(e₀) of c₀ rw [(cut_ok.two_mate cut_glued).2.2] at glued simp only [Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued rw [cut_ok.sh_c₁_le cut_glued (Nat.le_refl _), cut_ok.sh_c₀_le (Nat.le_refl _)] exact (cut_ok.cross_cut₁ cut_glued).1 · refine .one ?_ rw [sigmaR, cut_ok.mate_old is_cut₀ is_cut₁, glued]; rfl | false => simp only [Cut.port] rw [sigmaL] at crosses rw [Option.map_eq_some_iff] at crosses obtain ⟨⟨c', k'⟩, glued, rfl⟩ := crosses by_cases after_cut₀ : c = κ.c₀ ∧ p = κ.e₀ + 1 · obtain ⟨rfl, rfl⟩ := after_cut₀ rw [prv_succ'] at glued obtain ⟨cut_glued, partner⟩ := cut_ok.two_true glued simp only [Prod.mk.injEq] at partner obtain ⟨rfl, rfl⟩ := partner -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued -- across the new path, from L(e₀+3) of c₀ to L(e₁+3) of c₁, by the zigzag lemma rw [cut_ok.sh_c₀_gt (by omega)] simp only rw [nxt_of_lt' e₁_lt, cut_ok.sh_c₁_gt cut_glued (by omega)] exact (cut_ok.cross_cut₁ cut_glued).2 · by_cases after_cut₁ : κ.two = true ∧ c = κ.c₁ ∧ p = κ.e₁ + 1 · obtain ⟨cut_glued, rfl, rfl⟩ := after_cut₁ rw [prv_succ', (cut_ok.two_mate cut_glued).2.2] at glued simp only [Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- across the new path, from L(e₁+3) of c₁ to L(e₀+3) of c₀, by the zigzag lemma rw [cut_ok.sh_c₁_gt cut_glued (by omega)] simp only rw [nxt_of_lt' e₀_lt, cut_ok.sh_c₀_gt (by omega)] exact (cut_ok.cross_cut₀ cut_glued).2 · refine .one ?_ -- the edge before `p` is not the cut edge have not_cut₀ : ¬ (c = κ.c₀ ∧ prv (G.E c) p = κ.e₀) := fun prev_cut => after_cut₀ ⟨prev_cut.1, cut_ok.prv_cut p_lt prev_cut⟩ -- nor the partner edge have not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ prv (G.E c) p = κ.e₁) := fun ⟨cut_glued, is_c₁, prev_eq⟩ => after_cut₁ ⟨cut_glued, is_c₁, cut_ok.prv_cut₁ cut_glued p_lt ⟨is_c₁, prev_eq⟩⟩ -- the edge before `p` is an edge of `c` have prev_lt : prv (G.E c) p < G.E c := prv_lt p_lt obtain ⟨c'_lt, k'_lt, _⟩ := cut_ok.wf.mate_valid c _ c' k' c_lt prev_lt glued obtain ⟨mate_not_cut₀, mate_not_cut₁⟩ := cut_ok.target_not_cut c_lt prev_lt glued not_cut₀ not_cut₁ rw [sigmaL, cut_ok.prv_sh p_lt after_cut₀ after_cut₁, cut_ok.mate_old not_cut₀ not_cut₁, glued] simp only [Option.map_some] rw [cut_ok.nxt_sh k'_lt mate_not_cut₀ mate_not_cut₁]
Gluing.Cut.OK.step0_1F
theorem in lean/SpectreKnot/NewWalk.lean, line 103 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 1 of c₀, port L: across new edges e₀ + 1 and e₁, through the new hook of c₁ at e₁ + 1, the ribbon reaches L_{c₀} at the old vertex e₀ + 1, and runs on from there.
Statement
theorem step0_1F {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₀, κ.e₀ + 1, false)) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 1, false) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- nor is its mate the last edge of `c₁` have e₁_succ_lt := ok.e₁ shared simp only [Cut.port, ok.sh_c₀_gt (show κ.e₀ < κ.e₀ + 1 by omega)] at walk refine fullReach_step (y := (κ.c₁, κ.e₁ + 1, true)) ?_ (fullReach_step ?_ walk) · rw [ok.tau_new₀ (by omega) (by omega), Bool.not_false, sigmaR, ok.mate_new₀ (by omega), ite_eq_left shared] simp only [Option.map_some, show κ.e₁ + 2 - 1 = κ.e₁ + 1 by omega] · rw [ok.tau_new₁ shared (by omega) (by omega), Bool.not_true, sigmaL, prv_succ', ok.mate_cut₁ shared] simp only [Option.map_some, ok.E_c₀, nxt_of_lt' (show κ.e₀ + 2 + 1 < G.E κ.c₀ + 2 by omega)]
Gluing.Cut.OK.step0_1T
theorem in lean/SpectreKnot/NewWalk.lean, line 90 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 1 of c₀, port R: through the new hook and across new edge e₀, the ribbon reaches L_{c₁} at the old vertex e₁ + 1, and runs on from there.
Statement
theorem step0_1T {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₁, κ.e₁ + 1, false)) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 1, true) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- nor is its mate the last edge of `c₁` have e₁_succ_lt := ok.e₁ shared simp only [Cut.port, ok.sh_c₁_gt shared (show κ.e₁ < κ.e₁ + 1 by omega)] at walk refine fullReach_step ?_ walk rw [ok.tau_new₀ (by omega) (by omega), Bool.not_true, sigmaL, prv_succ', ok.mate_cut₀, ite_eq_left shared] simp only [Option.map_some, ok.E_c₁ shared, nxt_of_lt' (show κ.e₁ + 2 + 1 < G.E κ.c₁ + 2 by omega)]
Gluing.Cut.OK.step0_2F
theorem in lean/SpectreKnot/NewWalk.lean, line 62 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 2 of c₀, port L: through the new hook and across new edge e₀ + 2, the ribbon reaches R_{c₁} at the old vertex e₁, and runs on from there.
Statement
theorem step0_2F {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₁, κ.e₁, true)) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 2, false) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ simp only [Cut.port, ok.sh_c₁_le shared (Nat.le_refl _)] at walk refine fullReach_step ?_ walk rw [ok.tau_new₀ (by omega) (by omega), Bool.not_false, sigmaR, ok.mate_new₀ (by omega), ite_eq_left shared] simp
Gluing.Cut.OK.step0_2T
theorem in lean/SpectreKnot/NewWalk.lean, line 73 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₀ + 2 of c₀, port R: across new edges e₀ + 1 and e₁ + 2, through the new hook of c₁ at e₁ + 2, the ribbon reaches R_{c₀} at the old vertex e₀, and runs on from there.
Statement
theorem step0_2T {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₀, κ.e₀, true)) r) :
(subdiv G κ).FullReach (κ.c₀, κ.e₀ + 2, true) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- nor is its mate the last edge of `c₁` have e₁_succ_lt := ok.e₁ shared simp only [Cut.port, ok.sh_c₀_le (Nat.le_refl _)] at walk refine fullReach_step (y := (κ.c₁, κ.e₁ + 2, false)) ?_ (fullReach_step ?_ walk) · rw [ok.tau_new₀ (by omega) (by omega), Bool.not_true, sigmaL, ok.E_c₀, show κ.e₀ + 2 = (κ.e₀ + 1) + 1 from rfl, prv_succ', ok.mate_new₀ (by omega), ite_eq_left shared] simp only [Option.map_some, show κ.e₁ + 2 - 1 = κ.e₁ + 1 by omega, ok.E_c₁ shared, nxt_of_lt' (show κ.e₁ + 1 + 1 < (G.E κ.c₁ + 2) by omega)] · rw [ok.tau_new₁ shared (by omega) (by omega), Bool.not_false, sigmaR, ok.mate_new₁ shared (by omega)] simp
Gluing.Cut.OK.step1_1F
theorem in lean/SpectreKnot/NewWalk.lean, line 159 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 1 of c₁, port L: across new edges e₁ + 1 and e₀, through the new hook of c₀ at e₀ + 1, the ribbon reaches L_{c₁} at the old vertex e₁ + 1, and runs on from there.
Statement
theorem step1_1F {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₁, κ.e₁ + 1, false)) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 1, false) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- nor is its mate the last edge of `c₁` have e₁_succ_lt := ok.e₁ shared simp only [Cut.port, ok.sh_c₁_gt shared (show κ.e₁ < κ.e₁ + 1 by omega)] at walk refine fullReach_step (y := (κ.c₀, κ.e₀ + 1, true)) ?_ (fullReach_step ?_ walk) · rw [ok.tau_new₁ shared (by omega) (by omega), Bool.not_false, sigmaR, ok.mate_new₁ shared (by omega)] simp only [Option.map_some, show κ.e₀ + 2 - 1 = κ.e₀ + 1 by omega] · rw [ok.tau_new₀ (by omega) (by omega), Bool.not_true, sigmaL, prv_succ', ok.mate_cut₀, ite_eq_left shared] simp only [Option.map_some, ok.E_c₁ shared, nxt_of_lt' (show κ.e₁ + 2 + 1 < G.E κ.c₁ + 2 by omega)]
Gluing.Cut.OK.step1_1T
theorem in lean/SpectreKnot/NewWalk.lean, line 146 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 1 of c₁, port R: through the new hook and across new edge e₁, the ribbon reaches L_{c₀} at the old vertex e₀ + 1, and runs on from there.
Statement
theorem step1_1T {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₀, κ.e₀ + 1, false)) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 1, true) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- nor is its mate the last edge of `c₁` have e₁_succ_lt := ok.e₁ shared simp only [Cut.port, ok.sh_c₀_gt (show κ.e₀ < κ.e₀ + 1 by omega)] at walk refine fullReach_step ?_ walk rw [ok.tau_new₁ shared (by omega) (by omega), Bool.not_true, sigmaL, prv_succ', ok.mate_cut₁ shared] simp only [Option.map_some, ok.E_c₀, nxt_of_lt' (show κ.e₀ + 2 + 1 < G.E κ.c₀ + 2 by omega)]
Gluing.Cut.OK.step1_2F
theorem in lean/SpectreKnot/NewWalk.lean, line 118 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 2 of c₁, port L: through the new hook and across new edge e₁ + 2, the ribbon reaches R_{c₀} at the old vertex e₀, and runs on from there.
Statement
theorem step1_2F {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₀, κ.e₀, true)) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 2, false) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ simp only [Cut.port, ok.sh_c₀_le (Nat.le_refl _)] at walk refine fullReach_step ?_ walk rw [ok.tau_new₁ shared (by omega) (by omega), Bool.not_false, sigmaR, ok.mate_new₁ shared (by omega)] simp
Gluing.Cut.OK.step1_2T
theorem in lean/SpectreKnot/NewWalk.lean, line 129 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
New vertex e₁ + 2 of c₁, port R: across new edges e₁ + 1 and e₀ + 2, through the new hook of c₀ at e₀ + 2, the ribbon reaches R_{c₁} at the old vertex e₁, and runs on from there.
Statement
theorem step1_2T {r : GPort} (walk : (subdiv G κ).FullReach (κ.port (κ.c₁, κ.e₁, true)) r) :
(subdiv G κ).FullReach (κ.c₁, κ.e₁ + 2, true) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- the cut edge is not the last edge of `c₀` have e₀_succ_lt := ok.e₀ -- nor is its mate the last edge of `c₁` have e₁_succ_lt := ok.e₁ shared simp only [Cut.port, ok.sh_c₁_le shared (Nat.le_refl _)] at walk refine fullReach_step (y := (κ.c₀, κ.e₀ + 2, false)) ?_ (fullReach_step ?_ walk) · rw [ok.tau_new₁ shared (by omega) (by omega), Bool.not_true, sigmaL, ok.E_c₁ shared, show κ.e₁ + 2 = (κ.e₁ + 1) + 1 from rfl, prv_succ', ok.mate_new₁ shared (by omega)] simp only [Option.map_some, show κ.e₀ + 2 - 1 = κ.e₀ + 1 by omega, ok.E_c₀, nxt_of_lt' (show κ.e₀ + 1 + 1 < G.E κ.c₀ + 2 by omega)] · rw [ok.tau_new₀ (by omega) (by omega), Bool.not_false, sigmaR, ok.mate_new₀ (by omega), ite_eq_left shared] simp
Gluing.Cut.OK.target_not_cut
theorem in lean/SpectreKnot/Subdivide.lean, line 542 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The other end of an edge that is not cut is not a cut edge either.
Statement
theorem target_not_cut {c k c₂ k₂ : Nat} (c_lt : c < G.n) (k_lt : k < G.E c) (glued : G.mate c k = some (c₂, k₂))
(not_cut₀ : ¬ (c = κ.c₀ ∧ k = κ.e₀)) (not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ k = κ.e₁)) :
¬ (c₂ = κ.c₀ ∧ k₂ = κ.e₀) ∧ ¬ (κ.two = true ∧ c₂ = κ.c₁ ∧ k₂ = κ.e₁)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by obtain ⟨_, _, glued_back⟩ := cut_ok.wf.mate_valid c k c₂ k₂ c_lt k_lt glued constructor · rintro ⟨rfl, rfl⟩ -- the cut edge is glued back to edge `k` of `c`, so that is the partner edge have cut_mate := cut_ok.mate rw [glued_back] at cut_mate by_cases cut_glued : κ.two = true · rw [ite_eq_left cut_glued] at cut_mate simp only [Option.some.injEq, Prod.mk.injEq] at cut_mate exact not_cut₁ ⟨cut_glued, cut_mate.1, cut_mate.2⟩ · rw [ite_eq_right cut_glued] at cut_mate; contradiction · rintro ⟨cut_glued, rfl, rfl⟩ rw [(cut_ok.two_mate cut_glued).2.2] at glued_back simp only [Option.some.injEq, Prod.mk.injEq] at glued_back exact not_cut₀ ⟨glued_back.1.symm, glued_back.2.symm⟩
Gluing.Cut.OK.tau_new₀
theorem in lean/SpectreKnot/Subdivide.lean, line 672 · read it in its file
Doc comment
At a new vertex of c₀ the piece joins the two ports at that vertex.
Statement
theorem tau_new₀ {i : Nat} (i_ge : 1 ≤ i) (i_le : i ≤ 2) (s : Bool) :
(subdiv G κ).tau (κ.c₀, κ.e₀ + i, s) = (κ.c₀, κ.e₀ + i, !s)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
tau_of_not_corner (cut_ok.corner_new₀ i_ge i_le)
Gluing.Cut.OK.tau_new₁
theorem in lean/SpectreKnot/Subdivide.lean, line 676 · read it in its file
Doc comment
At a new vertex of c₁ the piece joins the two ports at that vertex.
Statement
theorem tau_new₁ (cut_glued : κ.two = true) {i : Nat} (i_ge : 1 ≤ i) (i_le : i ≤ 2) (s : Bool) :
(subdiv G κ).tau (κ.c₁, κ.e₁ + i, s) = (κ.c₁, κ.e₁ + i, !s)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
tau_of_not_corner (cut_ok.corner_new₁ cut_glued i_ge i_le)
Gluing.Cut.OK.tau_port
theorem in lean/SpectreKnot/Subdivide.lean, line 562 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
τ commutes with the shift (corners go to corners, and the shift is one to one).
Statement
theorem tau_port (x : GPort) : (subdiv G κ).tau (κ.port x) = κ.port (G.tau x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by obtain ⟨c, p, s⟩ := x -- the piece of the subdivided gluing, at the shifted corners have lhs : (subdiv G κ).tau (κ.port (c, p, s)) = if κ.sh c p = κ.sh c (G.A c) then (c, κ.sh c (G.B c), s) else if κ.sh c p = κ.sh c (G.B c) then (c, κ.sh c (G.A c), s) else (c, κ.sh c p, !s) := rfl rw [lhs] by_cases at_A : p = G.A c -- at corner `A` the piece goes to corner `B` · have tau_A : G.tau (c, p, s) = (c, G.B c, s) := by simp [Gluing.tau, at_A] rw [tau_A, ite_eq_left (by rw [at_A])]; rfl · rw [ite_eq_right (fun same => at_A (cut_ok.sh_inj same))] by_cases at_B : p = G.B c -- at corner `B` the piece goes to corner `A` · have tau_B : G.tau (c, p, s) = (c, G.A c, s) := by simp [Gluing.tau, at_A, at_B] rw [tau_B, ite_eq_left (by rw [at_B])]; rfl -- elsewhere the piece goes to the other port at the same vertex · have tau_other : G.tau (c, p, s) = (c, p, !s) := by simp [Gluing.tau, at_A, at_B] rw [tau_other, ite_eq_right (fun same => at_B (cut_ok.sh_inj same))]; rfl
Gluing.Cut.OK.two_false
theorem in lean/SpectreKnot/Subdivide.lean, line 642 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If the cut edge lies on the parent's rim, only it is cut.
Statement
theorem two_false (on_rim : G.mate κ.c₀ κ.e₀ = none) : κ.two = false
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- what `OK` says about the gluing of the cut edge have cut_mate := cut_ok.mate rw [on_rim] at cut_mate cases cut_glued : κ.two · rfl · rw [cut_glued] at cut_mate; simp at cut_mate
Gluing.Cut.OK.two_mate
theorem in lean/SpectreKnot/Subdivide.lean, line 292 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If the cut edge is glued (two), its partner is an edge of c₁, glued back to it.
Statement
theorem two_mate (cut_glued : κ.two = true) :
κ.c₁ < G.n ∧ κ.e₁ < G.E κ.c₁ ∧ G.mate κ.c₁ κ.e₁ = some (κ.c₀, κ.e₀)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the cut edge is glued to edge `e₁` of `c₁` have glued := cut_ok.mate rw [ite_eq_left cut_glued] at glued -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ exact cut_ok.wf.mate_valid _ _ _ _ cut_ok.c₀ (by omega) glued
Gluing.Cut.OK.two_true
theorem in lean/SpectreKnot/Subdivide.lean, line 651 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If the cut edge is glued, its partner is cut too, and it is the edge it is glued to.
Statement
theorem two_true {q : Nat × Nat} (glued : G.mate κ.c₀ κ.e₀ = some q) : κ.two = true ∧ q = (κ.c₁, κ.e₁)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- what `OK` says about the gluing of the cut edge have cut_mate := cut_ok.mate rw [glued] at cut_mate cases cut_glued : κ.two · rw [cut_glued] at cut_mate; simp at cut_mate · rw [cut_glued] at cut_mate; simp only [ite_true, Option.some.injEq] at cut_mate; exact ⟨rfl, cut_mate⟩
Gluing.Cut.OK.wf_subdiv
theorem in lean/SpectreKnot/Subdivide.lean, line 837 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The subdivided gluing is well formed.
Statement
theorem wf_subdiv : (subdiv G κ).WF where E_pos c c_lt
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (52 lines)
by -- every child had an edge before the cut have := cut_ok.wf.E_pos c c_lt dsimp only [subdiv]; omega A_lt c c_lt := cut_ok.sh_lt (cut_ok.wf.A_lt c c_lt) B_lt c c_lt := cut_ok.sh_lt (cut_ok.wf.B_lt c c_lt) A_ne_B c c_lt same := cut_ok.wf.A_ne_B c c_lt (cut_ok.sh_inj same) mate_valid := by intro c k c' k' c_lt k_lt glued -- the cut edge is not the last edge of `c₀` have e₀_lt := cut_ok.e₀ by_cases new₀ : c = κ.c₀ ∧ κ.e₀ ≤ k ∧ k ≤ κ.e₀ + 2 · obtain ⟨rfl, k_ge, k_le⟩ := new₀ rw [show k = κ.e₀ + (k - κ.e₀) by omega, cut_ok.mate_new₀ (by omega)] at glued by_cases cut_glued : κ.two = true · rw [ite_eq_left cut_glued] at glued simp only [Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- the partner edge is not the last edge of `c₁` have e₁_lt := cut_ok.e₁ cut_glued refine ⟨(cut_ok.two_mate cut_glued).1, by rw [cut_ok.E_c₁ cut_glued]; omega, ?_⟩ rw [show κ.e₁ + 2 - (k - κ.e₀) = κ.e₁ + (2 - (k - κ.e₀)) by omega, cut_ok.mate_new₁ cut_glued (by omega)] congr 2; omega · rw [ite_eq_right cut_glued] at glued; contradiction · by_cases new₁ : κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ ≤ k ∧ k ≤ κ.e₁ + 2 · obtain ⟨cut_glued, rfl, k_ge, k_le⟩ := new₁ rw [show k = κ.e₁ + (k - κ.e₁) by omega, cut_ok.mate_new₁ cut_glued (by omega)] at glued simp only [Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued refine ⟨cut_ok.c₀, by rw [cut_ok.E_c₀]; omega, ?_⟩ rw [show κ.e₀ + 2 - (k - κ.e₁) = κ.e₀ + (2 - (k - κ.e₁)) by omega, cut_ok.mate_new₀ (by omega), ite_eq_left cut_glued] congr 2; omega · obtain ⟨u, u_lt, rfl⟩ := cut_ok.preimage k_lt (fun ⟨is_c₀, k_gt, k_le⟩ => new₀ ⟨is_c₀, by omega, k_le⟩) (fun ⟨cut_glued, is_c₁, k_gt, k_le⟩ => new₁ ⟨cut_glued, is_c₁, by omega, k_le⟩) -- the edge is not the cut edge (whose position would be a new edge) have not_cut₀ : ¬ (c = κ.c₀ ∧ u = κ.e₀) := by rintro ⟨rfl, rfl⟩; exact new₀ ⟨rfl, by rw [cut_ok.sh_c₀_le (Nat.le_refl _)]; omega, by rw [cut_ok.sh_c₀_le (Nat.le_refl _)]; omega⟩ -- nor the partner edge have not_cut₁ : ¬ (κ.two = true ∧ c = κ.c₁ ∧ u = κ.e₁) := by rintro ⟨cut_glued, rfl, rfl⟩ exact new₁ ⟨cut_glued, rfl, by rw [cut_ok.sh_c₁_le cut_glued (Nat.le_refl _)]; omega, by rw [cut_ok.sh_c₁_le cut_glued (Nat.le_refl _)]; omega⟩ rw [cut_ok.mate_old not_cut₀ not_cut₁, Option.map_eq_some_iff] at glued obtain ⟨⟨c₂, u₂⟩, glued_old, shifted⟩ := glued simp only [Prod.mk.injEq] at shifted obtain ⟨rfl, rfl⟩ := shifted obtain ⟨c₂_lt, u₂_lt, glued_back⟩ := cut_ok.wf.mate_valid c u c₂ u₂ c_lt u_lt glued_old obtain ⟨mate_not_cut₀, mate_not_cut₁⟩ := cut_ok.target_not_cut c_lt u_lt glued_old not_cut₀ not_cut₁ refine ⟨c₂_lt, cut_ok.sh_lt u₂_lt, ?_⟩ rw [cut_ok.mate_old mate_not_cut₀ mate_not_cut₁, glued_back]; rfl
Gluing.Cut.port
def in lean/SpectreKnot/Subdivide.lean, line 199 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A port of the old gluing, in the subdivided one.
Statement
def port (x : GPort) : GPort := (x.1, κ.sh x.1 x.2.1, x.2.2)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Cut.sh
def in lean/SpectreKnot/Subdivide.lean, line 191 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Where vertex p (or edge p) of child c goes: positions after the cut move on by 2.
Statement
def sh (c p : Nat) : Nat := if c = κ.c₀ ∧ κ.e₀ < p then p + 2 else if κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ < p then p + 2 else p
Names in its proof
none
Named in the proofs of
Compose.Move.OK.sh_sideCompose.Move.OK.A_eqCompose.Move.OK.mate_hit₀Compose.Move.OK.mate_hit₁Gluing.Cut.OK.rot_portGluing.Cut.OK.sigCompose.Move.OK.shposCompose.Move.OK.sh_oneGluing.Cut.portGluing.Cut.OK.sh_c₀_leGluing.Cut.OK.sh_c₀_gtGluing.Cut.OK.sh_c₁_leGluing.Cut.OK.sh_c₁_gtGluing.Cut.OK.sh_otherGluing.Cut.OK.mate_oldGluing.Cut.OK.tau_port
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Cut.unsh
def in lean/SpectreKnot/Subdivide.lean, line 195 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Back from the subdivided numbering (for positions that are not new).
Statement
def unsh (c k : Nat) : Nat := if c = κ.c₀ ∧ κ.e₀ + 2 < k then k - 2 else if κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ + 2 < k then k - 2 else k
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Equiv
structure in lean/SpectreKnot/Subdivide.lean, line 89 · read it in its file
Doc comment
Two gluings that agree on their actual children: the same number of children, rim lengths, corners, and gluing of actual edges. (They may differ outside, where nothing is ever looked up.)
Statement
structure Equiv (G G' : Gluing) : Prop where n : G.n = G'.n E : ∀ c, c < G.n → G.E c = G'.E c A : ∀ c, c < G.n → G.A c = G'.A c B : ∀ c, c < G.n → G.B c = G'.B c mate : ∀ c k, c < G.n → k < G.E c → G.mate c k = G'.mate c k
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Equiv.freach
theorem in lean/SpectreKnot/Subdivide.lean, line 148 · read it in its file
Doc comment
Every walk of G from a valid port is a walk of an equivalent gluing G'.
Statement
theorem freach (G_wf : G.WF) : ∀ k x r, G.Valid x → G.FReach k x r → G'.FReach k x r
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by intro k x r x_valid walk induction walk with | @stop x on_rim => -- the walk of `G'` stops at the same rim port have stops := FReach.stop (G := G') (x := x) (by rw [equiv.tau x_valid, equiv.sigma G_wf (tau_valid G_wf x_valid)]; exact on_rim) rwa [equiv.tau x_valid] at stops | @step k x y r crosses _ ih => exact .step (by rw [equiv.tau x_valid, equiv.sigma G_wf (tau_valid G_wf x_valid)]; exact crosses) (ih (sigma_valid G_wf (tau_valid G_wf x_valid) crosses))
Gluing.Equiv.fullReach
theorem in lean/SpectreKnot/Subdivide.lean, line 161 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A walk of G from a valid port reaches the same rim port in an equivalent gluing G'.
Statement
theorem fullReach (G_wf : G.WF) {x r : GPort} (x_valid : G.Valid x) (reach : G.FullReach x r) : G'.FullReach x r
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨k, walk⟩ := reach
exact ⟨k, equiv.freach G_wf k x r x_valid walk⟩Gluing.Equiv.rimL
theorem in lean/SpectreKnot/Signature.lean, line 82 · read it in its file
Doc comment
A parent rim vertex of G is one of an equivalent gluing G'.
Statement
theorem rimL {c u : Nat} (rim_vertex : G.RimL c u) : G'.RimL c u
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
obtain ⟨c_lt, u_lt, prev_on_rim⟩ := rim_vertex
refine ⟨equiv.n ▸ c_lt, (equiv.E c c_lt) ▸ u_lt, ?_⟩
rw [← equiv.E c c_lt, ← equiv.mate c _ c_lt (prv_lt u_lt)]; exact prev_on_rimGluing.Equiv.rot
theorem in lean/SpectreKnot/Signature.lean, line 72 · read it in its file
Doc comment
Turning about a vertex of a child gives the same result in an equivalent gluing.
Statement
theorem rot (G_wf : G.WF) {x r : Nat × Nat} (turn : G.Rot x r) : x.1 < G.n → x.2 < G.E x.1 → G'.Rot x r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by induction turn with | @stop c u on_rim => intro c_lt u_lt; exact .stop (by rw [← equiv.mate c u c_lt u_lt]; exact on_rim) | @step c u c' k' r glued _ ih => intro c_lt u_lt obtain ⟨c'_lt, k'_lt, _⟩ := G_wf.mate_valid _ _ _ _ c_lt u_lt glued exact .step (by rw [← equiv.mate c u c_lt u_lt]; exact glued) (by rw [← equiv.E c' c'_lt]; exact ih c'_lt (nxt_lt k'_lt))
Gluing.Equiv.sig
theorem in lean/SpectreKnot/Signature.lean, line 88 · read it in its file
Doc comment
A gluing equivalent to one with the signature has the signature, with the same crossover child.
Statement
theorem sig {g : Nat} (has_sig : Sig G g) : Sig G' g where wf
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
equiv.wf has_sig.wf noLoops x x_valid := by obtain ⟨r, reach⟩ := has_sig.noLoops x (equiv.valid' x_valid) exact ⟨r, equiv.fullReach has_sig.wf (equiv.valid' x_valid) reach⟩ hooks c u rim_vertex := by -- the vertex is a parent rim vertex of `G` have rim_vertex_G : G.RimL c u := equiv.symm.rimL rim_vertex obtain ⟨c₂, u₂, turn, hook⟩ := has_sig.hooks c u rim_vertex_G refine ⟨c₂, u₂, equiv.rot has_sig.wf turn rim_vertex_G.1 rim_vertex_G.2.1, ?_⟩ rw [← equiv.A g has_sig.g_lt, ← equiv.B g has_sig.g_lt] rcases hook with at_corner | joins · exact Or.inl at_corner · exact Or.inr (equiv.fullReach has_sig.wf ⟨rim_vertex_G.1, rim_vertex_G.2.1⟩ joins) g_lt := equiv.n ▸ has_sig.g_lt rimA := by rw [← equiv.A g has_sig.g_lt, ← equiv.mate g _ has_sig.g_lt (has_sig.wf.A_lt g has_sig.g_lt)] exact has_sig.rimA rimB := by rw [← equiv.B g has_sig.g_lt, ← equiv.mate g _ has_sig.g_lt (has_sig.wf.B_lt g has_sig.g_lt)] exact has_sig.rimB crossR := by rw [← equiv.A g has_sig.g_lt, ← equiv.B g has_sig.g_lt] exact equiv.fullReach has_sig.wf ⟨has_sig.g_lt, has_sig.wf.A_lt g has_sig.g_lt⟩ has_sig.crossR crossL := by obtain ⟨cA, uA, cB, uB, rim_A, turn_A, rim_B, turn_B, joins⟩ := has_sig.crossL rw [← equiv.A g has_sig.g_lt, ← equiv.B g has_sig.g_lt] exact ⟨cA, uA, cB, uB, equiv.rimL rim_A, equiv.rot has_sig.wf turn_A rim_A.1 rim_A.2.1, equiv.rimL rim_B, equiv.rot has_sig.wf turn_B rim_B.1 rim_B.2.1, equiv.fullReach has_sig.wf ⟨rim_A.1, rim_A.2.1⟩ joins⟩
Gluing.Equiv.sigma
theorem in lean/SpectreKnot/Subdivide.lean, line 114 · read it in its file
Doc comment
Equivalent gluings cross edges in the same way at valid ports.
Statement
theorem sigma (G_wf : G.WF) {x : GPort} (x_valid : G.Valid x) : G'.sigma x = G.sigma x
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by obtain ⟨c, u, s⟩ := x obtain ⟨c_lt, u_lt⟩ := x_valid cases s with | true => simp only [Gluing.sigma, equiv.mate c u c_lt u_lt] | false => simp only [Gluing.sigma, ← equiv.E c c_lt, ← equiv.mate c _ c_lt (prv_lt u_lt)] cases glued : G.mate c (prv (G.E c) u) with | none => rfl | some p => obtain ⟨c', k'⟩ := p -- the child glued to is a child of `G`, so its rim length is the same in `G'` obtain ⟨c'_lt, _, _⟩ := G_wf.mate_valid c _ c' k' c_lt (prv_lt u_lt) glued simp [equiv.E c' c'_lt]
Gluing.Equiv.symm
theorem in lean/SpectreKnot/Subdivide.lean, line 168 · read it in its file
Doc comment
Equivalence of gluings is symmetric.
Statement
theorem Equiv.symm (equiv : Equiv G G') : Equiv G' G where n
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
equiv.n.symm E c c_lt := (equiv.E c (equiv.n ▸ c_lt)).symm A c c_lt := (equiv.A c (equiv.n ▸ c_lt)).symm B c c_lt := (equiv.B c (equiv.n ▸ c_lt)).symm mate c k c_lt k_lt := (equiv.mate c k (equiv.n ▸ c_lt) ((equiv.E c (equiv.n ▸ c_lt)) ▸ k_lt)).symm
Gluing.Equiv.tau
theorem in lean/SpectreKnot/Subdivide.lean, line 109 · read it in its file
Doc comment
Equivalent gluings have the same pieces at valid ports.
Statement
theorem tau {x : GPort} (x_valid : G.Valid x) : G'.tau x = G.tau x
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨c, u, s⟩ := x
simp only [Gluing.tau, equiv.A c x_valid.1, equiv.B c x_valid.1]Gluing.Equiv.valid'
theorem in lean/SpectreKnot/Subdivide.lean, line 103 · read it in its file
Doc comment
A valid port of G' is a valid port of an equivalent gluing G.
Statement
theorem valid' {x : GPort} (x_valid : G'.Valid x) : G.Valid x
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- the port's child is a child of `G` have c_lt : x.1 < G.n := equiv.n ▸ x_valid.1 exact ⟨c_lt, (equiv.E _ c_lt).symm ▸ x_valid.2⟩
Gluing.Equiv.wf
theorem in lean/SpectreKnot/Subdivide.lean, line 130 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A gluing equivalent to a well-formed one is well formed.
Statement
theorem wf (G_wf : G.WF) : G'.WF where E_pos c c_lt
Names in its proof
Named in the proofs of
Statement.Kids.across_rimStatement.Kids.btau_ltStatement.Kids.follow_of_reachStatement.Kids.noClosedStatement.compSig_of_sigStatement.Kids.glue_symmCompose.Move.OK.cutOKGluing.Cut.OK.port_reachStatement.Kids.parent_sigCompose.adm_inductStatement.Kids.noSelfGluing.Equiv.sigGluing.Cut.OK.sigStatement.Kids.bstep_validStatement.Kids.turn_fCStatement.Kids.rimChains
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by rw [← equiv.E c (equiv.n ▸ c_lt)]; exact G_wf.E_pos c (equiv.n ▸ c_lt) A_lt c c_lt := by rw [← equiv.E c (equiv.n ▸ c_lt), ← equiv.A c (equiv.n ▸ c_lt)]; exact G_wf.A_lt c (equiv.n ▸ c_lt) B_lt c c_lt := by rw [← equiv.E c (equiv.n ▸ c_lt), ← equiv.B c (equiv.n ▸ c_lt)]; exact G_wf.B_lt c (equiv.n ▸ c_lt) A_ne_B c c_lt := by rw [← equiv.A c (equiv.n ▸ c_lt), ← equiv.B c (equiv.n ▸ c_lt)]; exact G_wf.A_ne_B c (equiv.n ▸ c_lt) mate_valid c k c' k' c_lt k_lt glued := by -- the child is a child of `G` have c_lt_G : c < G.n := equiv.n ▸ c_lt -- the edge is an edge of the child in `G` have k_lt_G : k < G.E c := (equiv.E c c_lt_G) ▸ k_lt rw [← equiv.mate c k c_lt_G k_lt_G] at glued obtain ⟨c'_lt, k'_lt, glued_back⟩ := G_wf.mate_valid c k c' k' c_lt_G k_lt_G glued exact ⟨equiv.n ▸ c'_lt, (equiv.E c' c'_lt) ▸ k'_lt, by rw [← equiv.mate c' k' c'_lt k'_lt]; exact glued_back⟩
Gluing.FReach
inductive in lean/SpectreKnot/Gluing.lean, line 131 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Lemma 4.2, as a relation: from port x, FReach k x r says that alternately applying τ and σ, with k crossings, ends at the rim port r of the parent.
Statement
inductive FReach (G : Gluing) : Nat → GPort → GPort → Prop | stop {x : GPort} : G.sigma (G.tau x) = none → FReach G 0 x (G.tau x) | step {k : Nat} {x y r : GPort} : G.sigma (G.tau x) = some y → FReach G k y r → FReach G (k + 1) x r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.FReach.reverse
theorem in lean/SpectreKnot/Reverse.lean, line 117 · read it in its file
Doc comment
Following backwards: a walk from a rim port x to r gives a walk from r back to x.
Statement
theorem FReach.reverse (wf : G.WF) {k : Nat} {x r : GPort} (reach : G.FReach k x r) (valid : G.Valid x)
(x_on_rim : G.sigma x = none) : G.FReach k r x
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by obtain ⟨y, walk, _, rfl⟩ := reach.walk -- the walk backwards, ending where `x` leaves the parent have back := (walk.reverse wf valid).freach (by rw [tau_tau wf valid]; exact x_on_rim) rwa [tau_tau wf valid] at back
Gluing.FReach.walk
theorem in lean/SpectreKnot/Reverse.lean, line 101 · read it in its file
Doc comment
A full walk is a Walk to a port whose piece ends on the parent's rim.
Statement
theorem FReach.walk {k : Nat} {x r : GPort} (reach : G.FReach k x r) :
∃ y, G.Walk k x y ∧ G.sigma (G.tau y) = none ∧ r = G.tau y
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by induction reach with | @stop x on_rim => exact ⟨x, .zero, on_rim, rfl⟩ | step first_step _ ih => obtain ⟨y, walk, on_rim, r_eq⟩ := ih exact ⟨y, .succ first_step walk, on_rim, r_eq⟩
Gluing.FullReach
def in lean/SpectreKnot/Gluing.lean, line 136 · read it in its file
Formalises Lemma 4.2 Gluing.
Used, through the names in proofs, for Theorem A, Theorem B, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The full walk from x ends at r. For a rim port x of the parent, r is π_P(x) (Lemma 4.2).
Statement
def FullReach (x r : GPort) : Prop := ∃ k, G.FReach k x r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.FullReach.reverse
theorem in lean/SpectreKnot/Reverse.lean, line 125 · read it in its file
Doc comment
FReach.reverse for the full walk with any number of crossings.
Statement
theorem FullReach.reverse (wf : G.WF) {x r : GPort} (reach : G.FullReach x r) (valid : G.Valid x)
(x_on_rim : G.sigma x = none) : G.FullReach r x
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨k, reach_k⟩ := reach
exact ⟨k, reach_k.reverse wf valid x_on_rim⟩Gluing.RimL
def in lean/SpectreKnot/Signature.lean, line 40 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Vertex u of child c is a parent rim vertex, reached along the parent's rim: the edge before it, u - 1, is on the parent's rim. (Its port L is then a port of the parent.)
Statement
def RimL (G : Gluing) (c u : Nat) : Prop := c < G.n ∧ u < G.E c ∧ G.mate c (prv (G.E c) u) = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Rot
inductive in lean/SpectreKnot/Signature.lean, line 17 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Turning about a vertex inside the parent. Vertex u of child c is where its edge u starts. If that edge is glued to edge k' of child c', the same point is where edge k' ends, so the next edge about it is edge k' + 1 of c'. Rot G (c, u) r: turning from vertex u of c reaches the vertex r, whose edge is on the parent's rim.
Statement
inductive Rot (G : Gluing) : Nat × Nat → Nat × Nat → Prop | stop {c u : Nat} : G.mate c u = none → Rot G (c, u) (c, u) | step {c u c' k' : Nat} {r : Nat × Nat} : G.mate c u = some (c', k') → Rot G (c', nxt (G.E c') k') r → Rot G (c, u) r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Rot.inj
theorem in lean/SpectreKnot/Reverse.lean, line 168 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Two vertices reached along the parent's rim that turn to the same vertex are the same.
Statement
theorem Rot.inj (wf : G.WF) {x x' r : Nat × Nat} (rim_x : G.RimL x.1 x.2) (rim_x' : G.RimL x'.1 x'.2)
(turn : G.Rot x r) (turn' : G.Rot x' r) : x = x'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by obtain ⟨c, u⟩ := x obtain ⟨c', u'⟩ := x' -- turning backwards from `r` stops at `x`, since the edge before `x` is on the rim have back := turn.rotB wf rim_x.1 rim_x.2.1 (c, u) (.stop rim_x.2.2) -- and likewise at `x'` have back' := turn'.rotB wf rim_x'.1 rim_x'.2.1 (c', u') (.stop rim_x'.2.2) exact back.unique back'
Gluing.Rot.rotB
theorem in lean/SpectreKnot/Reverse.lean, line 156 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Turning backwards undoes turning forwards: in a well-formed gluing, if turning about vertex x (of an actual child) reaches r, then turning backwards from r reaches whatever turning backwards from x reaches.
Statement
theorem Rot.rotB (wf : G.WF) {x r : Nat × Nat} (turn : G.Rot x r) :
x.1 < G.n → x.2 < G.E x.1 → ∀ y, G.RotB x y → G.RotB r y
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by induction turn with | stop _ => intro _ _ y turn_back; exact turn_back | @step c u c' k' r glued _ ih => intro c_lt u_lt y turn_back -- the edge is glued back, and `k'` is an actual edge of `c'` obtain ⟨c'_lt, k'_lt, glued_back⟩ := wf.mate_valid c u c' k' c_lt u_lt glued refine ih c'_lt (nxt_lt k'_lt) y (RotB.step (c' := c) (k' := u) ?_ turn_back) rw [prv_nxt k'_lt]; exact glued_back
Gluing.Rot.unique
theorem in lean/SpectreKnot/Signature.lean, line 23 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Turning about a vertex has one result.
Statement
theorem Rot.unique {x r r' : Nat × Nat} (turn : G.Rot x r) (turn' : G.Rot x r') : r = r'
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by induction turn generalizing r' with | stop on_rim => cases turn' with | stop _ => rfl | step glued _ => rw [on_rim] at glued; contradiction | step glued _ ih => cases turn' with | stop on_rim => rw [glued] at on_rim; contradiction | step glued' rest' => rw [glued] at glued' simp only [Option.some.injEq, Prod.mk.injEq] at glued' obtain ⟨rfl, rfl⟩ := glued' exact ih rest'
Gluing.RotB
inductive in lean/SpectreKnot/Reverse.lean, line 133 · read it in its file
Doc comment
Turning backwards about a vertex: across the edge before it, while that edge is glued.
Statement
inductive RotB (G : Gluing) : Nat × Nat → Nat × Nat → Prop | stop {c u : Nat} : G.mate c (prv (G.E c) u) = none → RotB G (c, u) (c, u) | step {c u c' k' : Nat} {r : Nat × Nat} : G.mate c (prv (G.E c) u) = some (c', k') → RotB G (c', k') r → RotB G (c, u) r
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.RotB.unique
theorem in lean/SpectreKnot/Reverse.lean, line 139 · read it in its file
Doc comment
Turning backwards about a vertex has one result.
Statement
theorem RotB.unique {x r r' : Nat × Nat} (turn : G.RotB x r) (turn' : G.RotB x r') : r = r'
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by induction turn generalizing r' with | stop unglued => cases turn' with | stop _ => rfl | step glued _ => rw [unglued] at glued; contradiction | step glued _ ih => cases turn' with | stop unglued => rw [glued] at unglued; contradiction | step glued' rest' => rw [glued] at glued' simp only [Option.some.injEq, Prod.mk.injEq] at glued' obtain ⟨rfl, rfl⟩ := glued' exact ih rest'
Gluing.Sig
structure in lean/SpectreKnot/Signature.lean, line 51 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The signature of the parent, for a gluing whose crossover child is g (Def 4.3 at the parent's level):
- the gluing is well formed, and the walk from every port ends on the parent's rim (no closed strand);
- at every parent rim vertex, reached along the rim at vertex
uof childcand left along the rim at vertexu₂of childc₂(Rot), the strand from the portLthere leaves at the portRthere (a hook), except at the crossover child's cornersAandB; - those corners are parent rim vertices (their edges lie on the parent's rim), and carry the crossover:
R(A) ↔ R(B)andL(A) ↔ L(B).
Statement
structure Sig (G : Gluing) (g : Nat) : Prop where wf : G.WF noLoops : ∀ x, G.Valid x → ∃ r, G.FullReach x r hooks : ∀ c u, G.RimL c u → ∃ c₂ u₂, G.Rot (c, u) (c₂, u₂) ∧ ((c₂ = g ∧ (u₂ = G.A g ∨ u₂ = G.B g)) ∨ G.FullReach (c, u, false) (c₂, u₂, true)) g_lt : g < G.n rimA : G.mate g (G.A g) = none rimB : G.mate g (G.B g) = none crossR : G.FullReach (g, G.A g, true) (g, G.B g, true) crossL : ∃ cA uA cB uB, G.RimL cA uA ∧ G.Rot (cA, uA) (g, G.A g) ∧ G.RimL cB uB ∧ G.Rot (cB, uB) (g, G.B g) ∧ G.FullReach (cA, uA, false) (cB, uB, false)
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Sim
structure in lean/SpectreKnot/Subdivide.lean, line 61 · read it in its file
Doc comment
φ simulates G in G'.
Statement
structure Sim (G G' : Gluing) (φ : GPort → GPort) : Prop where valid : ∀ x, G.Valid x → G'.Valid (φ x) tau : ∀ x, G.Valid x → G'.tau (φ x) = φ (G.tau x) rim : ∀ x, G.Valid x → G.sigma x = none → G'.sigma (φ x) = none cross : ∀ x y, G.Valid x → G.sigma x = some y → G'.Cross (φ x) (φ y)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Sim.reach
theorem in lean/SpectreKnot/Subdivide.lean, line 68 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Along a simulation, every walk of G from a valid port maps to a walk of G' between the images of its ends.
Statement
theorem Sim.reach (G_wf : G.WF) {φ : GPort → GPort} (sim : Sim G G' φ) :
∀ k x r, G.Valid x → G.FReach k x r → G'.FullReach (φ x) (φ r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by intro k x r x_valid walk induction walk with | @stop x on_rim => -- the piece at `x` commutes with `φ` have tau_comm := sim.tau x x_valid refine ⟨0, ?_⟩ -- the image of the piece's other end is a rim port of `G'`, so the walk of `G'` stops there too have stops := FReach.stop (G := G') (x := φ x) (by rw [tau_comm]; exact sim.rim _ (tau_valid G_wf x_valid) on_rim) rwa [tau_comm] at stops | @step k x y r crosses _ ih => -- the port crossed to is valid, so the rest of the walk maps too have y_valid := sigma_valid G_wf (tau_valid G_wf x_valid) crosses exact Cross.reach (sim.cross _ _ (tau_valid G_wf x_valid) crosses) (φ x) (φ r) (sim.tau x x_valid) (ih y_valid)
Gluing.Valid
def in lean/SpectreKnot/Gluing.lean, line 53 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A port of an actual child, at an actual rim vertex.
Statement
def Valid (p : GPort) : Prop := p.1 < G.n ∧ p.2.1 < G.E p.1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.WF
structure in lean/SpectreKnot/Gluing.lean, line 56 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Well-formed: every child has a rim with its corners on it, and gluing pairs edges of children with each other.
Statement
structure WF : Prop where E_pos : ∀ c, c < G.n → 0 < G.E c A_lt : ∀ c, c < G.n → G.A c < G.E c B_lt : ∀ c, c < G.n → G.B c < G.E c A_ne_B : ∀ c, c < G.n → G.A c ≠ G.B c mate_valid : ∀ c k c' k', c < G.n → k < G.E c → G.mate c k = some (c', k') → c' < G.n ∧ k' < G.E c' ∧ G.mate c' k' = some (c, k)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Walk
inductive in lean/SpectreKnot/Reverse.lean, line 73 · read it in its file
Doc comment
Walk n a b: n steps (τ then σ) lead from a to b.
Statement
inductive Walk (G : Gluing) : Nat → GPort → GPort → Prop | zero {a : GPort} : Walk G 0 a a | succ {n : Nat} {a a' b : GPort} : G.sigma (G.tau a) = some a' → Walk G n a' b → Walk G (n + 1) a b
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.Walk.freach
theorem in lean/SpectreKnot/Reverse.lean, line 110 · read it in its file
Doc comment
A Walk to a port whose piece ends on the parent's rim is a full walk.
Statement
theorem Walk.freach {k : Nat} {x y : GPort} (walk : G.Walk k x y) (on_rim : G.sigma (G.tau y) = none) :
G.FReach k x (G.tau y)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction walk with | zero => exact .stop on_rim | succ first_step _ ih => exact .step first_step (ih on_rim)
Gluing.Walk.reverse
theorem in lean/SpectreKnot/Reverse.lean, line 85 · read it in its file
Doc comment
A walk read backwards, through the other ends of the same pieces and edges.
Statement
theorem Walk.reverse (wf : G.WF) {n : Nat} {a b : GPort} (walk : G.Walk n a b) (valid : G.Valid a) :
G.Walk n (G.tau b) (G.tau a)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by induction walk with | zero => exact .zero | @succ n a a' b first_step _ ih => -- the other end of the first piece is a port of an actual child have tau_valid_a := tau_valid wf valid -- and so is the port across from it have valid_a' := sigma_valid wf tau_valid_a first_step -- the rest of the walk, backwards have rest_back := ih valid_a' refine rest_back.snoc ?_ rw [tau_tau wf valid_a'] exact sigma_symm wf tau_valid_a first_step
Gluing.Walk.snoc
theorem in lean/SpectreKnot/Reverse.lean, line 78 · read it in its file
Doc comment
A walk extended by one more step at its end.
Statement
theorem Walk.snoc {n : Nat} {a b b' : GPort} (walk : G.Walk n a b) (last_step : G.sigma (G.tau b) = some b') :
G.Walk (n + 1) a b'
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction walk with | zero => exact .succ last_step .zero | succ first_step _ ih => exact .succ first_step (ih last_step)
Gluing.corner
def in lean/SpectreKnot/Gluing.lean, line 88 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
u is a crossover corner of child c.
Statement
def corner (c u : Nat) : Bool := u == G.A c || u == G.B c
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.corner_false
theorem in lean/SpectreKnot/Gluing.lean, line 100 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A vertex that is not a crossover corner is neither A nor B.
Statement
theorem corner_false {c u : Nat} (not_corner : G.corner c u = false) : u ≠ G.A c ∧ u ≠ G.B c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [corner] at not_corner; exact not_cornerGluing.cross_three
theorem in lean/SpectreKnot/Subdivide.lean, line 253 · read it in its file
Formalises Lemma 5.1 Zigzag Lemma, Lemma 7.1 Lengthening.
Doc comment
**A shared path of three edges, by the zigzag lemma (Lemma 5.1 with n = 3).** Let edges ea, ea + 1, ea + 2 of child a be glued, in reverse order, to edges eb + 2, eb + 1, eb of child b, with hooks at the inner vertices ea + 1, ea + 2 of a and eb + 1, eb + 2 of b. Then the crossings from R_a(ea) are forced along the path to R_b(eb), and those from L_b(eb + 3) to L_a(ea + 3): the two connections for odd n.
Statement
theorem cross_three {G : Gluing} {a ea b eb : Nat} (a_room : ea + 3 < G.E a)
(glued_a : ∀ i, i ≤ 2 → G.mate a (ea + i) = some (b, eb + 2 - i))
(glued_b : ∀ i, i ≤ 2 → G.mate b (eb + i) = some (a, ea + 2 - i))
(hook_a : ∀ i, 1 ≤ i → i ≤ 2 → G.corner a (ea + i) = false)
(hook_b : ∀ i, 1 ≤ i → i ≤ 2 → G.corner b (eb + i) = false) :
G.Cross (a, ea, true) (b, eb, true) ∧ G.Cross (b, eb + 3, false) (a, ea + 3, false)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (24 lines)
by obtain ⟨from_R, from_L, _⟩ := Zigzag.zigzag G.sigma G.tau (pathPort a ea b eb) 3 (by omega) (fun k k_lt => by -- across edge `ea + k` of `a`, to `R_b` at vertex `eb + 2 - k`, where that edge of `b` starts simp only [pathPort, Hand.isR, sigmaR, glued_a k (by omega), Option.map_some, Option.some.injEq, Prod.mk.injEq, true_and, and_true] omega) (fun k k_lt => by -- across the edge of `b` before its vertex `eb + 3 - k`, edge `eb + 2 - k`, to `L_a` after edge `ea + k` simp only [pathPort, Hand.isR, sigmaL] rw [show eb + 3 - k = (eb + (2 - k)) + 1 by omega, prv_succ', glued_b (2 - k) (by omega)] simp only [Option.map_some, show ea + 2 - (2 - k) = ea + k by omega, nxt_of_lt' (show ea + k + 1 < G.E a by omega), Nat.add_assoc]) (fun k k_pos k_lt => by -- the hook of `a` at its inner vertex `ea + k` simp only [pathPort, Hand.isR] rw [tau_of_not_corner (hook_a k k_pos (by omega))]; rfl) (fun k k_pos k_lt => by -- the hook of `b` at its inner vertex `eb + 3 - k` simp only [pathPort, Hand.isR] rw [show eb + 3 - k = eb + (3 - k) by omega, tau_of_not_corner (hook_b (3 - k) (by omega) (by omega))]; rfl) simp only [pathPort, Hand.isR, Nat.add_zero, show 3 % 2 = 1 by rfl, Nat.one_ne_zero, ite_false, show eb + 3 - 3 = eb by omega, show eb + 3 - 0 = eb + 3 by omega] at from_R from_L exact ⟨from_R, from_L⟩
Gluing.fullReach_first
theorem in lean/SpectreKnot/NewWalk.lean, line 23 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A walk whose first step lands on y goes on from y: if the walk from x ends at r, so does the walk from y.
Statement
theorem fullReach_first {G : Gluing} {x y r : GPort} (first_step : G.sigma (G.tau x) = some y)
(walk : G.FullReach x r) : G.FullReach y r
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by obtain ⟨k, walk_k⟩ := walk cases walk_k with | stop at_rim => -- the walk cannot stop at once: its first crossing exists rw [first_step] at at_rim; contradiction | step step_to rest_walk => -- the walk's first step is the same step, to `y` rw [first_step] at step_to simp only [Option.some.injEq] at step_to subst step_to exact ⟨_, rest_walk⟩
Gluing.fullReach_step
theorem in lean/SpectreKnot/NewWalk.lean, line 16 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The first step of a walk, then the rest: if from x the piece and then the crossing lead to y, and the walk from y ends at r, then the walk from x ends at r.
Statement
theorem fullReach_step {G : Gluing} {x y r : GPort} (first_step : G.sigma (G.tau x) = some y)
(rest : G.FullReach y r) : G.FullReach x r
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨k, rest_walk⟩ := rest
exact ⟨k + 1, .step first_step rest_walk⟩Gluing.fullWalk
def in lean/SpectreKnot/Gluing.lean, line 141 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The full walk as a computation with fuel: none if the fuel runs out.
Statement
def fullWalk : Nat → GPort → Option GPort | 0, _ => none | f + 1, x => match G.sigma (G.tau x) with | none => some (G.tau x) | some y => fullWalk f y
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.fullWalk_sound
theorem in lean/SpectreKnot/Gluing.lean, line 149 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
If the computed full walk from x ends at r, then FullReach x r.
Statement
theorem fullWalk_sound {f : Nat} {x r : GPort} (walk_eq : G.fullWalk f x = some r) : G.FullReach x r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by induction f generalizing x with | zero => simp [fullWalk] at walk_eq | succ f ih => simp only [fullWalk] at walk_eq split at walk_eq · -- on the parent's rim: the walk stops here rename_i on_rim; cases walk_eq; exact ⟨0, .stop on_rim⟩ · -- across to `y`, and on from there rename_i y crosses; obtain ⟨k, rest⟩ := ih walk_eq; exact ⟨k + 1, .step crosses rest⟩
Gluing.nxt_of_lt'
theorem in lean/SpectreKnot/Subdivide.lean, line 239 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The vertex after q is q + 1 when that is not the end of the rim.
Statement
theorem nxt_of_lt' {E q : Nat} (succ_lt : q + 1 < E) : nxt E q = q + 1
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by simp [nxt]; omegaGluing.pathPort
def in lean/SpectreKnot/Subdivide.lean, line 245 · read it in its file
Used, through the names in proofs, for Lemma 5.1, Lemma 7.1.
Doc comment
The ports along a path of three edges ea, ea + 1, ea + 2 of child a, glued to edges eb + 2, eb + 1, eb of child b: u_k is vertex ea + k of a, which is vertex eb + 3 - k of b.
Statement
def pathPort (a ea b eb : Nat) : Strip → GPort
| .c hand k => (a, ea + k, hand.isR)
| .d hand k => (b, eb + 3 - k, hand.isR)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.prv_succ'
theorem in lean/SpectreKnot/Subdivide.lean, line 236 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The vertex before q + 1 is q.
Statement
theorem prv_succ' (E q : Nat) : prv E (q + 1) = q
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by simp [prv]Gluing.sigma
def in lean/SpectreKnot/Gluing.lean, line 125 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
σ: the straight-through rule (Def 3.2). R_c(u) lies on edge u near u; if that edge is edge k' of c', it is joined to the port of c' on it near the other end, R_{c'}(k'). L_c(u) lies on edge u-1 near u, and is joined to L_{c'}(k'+1). none on the parent's rim.
Statement
def sigma : GPort → Option GPort | (c, u, true) => (G.mate c u).map fun (c', k') => (c', k', true) | (c, u, false) => (G.mate c (prv (G.E c) u)).map fun (c', k') => (c', nxt (G.E c') k', false)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.sigmaL
theorem in lean/SpectreKnot/Subdivide.lean, line 232 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Crossing from port L at vertex u: across the edge before u, to port L at the vertex after the edge glued to it.
Statement
theorem sigmaL (G : Gluing) (c u : Nat) : G.sigma (c, u, false) = (G.mate c (prv (G.E c) u)).map fun (c', k') => (c', nxt (G.E c') k', false)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Gluing.sigmaR
theorem in lean/SpectreKnot/Subdivide.lean, line 227 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Crossing from port R at vertex u: across edge u itself, to port R at the vertex where the edge glued to it starts.
Statement
theorem sigmaR (G : Gluing) (c u : Nat) : G.sigma (c, u, true) = (G.mate c u).map fun (c', k') => (c', k', true)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Gluing.sigma_symm
theorem in lean/SpectreKnot/Reverse.lean, line 40 · read it in its file
Doc comment
In a well-formed gluing, σ (straight across a glued edge) is symmetric: if it takes x to y, it takes y back to x.
Statement
theorem sigma_symm (wf : G.WF) {x y : GPort} (valid : G.Valid x) (across : G.sigma x = some y) :
G.sigma y = some x
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (30 lines)
by obtain ⟨c, u, s⟩ := x obtain ⟨c_lt, u_lt⟩ := valid cases s with | true => -- port `R(u)`, on edge `u` simp only [sigma] at across cases mate_eq : G.mate c u with | none => rw [mate_eq] at across; contradiction | some p => obtain ⟨c', k'⟩ := p rw [mate_eq] at across simp only [Option.map_some, Option.some.injEq] at across subst across -- the edge is glued back obtain ⟨_, _, mate_back⟩ := wf.mate_valid c u c' k' c_lt u_lt mate_eq simp only [sigma, mate_back, Option.map_some] | false => -- port `L(u)`, on edge `u - 1` simp only [sigma] at across cases mate_eq : G.mate c (prv (G.E c) u) with | none => rw [mate_eq] at across; contradiction | some p => obtain ⟨c', k'⟩ := p rw [mate_eq] at across simp only [Option.map_some, Option.some.injEq] at across subst across -- the edge is glued back obtain ⟨_, k'_lt, mate_back⟩ := wf.mate_valid c _ c' k' c_lt (prv_lt u_lt) mate_eq simp only [sigma, prv_nxt k'_lt, mate_back, Option.map_some, nxt_prv u_lt]
Gluing.sigma_valid
theorem in lean/SpectreKnot/Subdivide.lean, line 41 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
In a well-formed gluing, crossing an edge from a valid port lands on a valid port.
Statement
theorem sigma_valid (G_wf : G.WF) {x y : GPort} (x_valid : G.Valid x) (crosses : G.sigma x = some y) : G.Valid y
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by obtain ⟨c, u, s⟩ := x obtain ⟨c_lt, u_lt⟩ := x_valid cases s with | true => simp only [sigma, Option.map_eq_some_iff] at crosses obtain ⟨⟨c', k'⟩, glued, rfl⟩ := crosses -- port `R`: across edge `u` itself, to edge `k'` of `c'` obtain ⟨c'_lt, k'_lt, _⟩ := G_wf.mate_valid c u c' k' c_lt u_lt glued exact ⟨c'_lt, k'_lt⟩ | false => simp only [sigma, Option.map_eq_some_iff] at crosses obtain ⟨⟨c', k'⟩, glued, rfl⟩ := crosses -- port `L`: across the edge before vertex `u`, to the vertex after edge `k'` of `c'` obtain ⟨c'_lt, k'_lt, _⟩ := G_wf.mate_valid c _ c' k' c_lt (prv_lt u_lt) glued exact ⟨c'_lt, nxt_lt k'_lt⟩
Gluing.subdiv
def in lean/SpectreKnot/Subdivide.lean, line 204 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
G with the cut κ made: the cut edge becomes three edges, and positions after it move on by 2.
Statement
def subdiv (G : Gluing) (κ : Cut) : Gluing where n := G.n E c := G.E c + (if c = κ.c₀ then 2 else 0) + (if κ.two = true ∧ c = κ.c₁ then 2 else 0) A c := κ.sh c (G.A c) B c := κ.sh c (G.B c) mate c k := if c = κ.c₀ ∧ κ.e₀ ≤ k ∧ k ≤ κ.e₀ + 2 then (if κ.two = true then some (κ.c₁, κ.e₁ + 2 - (k - κ.e₀)) else none) else if κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ ≤ k ∧ k ≤ κ.e₁ + 2 then some (κ.c₀, κ.e₀ + 2 - (k - κ.e₁)) else (G.mate c (κ.unsh c k)).map fun (c₂, k₂) => (c₂, κ.sh c₂ k₂)
Names in its proof
Named in the proofs of
Gluing.Cut.OK.noLoopsGluing.Cut.OK.rimL_preGluing.Cut.OK.new_hookGluing.Cut.OK.E_c₀Gluing.Cut.OK.E_c₁Gluing.Cut.OK.E_otherGluing.Cut.OK.sh_ltGluing.Cut.OK.mate_new₀Gluing.Cut.OK.mate_new₁Gluing.Cut.OK.mate_oldGluing.Cut.OK.tau_portGluing.Cut.OK.corner_new₀Gluing.Cut.OK.corner_new₁Gluing.Cut.OK.wf_subdiv
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.tau
def in lean/SpectreKnot/Gluing.lean, line 92 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
τ: inside a child, by its signature (Def 4.3): a hook at every rim vertex but the corners, where R(A) ↔ R(B) and L(A) ↔ L(B).
Statement
def tau : GPort → GPort | (c, u, s) => if u = G.A c then (c, G.B c, s) else if u = G.B c then (c, G.A c, s) else (c, u, !s)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.tau_of_not_corner
theorem in lean/SpectreKnot/Gluing.lean, line 104 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Away from the crossover corners, τ is the hook: it swaps L and R at the same vertex.
Statement
theorem tau_of_not_corner {c u : Nat} {s : Bool} (not_corner : G.corner c u = false) :
G.tau (c, u, s) = (c, u, !s)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨ne_A, ne_B⟩ := corner_false not_corner
simp [tau, ne_A, ne_B]Gluing.tau_tau
theorem in lean/SpectreKnot/Reverse.lean, line 13 · read it in its file
Doc comment
In a well-formed gluing, τ (the children's signature pairing) undoes itself on the ports of actual children.
Statement
theorem tau_tau (wf : G.WF) {x : GPort} (valid : G.Valid x) : G.tau (G.tau x) = x
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (24 lines)
by obtain ⟨c, u, s⟩ := x -- the child's two corners differ have A_ne_B := wf.A_ne_B c valid.1 by_cases at_A : u = G.A c · -- at corner `A`: to `B` and back -- `τ` sends `A` to `B` have to_B : G.tau (c, u, s) = (c, G.B c, s) := by simp [tau, at_A] -- and `B` back to `A` have to_A : G.tau (c, G.B c, s) = (c, G.A c, s) := by simp [tau, Ne.symm A_ne_B] rw [to_B, to_A, at_A] · by_cases at_B : u = G.B c · -- at corner `B`: to `A` and back -- `τ` sends `B` to `A` have to_A : G.tau (c, u, s) = (c, G.A c, s) := by simp [tau, at_A, at_B] -- and `A` back to `B` have to_B : G.tau (c, G.A c, s) = (c, G.B c, s) := by simp [tau] rw [to_A, to_B, at_B] · -- at a hook: `R` and `L` swap twice -- the first swap have swap : G.tau (c, u, s) = (c, u, !s) := by simp [tau, at_A, at_B] -- the second swap have swap_back : G.tau (c, u, !s) = (c, u, !!s) := by simp [tau, at_A, at_B] rw [swap, swap_back, Bool.not_not]
Gluing.tau_valid
theorem in lean/SpectreKnot/Gluing.lean, line 110 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
In a well-formed gluing, τ sends a port of an actual child to a port of the same child.
Statement
theorem tau_valid (wf : G.WF) {x : GPort} (x_valid : G.Valid x) : G.Valid (G.tau x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by
obtain ⟨c, u, s⟩ := x
obtain ⟨c_lt, u_lt⟩ := x_valid
simp only [tau]
split
· exact ⟨c_lt, wf.B_lt c c_lt⟩
· split
· exact ⟨c_lt, wf.A_lt c c_lt⟩
· exact ⟨c_lt, u_lt⟩Gluing.wfCheck
def in lean/SpectreKnot/Gluing.lean, line 65 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
WF as a computation, for concrete gluings.
Statement
def wfCheck : Bool := (List.range G.n).all fun c => decide (0 < G.E c) && decide (G.A c < G.E c) && decide (G.B c < G.E c) && G.A c != G.B c && (List.range (G.E c)).all fun k => match G.mate c k with | none => true | some (c', k') => decide (c' < G.n) && decide (k' < G.E c') && G.mate c' k' == some (c, k)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Gluing.wfCheck_sound
theorem in lean/SpectreKnot/Gluing.lean, line 74 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If wfCheck returns true, the gluing is well formed.
Statement
theorem wfCheck_sound (checked : G.wfCheck = true) : G.WF
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by simp only [wfCheck, List.all_eq_true, List.mem_range, Bool.and_eq_true, decide_eq_true_eq, bne_iff_ne, ne_eq] at checked refine ⟨fun c c_lt => (checked c c_lt).1.1.1.1, fun c c_lt => (checked c c_lt).1.1.1.2, fun c c_lt => (checked c c_lt).1.1.2, fun c c_lt => (checked c c_lt).1.2, fun c k c' k' c_lt k_lt glued => ?_⟩ -- what the check says about edge `k` of child `c`, which is glued to edge `k'` of `c'` have edge_ok := (checked c c_lt).2 k k_lt rw [glued] at edge_ok simp only [Bool.and_eq_true, decide_eq_true_eq, beq_iff_eq] at edge_ok exact ⟨edge_ok.1.1, edge_ok.1.2, edge_ok.2⟩
Hand
inductive in lean/SpectreKnot/Box.lean, line 13 · read it in its file
Doc comment
The two ports at a rim vertex u: R on the rim edge after u, near u; L on the rim edge before u, near u (in a chosen orientation of the rim; reversing it exchanges L and R).
Statement
inductive Hand where | L | R deriving DecidableEq, Repr
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Hand.isR
def in lean/SpectreKnot/Gluing.lean, line 36 · read it in its file
Used, through the names in proofs, for Lemma 5.1, Lemma 7.1.
Doc comment
R as true, L as false, as in GPort.
Statement
def Hand.isR : Hand → Bool
| .R => true
| .L => false
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Kind
inductive in lean/SpectreKnot/Basic.lean, line 8 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
The nine kinds of supertile (paper §2.2).
Statement
inductive Kind where | Gamma | Delta | Theta | Lambda | Xi | Pi | Sigma | Phi | Psi deriving DecidableEq, Repr
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Letter
inductive in lean/SpectreKnot/Basic.lean, line 13 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The eight letters of the edge labels of [SMKGS-spectre, Fig. 4.2], signs ignored (paper §6.1).
Statement
inductive Letter where | alpha | beta | gamma | delta | epsilon | zeta | eta | theta deriving DecidableEq, Repr
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
RimPort
abbrev in lean/SpectreKnot/Box.lean, line 18 · read it in its file
Doc comment
A rim port of a patch with E rim vertices u_0, …, u_{E-1}.
Statement
abbrev RimPort (E : Nat) := Fin E × Hand
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain
structure in lean/SpectreKnot/Statement.lean, line 392 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
A chain of supertiles X_1 ⊂ X_2 ⊂ ⋯: for every level m ≥ 1, the kind K m of X_m and its position c m among the children of X_{m+1}, consistent with Table 1. In a tiling, the supertiles containing a given tile form a chain; the nest is the chain with K m = Δ, c m = 1.
Statement
structure Chain where K : Nat → Kind c : Nat → Nat child_lt : ∀ m, 1 ≤ m → c m < (Pattern.kids (K (m + 1))).length child_kind : ∀ m, 1 ≤ m → (Pattern.kids (K (m + 1))).getD (c m) .Gamma = K m
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.Contains
def in lean/SpectreKnot/Statement.lean, line 436 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
**T contains every block**: whatever X_m glues, the tiling T glues the same way.
Statement
def Contains (X : Chain) (T : Tiling) : Prop := ∀ m t i t' j, 1 ≤ m → t < (X.block m).tiles → i < 14 → (X.block m).glue t i = some (t', j) → T.glue (X.gid m t) i = some (X.gid m t', j)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.Covers
def in lean/SpectreKnot/Statement.lean, line 432 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
The chain covers: every edge of every block is glued in some larger block, so the union of the chain has no rim. This is the combinatorial form of a hierarchy that covers the plane (see (M2)).
Statement
def Covers (X : Chain) : Prop := ∀ m t i, 1 ≤ m → t < (X.block m).tiles → i < 14 → ∃ k, ((X.block (m + k)).glue (X.up m k t) i).isSome
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.GluedAt
def in lean/SpectreKnot/ProofChain.lean, line 281 · read it in its file
Doc comment
X.GluedAt L g i: the tile numbered g is a tile of X_L, and X_L glues its edge e_i.
Statement
def GluedAt (X : Chain) (L g i : Nat) : Prop := g < (X.block L).tiles ∧ ((X.block L).glue (X.loc L g) i).isSome
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.across_gP
theorem in lean/SpectreKnot/ProofChain.lean, line 496 · read it in its file
Doc comment
Across a port of X_m, the tiling continues as X_m does.
Statement
theorem across_gP (X : Chain) {T : Tiling} (contains : X.Contains T) {m : Nat}
(m_pos : 1 ≤ m) {p q : Port} (p_port : (X.block m).IsPort p) (across_p : (X.block m).across p = some q) :
T.across (X.gP m p) = some (X.gP m q)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (30 lines)
by obtain ⟨t, i, s⟩ := p obtain ⟨ht, hi⟩ := p_port simp only at ht hi -- the port, renumbered have renumbered : X.gP m (t, i, s) = (X.gid m t, i, s) := rfl rw [renumbered] cases s with | true => simp only [Patch.across, straightThrough] at across_p cases glued : (X.block m).glue t i with | none => rw [glued] at across_p; contradiction | some e => obtain ⟨t', j⟩ := e rw [glued] at across_p simp only [Option.map_some, Option.some.injEq] at across_p subst across_p show (T.glue (X.gid m t) i).map _ = _ rw [contains m t i t' j m_pos ht hi glued]; rfl | false => simp only [Patch.across, straightThrough] at across_p cases glued : (X.block m).glue t ((i + 13) % 14) with | none => rw [glued] at across_p; contradiction | some e => obtain ⟨t', j⟩ := e rw [glued] at across_p simp only [Option.map_some, Option.some.injEq] at across_p subst across_p show (T.glue (X.gid m t) ((i + 13) % 14)).map _ = _ rw [contains m t _ t' j m_pos ht (by omega) glued]; rfl
Statement.Chain.all_glued_at
theorem in lean/SpectreKnot/ProofChain.lean, line 327 · read it in its file
Doc comment
**All edges of the first M tiles are glued in one block** X_L, which contains those tiles.
Statement
theorem all_glued_at (X : Chain) (covers : X.Covers) (M : Nat) :
∃ L, 1 ≤ L ∧ M ≤ (X.block L).tiles ∧ ∀ g i, g < M → i < 14 → X.GluedAt L g i
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by -- number the edges `e_i` of the tiles `g < M` as `14 g + i`, and find one level for all of them obtain ⟨L, all⟩ := exists_common (P := fun L x => X.GluedAt (L + 1) (x / 14) (x % 14)) (fun L k x glued => by rw [show L + k + 1 = L + 1 + k by omega] exact X.gluedAt_up (by omega) glued k) (14 * M) (fun x _ => by obtain ⟨L, L_pos, glued⟩ := X.gluedAt_exists covers (g := x / 14) (Nat.mod_lt x (by decide)) exact ⟨L - 1, by rw [show L - 1 + 1 = L by omega]; exact glued⟩) -- go up `M` more levels, so that the block has at least `M` tiles refine ⟨L + 1 + M, by omega, ?_, fun g i hg hi => ?_⟩ · have big := X.tiles_ge (L + M) -- X_{L+M+1} has at least `L + M + 2` tiles rw [show L + 1 + M = L + M + 1 by omega] omega · -- the edge `14 g + i` have glued := all (14 * g + i) (by omega) rw [show (14 * g + i) / 14 = g by omega, show (14 * g + i) % 14 = i by omega] at glued exact X.gluedAt_up (by omega) glued M
Statement.Chain.block
def in lean/SpectreKnot/Statement.lean, line 401 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
The block X_m: the supertile of level m and kind K m.
Statement
def block (X : Chain) (m : Nat) : Patch := super m (X.K m)
Names in its proof
Named in the proofs of
Statement.Chain.tiles_succStatement.Chain.tiles_monoStatement.Chain.gid_locStatement.Chain.glue_liftStatement.Chain.GluedAtStatement.Chain.chainGlueStatement.Chain.chainTiling_containsStatement.Chain.across_gPStatement.Chain.follow_staysStatement.Chain.not_closedStatement.Chain.gidStatement.Chain.locStatement.Chain.CoversStatement.Chain.ContainsStatement.ChainModel
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.block_succ
theorem in lean/SpectreKnot/ProofChain.lean, line 28 · read it in its file
Doc comment
For m ≥ 1, X_{m+1} is the composition of its level-m children.
Statement
theorem block_succ (X : Chain) {m : Nat} (m_pos : 1 ≤ m) : X.block (m + 1) = compose (X.K (m + 1)) (X.kidsAt m)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ rfl
Statement.Chain.chainGlue
def in lean/SpectreKnot/ProofChain.lean, line 410 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
A gluing that contains every block (chosen, not computed). For the tile numbered g and its edge e_i: if some block X_{g+1+k} glues that edge, read the gluing off one such block (Classical.choose picks the k); otherwise nothing is glued.
Statement
noncomputable def chainGlue (X : Chain) (g i : Nat) : Option (Nat × Nat) := open Classical in if found : ∃ k, ((X.block (g + 1 + k)).glue (X.loc (g + 1 + k) g) i).isSome then ((X.block (g + 1 + Classical.choose found)).glue (X.loc (g + 1 + Classical.choose found) g) i).map fun e => (X.gid (g + 1 + Classical.choose found) e.1, e.2) else none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.chainTiling
def in lean/SpectreKnot/ProofChain.lean, line 428 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
**The tiling glued by chainGlue.**
Statement
noncomputable def chainTiling (X : Chain) : Tiling := ⟨X.chainGlue⟩
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.chainTiling_contains
theorem in lean/SpectreKnot/ProofChain.lean, line 431 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
**chainTiling contains every block.**
Statement
theorem chainTiling_contains (X : Chain) : X.Contains X.chainTiling
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (27 lines)
by intro m t i t' j m_pos ht hi glued show X.chainGlue (X.gid m t) i = some (X.gid m t', j) -- the far tile is an actual tile have far := (X.glue_ok m_pos ht hi glued).1 -- the number of the tile generalize number : X.gid m t = g -- the tile numbered `g` is a tile of X_{g+1} have big := X.tiles_ge g -- the edge is glued in some block above X_{g+1}: in X_{g+1+m}, which also lies above X_m have found : ∃ k, ((X.block (g + 1 + k)).glue (X.loc (g + 1 + k) g) i).isSome := by refine ⟨m, ?_⟩ rw [show g + 1 + m = m + (g + 1) by omega, ← number, X.loc_gid_up m_pos ht, X.glue_lift m_pos ht glued] rfl unfold chainGlue rw [dite_eq_left found] -- the block that `chainGlue` reads glues the edge have spec := Classical.choose_spec found generalize Classical.choose found = k at spec ⊢ obtain ⟨⟨u, j₂⟩, glued₂⟩ := Option.isSome_iff_exists.mp spec -- there the tile numbered `g` is found obtain ⟨loc_bound, gid_of_loc⟩ := X.gid_loc (g + 1 + k) g (by omega) (by have more := X.tiles_mono (m := g + 1) (by omega) k; omega) -- X_{g+1+k} is at least as large as X_{g+1} -- and X_m and that block glue the edge alike have agree := X.glue_agree m_pos (by omega) ht loc_bound hi (by rw [number, gid_of_loc]) glued glued₂ rw [glued₂, agree.1, agree.2] rfl
Statement.Chain.exists_common
theorem in lean/SpectreKnot/ProofChain.lean, line 311 · read it in its file
Doc comment
If each of finitely many claims holds from some level on, all of them hold from one level on.
Statement
theorem exists_common {P : Nat → Nat → Prop} (mono : ∀ L k x, P L x → P (L + k) x) : ∀ n, (∀ x, x < n → ∃ L, P L x) → ∃ L, ∀ x, x < n → P L x | 0, _ => ⟨0, fun _ hx => absurd hx (Nat.not_lt_zero _)⟩ | n + 1, each => by -- a common level for the first `n` obtain ⟨L₁, below⟩
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
exists_common mono n (fun x hx => each x (by omega)) -- a level for the last one obtain ⟨L₂, at_n⟩ := each n (by omega) refine ⟨L₁ + L₂, fun x hx => ?_⟩ by_cases earlier : x < n · exact mono L₁ L₂ x (below x earlier) · have is_n : x = n := by omega -- the last one subst is_n rw [Nat.add_comm]; exact mono L₂ L₁ x at_n
Statement.Chain.follow_stays
theorem in lean/SpectreKnot/ProofChain.lean, line 533 · read it in its file
Doc comment
A strand of the tiling cannot stay among the first M tiles if all their edges are glued in one block X_L: following it from a port of X_L would never reach the rim of X_L.
Statement
theorem follow_stays (X : Chain) {T : Tiling} (contains : X.Contains T)
(tiling : IsTiling T) {L M : Nat} (L_pos : 1 ≤ L) (all_glued : ∀ g i, g < M → i < 14 → X.GluedAt L g i) :
∀ p r, (X.block L).Follow p r → (X.block L).IsPort p →
∀ x : NPort, X.gP L p = x.1 → (∀ k, ((tilingSys tiling).walk x k).1.1 < M) → False
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (45 lines)
by -- X_L has the signature have sig := (good L (X.K L) L_pos).sig intro p r follows induction follows with | @leave p nothing_across => intro p_port x x_eq bounded -- the tile of `p` is among the first `M` have below : X.gid L p.1 < M := by -- the strand starts at `x`, on one of them have start := bounded 0 change x.1.1 < _ at start rw [← x_eq] at start; exact start -- X_L finds the tile of `p` by its number have found := (X.loc_gid L p.1 L_pos p_port.1).2 -- every edge of it is glued in X_L have edges_glued : ∀ i, i < 14 → ((X.block L).glue p.1 i).isSome := by intro i hi have glued := (all_glued _ i below hi).2 -- glued at the tile numbered `X.gid L p.1` rwa [found] at glued -- the other end of the piece is on the same tile have end_valid := pieceEnd_valid p_port.2 -- so something lies across it, yet the strand leaves X_L there have across_end := across_isSome edges_glued end_valid.1 end_valid.2 rw [nothing_across] at across_end contradiction | @next p q r across_end _ ih => intro p_port x x_eq bounded -- the other end of the piece is on the same tile have end_valid := pieceEnd_valid p_port.2 -- so it is a port of X_L have end_port : (X.block L).IsPort (pieceEnd p) := ⟨end_valid.1 ▸ p_port.1, end_valid.2⟩ -- and so is the port `q` across from it have q_port : (X.block L).IsPort q := Patch.across_valid sig end_port.1 end_port.2 across_end -- `q` is the next port of the strand in the tiling have next_is : ((tilingSys tiling).next x).1 = X.gP L q := by show (T.across (pieceEnd x.1)).getD (pieceEnd x.1) = _ rw [← x_eq, X.pieceEnd_gP, X.across_gP contains L_pos end_port across_end] rfl -- the strand from there is the rest of the strand from `x` refine ih q_port ((tilingSys tiling).next x) next_is.symm (fun k => ?_) -- its ports are ports of the strand from `x`, so on the first `M` tiles have later := bounded (k + 1) rw [StrandSystem.walk, iter_succ'] at later exact later
Statement.Chain.gP
def in lean/SpectreKnot/ProofChain.lean, line 488 · read it in its file
Doc comment
Port p of X_m, as a port of the whole tiling.
Statement
def gP (X : Chain) (m : Nat) (p : Port) : Port := (X.gid m p.1, p.2.1, p.2.2)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.gid
def in lean/SpectreKnot/Statement.lean, line 413 · read it in its file
In the statement file: read it line by line.
Doc comment
**X.gid m t: the number, in the union of the chain, of tile t of X_m**, as gid of §6, from level 1.
Statement
def gid (X : Chain) : Nat → Nat → Nat | 0, t => t | 1, t => t | m + 2, t => if X.shift (m + 1) ≤ t ∧ t < X.shift (m + 1) + (X.block (m + 1)).tiles then gid X (m + 1) (t - X.shift (m + 1)) else if t < X.shift (m + 1) then (X.block (m + 1)).tiles + t else t
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.gid_inj
theorem in lean/SpectreKnot/ProofChain.lean, line 161 · read it in its file
Doc comment
X.gid m is one to one on the tiles of X_m.
Statement
theorem gid_inj (X : Chain) {m t t' : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles)
(ht' : t' < (X.block m).tiles) (same : X.gid m t = X.gid m t') : t = t'
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- apply `X.loc m` to both sides: it takes `X.gid m t` back to `t` have back := (X.loc_gid m t m_pos ht).2 -- and `X.gid m t'` back to `t'` have back' := (X.loc_gid m t' m_pos ht').2 rw [← back, ← back', same]
Statement.Chain.gid_loc
theorem in lean/SpectreKnot/ProofChain.lean, line 136 · read it in its file
Doc comment
X.loc m sends 0 … |X_m| - 1 to tiles of X_m, and X.gid m undoes it.
Statement
theorem gid_loc (X : Chain) : ∀ m g, 1 ≤ m → g < (X.block m).tiles → X.loc m g < (X.block m).tiles ∧ X.gid m (X.loc m g) = g | 0, _, m_pos, _ => absurd m_pos (by decide) | 1, _, _, hg => ⟨hg, rfl⟩ | m + 2, g, _, hg => by -- X_{m+2} holds X_{m+1} and the children before it have grow : (X.block (m + 1)).tiles + X.shift (m + 1) ≤ (X.block (m + 2)).tiles := (X.tiles_succ (m := m + 1) (by omega)).1 by_cases old : g < (X.block (m + 1)).tiles · -- a number of X_{m+1}: its tile in X_{m+1} obtain ⟨bound, inverse⟩
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
X.gid_loc (m + 1) g (by omega) old simp only [Chain.loc, ite_eq_left old, Chain.gid] rw [ite_eq_left ⟨by omega, by omega⟩, Nat.add_sub_cancel, inverse] exact ⟨by omega, rfl⟩ · by_cases from_before : g < (X.block (m + 1)).tiles + X.shift (m + 1) · -- a number just after X_{m+1}: a tile of an earlier child simp only [Chain.loc, ite_eq_right old, ite_eq_left from_before, Chain.gid] rw [ite_eq_right (by omega), ite_eq_left (by omega)] exact ⟨by omega, by omega⟩ · -- a later number: a tile of a later child, same number simp only [Chain.loc, ite_eq_right old, ite_eq_right from_before, Chain.gid] rw [ite_eq_right (by omega), ite_eq_right (by omega)] exact ⟨hg, rfl⟩
Statement.Chain.gid_up
theorem in lean/SpectreKnot/ProofChain.lean, line 190 · read it in its file
Doc comment
Any number of levels up, a tile of X_m is still a tile, and keeps its number.
Statement
theorem gid_up (X : Chain) {m t : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles) : ∀ k, X.up m k t < (X.block (m + k)).tiles ∧ X.gid (m + k) (X.up m k t) = X.gid m t | 0 => ⟨ht, rfl⟩ | k + 1 => by -- `k` levels up obtain ⟨bound, same⟩
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
X.gid_up m_pos ht k
-- and one more
obtain ⟨bound', same'⟩ := X.gid_up1 (m := m + k) (by omega) bound
rw [X.up_succ]
exact ⟨bound', same'.trans same⟩Statement.Chain.gid_up1
theorem in lean/SpectreKnot/ProofChain.lean, line 178 · read it in its file
Doc comment
One level up, a tile of X_m is still a tile, and keeps its number.
Statement
theorem gid_up1 (X : Chain) {m t : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles) :
X.up m 1 t < (X.block (m + 1)).tiles ∧ X.gid (m + 1) (X.up m 1 t) = X.gid m t
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- X_{m+1} holds the children before X_m, then X_m have grow := (X.tiles_succ m_pos).1 obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ -- `X.up m 1 t` is `t` moved past the children before X_m show t + X.shift (m' + 1) < _ ∧ X.gid (m' + 2) (t + X.shift (m' + 1)) = _ refine ⟨by omega, ?_⟩ simp only [Chain.gid] rw [ite_eq_left ⟨by omega, by omega⟩, Nat.add_sub_cancel]
Statement.Chain.glue_agree
theorem in lean/SpectreKnot/ProofChain.lean, line 246 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
Two blocks agree. If X_m and X_{m'} both glue edge e_i of the tile numbered g, they glue it to the same edge of the same numbered tile.
Statement
theorem glue_agree (X : Chain) {m m' t t₂ i u j u₂ j₂ : Nat} (m_pos : 1 ≤ m) (m'_pos : 1 ≤ m')
(ht : t < (X.block m).tiles) (ht₂ : t₂ < (X.block m').tiles) (hi : i < 14) (same : X.gid m t = X.gid m' t₂)
(glued : (X.block m).glue t i = some (u, j)) (glued₂ : (X.block m').glue t₂ i = some (u₂, j₂)) :
X.gid m u = X.gid m' u₂ ∧ j = j₂
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
by -- the far tiles are actual tiles have far := (X.glue_ok m_pos ht hi glued).1 -- in both blocks have far₂ := (X.glue_ok m'_pos ht₂ hi glued₂).1 -- both gluings, seen in X_{m+m'}, which contains both blocks: the gluing in X_m have lift := X.glue_lift m_pos ht glued m' -- and the gluing in X_{m'} have lift₂ := X.glue_lift m'_pos ht₂ glued₂ m -- the tile keeps its number up there, from X_m have tile := X.gid_up m_pos ht m' -- and from X_{m'} have tile₂ := X.gid_up m'_pos ht₂ m -- so do the far tiles, from X_m have far_up := X.gid_up m_pos far m' -- and from X_{m'} have far_up₂ := X.gid_up m'_pos far₂ m rw [show m' + m = m + m' from Nat.add_comm _ _] at lift₂ tile₂ far_up₂ -- the tile has the same number either way, so it is the same tile up there have same_tile : X.up m' m t₂ = X.up m m' t := by apply X.gid_inj (m := m + m') (by omega) tile₂.1 tile.1 rw [tile₂.2, tile.2, same] rw [same_tile, lift] at lift₂ -- so the two gluings agree: the same far tile, the same edge simp only [Option.some.injEq, Prod.mk.injEq] at lift₂ obtain ⟨same_far, same_edge⟩ := lift₂ refine ⟨?_, same_edge⟩ rw [← far_up.2, ← far_up₂.2, same_far]
Statement.Chain.glue_lift
theorem in lean/SpectreKnot/ProofChain.lean, line 232 · read it in its file
Doc comment
An edge glued in X_m is glued the same way any number of levels up.
Statement
theorem glue_lift (X : Chain) {m t i t' j : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles) (glued : (X.block m).glue t i = some (t', j)) : ∀ k, (X.block (m + k)).glue (X.up m k t) i = some (X.up m k t', j) | 0 => glued | k + 1 => by rw [X.up_succ k m t, X.up_succ k m t'] exact X.glue_lift1 (m := m + k) (by omega) (X.gid_up m_pos ht k).1 (X.glue_lift m_pos ht glued k)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.glue_lift1
theorem in lean/SpectreKnot/ProofChain.lean, line 216 · read it in its file
Doc comment
An edge glued in X_m is glued the same way, renumbered, in X_{m+1}.
Statement
theorem glue_lift1 (X : Chain) {m t i t' j : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles)
(glued : (X.block m).glue t i = some (t', j)) : (X.block (m + 1)).glue (X.up m 1 t) i = some (X.up m 1 t', j)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- the children of X_{m+1} have kids := X.kids_ok m_pos -- `t` is a tile of child `c m`, which is X_m have ht_child : t < (X.kidsAt m (X.c m)).tiles := by rw [X.kid_eq m_pos]; exact ht -- and the child glues it as X_m does have glued_child : (X.kidsAt m (X.c m)).glue t i = some (t', j) := by rw [X.kid_eq m_pos]; exact glued rw [X.block_succ m_pos] show (compose (X.K (m + 1)) (X.kidsAt m)).glue (t + offC (X.kidsAt m) (X.c m)) i = some (t' + offC (X.kidsAt m) (X.c m), j) rw [kids.glue_shift (X.child_lt m m_pos) ht_child] unfold glueAt rw [glued_child]
Statement.Chain.glue_ok
theorem in lean/SpectreKnot/ProofChain.lean, line 240 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A gluing in X_m joins actual tiles and edges.
Statement
theorem glue_ok (X : Chain) {m t i t' j : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles) (hi : i < 14)
(glued : (X.block m).glue t i = some (t', j)) : t' < (X.block m).tiles ∧ j < 14
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
(good m (X.K m) m_pos).sig.glue_ok t i t' j ht hi glued
Statement.Chain.gluedAt_exists
theorem in lean/SpectreKnot/ProofChain.lean, line 297 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
Where the chain covers the plane, every edge of every tile is glued in some block.
Statement
theorem gluedAt_exists (X : Chain) (covers : X.Covers) {g i : Nat} (hi : i < 14) : ∃ L, 1 ≤ L ∧ X.GluedAt L g i
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by -- the tile numbered `g` is a tile of X_{g+1} have big := X.tiles_ge g -- found there obtain ⟨loc_bound, gid_of_loc⟩ := X.gid_loc (g + 1) g (by omega) (by omega) -- some block X_{g+1+k} glues its edge `e_i` obtain ⟨k, is_glued⟩ := covers (g + 1) _ i (by omega) loc_bound hi refine ⟨g + 1 + k, by omega, ?_, ?_⟩ · -- larger blocks have more tiles have more := X.tiles_mono (m := g + 1) (by omega) k omega · rw [X.loc_up (by omega) (by omega)]; exact is_glued
Statement.Chain.gluedAt_up
theorem in lean/SpectreKnot/ProofChain.lean, line 284 · read it in its file
Doc comment
An edge glued in X_L stays glued in every larger block.
Statement
theorem gluedAt_up (X : Chain) {L g i : Nat} (L_pos : 1 ≤ L) (glued : X.GluedAt L g i) (k : Nat) :
X.GluedAt (L + k) g i
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by obtain ⟨hg, is_glued⟩ := glued -- the tile of X_L numbered `g` have loc_bound := (X.gid_loc L g L_pos hg).1 obtain ⟨⟨u, j⟩, glued⟩ := Option.isSome_iff_exists.mp is_glued refine ⟨?_, ?_⟩ · -- larger blocks have more tiles have more := X.tiles_mono L_pos k omega · rw [X.loc_up L_pos hg, X.glue_lift L_pos loc_bound glued k]; rfl
Statement.Chain.isTiling
theorem in lean/SpectreKnot/ProofChain.lean, line 461 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
Where the chain covers the plane, a gluing that contains every block is a tiling: every edge of every tile is glued, to an edge of another tile, which is glued back.
Statement
theorem isTiling (X : Chain) (covers : X.Covers) {T : Tiling} (contains : X.Contains T) : IsTiling T
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (23 lines)
by intro g i hi -- some block X_L glues the edge obtain ⟨L, L_pos, hg, is_glued⟩ := X.gluedAt_exists covers (g := g) hi obtain ⟨⟨t', j⟩, glued⟩ := Option.isSome_iff_exists.mp is_glued -- the tile numbered `g` in X_L obtain ⟨loc_bound, gid_of_loc⟩ := X.gid_loc L g L_pos hg -- the far tile and edge are actual ones obtain ⟨far, hj⟩ := X.glue_ok L_pos loc_bound hi glued refine ⟨X.gid L t', j, ?_, ?_, hj, ?_⟩ · -- `T` glues as X_L does have read := contains L _ i t' j L_pos loc_bound hi glued rwa [gid_of_loc] at read · -- X_L glues no tile to itself, and different tiles have different numbers intro same -- the far tile differs from the tile have differ := super_noSelf L (X.K L) _ i t' j loc_bound hi glued exact differ (X.gid_inj L_pos far loc_bound (same.trans gid_of_loc.symm)) · -- X_L glues the edge back, and `T` reads that too have back := super_glueSymm L (X.K L) _ i t' j loc_bound hi glued -- read by `T` have read := contains L t' j _ i L_pos far hj back rwa [gid_of_loc] at read
Statement.Chain.kid_eq
theorem in lean/SpectreKnot/ProofChain.lean, line 33 · read it in its file
Doc comment
Child c m of X_{m+1} is X_m.
Statement
theorem kid_eq (X : Chain) {m : Nat} (m_pos : 1 ≤ m) : X.kidsAt m (X.c m) = X.block m
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by show super m (kidAt (X.K (m + 1)) (X.c m)) = super m (X.K m) rw [show kidAt (X.K (m + 1)) (X.c m) = X.K m from X.child_kind m m_pos]
Statement.Chain.kidsAt
abbrev in lean/SpectreKnot/ProofChain.lean, line 25 · read it in its file
Doc comment
The children of X_{m+1}: the level-m supertiles of the kinds that Table 1 lists for K (m + 1).
Statement
abbrev kidsAt (X : Chain) (m : Nat) : Nat → Patch := fun c => super m (kidAt (X.K (m + 1)) c)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.kids_ok
theorem in lean/SpectreKnot/ProofChain.lean, line 41 · read it in its file
Doc comment
The children of X_{m+1}, with the bridge's hypotheses.
Statement
theorem kids_ok (X : Chain) {m : Nat} (m_pos : 1 ≤ m) :
Kids (X.K (m + 1)) (X.kidsAt m) (Lk m (X.K (m + 1))) (dOff m) (ori m) (ori m)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
kids_at m_pos (X.K (m + 1)) (fun K => good m K m_pos)Statement.Chain.level1_two
theorem in lean/SpectreKnot/ProofChain.lean, line 86 · read it in its file
Doc comment
Every level-1 supertile has at least two tiles.
Statement
theorem level1_two : ∀ K, 2 ≤ (super 1 K).tiles
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro K; cases K <;> decideStatement.Chain.loc
def in lean/SpectreKnot/Statement.lean, line 422 · read it in its file
In the statement file: read it line by line.
Doc comment
**X.loc m g**: the tile of X_m whose number in the union is g; it undoes X.gid m.
Statement
def loc (X : Chain) : Nat → Nat → Nat | 0, g => g | 1, g => g | m + 2, g => if g < (X.block (m + 1)).tiles then loc X (m + 1) g + X.shift (m + 1) else if g < (X.block (m + 1)).tiles + X.shift (m + 1) then g - (X.block (m + 1)).tiles else g
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.loc_gid
theorem in lean/SpectreKnot/ProofChain.lean, line 112 · read it in its file
Doc comment
X.gid m sends the tiles of X_m into 0 … |X_m| - 1, and X.loc m undoes it.
Statement
theorem loc_gid (X : Chain) : ∀ m t, 1 ≤ m → t < (X.block m).tiles → X.gid m t < (X.block m).tiles ∧ X.loc m (X.gid m t) = t | 0, _, m_pos, _ => absurd m_pos (by decide) | 1, _, _, ht => ⟨ht, rfl⟩ | m + 2, t, _, ht => by -- X_{m+2} holds X_{m+1} and the children before it have grow : (X.block (m + 1)).tiles + X.shift (m + 1) ≤ (X.block (m + 2)).tiles := (X.tiles_succ (m := m + 1) (by omega)).1 by_cases in_child : X.shift (m + 1) ≤ t ∧ t < X.shift (m + 1) + (X.block (m + 1)).tiles · -- a tile of X_{m+1}: numbered as in X_{m+1} obtain ⟨bound, inverse⟩
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
X.loc_gid (m + 1) (t - X.shift (m + 1)) (by omega) (by omega) simp only [Chain.gid, Chain.loc, ite_eq_left in_child, ite_eq_left bound, inverse] exact ⟨by omega, by omega⟩ · by_cases before : t < X.shift (m + 1) · -- a tile of an earlier child: numbered just after X_{m+1} simp only [Chain.gid, Chain.loc, ite_eq_right in_child, ite_eq_left before] rw [ite_eq_right (by omega), ite_eq_left (by omega)] exact ⟨by omega, by omega⟩ · -- a tile of a later child: keeps its number simp only [Chain.gid, Chain.loc, ite_eq_right in_child, ite_eq_right before] rw [ite_eq_right (by omega), ite_eq_right (by omega)] exact ⟨ht, rfl⟩
Statement.Chain.loc_gid_up
theorem in lean/SpectreKnot/ProofChain.lean, line 418 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
The tile numbered X.gid m t, found in X_{m+k}, is tile t taken k levels up.
Statement
theorem loc_gid_up (X : Chain) {m t : Nat} (m_pos : 1 ≤ m) (ht : t < (X.block m).tiles) (k : Nat) :
X.loc (m + k) (X.gid m t) = X.up m k t
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- tile `t` taken up keeps its number obtain ⟨up_bound, gid_of_up⟩ := X.gid_up m_pos ht k -- so `X.loc (m + k)` finds it have found := (X.loc_gid (m + k) _ (by omega) up_bound).2 rw [gid_of_up] at found exact found
Statement.Chain.loc_up
theorem in lean/SpectreKnot/ProofChain.lean, line 202 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
The tile numbered g, found in X_{m+k}, is the one found in X_m, taken k levels up.
Statement
theorem loc_up (X : Chain) {m g : Nat} (m_pos : 1 ≤ m) (hg : g < (X.block m).tiles) (k : Nat) :
X.loc (m + k) g = X.up m k (X.loc m g)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- the tile of X_m numbered `g` obtain ⟨loc_bound, gid_of_loc⟩ := X.gid_loc m g m_pos hg -- taken `k` levels up, it keeps its number obtain ⟨up_bound, gid_of_up⟩ := X.gid_up m_pos loc_bound k -- so `X.loc (m + k)` finds it have found := (X.loc_gid (m + k) _ (by omega) up_bound).2 rw [gid_of_up, gid_of_loc] at found exact found
Statement.Chain.not_closed
theorem in lean/SpectreKnot/ProofChain.lean, line 584 · read it in its file
Doc comment
No strand of the tiling is closed. A closed strand visits finitely many tiles; all their edges are glued in one block, and following the strand there never reaches the rim, against Theorem A.
Statement
theorem not_closed (X : Chain) (covers : X.Covers) {T : Tiling} (contains : X.Contains T)
(tiling : IsTiling T) (x : NPort) : ¬ (tilingSys tiling).Closed x
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (44 lines)
by rintro ⟨n, n_pos, back⟩ -- the strand only ever visits the ports reached in its first `n` steps have periodic : ∀ k, ∃ j, j < n ∧ (tilingSys tiling).walk x k = (tilingSys tiling).walk x j := by intro k induction k with | zero => exact ⟨0, n_pos, rfl⟩ | succ k ih => obtain ⟨j, hj, same⟩ := ih by_cases wraps : j + 1 = n · refine ⟨0, n_pos, ?_⟩ rw [StrandSystem.walk_succ, same, ← StrandSystem.walk_succ, wraps, back] rfl · exact ⟨j + 1, by omega, by rw [StrandSystem.walk_succ, same, ← StrandSystem.walk_succ]⟩ -- the tiles of those ports have numbers below some bound `M` have bounded : ∀ m, ∃ M, ∀ j, j < m → ((tilingSys tiling).walk x j).1.1 < M := by intro m induction m with | zero => exact ⟨0, fun j hj => absurd hj (by omega)⟩ | succ m ih => obtain ⟨M, below⟩ := ih refine ⟨M + ((tilingSys tiling).walk x m).1.1 + 1, fun j hj => ?_⟩ by_cases earlier : j < m · have := below j earlier -- an earlier port: below `M` omega · have is_m : j = m := by omega -- port `m` itself subst is_m; omega obtain ⟨M, below⟩ := bounded n -- every port of the strand is on one of the first `M` tiles have in_first : ∀ k, ((tilingSys tiling).walk x k).1.1 < M := by intro k obtain ⟨j, hj, same⟩ := periodic k rw [same]; exact below j hj -- one block X_L glues every edge of those tiles, and contains them obtain ⟨L, L_pos, M_le, all_glued⟩ := X.all_glued_at covers M -- the start `x`, as a port of X_L obtain ⟨loc_bound, gid_of_loc⟩ := X.gid_loc L x.1.1 L_pos (by have := in_first 0; exact Nat.lt_of_lt_of_le this M_le) -- it is a port of X_L have start : (X.block L).IsPort (X.loc L x.1.1, x.1.2.1, x.1.2.2) := ⟨loc_bound, x.2⟩ -- Theorem A says the strand leaves X_L obtain ⟨r, follows⟩ := theoremA L (X.K L) _ start refine X.follow_stays contains tiling L_pos all_glued _ r follows start x ?_ in_first show (X.gid L (X.loc L x.1.1), x.1.2.1, x.1.2.2) = x.1 rw [gid_of_loc]
Statement.Chain.pieceEnd_gP
theorem in lean/SpectreKnot/ProofChain.lean, line 491 · read it in its file
Doc comment
The other end of a piece, before or after renumbering.
Statement
theorem pieceEnd_gP (X : Chain) (m : Nat) (p : Port) : pieceEnd (X.gP m p) = X.gP m (pieceEnd p)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by obtain ⟨t, i, s⟩ := p rcases i with _ | _ | i <;> rfl
Statement.Chain.seven_kids
theorem in lean/SpectreKnot/ProofChain.lean, line 48 · read it in its file
Doc comment
Every supertile has at least seven children.
Statement
theorem seven_kids : ∀ T : Kind, 7 ≤ nk T
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro T; cases T <;> decideStatement.Chain.shift
def in lean/SpectreKnot/Statement.lean, line 404 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
Where X_m starts inside X_{m+1}: the number of tiles of the children before it.
Statement
def shift (X : Chain) (m : Nat) : Nat := ((List.range (X.c m)).map fun c' => (super m ((Pattern.kids (X.K (m + 1))).getD c' .Gamma)).tiles).sum
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.shift_eq
theorem in lean/SpectreKnot/ProofChain.lean, line 38 · read it in its file
Doc comment
X_m starts at tile X.shift m of X_{m+1}: after the tiles of the children before it.
Statement
theorem shift_eq (X : Chain) (m : Nat) : X.shift m = offC (X.kidsAt m) (X.c m)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Statement.Chain.tiles_ge
theorem in lean/SpectreKnot/ProofChain.lean, line 89 · read it in its file
Doc comment
X_{m+1} has at least m + 2 tiles.
Statement
theorem tiles_ge (X : Chain) : ∀ m, m + 2 ≤ (X.block (m + 1)).tiles | 0 => level1_two (X.K 1) | m + 1 => by -- one more tile at least, at each level have grow := (X.tiles_succ (m := m + 1) (by omega)).2 -- and X_{m+1} has at least `m + 2` have before := X.tiles_ge m omega
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.tiles_mono
theorem in lean/SpectreKnot/ProofChain.lean, line 99 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
Larger blocks have at least as many tiles.
Statement
theorem tiles_mono (X : Chain) {m : Nat} (m_pos : 1 ≤ m) : ∀ k, (X.block m).tiles ≤ (X.block (m + k)).tiles | 0 => Nat.le_refl _ | k + 1 => by -- up to X_{m+k} have before := X.tiles_mono m_pos k -- and one more level have grow := (X.tiles_succ (m := m + k) (by omega)).2 show _ ≤ (X.block (m + k + 1)).tiles omega
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.tiles_succ
theorem in lean/SpectreKnot/ProofChain.lean, line 51 · read it in its file
Doc comment
X_{m+1} holds the children before X_m (X.shift m tiles) and then X_m; and it has more tiles than X_m.
Statement
theorem tiles_succ (X : Chain) {m : Nat} (m_pos : 1 ≤ m) :
(X.block m).tiles + X.shift m ≤ (X.block (m + 1)).tiles ∧ (X.block m).tiles < (X.block (m + 1)).tiles
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (32 lines)
by -- the children of X_{m+1} have kids := X.kids_ok m_pos -- X_m is child `c m` have child_lt : X.c m < nk (X.K (m + 1)) := X.child_lt m m_pos -- which has the tiles of X_m have child_tiles : (X.kidsAt m (X.c m)).tiles = (X.block m).tiles := by rw [X.kid_eq m_pos] -- the children up to and including X_m have upto := offC_succ (X.kidsAt m) (X.c m) -- are among all the children have upto_le := offC_mono (X.kidsAt m) (show X.c m + 1 ≤ nk (X.K (m + 1)) from child_lt) rw [X.block_succ m_pos, X.shift_eq] show _ ≤ offC (X.kidsAt m) (nk (X.K (m + 1))) ∧ _ < offC (X.kidsAt m) (nk (X.K (m + 1))) refine ⟨by omega, ?_⟩ by_cases last : X.c m + 1 = nk (X.K (m + 1)) · -- X_m is the last child: there is a child before it, with a tile have seven := seven_kids (X.K (m + 1)) -- the children before X_m include child 0 have first_le := offC_mono (X.kidsAt m) (show 1 ≤ X.c m by omega) -- whose tiles come first have first := offC_succ (X.kidsAt m) 0 -- child 0 has a tile have first_pos := kids.tiles_pos 0 (by omega) simp only [Nat.zero_add, show offC (X.kidsAt m) 0 = 0 from rfl] at first omega · -- X_m is not the last child: the next child has a tile have next_le := offC_mono (X.kidsAt m) (show X.c m + 1 + 1 ≤ nk (X.K (m + 1)) by omega) -- the tiles of the next child come after X_m have next := offC_succ (X.kidsAt m) (X.c m + 1) -- the next child has a tile have next_pos := kids.tiles_pos (X.c m + 1) (by omega) omega
Statement.Chain.up
def in lean/SpectreKnot/Statement.lean, line 408 · read it in its file
In the statement file: read it line by line.
Doc comment
X.up m k t: tile t of X_m, renumbered as a tile of X_{m+k}.
Statement
def up (X : Chain) (m : Nat) : Nat → Nat → Nat
| 0, t => t
| k + 1, t => up X (m + 1) k (t + X.shift m)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Chain.up_succ
theorem in lean/SpectreKnot/ProofChain.lean, line 170 · read it in its file
Doc comment
Going k + 1 levels up the chain is going k levels up, then one more.
Statement
theorem up_succ (X : Chain) : ∀ (k m t : Nat), X.up m (k + 1) t = X.up (m + k) 1 (X.up m k t) | 0, _, _ => rfl | k + 1, m, t => by show X.up (m + 1) (k + 1) (t + X.shift m) = _ rw [X.up_succ k (m + 1) (t + X.shift m), show m + 1 + k = m + (k + 1) by omega] rfl
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.ChainModel
def in lean/SpectreKnot/Statement.lean, line 448 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
The union of a chain is a tiling. For every chain X: (a) every number g is a tile of X_{g+1}; (b) X.gid m numbers the tiles of X_m one to one, and X.loc m is its inverse; (c) a tile keeps its number one level up; (d) there is a tiling T of the union that contains every block; (e) if the chain covers, every such T glues every edge of every tile, to a different tile, and back.
Statement
def ChainModel : Prop := ∀ X : Chain, (∀ g, g < (X.block (g + 1)).tiles) ∧ (∀ m t, 1 ≤ m → t < (X.block m).tiles → X.gid m t < (X.block m).tiles ∧ X.loc m (X.gid m t) = t) ∧ (∀ m g, 1 ≤ m → g < (X.block m).tiles → X.loc m g < (X.block m).tiles ∧ X.gid m (X.loc m g) = g) ∧ (∀ m t, 1 ≤ m → t < (X.block m).tiles → X.gid (m + 1) (X.up m 1 t) = X.gid m t) ∧ (∃ T : Tiling, X.Contains T) ∧ (X.Covers → ∀ T : Tiling, X.Contains T → ∀ g i, i < 14 → ∃ g' j, T.glue g i = some (g', j) ∧ g' ≠ g ∧ j < 14 ∧ T.glue g' j = some (g, i))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.CompSig
structure in lean/SpectreKnot/CompSig.lean, line 313 · read it in its file
Doc comment
**The composition C_T(L, d, ω) has the signature**, as §7.1 words it: it is well formed; it has no closed strand; the Γ child's corners A and B are its rim vertices at the adjacent positions cA and cB of Table 3's rim; every other rim vertex p is a hook, its port gR p joined to its port gL p; and A and B carry the crossover, R(A) ↔ R(B) and L(A) ↔ L(B).
Statement
structure CompSig (T : Kind) (L : Nat → Nat → Nat) (d : Nat) (ω : Bool) : Prop where wf : (Comp.ofLens T L d ω).toGluing.WF noLoops : ∀ x, (Comp.ofLens T L d ω).toGluing.Valid x → ∃ r, (Comp.ofLens T L d ω).toGluing.FullReach x r cA_lt : cA T L < rimN T L cB_lt : cB T L ω < rimN T L at_A : gL T L (cA T L) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.A (nk T - 1), true) at_B : gL T L (cB T L ω) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.B (nk T - 1), true) hooks : ∀ p, p < rimN T L → p ≠ cA T L → p ≠ cB T L ω → (Comp.ofLens T L d ω).toGluing.FullReach (gR T L d ω p) (gL T L p) crossR : (Comp.ofLens T L d ω).toGluing.FullReach (gL T L (cA T L)) (gL T L (cB T L ω)) crossL : (Comp.ofLens T L d ω).toGluing.FullReach (gR T L d ω (cA T L)) (gR T L d ω (cB T L ω))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Consec
inductive in lean/SpectreKnot/ParentRim.lean, line 32 · read it in its file
Doc comment
Consec pcs a b: the piece b comes right after the piece a in pcs.
Statement
inductive Consec : List (Nat × Nat) → Nat × Nat → Nat × Nat → Prop | here {a b : Nat × Nat} {rest : List (Nat × Nat)} : Consec (a :: b :: rest) a b | there {x a b : Nat × Nat} {rest : List (Nat × Nat)} : Consec rest a b → Consec (x :: rest) a b
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Consec.mem
theorem in lean/SpectreKnot/ParentRim.lean, line 39 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Both pieces of a consecutive pair are in the list.
Statement
theorem Consec.mem {l : List (Nat × Nat)} {a b : Nat × Nat} (consec : Consec l a b) : a ∈ l ∧ b ∈ l
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction consec with | here => exact ⟨List.mem_cons_self, List.mem_cons_of_mem _ List.mem_cons_self⟩ | there _ ih => exact ⟨List.mem_cons_of_mem _ ih.1, List.mem_cons_of_mem _ ih.2⟩
Statement.E_N
theorem in lean/SpectreKnot/NestStep.lean, line 136 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The rim of N_m has the length that its side lengths give.
Statement
theorem E_N {m : Nat} (m_pos : 1 ≤ m) : (N m).E = pos (Lk m .Delta 1) 6
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
(good m .Delta m_pos).len
Statement.Good
structure in lean/SpectreKnot/PatchSig.lean, line 142 · read it in its file
Doc comment
The induction hypothesis of Thm 7.6, at tile level: the level-m K-supertile has the signature with its corners where aPos, bPos say, its six vertices where the side lengths ℓ_m put them.
Statement
structure Good (m : Nat) (K : Kind) : Prop where sig : (super m K).HasSig (ori m) (aPos m K) (bPos m K) vtx : (super m K).vtx = (List.range 7).map (vpos m K) len : (super m K).E = vpos m K 6
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Grandparent
def in lean/SpectreKnot/Statement.lean, line 303 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
In the statement file: read it line by line.
Doc comment
The Grandparent Lemma (the paper's Lemma 8.3(a), at the vertices of tiles): for b ≥ 1, every vertex of every tile of N_b is surrounded by tiles of N_{b+2}. So N_b does not meet the rim of N_{b+2}. (Proved in ProofGrand.lean.)
Statement
def Grandparent : Prop := ∀ b, 1 ≤ b → ∀ t i, t < (N b).tiles → i < 14 → (N (b + 2)).Surrounded (up b 2 t) i
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Inside
def in lean/SpectreKnot/ProofB.lean, line 96 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
v lies inside side J of N_n, at least two vertices from either end.
Statement
def Inside (n J v : Nat) : Prop := pos (Lk n .Delta 1) J + 2 ≤ v ∧ v + 2 ≤ pos (Lk n .Delta 1) (J + 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.IsTiling
def in lean/SpectreKnot/ProofChain.lean, line 352 · read it in its file
Doc comment
T glues every edge of every tile to an edge of a different tile, and that edge back to it.
Statement
def IsTiling (T : Tiling) : Prop := ∀ g i, i < 14 → ∃ g' j, T.glue g i = some (g', j) ∧ g' ≠ g ∧ j < 14 ∧ T.glue g' j = some (g, i)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.KD
theorem in lean/SpectreKnot/NestStep.lean, line 116 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The children of N_{m+1}, with the bridge's hypotheses.
Statement
theorem KD {m : Nat} (m_pos : 1 ≤ m) :
Kids .Delta (kidsD m) (Lk m .Delta) (dOff m) (ori m) (ori m)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
kids_at m_pos .Delta (fun K => good m K m_pos)Statement.Kids
structure in lean/SpectreKnot/Bridge.lean, line 125 · read it in its file
Doc comment
What the children must satisfy: positive side lengths, glued sides of equal length, vertices where the lengths put them, the signature with the composition's corners, and the composition itself with the signature.
Statement
structure Kids (T : Kind) (child : Nat → Patch) (L : Nat → Nat → Nat) (d : Nat) (ω o : Bool) : Prop where len_pos : ∀ c j, 1 ≤ L c j pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧ (child c).E = pos (L c) 6 sig : ∀ c, c < nk T → (child c).HasSig o ((Comp.ofLens T L d ω).toGluing.A c) ((Comp.ofLens T L d ω).toGluing.B c) csig : CompSig T L d ω
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Kids.E_eq
theorem in lean/SpectreKnot/Bridge.lean, line 150 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The composition's rim length for child c is that of child c's rim.
Statement
theorem E_eq {c : Nat} (c_lt : c < nk T) : (Comp.ofLens T L d ω).toGluing.E c = (child c).E
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
rw [ofLens_E c_lt, (kids.shape c c_lt).2]Statement.Kids.across_in
theorem in lean/SpectreKnot/Bridge.lean, line 159 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Across an edge inside a child, the parent glues as the child does.
Statement
theorem across_in {c t i : Nat} {s : Bool} {q' : Port} (c_lt : c < nk T) (t_lt : t < (child c).tiles)
(across_eq : (child c).across (t, i, s) = some q') :
(compose T child).across (shiftP child c (t, i, s)) = some (shiftP child c q')
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
by cases s with | true => -- port `R(v_i)`, on edge `e_i` simp only [Patch.across, straightThrough] at across_eq cases glue_eq : (child c).glue t i with | none => rw [glue_eq] at across_eq; contradiction | some edge => obtain ⟨t', j⟩ := edge rw [glue_eq] at across_eq simp only [Option.map_some, Option.some.injEq] at across_eq subst across_eq simp only [shiftP, Patch.across, straightThrough] rw [kids.glue_shift c_lt t_lt] simp only [glueAt, glue_eq, Option.map_some] | false => -- port `L(v_i)`, on edge `e_{i-1}` simp only [Patch.across, straightThrough] at across_eq cases glue_eq : (child c).glue t ((i + 13) % 14) with | none => rw [glue_eq] at across_eq; contradiction | some edge => obtain ⟨t', j⟩ := edge rw [glue_eq] at across_eq simp only [Option.map_some, Option.some.injEq] at across_eq subst across_eq simp only [shiftP, Patch.across, straightThrough] rw [kids.glue_shift c_lt t_lt] simp only [glueAt, glue_eq, Option.map_some]
Statement.Kids.across_in'
theorem in lean/SpectreKnot/Bridge.lean, line 268 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
across_in, for a port not yet split into its tile, vertex and hand.
Statement
theorem across_in' {c : Nat} {p q' : Port} (c_lt : c < nk T) (t_lt : p.1 < (child c).tiles)
(across_eq : (child c).across p = some q') :
(compose T child).across (shiftP child c p) = some (shiftP child c q')
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨t, i, s⟩ := p
exact kids.across_in c_lt t_lt across_eqStatement.Kids.across_rim
theorem in lean/SpectreKnot/Bridge.lean, line 204 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**Across a child's rim port, the parent continues as σ says.**
Statement
theorem across_rim {c u : Nat} {s : Bool} (c_lt : c < nk T) (u_lt : u < (child c).E) :
(compose T child).across (ιP child o (c, u, s)) =
((Comp.ofLens T L d ω).toGluing.sigma (c, u, s)).map (ιP child o)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (60 lines)
by -- child `c` has the signature have has_sig := kids.sig c c_lt -- the composition is well formed have wf := kids.csig.wf -- `c` is a child of the composition have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact c_lt cases s with | true => -- port `R(u)`, on rim edge `u` -- the edge is an actual edge of its tile have i_lt := (has_sig.rim_ok u u_lt).2.1 simp only [Gluing.sigma] cases mate_eq : (Comp.ofLens T L d ω).toGluing.mate c u with | none => -- the parent's gluing across rim edge `u` have glue_eq := kids.glue_rimEdge c_lt u_lt rw [mate_eq] at glue_eq cases o <;> simp only [ιP, shiftP, Patch.bport, Patch.across, straightThrough, ite_true, ite_false, Bool.false_eq_true, mod14 i_lt, glue_eq] <;> rfl | some p => obtain ⟨c', k'⟩ := p -- the parent's gluing across rim edge `u` have glue_eq := kids.glue_rimEdge c_lt u_lt rw [mate_eq] at glue_eq obtain ⟨c'_lt, k'_lt, _⟩ := wf.mate_valid c u c' k' c_lt_n (by rw [kids.E_eq c_lt]; exact u_lt) mate_eq -- the edge across is an actual edge of its tile in child `c'` have i_lt' := ((kids.sig c' (by rwa [ofLens_n] at c'_lt)).rim_ok k' (by rw [← kids.E_eq (by rwa [ofLens_n] at c'_lt)]; exact k'_lt)).2.1 cases o <;> simp only [ιP, shiftP, Patch.bport, Patch.across, straightThrough, ite_true, ite_false, Bool.false_eq_true, mod14 i_lt, glue_eq, Option.map_some] | false => -- port `L(u)`, on rim edge `u - 1` -- the edge before `u` is a rim edge have prv_lt_E := prv_lt u_lt -- and an actual edge of its tile have i_lt := (has_sig.rim_ok _ prv_lt_E).2.1 simp only [Gluing.sigma] rw [kids.E_eq c_lt] cases mate_eq : (Comp.ofLens T L d ω).toGluing.mate c (prv (child c).E u) with | none => -- the parent's gluing across rim edge `u - 1` have glue_eq := kids.glue_rimEdge c_lt prv_lt_E rw [mate_eq] at glue_eq cases o <;> simp only [ιP, shiftP, Patch.bport, Patch.across, straightThrough, ite_true, ite_false, Bool.false_eq_true, mod14 i_lt, glue_eq] <;> rfl | some p => obtain ⟨c', k'⟩ := p -- the parent's gluing across rim edge `u - 1` have glue_eq := kids.glue_rimEdge c_lt prv_lt_E rw [mate_eq] at glue_eq obtain ⟨c'_lt_n, k'_lt, _⟩ := wf.mate_valid c _ c' k' c_lt_n (by rw [kids.E_eq c_lt]; exact prv_lt_E) mate_eq -- `c'` is a child have c'_lt : c' < nk T := by rwa [ofLens_n] at c'_lt_n simp only [Option.map_some] rw [kids.E_eq c'_lt] at k'_lt ⊢ -- the edge across is an actual edge of its tile in child `c'` have i_lt' := ((kids.sig c' c'_lt).rim_ok k' k'_lt).2.1 cases o <;> simp only [ιP, shiftP, Patch.bport, Patch.across, straightThrough, ite_true, ite_false, Bool.false_eq_true, mod14 i_lt, glue_eq, Option.map_some, prv_nxt k'_lt]
Statement.Kids.bport_L
theorem in lean/SpectreKnot/ParentSig.lean, line 205 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's port L(p) is the gluing's port gL p.
Statement
theorem bport_L {p : Nat} (p_lt : p < rimN T L) :
(compose T child).bport (!o) (p, false) = ιP child o (gL T L p)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the position before `p` is on the rim too have prv_lt_N : prv (rimN T L) p < rimN T L := prv_lt p_lt simp only [gL, ιP, Patch.bport, compose_E kids.shape, rim_edgeAt kids.shape prv_lt_N] cases o <;> rfl
Statement.Kids.bport_R
theorem in lean/SpectreKnot/ParentSig.lean, line 193 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's port R(p) (its orientation !o is opposite to the children's) is the gluing's port gR p.
Statement
theorem bport_R {p : Nat} (p_lt : p < rimN T L) :
(compose T child).bport (!o) (p, true) = ιP child o (gR T L d ω p)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by obtain ⟨c_lt, k_lt, _⟩ := own_mate (d := d) (ω := ω) kids.len_pos p_lt -- the composition's rim length for the child is the child's have E_eq := kids.E_eq c_lt rw [ofLens_E c_lt] at E_eq -- so the edge is on the child's rim have k_lt' : (ownGo L (pcs T) p).2 < (child (ownGo L (pcs T) p).1).E := by rw [← E_eq]; exact k_lt simp only [gR, ιP, Patch.bport, rim_edgeAt kids.shape p_lt, ofLens_E c_lt, E_eq, prv_nxt k_lt'] cases o <;> rfl
Statement.Kids.bport_valid
theorem in lean/SpectreKnot/Bridge.lean, line 302 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A rim port of child c is a port of an actual tile.
Statement
theorem bport_valid {c u : Nat} {s : Bool} (c_lt : c < nk T) (u_lt : u < (child c).E) :
((child c).bport o (u, s)).1 < (child c).tiles ∧ ((child c).bport o (u, s)).2.1 < 14
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by -- child `c` has the signature have has_sig := kids.sig c c_lt cases s with | true => obtain ⟨t_lt, i_lt, _⟩ := has_sig.rim_ok u u_lt cases o <;> exact ⟨t_lt, by simp only [Patch.bport]; first | exact i_lt | exact Nat.mod_lt _ (by omega)⟩ | false => obtain ⟨t_lt, i_lt, _⟩ := has_sig.rim_ok _ (prv_lt u_lt) cases o <;> exact ⟨t_lt, by simp only [Patch.bport]; first | exact i_lt | exact Nat.mod_lt _ (by omega)⟩
Statement.Kids.bstep_valid
theorem in lean/SpectreKnot/Turn.lean, line 285 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
A step of the gluing keeps to the rim vertices of actual children.
Statement
theorem bstep_valid {c u : Nat} (c_lt : c < nk T) (u_lt : u < (child c).E) {y : Nat × Nat}
(stepped : bstep (Comp.ofLens T L d ω).toGluing o (c, u) = some y) : y.1 < nk T ∧ y.2 < (child y.1).E
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (24 lines)
by -- the composition is well formed have wf := kids.csig.wf -- `c` is a child of the composition have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact c_lt -- and `u` a rim vertex of it have u_lt_E : u < (Comp.ofLens T L d ω).toGluing.E c := by rw [kids.E_eq c_lt]; exact u_lt cases o · simp only [bstep, Bool.false_eq_true, ite_false] at stepped cases mate_eq : (Comp.ofLens T L d ω).toGluing.mate c u with | none => rw [mate_eq] at stepped; contradiction | some e => rw [mate_eq] at stepped simp only [Option.map_some, Option.some.injEq] at stepped subst stepped obtain ⟨c'_lt, k'_lt, _⟩ := wf.mate_valid c u e.1 e.2 c_lt_n u_lt_E mate_eq -- `e.1` is a child have c'_lt' : e.1 < nk T := by rw [ofLens_n] at c'_lt; exact c'_lt exact ⟨c'_lt', by rw [← kids.E_eq c'_lt']; exact nxt_lt k'_lt⟩ · simp only [bstep, ite_true] at stepped obtain ⟨c'_lt, k'_lt, _⟩ := wf.mate_valid c _ y.1 y.2 c_lt_n (prv_lt u_lt_E) stepped -- `y.1` is a child have c'_lt' : y.1 < nk T := by rw [ofLens_n] at c'_lt; exact c'_lt exact ⟨c'_lt', by rw [← kids.E_eq c'_lt']; exact k'_lt⟩
Statement.Kids.bsteps_valid
theorem in lean/SpectreKnot/Turn.lean, line 312 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Steps of the gluing keep to the rim vertices of actual children.
Statement
theorem bsteps_valid : ∀ a {c u : Nat} {y : Nat × Nat}, c < nk T → u < (child c).E →
bsteps (Comp.ofLens T L d ω).toGluing o a (c, u) = some y → y.1 < nk T ∧ y.2 < (child y.1).E
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by intro a induction a with | zero => intro c u y c_lt u_lt stepped; cases stepped; exact ⟨c_lt, u_lt⟩ | succ a ih => intro c u y c_lt u_lt stepped simp only [bsteps] at stepped cases step_eq : bstep (Comp.ofLens T L d ω).toGluing o (c, u) with | none => rw [step_eq] at stepped; contradiction | some z => rw [step_eq] at stepped -- the next vertex is a rim vertex of an actual child have z_valid := kids.bstep_valid c_lt u_lt step_eq exact ih z_valid.1 z_valid.2 stepped
Statement.Kids.btau_lt
theorem in lean/SpectreKnot/Bridge.lean, line 328 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The signature pairing keeps rim vertices on the rim.
Statement
theorem btau_lt {c u : Nat} {s : Bool} (c_lt : c < nk T) (u_lt : u < (child c).E) :
(btau ((Comp.ofLens T L d ω).toGluing.A c) ((Comp.ofLens T L d ω).toGluing.B c) (u, s)).1 < (child c).E
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- the composition is well formed have wf := kids.csig.wf -- `c` is a child of the composition have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact c_lt -- corner `A` is on the child's rim have A_lt := wf.A_lt c c_lt_n -- and so is corner `B` have B_lt := wf.B_lt c c_lt_n rw [kids.E_eq c_lt] at A_lt B_lt simp only [btau] split · exact B_lt · split · exact A_lt · exact u_lt
Statement.Kids.chain_path
theorem in lean/SpectreKnot/Turn.lean, line 380 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Steps of the gluing, at tile level: if a steps of the gluing lead from vertex u of child c to vertex u' of child c', then turning in the parent leads, in at least a turns, from the start of the chain about the first to the start of the chain about the second.
Statement
theorem chain_path (chains : ∀ c, c < nk T → (child c).RimChains o) :
∀ a {c u c' u' : Nat}, c < nk T → u < (child c).E →
bsteps (Comp.ofLens T L d ω).toGluing o a (c, u) = some (c', u') →
∃ n, a ≤ n ∧ (compose T child).turns n (shiftC child c ((child c).sC o u)) =
some (shiftC child c' ((child c').sC o u'))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by intro a induction a with | zero => intro c u c' u' _ _ stepped; cases stepped; exact ⟨0, Nat.le_refl _, rfl⟩ | succ a ih => intro c u c' u' c_lt u_lt stepped simp only [bsteps] at stepped cases step_eq : bstep (Comp.ofLens T L d ω).toGluing o (c, u) with | none => rw [step_eq] at stepped; contradiction | some y => rw [step_eq] at stepped -- the next vertex is a rim vertex of an actual child have y_valid := kids.bstep_valid c_lt u_lt step_eq obtain ⟨n₁, first⟩ := kids.chain_step chains c_lt u_lt rw [step_eq] at first obtain ⟨n₂, a_le, rest⟩ := ih y_valid.1 y_valid.2 stepped refine ⟨n₁ + 1 + n₂, by omega, ?_⟩ rw [Patch.turns_add, first] exact rest
Statement.Kids.chain_step
theorem in lean/SpectreKnot/Turn.lean, line 368 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
One step of the gluing, at tile level: from the start of the chain about child vertex u, turning runs along the chain and then, once more, on to what the gluing's step names.
Statement
theorem chain_step (chains : ∀ c, c < nk T → (child c).RimChains o) {c u : Nat} (c_lt : c < nk T) (u_lt : u < (child c).E) : ∃ n, (compose T child).turns (n + 1) (shiftC child c ((child c).sC o u)) = (bstep (Comp.ofLens T L d ω).toGluing o (c, u)).map fun y => shiftC child y.1 ((child y.1).sC o y.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
obtain ⟨n, along⟩ := chains c c_lt u u_lt
refine ⟨n, ?_⟩
rw [Patch.turns_succ', kids.turns_lift c_lt n (Patch.sC_valid (kids.sig c c_lt) u_lt).1 along]
exact kids.turn_fC c_lt u_ltStatement.Kids.follow_of_fullReach
theorem in lean/SpectreKnot/Bridge.lean, line 396 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
follow_of_reach, for the full walk with any number of crossings.
Statement
theorem follow_of_fullReach {x r : GPort} (reach : (Comp.ofLens T L d ω).toGluing.FullReach x r)
(valid : (Comp.ofLens T L d ω).toGluing.Valid x) : (compose T child).Follow (ιP child o x) (ιP child o r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨k, reach_k⟩ := reach
exact kids.follow_of_reach k x r reach_k validStatement.Kids.follow_of_reach
theorem in lean/SpectreKnot/Bridge.lean, line 347 · read it in its file
Formalises Lemma 4.2 Gluing.
Used, through the names in proofs, for Theorem A, Theorem B, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A walk of the composition is a strand of the parent (Lemma 4.2).
Statement
theorem follow_of_reach : ∀ k x r, (Comp.ofLens T L d ω).toGluing.FReach k x r →
(Comp.ofLens T L d ω).toGluing.Valid x → (compose T child).Follow (ιP child o x) (ιP child o r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (46 lines)
by -- the composition is well formed have wf := kids.csig.wf intro k x r reach induction reach with | @stop x on_rim => -- through child `c` by its signature, then out of the parent intro valid obtain ⟨c, u, s⟩ := x obtain ⟨c_lt_n, u_lt_E⟩ := valid -- `c` is a child have c_lt : c < nk T := by rwa [ofLens_n] at c_lt_n -- `u` is a vertex of child `c`'s rim have u_lt : u < (child c).E := by rwa [kids.E_eq c_lt] at u_lt_E rw [kids.tau_btau] at on_rim ⊢ -- the start is a port of an actual tile have port_valid := kids.bport_valid (s := s) c_lt u_lt refine kids.lift c_lt _ _ ((kids.sig c c_lt).sig u s u_lt) port_valid.1 port_valid.2 _ (Or.inl ⟨?_, rfl⟩) -- across the far port, the parent continues as `σ` says: nowhere have across_eq := kids.across_rim (s := (btau ((Comp.ofLens T L d ω).toGluing.A c) ((Comp.ofLens T L d ω).toGluing.B c) (u, s)).2) c_lt (kids.btau_lt (s := s) c_lt u_lt) simp only [ιP] at across_eq rw [across_eq, on_rim]; rfl | @step k x y r first_step _ ih => -- through child `c` by its signature, then across into the next child, and on by induction intro valid obtain ⟨c, u, s⟩ := x obtain ⟨c_lt_n, u_lt_E⟩ := valid -- `c` is a child have c_lt : c < nk T := by rwa [ofLens_n] at c_lt_n -- `u` is a vertex of child `c`'s rim have u_lt : u < (child c).E := by rwa [kids.E_eq c_lt] at u_lt_E -- the next port is a port of an actual child have y_valid := sigma_valid wf (tau_valid wf ⟨c_lt_n, u_lt_E⟩) first_step rw [kids.tau_btau] at first_step -- the start is a port of an actual tile have port_valid := kids.bport_valid (s := s) c_lt u_lt refine kids.lift c_lt _ _ ((kids.sig c c_lt).sig u s u_lt) port_valid.1 port_valid.2 _ (Or.inr ⟨ιP child o y, ?_, ih y_valid⟩) -- across the far port, the parent continues as `σ` says: to `y` have across_eq := kids.across_rim (s := (btau ((Comp.ofLens T L d ω).toGluing.A c) ((Comp.ofLens T L d ω).toGluing.B c) (u, s)).2) c_lt (kids.btau_lt (s := s) c_lt u_lt) simp only [ιP] at across_eq rw [across_eq, first_step]; rfl
Statement.Kids.gL_sigma
theorem in lean/SpectreKnot/ParentSig.lean, line 237 · read it in its file
Doc comment
gL p is on the parent's rim: nothing lies across it.
Statement
theorem gL_sigma {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.sigma (gL T L p) = none
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
Statement.gL_sigma kids.len_pos p_lt
Statement.Kids.gL_valid
theorem in lean/SpectreKnot/ParentSig.lean, line 228 · read it in its file
Doc comment
gL p is a port of an actual child, at an actual rim vertex.
Statement
theorem gL_valid {p : Nat} (p_lt : p < rimN T L) : (Comp.ofLens T L d ω).toGluing.Valid (gL T L p)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
Statement.gL_valid kids.len_pos p_lt
Statement.Kids.gR_rimL
theorem in lean/SpectreKnot/ParentSig.lean, line 213 · read it in its file
Doc comment
The vertex of gR p is a parent rim vertex reached along the rim: the edge before it is unglued.
Statement
theorem gR_rimL {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.RimL (gR T L d ω p).1 (gR T L d ω p).2.1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
Statement.gR_rimL kids.len_pos p_lt
Statement.Kids.gR_rot
theorem in lean/SpectreKnot/ParentSig.lean, line 219 · read it in its file
Doc comment
Turning about the vertex of gR p reaches the start of the child edge at position p - 1, the vertex of gL p.
Statement
theorem gR_rot {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.Rot ((gR T L d ω p).1, (gR T L d ω p).2.1) (ownGo L (pcs T) (prv (rimN T L) p))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
Statement.gR_rot kids.len_pos p_lt
Statement.Kids.gR_sigma
theorem in lean/SpectreKnot/ParentSig.lean, line 232 · read it in its file
Doc comment
gR p is on the parent's rim: nothing lies across it.
Statement
theorem gR_sigma {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.sigma (gR T L d ω p) = none
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
Statement.gR_sigma kids.len_pos p_lt
Statement.Kids.gR_valid
theorem in lean/SpectreKnot/ParentSig.lean, line 224 · read it in its file
Doc comment
gR p is a port of an actual child, at an actual rim vertex.
Statement
theorem gR_valid {p : Nat} (p_lt : p < rimN T L) : (Comp.ofLens T L d ω).toGluing.Valid (gR T L d ω p)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
Statement.gR_valid kids.len_pos p_lt
Statement.Kids.glue_rimEdge
theorem in lean/SpectreKnot/Bridge.lean, line 191 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Across child c's rim edge k, the parent glues what the composition's mate says.
Statement
theorem glue_rimEdge {c k : Nat} (c_lt : c < nk T) (k_lt : k < (child c).E) : (compose T child).glue (((child c).edgeAt k).1 + offC child c) ((child c).edgeAt k).2 = ((Comp.ofLens T L d ω).toGluing.mate c k).map fun (c', k') => (((child c').edgeAt k').1 + offC child c', ((child c').edgeAt k').2)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by -- child `c` has the signature have has_sig := kids.sig c c_lt obtain ⟨t_lt, _, unglued⟩ := has_sig.rim_ok k k_lt rw [kids.glue_shift c_lt t_lt] exact glue_rim (fun c _ j _ => kids.len_pos c j) kids.pair kids.shape c_lt (by rw [← (kids.shape c c_lt).2]; exact k_lt) unglued (fun k' k'_lt same_edge => has_sig.rim_inj k' k k'_lt k_lt same_edge)
Statement.Kids.glue_shift
theorem in lean/SpectreKnot/Bridge.lean, line 154 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
What the parent glues across an edge of tile t of child c is what glueAt says.
Statement
theorem glue_shift {c t : Nat} (c_lt : c < nk T) (t_lt : t < (child c).tiles) (i : Nat) :
(compose T child).glue (t + offC child c) i = glueAt T child c t i
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
rw [Nat.add_comm]; exact compose_glue kids.tiles_pos c_lt t_lt iStatement.Kids.glue_symm
theorem in lean/SpectreKnot/Linked.lean, line 130 · read it in its file
Doc comment
The parent's gluing is symmetric if the children's are.
Statement
theorem glue_symm (children_symm : ∀ c, c < nk T → (child c).GlueSymm) : (compose T child).GlueSymm
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (47 lines)
by -- the composition is well formed have wf := kids.csig.wf intro t i t' j ht hi glued -- the child `c` that tile `t` belongs to obtain ⟨c, hc, after_start, before_end⟩ := owner_exists child (nk T) t ht obtain ⟨t₀, rfl⟩ : ∃ t₀, t = t₀ + offC child c := ⟨t - offC child c, by omega⟩ -- its number `t₀` in child `c` have ht₀ : t₀ < (child c).tiles := by omega -- child `c` has the signature have sig := kids.sig c hc cases inside : (child c).glue t₀ i with | some e => -- glued inside the child: the child's own gluing, shifted, which is symmetric obtain ⟨t₂, j₂⟩ := e rw [kids.glue_shift hc ht₀] at glued simp only [glueAt, inside, Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- the far tile is an actual tile of child `c` have far_valid := sig.glue_ok t₀ i t₂ j₂ ht₀ hi inside rw [kids.glue_shift hc far_valid.1] simp only [glueAt, children_symm c hc t₀ i t₂ j₂ ht₀ hi inside] | none => -- on the child's rim, at rim edge `k`: glued to a sibling's edge, as the gluing's `mate` says obtain ⟨k, hk, at_k⟩ := sig.rim_all t₀ i ht₀ hi inside -- `c` is a child of the gluing have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact hc -- the parent glues rim edge `k` of child `c` as `mate` says have formula := kids.glue_rimEdge hc hk rw [at_k] at formula rw [formula] at glued cases mated : (Comp.ofLens T L d ω).toGluing.mate c k with | none => rw [mated] at glued; contradiction | some m => obtain ⟨c', k'⟩ := m rw [mated] at glued simp only [Option.map_some, Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- the sibling's edge `k'` is an actual rim edge, glued back to edge `k` of `c` obtain ⟨sib_lt_n, sib_edge_lt, mated_back⟩ := wf.mate_valid c k c' k' c_lt_n (by rw [kids.E_eq hc]; exact hk) mated -- the sibling is an actual child have sib_lt : c' < nk T := by rwa [ofLens_n] at sib_lt_n -- the parent glues the sibling's rim edge `k'` as `mate` says have formula' := kids.glue_rimEdge sib_lt (by rw [← kids.E_eq sib_lt]; exact sib_edge_lt) rw [formula', mated_back] simp only [Option.map_some, at_k]
Statement.Kids.lift
theorem in lean/SpectreKnot/Bridge.lean, line 275 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A strand of child c is a stretch of a strand of the parent.
Statement
theorem lift {c : Nat} (c_lt : c < nk T) : ∀ q r, (child c).Follow q r → q.1 < (child c).tiles → q.2.1 < 14 →
∀ r', ((compose T child).across (shiftP child c r) = none ∧ r' = shiftP child c r) ∨
(∃ q₁, (compose T child).across (shiftP child c r) = some q₁ ∧ (compose T child).Follow q₁ r') →
(compose T child).Follow (shiftP child c q) r'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (22 lines)
by intro q r follow induction follow with | @leave q leaves => intro _ _ r' after rcases after with ⟨on_rim, rfl⟩ | ⟨q₁, crosses, follow_on⟩ · -- the child's strand ends on the parent's rim too -- so the parent's strand leaves there have leave := Patch.Follow.leave (P := compose T child) (p := shiftP child c q) (by rw [pieceEnd_shift]; exact on_rim) rwa [pieceEnd_shift] at leave · -- the child's strand ends on the child's rim, and the parent's strand crosses into a sibling exact .next (by rw [pieceEnd_shift]; exact crosses) follow_on | @next q q' r crosses _ ih => intro t_lt i_lt r' after -- the other end of the piece is a port of the same tile have end_valid := pieceEnd_valid i_lt -- and the port across from it is a port of an actual tile of the child have next_valid := Patch.across_valid (kids.sig c c_lt) (end_valid.1 ▸ t_lt) end_valid.2 crosses refine .next ?_ (ih next_valid.1 next_valid.2 r' after) rw [pieceEnd_shift] exact kids.across_in' c_lt (end_valid.1 ▸ t_lt) crosses
Statement.Kids.linked_lift
theorem in lean/SpectreKnot/Linked.lean, line 121 · read it in its file
Doc comment
A strand of a child is part of a strand of the parent.
Statement
theorem linked_lift {c : Nat} (hc : c < nk T) {p q : Port} (linked : (child c).Linked p q)
(p_port : (child c).IsPort p) : (compose T child).Linked (shiftP child c p) (shiftP child c q)
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by induction linked with | refl => exact .refl | piece _ ih => rw [← pieceEnd_shift]; exact .piece ih | @edge q q' to_q across_eq ih => exact .edge ih (kids.across_in' hc (to_q.valid (kids.sig c hc) p_port).1 across_eq)
Statement.Kids.noClosed
theorem in lean/SpectreKnot/Bridge.lean, line 402 · read it in its file
Formalises Lemma 4.2 Gluing.
Used, through the names in proofs, for Theorem A, Theorem B, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
No closed strand in the parent.
Statement
theorem noClosed : (compose T child).NoClosedStrand
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (33 lines)
by -- the composition is well formed have wf := kids.csig.wf intro p is_port obtain ⟨t, i, s⟩ := p obtain ⟨t_lt, i_lt⟩ := is_port simp only at t_lt i_lt -- the child `c` that tile `t` belongs to, and its number `t₀` there obtain ⟨c, c_lt, start_le, lt_end⟩ := owner_exists child (nk T) t t_lt obtain ⟨t₀, rfl⟩ : ∃ t₀, t = t₀ + offC child c := ⟨t - offC child c, by omega⟩ -- child `c` has the signature have has_sig := kids.sig c c_lt -- in the child, the ribbon leaves at a rim port `(u, s')` obtain ⟨r, follow⟩ := has_sig.noClosed (t₀, i, s) ⟨by simp only; omega, i_lt⟩ obtain ⟨leaves, r_tile, r_vertex⟩ := Patch.Follow.end_ has_sig follow (by simp only; omega) i_lt obtain ⟨u, s', u_lt, rfl⟩ := Patch.rim_port has_sig r_tile r_vertex leaves -- `c` is a child of the composition have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact c_lt -- across that rim port, the parent continues as `σ` says have across_eq := kids.across_rim (s := s') c_lt u_lt simp only [ιP] at across_eq cases sigma_eq : (Comp.ofLens T L d ω).toGluing.sigma (c, u, s') with | none => -- on the parent's rim: the ribbon leaves the parent there exact ⟨_, kids.lift c_lt _ _ follow (by simp only; omega) i_lt _ (Or.inl ⟨by rw [across_eq, sigma_eq]; rfl, rfl⟩)⟩ | some y => -- into a sibling at `y` -- `y` is a port of an actual child have y_valid := sigma_valid wf ⟨c_lt_n, by rw [kids.E_eq c_lt]; exact u_lt⟩ sigma_eq -- the composition's walk from `y` reaches its rim obtain ⟨r', reach'⟩ := kids.csig.noLoops y y_valid exact ⟨_, kids.lift c_lt _ _ follow (by simp only; omega) i_lt _ (Or.inr ⟨ιP child o y, by rw [across_eq, sigma_eq]; rfl, kids.follow_of_fullReach reach' y_valid⟩)⟩
Statement.Kids.noSelf
theorem in lean/SpectreKnot/ProofStrand.lean, line 256 · read it in its file
Doc comment
If no child glues a tile to itself, neither does the parent.
Statement
theorem Kids.noSelf {T : Kind} {child : Nat → Patch} {L : Nat → Nat → Nat} {d : Nat} {ω o : Bool}
(kids : Kids T child L d ω o) (children : ∀ c, c < nk T → NoSelf (child c)) : NoSelf (compose T child)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (50 lines)
by -- the composition is well formed have wf := kids.csig.wf intro t i t' j ht hi glued -- the child `c` that tile `t` belongs to, and its number `t₀` there obtain ⟨c, hc, lo, hi_c⟩ := owner_exists child (nk T) t ht obtain ⟨t₀, rfl⟩ : ∃ t₀, t = t₀ + offC child c := ⟨t - offC child c, by omega⟩ -- `t₀` is a tile of child `c` have ht₀ : t₀ < (child c).tiles := by omega -- which has the signature have sig := kids.sig c hc cases inside : (child c).glue t₀ i with | some e => -- glued inside the child: the child's own tile, shifted obtain ⟨t₂, j₂⟩ := e rw [kids.glue_shift hc ht₀] at glued simp only [glueAt, inside, Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- the child glues it to a different tile have differ := children c hc t₀ i t₂ j₂ ht₀ hi inside omega | none => -- on the child's rim, at rim edge `k`: glued to a sibling's edge obtain ⟨k, hk, at_k⟩ := sig.rim_all t₀ i ht₀ hi inside -- the parent glues rim edge `k` as the gluing's `mate` says have formula := kids.glue_rimEdge hc hk rw [at_k] at formula rw [formula] at glued cases mated : (Comp.ofLens T L d ω).toGluing.mate c k with | none => rw [mated] at glued; contradiction | some m => obtain ⟨c', k'⟩ := m rw [mated] at glued simp only [Option.map_some, Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued -- `c` is a child of the gluing have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact hc -- the sibling is an actual child, and the edge a real rim edge of it obtain ⟨sib_lt_n, sib_edge_lt, _⟩ := wf.mate_valid c k c' k' c_lt_n (by rw [kids.E_eq hc]; exact hk) mated -- the sibling is a child of the composition have sib_lt : c' < nk T := by rwa [ofLens_n] at sib_lt_n -- its rim edge `k'` is an edge of an actual tile of it have on_rim := (kids.sig c' sib_lt).rim_ok k' (by rw [← kids.E_eq sib_lt]; exact sib_edge_lt) -- it is a different child have other := mate_other_child (d := d) (ω := ω) kids.len_pos hc (by rw [← ofLens_E (d := d) (ω := ω) hc, kids.E_eq hc]; exact hk) mated intro same -- two tiles of different children have different numbers in the parent have same_child := owner_unique child on_rim.1 ht₀ (by omega) exact other same_child.1
Statement.Kids.on_parent_chain
theorem in lean/SpectreKnot/Turn.lean, line 436 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
On the parent's chain: a corner on the chain about a child vertex that steps of the gluing reach from the start of the parent's chain about rim position p is on that chain.
Statement
theorem on_parent_chain (chains : ∀ c, c < nk T → (child c).RimChains o) {p : Nat} (p_lt : p < rimN T L)
{a c u : Nat} (path : bsteps (Comp.ofLens T L d ω).toGluing o a (vS T L d ω o p) = some (c, u)) {n : Nat}
{x : Nat × Nat} (on_chain : (child c).turns n ((child c).sC o u) = some x) :
∃ n', (compose T child).turns n' ((compose T child).sC (!o) p) = some (shiftC child c x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- the vertex of `R(p)` and that of `L(p)`, as rim vertices of actual children obtain ⟨cR_lt, uR_lt⟩ := kids.gR_valid p_lt -- (that of `L(p)`) obtain ⟨cL_lt, uL_lt⟩ := kids.gL_valid p_lt rw [ofLens_n] at cR_lt cL_lt rw [kids.E_eq cR_lt] at uR_lt rw [kids.E_eq cL_lt] at uL_lt -- the start of the parent's chain is a rim vertex of an actual child have start_valid : (vS T L d ω o p).1 < nk T ∧ (vS T L d ω o p).2 < (child (vS T L d ω o p).1).E := by cases o · exact ⟨cR_lt, uR_lt⟩ · exact ⟨cL_lt, uL_lt⟩ obtain ⟨n₁, _, to_vertex⟩ := kids.chain_path chains a start_valid.1 start_valid.2 path -- the end of that path is a rim vertex of an actual child have end_valid := kids.bsteps_valid a start_valid.1 start_valid.2 path refine ⟨n₁ + n, ?_⟩ rw [kids.sC_parent p_lt, Patch.turns_add, to_vertex] exact kids.turns_lift end_valid.1 n (Patch.sC_valid (kids.sig c end_valid.1) end_valid.2).1 on_chain
Statement.Kids.parent_sig
theorem in lean/SpectreKnot/ParentSig.lean, line 243 · read it in its file
Formalises Theorem 7.6 Signature Theorem.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent has the signature (Thm 7.6's induction step, at tile level), at the rim positions cA, cB of the Γ child's corners: Prop 7.4 for the composition of the children (Kids.csig), read port by port.
Statement
theorem parent_sig : (compose T child).HasSig (!o) (cA T L) (cB T L ω)
Names in its proof
Compose.Comp.mateCompose.Comp.ofLensCompose.nkCompose.ofLens_nGluing.Equiv.wfStatement.Kids.E_eqStatement.Kids.bport_LStatement.Kids.bport_RStatement.Kids.follow_of_fullReachStatement.Kids.glue_rimEdgeStatement.Kids.glue_shiftStatement.Kids.noClosedStatement.Kids.tiles_posStatement.btauStatement.cAStatement.cBStatement.compose_EStatement.glueAtStatement.offCStatement.ownGoStatement.own_injStatement.own_mateStatement.own_surjStatement.owner_existsStatement.owner_uniqueStatement.pcsStatement.rim_edgeAtStatement.tile_lt
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (153 lines)
by -- the composition is well formed have wf := kids.csig.wf -- the children's vertices sit where the side lengths put them have shape := kids.shape -- the parent's rim length have E_eq := compose_E (child := child) shape -- the corners' positions are on the rim have pA_lt := kids.csig.cA_lt -- (both of them) have pB_lt := kids.csig.cB_lt refine ⟨?_, ?_, ?_, ?_, ?_, kids.noClosed, ?_⟩ · -- tiles show 0 < offC child (nk T) -- there is a child have has_child : 0 < nk T := by cases T <;> decide -- whose tiles come before the end have := tile_lt child has_child (kids.tiles_pos 0 has_child) omega · -- rim edges intro p p_lt rw [E_eq] at p_lt obtain ⟨c_lt, k_lt, unglued⟩ := own_mate (d := d) (ω := ω) kids.len_pos p_lt -- the child edge is on the child's rim have k_lt' : (ownGo L (pcs T) p).2 < (child (ownGo L (pcs T) p).1).E := by rw [(shape _ c_lt).2]; exact k_lt obtain ⟨t_lt, i_lt, _⟩ := (kids.sig _ c_lt).rim_ok _ k_lt' rw [rim_edgeAt shape p_lt] refine ⟨tile_lt child c_lt t_lt, i_lt, ?_⟩ rw [kids.glue_rimEdge c_lt k_lt', unglued]; rfl · -- no edge twice intro p p' p_lt p_lt' same_edge rw [E_eq] at p_lt p_lt' rw [rim_edgeAt shape p_lt, rim_edgeAt shape p_lt'] at same_edge simp only [Prod.mk.injEq] at same_edge obtain ⟨c_lt, k_lt, _⟩ := own_mate (d := d) (ω := ω) kids.len_pos p_lt obtain ⟨c_lt', k_lt', _⟩ := own_mate (d := d) (ω := ω) kids.len_pos p_lt' -- both child edges are on their children's rims have on_rim : (ownGo L (pcs T) p).2 < (child (ownGo L (pcs T) p).1).E := by rw [(shape _ c_lt).2]; exact k_lt -- (the second) have on_rim' : (ownGo L (pcs T) p').2 < (child (ownGo L (pcs T) p').1).E := by rw [(shape _ c_lt').2]; exact k_lt' obtain ⟨t_lt, _, _⟩ := (kids.sig _ c_lt).rim_ok _ on_rim obtain ⟨t_lt', _, _⟩ := (kids.sig _ c_lt').rim_ok _ on_rim' -- the same parent tile: the same child, and the same tile in it obtain ⟨same_child, same_tile⟩ := owner_unique child t_lt t_lt' (by omega) -- the same child edge, so the same position on the child's rim have same_k : (ownGo L (pcs T) p).2 = (ownGo L (pcs T) p').2 := by apply (kids.sig _ c_lt).rim_inj _ _ on_rim (by rw [same_child]; exact on_rim') rw [same_child]; rw [same_child] at same_tile same_edge; exact Prod.ext same_tile same_edge.2 exact own_inj kids.len_pos p_lt p_lt' (Prod.ext same_child same_k) · -- every unglued edge is a rim edge intro t i t_lt i_lt unglued -- the child `c` that tile `t` belongs to, and its number `t₀` there obtain ⟨c, c_lt, start_le, lt_end⟩ := owner_exists child (nk T) t t_lt obtain ⟨t₀, rfl⟩ : ∃ t₀, t = t₀ + offC child c := ⟨t - offC child c, by omega⟩ -- `t₀` is a tile of child `c` have t₀_lt : t₀ < (child c).tiles := by omega rw [kids.glue_shift c_lt t₀_lt] at unglued cases glue_eq : (child c).glue t₀ i with | some edge => simp [glueAt, glue_eq] at unglued | none => -- unglued in the child: rim edge `k` of the child obtain ⟨k, k_lt, at_k⟩ := (kids.sig c c_lt).rim_all t₀ i t₀_lt i_lt glue_eq -- what the parent glues there, by the composition have rim_glue := kids.glue_rimEdge c_lt k_lt rw [at_k, kids.glue_shift c_lt t₀_lt, unglued] at rim_glue -- so the composition leaves it unglued have mate_none : (Comp.ofLens T L d ω).toGluing.mate c k = none := by cases mate_eq : (Comp.ofLens T L d ω).toGluing.mate c k with | none => rfl | some q => rw [mate_eq] at rim_glue; simp at rim_glue obtain ⟨p, p_lt, at_p⟩ := own_surj (d := d) (ω := ω) kids.len_pos c_lt (by rw [← (shape c c_lt).2]; exact k_lt) mate_none refine ⟨p, by rw [E_eq]; exact p_lt, ?_⟩ rw [rim_edgeAt shape p_lt, at_p, at_k] · -- glued edges are edges of actual tiles intro t i t' j t_lt i_lt glued -- the child `c` that tile `t` belongs to, and its number `t₀` there obtain ⟨c, c_lt, start_le, lt_end⟩ := owner_exists child (nk T) t t_lt obtain ⟨t₀, rfl⟩ : ∃ t₀, t = t₀ + offC child c := ⟨t - offC child c, by omega⟩ -- `t₀` is a tile of child `c` have t₀_lt : t₀ < (child c).tiles := by omega rw [kids.glue_shift c_lt t₀_lt] at glued cases glue_eq : (child c).glue t₀ i with | some edge => -- glued inside the child obtain ⟨t₁, i₁⟩ := edge simp only [glueAt, glue_eq, Option.some.injEq, Prod.mk.injEq] at glued obtain ⟨rfl, rfl⟩ := glued obtain ⟨t₁_lt, i₁_lt⟩ := (kids.sig c c_lt).glue_ok t₀ i t₁ i₁ t₀_lt i_lt glue_eq exact ⟨tile_lt child c_lt t₁_lt, i₁_lt⟩ | none => -- on the child's rim, at rim edge `k`: glued to a sibling's rim edge obtain ⟨k, k_lt, at_k⟩ := (kids.sig c c_lt).rim_all t₀ i t₀_lt i_lt glue_eq -- what the parent glues there, by the composition have rim_glue := kids.glue_rimEdge c_lt k_lt rw [at_k, kids.glue_shift c_lt t₀_lt, glued] at rim_glue -- `c` is a child of the composition have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact c_lt cases mate_eq : (Comp.ofLens T L d ω).toGluing.mate c k with | none => rw [mate_eq] at rim_glue; simp at rim_glue | some q => obtain ⟨c', k'⟩ := q rw [mate_eq] at rim_glue simp only [Option.map_some, Option.some.injEq, Prod.mk.injEq] at rim_glue obtain ⟨c'_lt_n, k'_lt, _⟩ := wf.mate_valid c k c' k' c_lt_n (by rw [kids.E_eq c_lt]; exact k_lt) mate_eq -- `c'` is a child have c'_lt : c' < nk T := by rwa [ofLens_n] at c'_lt_n rw [kids.E_eq c'_lt] at k'_lt obtain ⟨t'_lt, j_lt, _⟩ := (kids.sig c' c'_lt).rim_ok k' k'_lt obtain ⟨tile_eq, edge_eq⟩ := rim_glue subst tile_eq edge_eq exact ⟨tile_lt child c'_lt t'_lt, j_lt⟩ · -- the signature intro p s p_lt rw [E_eq] at p_lt by_cases p_eq_A : p = cA T L · -- at the corner `cA` subst p_eq_A simp only [btau, ↓reduceIte] cases s with | true => -- `R(cA) ↔ R(cB)`: the composition's crossover `L(A) ↔ L(B)` rw [kids.bport_R p_lt, kids.bport_R pB_lt] exact kids.follow_of_fullReach kids.csig.crossL (kids.gR_valid p_lt) | false => -- `L(cA) ↔ L(cB)`: the composition's crossover `R(A) ↔ R(B)` rw [kids.bport_L p_lt, kids.bport_L pB_lt] exact kids.follow_of_fullReach kids.csig.crossR (kids.gL_valid p_lt) · by_cases p_eq_B : p = cB T L ω · -- at the corner `cB`: the crossover walks, backwards subst p_eq_B simp only [btau, ite_eq_right p_eq_A, ↓reduceIte] cases s with | true => rw [kids.bport_R p_lt, kids.bport_R pA_lt] exact kids.follow_of_fullReach (kids.csig.crossL.reverse wf (kids.gR_valid pA_lt) (kids.gR_sigma pA_lt)) (kids.gR_valid p_lt) | false => rw [kids.bport_L p_lt, kids.bport_L pA_lt] exact kids.follow_of_fullReach (kids.csig.crossR.reverse wf (kids.gL_valid pA_lt) (kids.gL_sigma pA_lt)) (kids.gL_valid p_lt) · -- a hook of the composition simp only [btau, ite_eq_right p_eq_A, ite_eq_right p_eq_B] have reach := kids.csig.hooks p p_lt p_eq_A p_eq_B -- the composition's walk from `gR p` to `gL p` cases s with | true => rw [kids.bport_R p_lt, Bool.not_true, kids.bport_L p_lt] exact kids.follow_of_fullReach reach (kids.gR_valid p_lt) | false => rw [kids.bport_L p_lt, Bool.not_false, kids.bport_R p_lt] exact kids.follow_of_fullReach (reach.reverse wf (kids.gR_valid p_lt) (kids.gR_sigma p_lt)) (kids.gL_valid p_lt)
Statement.Kids.rimChains
theorem in lean/SpectreKnot/Turn.lean, line 461 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
The parent is a disc at its rim if its children are: the chain about a parent rim vertex is made of the children's chains, joined as the gluing turns about the vertex.
Statement
theorem rimChains (chains : ∀ c, c < nk T → (child c).RimChains o) : (compose T child).RimChains (!o)
Names in its proof
Compose.ofLens_nGluing.Equiv.wfGluing.Rot.rotBStatement.Kids.bport_LStatement.Kids.bport_RStatement.Kids.chain_pathStatement.Kids.turns_liftStatement.Patch.cornerStatement.Patch.sC_validStatement.Patch.turns_addStatement.composeStatement.compose_EStatement.gLStatement.gRStatement.rotB_bstepsStatement.rot_bstepsStatement.shiftC
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (49 lines)
by -- the composition is well formed have wf := kids.csig.wf intro p p_lt rw [compose_E kids.shape] at p_lt -- the vertex of `R(p)` and that of `L(p)`, as rim vertices of actual children obtain ⟨cR_lt, uR_lt⟩ := kids.gR_valid p_lt -- (that of `L(p)`) obtain ⟨cL_lt, uL_lt⟩ := kids.gL_valid p_lt rw [ofLens_n] at cR_lt cL_lt rw [kids.E_eq cR_lt] at uR_lt rw [kids.E_eq cL_lt] at uL_lt -- turning about the vertex of `R(p)` reaches that of `L(p)` have turn := kids.gR_rot p_lt cases o · -- clockwise children: the parent's chain runs from beside `R(p)` to beside `L(p)` obtain ⟨a, path⟩ := rot_bsteps turn obtain ⟨n₁, _, to_L⟩ := kids.chain_path chains a cR_lt uR_lt path obtain ⟨n₂, along⟩ := chains _ cL_lt _ uL_lt refine ⟨n₁ + n₂, ?_⟩ -- the parent's chain starts beside `R(p)`, at the start of the chain about its vertex have start_eq : Patch.corner (ιP child false (gR T L d ω p)) = shiftC child (gR T L d ω p).1 ((child (gR T L d ω p).1).sC false (gR T L d ω p).2.1) := rfl -- and ends beside `L(p)`, at the end of the chain about its vertex have end_eq : Patch.corner (ιP child false (gL T L p)) = shiftC child (gL T L p).1 ((child (gL T L p).1).fC false (gL T L p).2.1) := rfl show (compose T child).turns (n₁ + n₂) (Patch.corner ((compose T child).bport (!false) (p, true))) = some (Patch.corner ((compose T child).bport (!false) (p, false))) rw [kids.bport_R p_lt, kids.bport_L p_lt, start_eq, end_eq, Patch.turns_add, to_L] exact kids.turns_lift cL_lt n₂ (Patch.sC_valid (kids.sig _ cL_lt) uL_lt).1 along · -- counter-clockwise children: from beside `L(p)` to beside `R(p)`, turning backwards about the vertex -- the edge before the vertex of `R(p)` is on the parent's rim have rim_R := kids.gR_rimL p_lt -- so turning backwards from the vertex of `L(p)` reaches it have back := turn.rotB wf rim_R.1 rim_R.2.1 _ (.stop rim_R.2.2) obtain ⟨a, path⟩ := rotB_bsteps back obtain ⟨n₁, _, to_R⟩ := kids.chain_path chains a cL_lt uL_lt path obtain ⟨n₂, along⟩ := chains _ cR_lt _ uR_lt refine ⟨n₁ + n₂, ?_⟩ -- the parent's chain starts beside `L(p)`, at the start of the chain about its vertex have start_eq : Patch.corner (ιP child true (gL T L p)) = shiftC child (gL T L p).1 ((child (gL T L p).1).sC true (gL T L p).2.1) := rfl -- and ends beside `R(p)`, at the end of the chain about its vertex have end_eq : Patch.corner (ιP child true (gR T L d ω p)) = shiftC child (gR T L d ω p).1 ((child (gR T L d ω p).1).fC true (gR T L d ω p).2.1) := rfl show (compose T child).turns (n₁ + n₂) (Patch.corner ((compose T child).bport (!true) (p, false))) = some (Patch.corner ((compose T child).bport (!true) (p, true))) rw [kids.bport_R p_lt, kids.bport_L p_lt, start_eq, end_eq, Patch.turns_add, to_R] exact kids.turns_lift cR_lt n₂ (Patch.sC_valid (kids.sig _ cR_lt) uR_lt).1 along
Statement.Kids.sC_parent
theorem in lean/SpectreKnot/Turn.lean, line 425 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Where the parent's chain about rim position p starts: at the start of the chain about the child vertex of R(p) (for clockwise children) or of L(p) (for counter-clockwise ones).
Statement
theorem sC_parent {p : Nat} (p_lt : p < rimN T L) :
(compose T child).sC (!o) p =
shiftC child (vS T L d ω o p).1 ((child (vS T L d ω o p).1).sC o (vS T L d ω o p).2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by cases o · show Patch.corner ((compose T child).bport (!false) (p, true)) = _ rw [kids.bport_R p_lt]; rfl · show Patch.corner ((compose T child).bport (!true) (p, false)) = _ rw [kids.bport_L p_lt]; rfl
Statement.Kids.surrounded_of_cycle
theorem in lean/SpectreKnot/Turn.lean, line 406 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
A corner on a child's chain is surrounded in the parent if the gluing's turning about that child vertex comes round to it.
Statement
theorem surrounded_of_cycle (chains : ∀ c, c < nk T → (child c).RimChains o) {c u a : Nat} (c_lt : c < nk T)
(u_lt : u < (child c).E) (a_pos : 0 < a)
(cycle : bsteps (Comp.ofLens T L d ω).toGluing o a (c, u) = some (c, u)) {m : Nat} {x : Nat × Nat}
(on_chain : (child c).turns m ((child c).sC o u) = some x) :
(compose T child).Surrounded (x.1 + offC child c) x.2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by obtain ⟨n, a_le, round⟩ := kids.chain_path chains a c_lt u_lt cycle -- the corner, in the parent, on the lifted chain have to_x := kids.turns_lift c_lt m (Patch.sC_valid (kids.sig c c_lt) u_lt).1 on_chain refine ⟨n, by omega, ?_⟩ -- `m` turns then `n` from the start of the chain: `n` turns from the corner have m_then_n := Patch.turns_add (P := compose T child) m n (shiftC child c ((child c).sC o u)) -- `n` turns then `m`: round to the start, and on to the corner have n_then_m := Patch.turns_add (P := compose T child) n m (shiftC child c ((child c).sC o u)) rw [to_x, Option.bind_some] at m_then_n rw [round, Option.bind_some, to_x, Nat.add_comm n m] at n_then_m exact m_then_n.symm.trans n_then_m
Statement.Kids.tau_btau
theorem in lean/SpectreKnot/Bridge.lean, line 315 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The composition's τ on child c is the child's signature pairing btau, with the composition's corners.
Statement
theorem tau_btau (c u : Nat) (s : Bool) :
(Comp.ofLens T L d ω).toGluing.tau (c, u, s) =
(c, (btau ((Comp.ofLens T L d ω).toGluing.A c) ((Comp.ofLens T L d ω).toGluing.B c) (u, s)).1,
(btau ((Comp.ofLens T L d ω).toGluing.A c) ((Comp.ofLens T L d ω).toGluing.B c) (u, s)).2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by
simp only [Gluing.tau, btau]
by_cases at_A : u = (Comp.ofLens T L d ω).toGluing.A c
· simp [at_A]
· by_cases at_B : u = (Comp.ofLens T L d ω).toGluing.B c
· subst at_B
by_cases B_eq_A : (Comp.ofLens T L d ω).toGluing.B c = (Comp.ofLens T L d ω).toGluing.A c <;> simp [B_eq_A]
· simp [at_A, at_B]Statement.Kids.tiles_pos
theorem in lean/SpectreKnot/Bridge.lean, line 147 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every child has a tile.
Statement
theorem tiles_pos : ∀ c, c < nk T → 0 < (child c).tiles
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
fun c c_lt => (kids.sig c c_lt).tiles_posStatement.Kids.turn_fC
theorem in lean/SpectreKnot/Turn.lean, line 331 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Across the end of a child's chain: from the corner where the chain about child vertex u ends, turning crosses a rim edge of the child into the sibling the gluing's step names, at the start of its chain; or it reaches the parent's rim.
Statement
theorem turn_fC {c u : Nat} (c_lt : c < nk T) (u_lt : u < (child c).E) : (compose T child).turn (shiftC child c ((child c).fC o u)) = (bstep (Comp.ofLens T L d ω).toGluing o (c, u)).map fun y => shiftC child y.1 ((child y.1).sC o y.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (32 lines)
by -- the composition is well formed have wf := kids.csig.wf -- `c` is a child of the composition have c_lt_n : c < (Comp.ofLens T L d ω).toGluing.n := by rw [ofLens_n]; exact c_lt cases o · -- clockwise children: the chain ends beside the rim edge `u` -- which is an actual edge have i_lt := ((kids.sig c c_lt).rim_ok u u_lt).2.1 show (compose T child).glue (((child c).edgeAt u).1 + offC child c) (((((child c).edgeAt u).2 + 1) % 14 + 13) % 14) = _ rw [mod14 i_lt, kids.glue_rimEdge c_lt u_lt] simp only [bstep, Bool.false_eq_true, ite_false] cases mate_eq : (Comp.ofLens T L d ω).toGluing.mate c u with | none => rfl | some e => obtain ⟨c'_lt, k'_lt, _⟩ := wf.mate_valid c u e.1 e.2 c_lt_n (by rw [kids.E_eq c_lt]; exact u_lt) mate_eq -- `e.1` is a child have c'_lt' : e.1 < nk T := by rw [ofLens_n] at c'_lt; exact c'_lt simp only [Option.map_some, shiftC, Patch.sC, Patch.corner, Patch.bport, Bool.false_eq_true, ite_false, kids.E_eq c'_lt', prv_nxt (show e.2 < (child e.1).E by rw [← kids.E_eq c'_lt']; exact k'_lt)] · -- counter-clockwise children: the chain ends beside the rim edge `u - 1` -- which is an actual edge have i_lt := ((kids.sig c c_lt).rim_ok _ (prv_lt u_lt)).2.1 show (compose T child).glue (((child c).edgeAt (prv (child c).E u)).1 + offC child c) (((((child c).edgeAt (prv (child c).E u)).2 + 1) % 14 + 13) % 14) = _ rw [mod14 i_lt, kids.glue_rimEdge c_lt (prv_lt u_lt)] simp only [bstep, ite_true, kids.E_eq c_lt] cases (Comp.ofLens T L d ω).toGluing.mate c (prv (child c).E u) with | none => rfl | some e => rfl
Statement.Kids.turn_lift
theorem in lean/SpectreKnot/Turn.lean, line 261 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning inside a child is turning in the parent.
Statement
theorem turn_lift {c : Nat} (c_lt : c < nk T) {x y : Nat × Nat} (x_tile : x.1 < (child c).tiles)
(turned : (child c).turn x = some y) : (compose T child).turn (shiftC child c x) = some (shiftC child c y)
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
simp only [Patch.turn, shiftC] at turned ⊢
rw [kids.glue_shift c_lt x_tile]
simp only [glueAt, turned]Statement.Kids.turns_lift
theorem in lean/SpectreKnot/Turn.lean, line 268 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning several times inside a child is turning in the parent.
Statement
theorem turns_lift {c : Nat} (c_lt : c < nk T) :
∀ n {x y : Nat × Nat}, x.1 < (child c).tiles → (child c).turns n x = some y →
(compose T child).turns n (shiftC child c x) = some (shiftC child c y)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by intro n induction n with | zero => intro x y _ turned; cases turned; rfl | succ n ih => intro x y x_tile turned simp only [Patch.turns] at turned ⊢ cases turn_eq : (child c).turn x with | none => rw [turn_eq] at turned; contradiction | some x₁ => rw [turn_eq] at turned rw [kids.turn_lift c_lt x_tile turn_eq] exact ih (Patch.turn_valid (kids.sig c c_lt) x_tile turn_eq).1 turned
Statement.Lk
abbrev in lean/SpectreKnot/ProofA.lean, line 32 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The side lengths of the children in a composition of level-m supertiles.
Statement
abbrev Lk (m : Nat) (T : Kind) (c j : Nat) : Nat := letterLen m (letterOf (kidAt T c) j)
Named in the proofs of
Statement.corners_NStatement.gR_jposStatement.jpos_posStatement.gL_jposStatement.step_tileStatement.kids_atStatement.aPos_succStatement.good_succStatement.compose_no_defaultStatement.stretch_eqStatement.InsideStatement.pos_upStatement.inside_ofStatement.inside_stpStatement.adv_noneStatement.reach_noneStatement.firstStatement.ZpStatement.mate_someStatement.no_boundaryStatement.inside_twoStatement.two_evenStatement.odd_witnessesStatement.two_oddStatement.three_oddStatement.surrounded_side4Statement.chain_stretchStatement.junction_ltStatement.chain_j16Statement.chain_j17Statement.grandparent
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.N
def in lean/SpectreKnot/Statement.lean, line 235 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
The block N_b of the nest: the Δ-supertile of level b.
Statement
def N (b : Nat) : Patch := super b .Delta
Names in its proof
Named in the proofs of
Statement.hookStatement.step_tileStatement.ReachStatement.firstStatement.ZpStatement.isPort_upkStatement.theoremB_sharpStatement.no_boundaryStatement.theoremBStatement.hookAtStatement.hook_endsStatement.hooks_apartStatement.hook_portStatement.surrounded_side4Statement.chain_stretchStatement.grandparentStatement.tiles_succStatement.gid_locStatement.glue_lift1Statement.glue_liftStatement.glue_ok_NStatement.across_gPStatement.follow_boundedStatement.not_closedStatement.TheoremBStatement.TheoremB_sharpStatement.TwoStrandsStatement.GrandparentStatement.gidStatement.locStatement.nestGlueStatement.NestModel
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.NPort
abbrev in lean/SpectreKnot/ProofStrand.lean, line 412 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
The ports of the nest tiling: a tile number, a vertex 0 … 13 of the tile, and a hand.
Statement
abbrev NPort := {p : Port // p.2.1 < 14}
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.N_succ
theorem in lean/SpectreKnot/NestStep.lean, line 99 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
For m ≥ 1, N_{m+1} is the Δ composition of its level-m children.
Statement
theorem N_succ {m : Nat} (m_pos : 1 ≤ m) : N (m + 1) = Par m
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ rfl
Statement.NestCovers
def in lean/SpectreKnot/Statement.lean, line 474 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
Chains that cover exist: the nest, as a chain (every block a Δ, child 1 of the next), covers. So TheoremA_strand is not vacuous. (Proved in ProofChain.lean.)
Statement
def NestCovers : Prop := ∃ X : Chain, (∀ m, X.K m = .Delta ∧ X.c m = 1) ∧ X.Covers
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.NestModel
def in lean/SpectreKnot/Statement.lean, line 361 · read it in its file
Used, through the names in proofs, for Theorem B.
In the statement file: read it line by line.
Doc comment
The nest tiling is a tiling, and the union of the blocks: (a) every number g is a tile of N_{g+1}; (b) gid b numbers the tiles of N_b one to one with 0 … |N_b| - 1, and loc b is its inverse; (c) a tile keeps its number one level up; (d) whatever N_b glues, the nest tiling glues the same way; (e) every edge of every tile is glued, to an edge of a different tile, which is glued back.
Statement
def NestModel : Prop := (∀ g, g < (N (g + 1)).tiles) ∧ (∀ b t, t < (N b).tiles → gid b t < (N b).tiles ∧ loc b (gid b t) = t) ∧ (∀ b g, g < (N b).tiles → loc b g < (N b).tiles ∧ gid b (loc b g) = g) ∧ (∀ b t, t < (N b).tiles → gid (b + 1) (up b 1 t) = gid b t) ∧ (∀ b t i t' j, t < (N b).tiles → i < 14 → (N b).glue t i = some (t', j) → nestGlue (gid b t) i = some (gid b t', j)) ∧ (∀ g i, i < 14 → ∃ g' j, nestGlue g i = some (g', j) ∧ g' ≠ g ∧ j < 14 ∧ nestGlue g' j = some (g, i))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.NoSelf
def in lean/SpectreKnot/ProofStrand.lean, line 212 · read it in its file
Doc comment
No edge of a tile is glued to an edge of the same tile.
Statement
def NoSelf (P : Patch) : Prop := ∀ t i t' j, t < P.tiles → i < 14 → P.glue t i = some (t', j) → t' ≠ t
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Par
abbrev in lean/SpectreKnot/NestStep.lean, line 93 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
N_{m+1}, as compose builds it.
Statement
abbrev Par (m : Nat) : Patch := compose .Delta fun c => super m (kidAt .Delta c)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch
structure in lean/SpectreKnot/Statement.lean, line 60 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
A patch: tiles tiles, numbered 0 … tiles - 1, and what lies across each edge. glue t i = some (t', j) means that edge e_i of tile t is edge e_j of tile t'; the two tiles run along it in opposite directions, so v_i of t is v_{j+1} of t'. none means the edge is on the rim. For supertiles, rim lists the rim edges in order from vertex 0, and vtx the positions in rim of the six vertices, then the rim's length.
Statement
structure Patch where tiles : Nat glue : Nat → Nat → Option (Nat × Nat) rim : List (Nat × Nat) vtx : List Nat
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.E
abbrev in lean/SpectreKnot/Statement.lean, line 122 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 4.4, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
The number of rim edges, which is also the number of rim vertices.
Statement
abbrev E : Nat := P.rim.length
Names in its proof
none
Named in the proofs of
Statement.Patch.rim_portCompose.Comp.spreadCornersStatement.gRStatement.gR_rimLStatement.side_getElem?Statement.findIdx_rimGluing.ValidGluing.WFGluing.wfCheckGluing.sigmaCompose.Move.OK.cutOKGluing.Cut.OK.step0_2TGluing.Cut.OK.step0_1TGluing.Cut.OK.step0_1FGluing.Cut.OK.step1_2TGluing.Cut.OK.step1_1TGluing.Cut.OK.step1_1FGluing.Cut.OK.nw0_2TGluing.Cut.OK.nw0_1TGluing.Cut.OK.nw0_1FGluing.Cut.OK.nw1_2FGluing.Cut.OK.nw1_1TGluing.Cut.OK.nw1_1FGluing.Cut.OK.noLoopsCompose.sig_adjStatement.Patch.sigCheckStatement.Patch.bport_injStatement.Patch.chainCheckStatement.rim_not_surroundedGluing.sigma_symmGluing.RotBGluing.RotGluing.RimLGluing.Equiv.rotGluing.Equiv.rimLGluing.Cut.OK.rimL_preStatement.Patch.bportStatement.Patch.RimChainsStatement.Patch.HasSigGluing.EquivGluing.Equiv.valid'Gluing.Equiv.sigmaGluing.Equiv.wfGluing.Equiv.symmGluing.subdivGluing.Cut.OKGluing.cross_threeGluing.Cut.OK.nxt_shGluing.Cut.OK.simStatement.Patch.surrounded_or_chainStatement.bstepStatement.Kids.bstep_valid
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.Ends
def in lean/SpectreKnot/ProofExact.lean, line 41 · read it in its file
Doc comment
**The two ends of the strand through port q**: following the ribbon from q (along its piece first) leaves the patch at a; going the other way (across q's edge first) it leaves at b, which is q itself if q is on the rim.
Statement
def Ends (P : Patch) (q a b : Port) : Prop := P.Follow q a ∧ ((P.across q = none ∧ b = q) ∨ ∃ q', P.across q = some q' ∧ P.Follow q' b)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.Ends.edge
theorem in lean/SpectreKnot/ProofExact.lean, line 73 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Seen from across q's edge, the ends are the same, the other way round.
Statement
theorem Ends.edge {q q' a b : Port} (ends : P.Ends q a b) (across_eq : P.across q = some q')
(back : P.across q' = some q) : P.Ends q' b a
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by obtain ⟨follows, beyond⟩ := ends refine ⟨?_, .inr ⟨q, back, follows⟩⟩ rcases beyond with ⟨on_rim, _⟩ | ⟨q₁, crosses, follows₁⟩ · rw [across_eq] at on_rim; contradiction · rw [across_eq] at crosses cases crosses exact follows₁
Statement.Patch.Ends.piece
theorem in lean/SpectreKnot/ProofExact.lean, line 57 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Seen from the other end of q's piece, the ends are the same, the other way round.
Statement
theorem Ends.piece {q a b : Port} (ends : P.Ends q a b) : P.Ends (pieceEnd q) b a
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by obtain ⟨follows, beyond⟩ := ends refine ⟨?_, ?_⟩ · rcases beyond with ⟨on_rim, b_eq⟩ | ⟨q₁, crosses, follows₁⟩ · -- `q` is on the rim: from the other end, the ribbon runs along the piece and leaves at `q` have leave := Follow.leave (P := P) (p := pieceEnd q) (by rw [pieceEnd_pieceEnd]; exact on_rim) rw [b_eq] rwa [pieceEnd_pieceEnd] at leave · -- from the other end, the ribbon runs along the piece, across `q`'s edge, and on to `b` exact .next (by rw [pieceEnd_pieceEnd]; exact crosses) follows₁ · -- across the edge at the other end is where following the ribbon from `q` goes cases follows with | leave leaves => exact .inl ⟨leaves, rfl⟩ | next crosses rest => exact .inr ⟨_, crosses, rest⟩
Statement.Patch.Ends.unique
theorem in lean/SpectreKnot/ProofExact.lean, line 45 · read it in its file
Doc comment
A port has one pair of ends.
Statement
theorem Ends.unique {q a b a' b' : Port} (ends : P.Ends q a b) (ends' : P.Ends q a' b') : a = a' ∧ b = b'
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by refine ⟨ends.1.unique ends'.1, ?_⟩ rcases ends.2 with ⟨on_rim, rfl⟩ | ⟨q₁, crosses, follows⟩ <;> rcases ends'.2 with ⟨on_rim', rfl⟩ | ⟨q₁', crosses', follows'⟩ · rfl · rw [on_rim] at crosses'; contradiction · rw [crosses] at on_rim'; contradiction · rw [crosses] at crosses' cases crosses' exact follows.unique follows'
Statement.Patch.Follow
inductive in lean/SpectreKnot/Statement.lean, line 86 · read it in its file
In the statement file: read it line by line.
Doc comment
Following a ribbon. P.Follow p r: from p, going along a piece, across an edge, along a piece, and so on, you leave the patch at the rim port r. It holds exactly when it follows from the two rules in finitely many steps.
Statement
inductive Follow : Port → Port → Prop -- The far end of p's piece is on the rim: leave there. | leave {p : Port} : P.across (pieceEnd p) = none → Follow p (pieceEnd p) -- Otherwise cross to q, and carry on from q. | next {p q r : Port} : P.across (pieceEnd p) = some q → Follow q r → Follow p r
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.Follow.end_
theorem in lean/SpectreKnot/Bridge.lean, line 71 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Following a ribbon ends at a rim port, and stays among the patch's ports.
Statement
theorem Follow.end_ {o : Bool} {A B : Nat} (has_sig : P.HasSig o A B) {q r : Port} (follow : P.Follow q r) :
q.1 < P.tiles → q.2.1 < 14 → P.across r = none ∧ r.1 < P.tiles ∧ r.2.1 < 14
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by induction follow with | @leave q leaves => intro t_lt i_lt -- the other end of the piece is a port of the same tile have end_valid := pieceEnd_valid i_lt exact ⟨leaves, end_valid.1 ▸ t_lt, end_valid.2⟩ | @next q q' r crosses _ ih => intro t_lt i_lt -- the other end of the piece is a port of the same tile have end_valid := pieceEnd_valid i_lt -- and the port across from it is a port of an actual tile have next_valid := across_valid has_sig (end_valid.1 ▸ t_lt) end_valid.2 crosses exact ih next_valid.1 next_valid.2
Statement.Patch.Follow.unique
theorem in lean/SpectreKnot/ProofExact.lean, line 24 · read it in its file
Doc comment
Following a ribbon has one result.
Statement
theorem Follow.unique {p r r' : Port} (follows : P.Follow p r) (follows' : P.Follow p r') : r = r'
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by induction follows generalizing r' with | leave leaves => cases follows' with | leave _ => rfl | next crosses _ => rw [leaves] at crosses; contradiction | next crosses _ ih => cases follows' with | leave leaves => rw [crosses] at leaves; contradiction | next crosses' rest' => rw [crosses] at crosses' cases crosses' exact ih rest'
Statement.Patch.GlueSymm
def in lean/SpectreKnot/Linked.lean, line 43 · read it in its file
Doc comment
Gluing is symmetric.
Statement
def GlueSymm (P : Patch) : Prop := ∀ t i t' j, t < P.tiles → i < 14 → P.glue t i = some (t', j) → P.glue t' j = some (t, i)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.HasSig
structure in lean/SpectreKnot/Statement.lean, line 160 · read it in its file
Formalises Definition 4.3 Signature.
In the statement file: read it line by line.
Doc comment
Def 4.3, a patch with the signature at rim vertices A, B, its rim listed in the orientation o: the rim list holds exactly the unglued edges, each once; no strand is closed; and following the ribbon from each rim port leads to the port that btau pairs it with.
Statement
structure Patch.HasSig (P : Patch) (o : Bool) (A B : Nat) : Prop where tiles_pos : 0 < P.tiles /-- the rim edges are edges of actual tiles, and are not glued -/ rim_ok : ∀ k, k < P.E → (P.edgeAt k).1 < P.tiles ∧ (P.edgeAt k).2 < 14 ∧ P.glue (P.edgeAt k).1 (P.edgeAt k).2 = none /-- no edge is listed twice -/ rim_inj : ∀ k k', k < P.E → k' < P.E → P.edgeAt k = P.edgeAt k' → k = k' /-- every unglued edge is listed -/ rim_all : ∀ t i, t < P.tiles → i < 14 → P.glue t i = none → ∃ k, k < P.E ∧ P.edgeAt k = (t, i) /-- glued edges are edges of actual tiles -/ glue_ok : ∀ t i t' j, t < P.tiles → i < 14 → P.glue t i = some (t', j) → t' < P.tiles ∧ j < 14 noClosed : P.NoClosedStrand /-- following the ribbon from a rim port leads to the port the signature pairs it with -/ sig : ∀ k s, k < P.E → P.Follow (P.bport o (k, s)) (P.bport o (btau A B (k, s)))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.HasSig.box
theorem in lean/SpectreKnot/PatchSig.lean, line 106 · read it in its file
Formalises Lemma 4.1 The box of a patch.
Doc comment
The box of a patch with the signature (Lemma 4.1, for the patches the proof uses): the ribbon from each rim port leaves the patch at the rim port that btau pairs it with, and btau is an involution on the rim ports without fixed points.
Statement
theorem HasSig.box {o : Bool} {A B : Nat} (has_sig : P.HasSig o A B) (A_lt : A < P.E) (B_lt : B < P.E)
(A_ne_B : A ≠ B) (k : Nat) (s : Bool) (k_lt : k < P.E) :
P.Follow (P.bport o (k, s)) (P.bport o (btau A B (k, s))) ∧ (btau A B (k, s)).1 < P.E ∧
btau A B (btau A B (k, s)) = (k, s) ∧ btau A B (k, s) ≠ (k, s)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by
refine ⟨has_sig.sig k s k_lt, ?_⟩
simp only [btau]
by_cases at_A : k = A
· subst at_A; simp [Ne.symm A_ne_B, B_lt]
· by_cases at_B : k = B
· subst at_B; simp [at_A, A_lt, Ne.symm at_A]
· simp [at_A, at_B, k_lt]Statement.Patch.IsPort
def in lean/SpectreKnot/Statement.lean, line 79 · read it in its file
In the statement file: read it line by line.
Doc comment
p is a port of a tile of the patch.
Statement
def IsPort (p : Port) : Prop := p.1 < P.tiles ∧ p.2.1 < 14
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.Linked
inductive in lean/SpectreKnot/Statement.lean, line 98 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
In the statement file: read it line by line.
Doc comment
Same strand. P.Linked p q: q is reached from p by moves along pieces and across glued edges, inside the patch.
Statement
inductive Linked (p : Port) : Port → Prop | refl : Linked p p | piece {q : Port} : Linked p q → Linked p (pieceEnd q) | edge {q q' : Port} : Linked p q → P.across q = some q' → Linked p q'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.Linked.ends
theorem in lean/SpectreKnot/ProofExact.lean, line 86 · read it in its file
Formalises Theorem 9.1 Merging.
Doc comment
Along a strand, its ends stay the same (in a patch with the signature and symmetric gluing, where every move along a strand can be undone): if q is on the strand of p, the ends seen from q are those seen from p, one way round or the other.
Statement
theorem Linked.ends {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {p q a b : Port}
(linked : P.Linked p q) (p_port : P.IsPort p) (ends : P.Ends p a b) : P.Ends q a b ∨ P.Ends q b a
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by induction linked with | refl => exact .inl ends | piece _ ih => rcases ih with same | swapped · exact .inr same.piece · exact .inl swapped.piece | edge to_q across_eq ih => -- the edge can be crossed back have back := across_symm sig symm (to_q.valid sig p_port) across_eq rcases ih with same | swapped · exact .inr (same.edge across_eq back) · exact .inl (swapped.edge across_eq back)
Statement.Patch.Linked.of_follow
theorem in lean/SpectreKnot/Linked.lean, line 26 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Following a ribbon stays on one strand.
Statement
theorem Linked.of_follow {p r : Port} (follows : P.Follow p r) : P.Linked p r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction follows with | leave _ => exact .piece .refl | next across_eq _ ih => exact (Linked.edge (.piece .refl) across_eq).trans ih
Statement.Patch.Linked.symm
theorem in lean/SpectreKnot/Linked.lean, line 91 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Same strand is symmetric (in a patch with the signature and symmetric gluing).
Statement
theorem Linked.symm {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {p q : Port}
(linked : P.Linked p q) (p_port : P.IsPort p) : P.Linked q p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by induction linked with | refl => exact .refl | @piece q _ ih => -- back along the piece have back_along : P.Linked (pieceEnd q) q := by -- one move along the piece from its other end have along := Linked.piece (P := P) (p := pieceEnd q) .refl rwa [pieceEnd_pieceEnd] at along exact back_along.trans ih | @edge q q' to_q across_eq ih => -- back across the edge exact (Linked.edge .refl (across_symm sig symm (to_q.valid sig p_port) across_eq)).trans ih
Statement.Patch.Linked.trans
theorem in lean/SpectreKnot/Linked.lean, line 19 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Same strand is transitive: if q is on the strand of p, and r on the strand of q, then r is on the strand of p.
Statement
theorem Linked.trans {p q r : Port} (first : P.Linked p q) (second : P.Linked q r) : P.Linked p r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by induction second with | refl => exact first | piece _ ih => exact .piece ih | edge _ across_eq ih => exact .edge ih across_eq
Statement.Patch.Linked.valid
theorem in lean/SpectreKnot/Linked.lean, line 32 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
A strand stays among the ports of actual tiles.
Statement
theorem Linked.valid {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {p q : Port} (linked : P.Linked p q)
(p_port : P.IsPort p) : P.IsPort q
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by induction linked with | refl => exact p_port | piece _ ih => -- the other end of a piece is on the same tile, at an actual vertex have end_valid := pieceEnd_valid ih.2 exact ⟨end_valid.1 ▸ ih.1, end_valid.2⟩ | edge _ across_eq ih => exact across_valid sig ih.1 ih.2 across_eq
Statement.Patch.NoClosedStrand
def in lean/SpectreKnot/Statement.lean, line 94 · read it in its file
In the statement file: read it line by line.
Doc comment
No closed strand: from every port of the patch, following the ribbon leads out of it. (A closed strand never reaches the rim.)
Statement
def NoClosedStrand : Prop := ∀ p, P.IsPort p → ∃ r, P.Follow p r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.RimChains
def in lean/SpectreKnot/Statement.lean, line 148 · read it in its file
In the statement file: read it line by line.
Doc comment
The patch is a disc at its rim: turning about each rim vertex, from the corner beside one of its rim ports, reaches the corner beside the other. So consecutive rim edges meet at the rim vertex between them.
Statement
def RimChains (o : Bool) : Prop := ∀ k, k < P.E → ∃ n, P.turns n (P.sC o k) = some (P.fC o k)
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.Surrounded
def in lean/SpectreKnot/Statement.lean, line 115 · read it in its file
In the statement file: read it line by line.
Doc comment
Vertex v_i of tile t is surrounded: turning about it, across glued edges only, comes back to where it started. (A vertex on the rim is not: turning about it reaches the rim.)
Statement
def Surrounded (t i : Nat) : Prop := ∃ n, 0 < n ∧ P.turns n (t, i) = some (t, i)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.across
def in lean/SpectreKnot/Statement.lean, line 82 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
The straight-through rule in the patch: none if the edge is on the rim.
Statement
def across (p : Port) : Option Port := straightThrough P.glue p
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.across_bport
theorem in lean/SpectreKnot/ProofExact.lean, line 102 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Nothing lies across a rim port.
Statement
theorem across_bport {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {k : Nat} (k_lt : k < P.E) (s : Bool) :
P.across (P.bport o (k, s)) = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by cases s with | true => obtain ⟨_, i_lt, unglued⟩ := sig.rim_ok k k_lt cases o <;> simp only [bport, across, straightThrough, ite_true, ite_false, Bool.false_eq_true, mod14 i_lt, unglued, Option.map_none] | false => obtain ⟨_, i_lt, unglued⟩ := sig.rim_ok _ (prv_lt k_lt) cases o <;> simp only [bport, across, straightThrough, ite_true, ite_false, Bool.false_eq_true, mod14 i_lt, unglued, Option.map_none]
Statement.Patch.across_symm
theorem in lean/SpectreKnot/Linked.lean, line 56 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Crossing an edge can be undone: in a patch with the signature and symmetric gluing, if port q lies across the edge from port p, then p lies across from q.
Statement
theorem across_symm {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {p q : Port}
(p_port : P.IsPort p) (across_eq : P.across p = some q) : P.across q = some p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (32 lines)
by obtain ⟨t, i, s⟩ := p obtain ⟨ht, hi⟩ := p_port simp only at ht hi cases s with | true => simp only [across, straightThrough] at across_eq cases glued : P.glue t i with | none => rw [glued] at across_eq; contradiction | some e => obtain ⟨t', j⟩ := e rw [glued] at across_eq simp only [Option.map_some, Option.some.injEq] at across_eq subst across_eq simp only [across, straightThrough, symm t i t' j ht hi glued, Option.map_some] | false => simp only [across, straightThrough] at across_eq cases glued : P.glue t ((i + 13) % 14) with | none => rw [glued] at across_eq; contradiction | some e => obtain ⟨t', j⟩ := e rw [glued] at across_eq simp only [Option.map_some, Option.some.injEq] at across_eq subst across_eq -- the far edge is an actual edge have hj := (sig.glue_ok t _ t' j ht (by omega) glued).2 simp only [across, straightThrough, mod14 hj, symm t _ t' j ht (by omega) glued, Option.map_some, Option.some.injEq, Prod.mk.injEq] refine ⟨trivial, ?_, trivial⟩ -- vertex `i - 1`, counted round the 14 vertices, without `%` have wrap : (i + 13) % 14 = (i + 13) - 14 ∨ (i + 13) % 14 = i + 13 := by omega rcases wrap with wrap_eq | wrap_eq <;> rw [wrap_eq] <;> omega
Statement.Patch.across_valid
theorem in lean/SpectreKnot/Bridge.lean, line 42 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
In a patch with the signature, the port across a glued edge is a port of an actual tile.
Statement
theorem across_valid {o : Bool} {A B : Nat} (has_sig : P.HasSig o A B) {p q : Port}
(t_lt : p.1 < P.tiles) (i_lt : p.2.1 < 14) (across_eq : P.across p = some q) : q.1 < P.tiles ∧ q.2.1 < 14
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (26 lines)
by obtain ⟨t, i, s⟩ := p simp only at t_lt i_lt cases s with | true => -- port `R(v_i)`, on edge `e_i` simp only [across, straightThrough] at across_eq cases glue_eq : P.glue t i with | none => rw [glue_eq] at across_eq; contradiction | some edge => obtain ⟨t', j⟩ := edge rw [glue_eq] at across_eq simp only [Option.map_some, Option.some.injEq] at across_eq subst across_eq exact has_sig.glue_ok t i t' j t_lt i_lt glue_eq | false => -- port `L(v_i)`, on edge `e_{i-1}` simp only [across, straightThrough] at across_eq cases glue_eq : P.glue t ((i + 13) % 14) with | none => rw [glue_eq] at across_eq; contradiction | some edge => obtain ⟨t', j⟩ := edge rw [glue_eq] at across_eq simp only [Option.map_some, Option.some.injEq] at across_eq subst across_eq exact ⟨(has_sig.glue_ok t _ t' j t_lt (by omega) glue_eq).1, Nat.mod_lt _ (by omega)⟩
Statement.Patch.bport
def in lean/SpectreKnot/Statement.lean, line 130 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 4.4, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
The rim ports (the paper's §4.1). The rim is listed in the orientation o: true is counter-clockwise, the way each tile's own edges run, false clockwise. Rim vertex k is where rim edge k begins. (k, true) is its port R(u_k), on rim edge k near the vertex; (k, false) is L(u_k), on rim edge k - 1 near the vertex.
Statement
def bport (o : Bool) : Nat × Bool → Port | (k, true) => if o then ((P.edgeAt k).1, (P.edgeAt k).2, true) else ((P.edgeAt k).1, ((P.edgeAt k).2 + 1) % 14, false) | (k, false) => if o then ((P.edgeAt (prv P.E k)).1, ((P.edgeAt (prv P.E k)).2 + 1) % 14, false) else ((P.edgeAt (prv P.E k)).1, (P.edgeAt (prv P.E k)).2, true)
Names in its proof
Named in the proofs of
Statement.Patch.rim_portStatement.Kids.across_rimStatement.Kids.bport_validStatement.Kids.bport_RStatement.Kids.bport_LStatement.Patch.sigCheckStatement.Patch.across_bportStatement.Patch.bport_isPortStatement.Patch.bport_injStatement.Patch.sCStatement.Patch.fCStatement.Patch.HasSigStatement.Kids.turn_fC
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.bport_inj
theorem in lean/SpectreKnot/ProofExact.lean, line 126 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Different rim ports are different ports.
Statement
theorem bport_inj {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {k k' : Nat} (k_lt : k < P.E) (k_lt' : k' < P.E)
{s s' : Bool} (same : P.bport o (k, s) = P.bport o (k', s')) : k = k' ∧ s = s'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- the rim edges at the two positions are actual edges obtain ⟨_, i_lt, _⟩ := sig.rim_ok k k_lt -- (the second) obtain ⟨_, i_lt', _⟩ := sig.rim_ok k' k_lt' -- and so are those before them obtain ⟨_, j_lt, _⟩ := sig.rim_ok _ (prv_lt k_lt) -- (the second) obtain ⟨_, j_lt', _⟩ := sig.rim_ok _ (prv_lt k_lt') -- the same edge at two rim positions: the same position have at_same : ∀ x y, x < P.E → y < P.E → (P.edgeAt x).1 = (P.edgeAt y).1 → (P.edgeAt x).2 = (P.edgeAt y).2 → x = y := fun x y x_lt y_lt same_tile same_edge => sig.rim_inj x y x_lt y_lt (Prod.ext same_tile same_edge) cases o <;> cases s <;> cases s' <;> simp only [bport, ite_true, ite_false, Bool.false_eq_true, Prod.mk.injEq, reduceCtorEq, and_false, and_true] at same ⊢ · exact prv_inj k_lt k_lt' (at_same _ _ (prv_lt k_lt) (prv_lt k_lt') same.1 (by omega)) · exact at_same _ _ k_lt k_lt' same.1 (by omega) · exact prv_inj k_lt k_lt' (at_same _ _ (prv_lt k_lt) (prv_lt k_lt') same.1 (by omega)) · exact at_same _ _ k_lt k_lt' same.1 same.2
Statement.Patch.bport_isPort
theorem in lean/SpectreKnot/ProofExact.lean, line 115 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
A rim port is a port of an actual tile.
Statement
theorem bport_isPort {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {k : Nat} (k_lt : k < P.E) (s : Bool) :
P.IsPort (P.bport o (k, s))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by cases s with | true => obtain ⟨t_lt, i_lt, _⟩ := sig.rim_ok k k_lt cases o <;> exact ⟨t_lt, by simp only [bport]; first | exact i_lt | exact Nat.mod_lt _ (by omega)⟩ | false => obtain ⟨t_lt, i_lt, _⟩ := sig.rim_ok _ (prv_lt k_lt) cases o <;> exact ⟨t_lt, by simp only [bport]; first | exact i_lt | exact Nat.mod_lt _ (by omega)⟩
Statement.Patch.chainCheck
def in lean/SpectreKnot/ProofGrand.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
The chain check, as a computation: from the start of the chain about each rim vertex, turning reaches its end within f turns.
Statement
def Patch.chainCheck (P : Patch) (o : Bool) (f : Nat) : Bool := (List.range P.E).all fun k => (List.range f).any fun n => P.turns n (P.sC o k) == some (P.fC o k)
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.chainCheck_sound
theorem in lean/SpectreKnot/ProofGrand.lean, line 32 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
The chain check is sound.
Statement
theorem Patch.chainCheck_sound {P : Patch} {o : Bool} {f : Nat} (check : P.chainCheck o f = true) :
P.RimChains o
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
intro k k_lt
simp only [Patch.chainCheck, List.all_eq_true, List.mem_range, List.any_eq_true, beq_iff_eq] at check
obtain ⟨n, _, found⟩ := check k k_lt
exact ⟨n, found⟩Statement.Patch.corner
def in lean/SpectreKnot/Statement.lean, line 138 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
In the statement file: read it line by line.
Doc comment
The corner (t, i) of a port (t, i, s): vertex v_i of tile t, which the port is beside.
Statement
def corner (p : Port) : Nat × Nat := (p.1, p.2.1)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.edgeAt
def in lean/SpectreKnot/Statement.lean, line 125 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 4.4, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
Rim edge number k.
Statement
def edgeAt (k : Nat) : Nat × Nat := P.rim.getD k (0, 0)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.fC
def in lean/SpectreKnot/Statement.lean, line 144 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
In the statement file: read it line by line.
Doc comment
The corner where turning about rim vertex k ends: beside its other rim port.
Statement
def fC (o : Bool) (k : Nat) : Nat × Nat := corner (P.bport o (k, !o))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.follow
def in lean/SpectreKnot/PatchSig.lean, line 33 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 4.4, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Following the ribbon from p, with at most f steps.
Statement
def follow : Nat → Port → Option Port | 0, _ => none | f + 1, p => match P.across (pieceEnd p) with | none => some (pieceEnd p) | some q => follow f q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.follow_sound
theorem in lean/SpectreKnot/PatchSig.lean, line 42 · read it in its file
Used, through the names in proofs, for Lemma 4.4.
Doc comment
The computation is sound: if follow finds a port within its fuel, following the ribbon really leaves the patch there.
Statement
theorem follow_sound : ∀ f p r, P.follow f p = some r → P.Follow p r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by intro f induction f with | zero => intro p r found; simp [follow] at found | succ f ih => intro p r found simp only [follow] at found cases across_eq : P.across (pieceEnd p) with | none => -- the other end of the piece is on the rim: the walk leaves there rw [across_eq] at found; simp only [Option.some.injEq] at found; subst found; exact .leave across_eq | some q => -- the ribbon crosses to `q`, and the rest of the walk starts there rw [across_eq] at found; exact .next across_eq (ih q r found)
Statement.Patch.pieceEnd_pieceEnd
theorem in lean/SpectreKnot/Linked.lean, line 47 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Theorem 9.1.
Doc comment
The other end of the piece at the other end is the port itself.
Statement
theorem pieceEnd_pieceEnd (p : Port) : pieceEnd (pieceEnd p) = p
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by obtain ⟨t, i, s⟩ := p rcases i with _ | _ | i · rfl · rfl · simp [pieceEnd]
Statement.Patch.rim_port
theorem in lean/SpectreKnot/Bridge.lean, line 88 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A port with nothing across it is a rim port: one of the two at a rim vertex.
Statement
theorem rim_port {o : Bool} {A B : Nat} (has_sig : P.HasSig o A B) {r : Port} (t_lt : r.1 < P.tiles)
(i_lt : r.2.1 < 14) (unglued : P.across r = none) : ∃ u s, u < P.E ∧ r = P.bport o (u, s)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (31 lines)
by obtain ⟨t, i, s⟩ := r simp only at t_lt i_lt -- the rim is not empty, since this port's edge is on it have rim_pos : 0 < P.E := by cases s with | true => simp only [across, straightThrough, Option.map_eq_none_iff] at unglued obtain ⟨k, k_lt, _⟩ := has_sig.rim_all t i t_lt i_lt unglued omega | false => simp only [across, straightThrough, Option.map_eq_none_iff] at unglued obtain ⟨k, k_lt, _⟩ := has_sig.rim_all t _ t_lt (Nat.mod_lt _ (by omega)) unglued omega cases s with | true => -- `R(v_i)` lies on rim edge `k`, near its start in the tile's own sense simp only [across, straightThrough, Option.map_eq_none_iff] at unglued obtain ⟨k, k_lt, at_k⟩ := has_sig.rim_all t i t_lt i_lt unglued cases o with | true => exact ⟨k, true, k_lt, by simp [bport, at_k]⟩ | false => exact ⟨nxt P.E k, false, nxt_lt k_lt, by simp [bport, prv_nxt k_lt, at_k]⟩ | false => -- `L(v_i)` lies on rim edge `k`, near its end in the tile's own sense simp only [across, straightThrough, Option.map_eq_none_iff] at unglued obtain ⟨k, k_lt, at_k⟩ := has_sig.rim_all t _ t_lt (Nat.mod_lt _ (by omega)) unglued -- the vertex after edge `e_{i-1}` is `v_i` have mod_eq : ((i + 13) % 14 + 1) % 14 = i := by omega cases o with | true => exact ⟨nxt P.E k, false, nxt_lt k_lt, by simp [bport, prv_nxt k_lt, at_k, mod_eq]⟩ | false => exact ⟨k, true, k_lt, by simp [bport, at_k, mod_eq]⟩
Statement.Patch.sC
def in lean/SpectreKnot/Statement.lean, line 141 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
In the statement file: read it line by line.
Doc comment
The corner where turning about rim vertex k starts: beside its rim port (k, o).
Statement
def sC (o : Bool) (k : Nat) : Nat × Nat := corner (P.bport o (k, o))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.sC_valid
theorem in lean/SpectreKnot/Turn.lean, line 141 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
The start of a chain is a corner of an actual tile.
Statement
theorem sC_valid {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {k : Nat} (k_lt : k < P.E) :
(P.sC o k).1 < P.tiles ∧ (P.sC o k).2 < 14
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by cases o · exact (sig.rim_ok _ (prv_lt k_lt)).imp id fun rest => rest.1 · exact (sig.rim_ok k k_lt).imp id fun rest => rest.1
Statement.Patch.side
def in lean/SpectreKnot/Statement.lean, line 118 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
**Side j of a supertile**: its rim edges from vertex j to vertex j+1.
Statement
def side (j : Nat) : List (Nat × Nat) :=
(P.rim.drop (P.vtx.getD j 0)).take (P.vtx.getD (j + 1) 0 - P.vtx.getD j 0)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.sigCheck
def in lean/SpectreKnot/PatchSig.lean, line 58 · read it in its file
Used, through the names in proofs, for Lemma 4.4.
Doc comment
The checks of HasSig, as a computation (f: the fuel for each walk).
Statement
def sigCheck (o : Bool) (A B f : Nat) : Bool := decide (0 < P.tiles) && ((List.range P.E).all fun k => decide ((P.edgeAt k).1 < P.tiles) && decide ((P.edgeAt k).2 < 14) && (P.glue (P.edgeAt k).1 (P.edgeAt k).2).isNone) && ((List.range P.E).all fun k => (List.range P.E).all fun k' => !(P.edgeAt k == P.edgeAt k') || k == k') && ((List.range P.tiles).all fun t => (List.range 14).all fun i => (P.glue t i).isSome || (List.range P.E).any fun k => P.edgeAt k == (t, i)) && ((List.range P.tiles).all fun t => (List.range 14).all fun i => match P.glue t i with | none => true | some (t', j) => decide (t' < P.tiles) && decide (j < 14)) && ((List.range P.tiles).all fun t => (List.range 14).all fun i => [true, false].all fun s => (P.follow f (t, i, s)).isSome) && ((List.range P.E).all fun k => [true, false].all fun s => P.follow f (P.bport o (k, s)) == some (P.bport o (btau A B (k, s))))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.sigCheck_sound
theorem in lean/SpectreKnot/PatchSig.lean, line 76 · read it in its file
Used, through the names in proofs, for Lemma 4.4.
Doc comment
The checker is sound: if sigCheck returns true (for any fuel), the patch has the signature at A, B.
Statement
theorem sigCheck_sound {o : Bool} {A B f : Nat} (check : P.sigCheck o A B f = true) : P.HasSig o A B
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (26 lines)
by simp only [sigCheck, Bool.and_eq_true, decide_eq_true_eq, List.all_eq_true, List.mem_range, Bool.or_eq_true, Option.isNone_iff_eq_none, Bool.not_eq_true', beq_iff_eq, List.any_eq_true, Option.isSome_iff_exists] at check obtain ⟨⟨⟨⟨⟨⟨tiles_pos, rim_ok⟩, rim_inj⟩, rim_all⟩, glue_ok⟩, all_leave⟩, sig_ok⟩ := check refine ⟨tiles_pos, fun k on_rim => ⟨(rim_ok k on_rim).1.1, (rim_ok k on_rim).1.2, (rim_ok k on_rim).2⟩, fun k k' on_rim on_rim' same_edge => ?_, fun t i is_tile is_vertex unglued => ?_, fun t i t' j is_tile is_vertex glued => ?_, fun p is_port => ?_, fun k s on_rim => ?_⟩ · -- two positions with the same edge: the check says they are equal rcases rim_inj k on_rim k' on_rim' with differ | equal · rw [same_edge] at differ; simp at differ · exact equal · -- an unglued edge: the check finds it on the rim list rcases rim_all t is_tile i is_vertex with ⟨x, glued⟩ | ⟨k, on_rim, at_k⟩ · rw [unglued] at glued; contradiction · exact ⟨k, on_rim, at_k⟩ · have bound := glue_ok t is_tile i is_vertex -- the check's bound on the edge across this glued edge rw [glued] at bound simpa using bound · obtain ⟨t, i, s⟩ := p obtain ⟨is_tile, is_vertex⟩ := is_port -- the check found where the walk from this port leaves the patch have leaves := all_leave t is_tile i is_vertex s (by cases s <;> simp) obtain ⟨r, found⟩ := leaves exact ⟨r, P.follow_sound f _ r found⟩ · have found := sig_ok k on_rim s (by cases s <;> simp) -- the walk from this rim port ends at its partner exact P.follow_sound f _ _ found
Statement.Patch.surrounded_or_chain
theorem in lean/SpectreKnot/Turn.lean, line 150 · read it in its file
Formalises Lemma 8.3 Grandparent Lemma.
Doc comment
Every corner is surrounded, or on the chain of a rim vertex (in a patch with the signature and symmetric gluing): turning backwards from it either comes round to it again, or stops at the start of the chain of a rim vertex.
Statement
theorem surrounded_or_chain {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {t i : Nat}
(t_lt : t < P.tiles) (i_lt : i < 14) :
P.Surrounded t i ∨ ∃ k, k < P.E ∧ ∃ n, P.turns n (P.sC o k) = some (t, i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (53 lines)
by by_cases stops : ∃ n, P.turnsB n (t, i) = none · -- turning backwards stops at a corner whose edge `e_i` is on the rim: the start of a chain right obtain ⟨n, stopped⟩ := stops obtain ⟨m, d, reached, nothing_behind⟩ := turnsB_stop n stopped -- turning forwards from there comes back obtain ⟨forwards, d_tile, d_vertex⟩ := turnsB_sound sig symm m t_lt i_lt reached -- the edge behind `d` is unglued have unglued : P.glue d.1 d.2 = none := by simp only [turnB, Option.map_eq_none_iff] at nothing_behind; exact nothing_behind -- so it is a rim edge obtain ⟨k, k_lt, at_k⟩ := sig.rim_all d.1 d.2 d_tile d_vertex unglued cases o · -- clockwise: rim edge `k` arrives at rim vertex `k + 1`, beside its rim port `L` refine ⟨nxt P.E k, nxt_lt k_lt, m, ?_⟩ show P.turns m (P.edgeAt (prv P.E (nxt P.E k))) = some (t, i) rw [prv_nxt k_lt, at_k] exact forwards · -- counter-clockwise: rim edge `k` leaves rim vertex `k`, beside its rim port `R` refine ⟨k, k_lt, m, ?_⟩ show P.turns m (P.edgeAt k) = some (t, i) rw [at_k] exact forwards · -- turning backwards never stops: two of the first corners agree, so the turning comes round left -- the corner reached after `n` steps back have reached : ∀ n, ∃ d, P.turnsB n (t, i) = some d := fun n => by cases back_n : P.turnsB n (t, i) with | none => exact absurd ⟨n, back_n⟩ stops | some d => exact ⟨d, rfl⟩ -- name them let y : Nat → Nat × Nat := fun n => (P.turnsB n (t, i)).getD (0, 0) -- each is reached have y_eq : ∀ n, P.turnsB n (t, i) = some (y n) := fun n => by obtain ⟨d, found⟩ := reached n simp only [y, found, Option.getD_some] -- and turning forwards from it comes back have y_back : ∀ n, P.turns n (y n) = some (t, i) ∧ (y n).1 < P.tiles ∧ (y n).2 < 14 := fun n => turnsB_sound sig symm n t_lt i_lt (y_eq n) obtain ⟨a, b, a_lt, _, same⟩ := pigeonhole (14 * P.tiles) (fun n => (y n).1 * 14 + (y n).2) (fun j _ => by have bounds := (y_back j).2 -- `y j` is a corner of an actual tile omega) -- the two corners are the same have same_corner : y a = y b := by have bounds_a := (y_back a).2 -- `y a` is a corner of an actual tile have bounds_b := (y_back b).2 -- and so is `y b` exact Prod.ext (by omega) (by omega) refine ⟨b - a, by omega, ?_⟩ -- from `y b`, `b` turns reach `(t, i)`; the first `a` of them reach `(t, i)` too, since `y b = y a` have split := turns_add (P := P) a (b - a) (y a) rw [show a + (b - a) = b by omega, same_corner, (y_back b).1, ← same_corner, (y_back a).1] at split exact split.symm
Statement.Patch.turn
def in lean/SpectreKnot/Statement.lean, line 106 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
In the statement file: read it line by line.
Doc comment
Turning about a point. Corner (t, i) is vertex v_i of tile t. If edge e_{i-1} (which ends at v_i) is glued to edge e_j of tile t', the same point is v_j of t', the next corner about it (the two tiles run along the edge in opposite directions); none if the edge is on the rim.
Statement
def turn (c : Nat × Nat) : Option (Nat × Nat) := P.glue c.1 ((c.2 + 13) % 14)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.turnB
def in lean/SpectreKnot/Turn.lean, line 76 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Turning backwards about a point: across edge e_i (which leaves v_i) of corner (t, i).
Statement
def turnB (P : Patch) (c : Nat × Nat) : Option (Nat × Nat) := (P.glue c.1 c.2).map fun e => (e.1, (e.2 + 1) % 14)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.turn_turnB
theorem in lean/SpectreKnot/Turn.lean, line 84 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Turning backwards, then forwards, comes back (with symmetric gluing).
Statement
theorem turn_turnB {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) {c d : Nat × Nat}
(c_tile : c.1 < P.tiles) (c_vertex : c.2 < 14) (back : P.turnB c = some d) :
P.turn d = some c ∧ d.1 < P.tiles ∧ d.2 < 14
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by simp only [turnB] at back cases glue_eq : P.glue c.1 c.2 with | none => rw [glue_eq] at back; contradiction | some e => rw [glue_eq] at back simp only [Option.map_some, Option.some.injEq] at back subst back -- the edge across is an actual edge obtain ⟨e_tile, e_edge⟩ := sig.glue_ok c.1 c.2 e.1 e.2 c_tile c_vertex glue_eq refine ⟨?_, e_tile, Nat.mod_lt _ (by omega)⟩ simp only [turn, mod14 e_edge] exact symm c.1 c.2 e.1 e.2 c_tile c_vertex glue_eq
Statement.Patch.turn_valid
theorem in lean/SpectreKnot/Turn.lean, line 69 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning keeps to the corners of actual tiles.
Statement
theorem turn_valid {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {c d : Nat × Nat} (c_tile : c.1 < P.tiles)
(turned : P.turn c = some d) : d.1 < P.tiles ∧ d.2 < 14
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
sig.glue_ok c.1 _ d.1 d.2 c_tile (Nat.mod_lt _ (by omega)) turnedStatement.Patch.turns
def in lean/SpectreKnot/Statement.lean, line 109 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
In the statement file: read it line by line.
Doc comment
Turning n times about a point, across glued edges only.
Statement
def turns : Nat → Nat × Nat → Option (Nat × Nat)
| 0, c => some c
| n + 1, c => (P.turn c).bind (turns n)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.turnsB
def in lean/SpectreKnot/Turn.lean, line 79 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Turning backwards n times.
Statement
def turnsB (P : Patch) : Nat → Nat × Nat → Option (Nat × Nat)
| 0, c => some c
| n + 1, c => (P.turnB c).bind (P.turnsB n)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Patch.turnsB_sound
theorem in lean/SpectreKnot/Turn.lean, line 101 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Turning backwards n times to d, then forwards n times, comes back.
Statement
theorem turnsB_sound {o : Bool} {A B : Nat} (sig : P.HasSig o A B) (symm : P.GlueSymm) :
∀ n {c d : Nat × Nat}, c.1 < P.tiles → c.2 < 14 → P.turnsB n c = some d →
P.turns n d = some c ∧ d.1 < P.tiles ∧ d.2 < 14
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by intro n induction n with | zero => intro c d c_tile c_vertex back; cases back; exact ⟨rfl, c_tile, c_vertex⟩ | succ n ih => intro c d c_tile c_vertex back simp only [turnsB] at back cases back_eq : P.turnB c with | none => rw [back_eq] at back; contradiction | some c₁ => rw [back_eq] at back -- one step back, and forwards again have one := turn_turnB sig symm c_tile c_vertex back_eq -- the other `n` steps have rest := ih one.2.1 one.2.2 back refine ⟨?_, rest.2⟩ rw [turns_succ', rest.1] exact one.1
Statement.Patch.turnsB_stop
theorem in lean/SpectreKnot/Turn.lean, line 123 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
If turning backwards stops within n steps, it stops at some corner with nothing behind it.
Statement
theorem turnsB_stop : ∀ n {c : Nat × Nat}, P.turnsB n c = none → ∃ m d, P.turnsB m c = some d ∧ P.turnB d = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by intro n induction n with | zero => intro c stopped; simp [turnsB] at stopped | succ n ih => intro c stopped simp only [turnsB] at stopped cases back_eq : P.turnB c with | none => exact ⟨0, c, rfl, back_eq⟩ | some c₁ => rw [back_eq] at stopped obtain ⟨m, d, reached, stops⟩ := ih stopped exact ⟨m + 1, d, by simp only [turnsB, back_eq]; exact reached, stops⟩
Statement.Patch.turns_add
theorem in lean/SpectreKnot/Turn.lean, line 50 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning n times, then m more.
Statement
theorem turns_add (n m : Nat) (c : Nat × Nat) : P.turns (n + m) c = (P.turns n c).bind (P.turns m)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by induction n generalizing c with | zero => simp [turns] | succ n ih => rw [Nat.add_right_comm] simp only [turns, Option.bind_assoc] congr 1 funext y exact ih y
Statement.Patch.turns_succ'
theorem in lean/SpectreKnot/Turn.lean, line 61 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning n + 1 times is turning n times, then once more.
Statement
theorem turns_succ' (n : Nat) (c : Nat × Nat) : P.turns (n + 1) c = (P.turns n c).bind P.turn
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by rw [turns_add] congr 1 funext y show (P.turn y).bind (P.turns 0) = P.turn y cases P.turn y <;> rfl
Statement.Port
abbrev in lean/SpectreKnot/Statement.lean, line 44 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
A port (t, i, s): a ribbon end on an edge of tile t, beside its vertex v_i (i = 0 … 13, numbered counter-clockwise; edge e_i runs from v_i to v_{i+1}). s = true is R(v_i), on edge e_i; s = false is L(v_i), on edge e_{i-1}. Each tile has 28 ports.
Statement
abbrev Port := Nat × Nat × Bool
Names in its proof
none
Named in the proofs of
Statement.shiftPStatement.ZpStatement.Chain.gPStatement.hookAtStatement.NPortStatement.gPStatement.toBlockStatement.Patch.IsPortStatement.Patch.acrossStatement.Patch.FollowStatement.Patch.LinkedStatement.Patch.cornerStatement.upPortStatement.Tiling.acrossStatement.Tiling.forwardStatement.Tiling.backwardStatement.TheoremB_strandStatement.TheoremA_strand
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Reach
def in lean/SpectreKnot/ProofB.lean, line 192 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
x is on the strand of the hook at a vertex inside side J of N_n.
Statement
def Reach (n J : Nat) (x : Port) : Prop := (N n).IsPort x ∧ ∃ v, Inside n J v ∧ (N n).Linked x ((N n).bport (ori n) (v, true))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.SignatureTheorem
def in lean/SpectreKnot/Statement.lean, line 263 · read it in its file
Used, through the names in proofs, for Theorem 7.6.
In the statement file: read it line by line.
Doc comment
The Signature Theorem (the paper's Thm 7.6, for every level m ≥ 1). With its rim listed in its own orientation (counter-clockwise at even levels, clockwise at odd ones), every supertile super m K is a disc at its rim, and has the signature at its crossover corners: A (cornerA, a rim vertex) and B = A + ω_m (cornerB). (Proved in ProofGrand.lean.)
Statement
def SignatureTheorem : Prop := ∀ m K, 1 ≤ m → cornerA m K < (super m K).E ∧ (super m K).RimChains (m % 2 == 0) ∧ (super m K).HasSig (m % 2 == 0) (cornerA m K) (cornerB m K)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.StepOK
def in lean/SpectreKnot/StepMap.lean, line 50 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The junction map holds: the walk from every port of child 1 (outside side 2) ends at a port of the parent hook at the junction tgt names.
Statement
def StepOK (L : Nat → Nat → Nat) (d : Nat) (ω : Bool) : Prop := ∀ u, u < pos (L 1) 6 → ∀ s q, tgt ω (L 1) u s = some q → ∃ r, (Comp.ofLens .Delta L d ω).toGluing.FullReach (1, u, s) r ∧ (r = jR L q ∨ r = jL L q)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.StepOK.congr
theorem in lean/SpectreKnot/StepMap.lean, line 558 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The junction map depends only on the lengths of actual sides (and on d only through the Σ child).
Statement
theorem StepOK.congr {L L' : Nat → Nat → Nat} {d d' : Nat} {ω : Bool}
(same_len : ∀ c, c < nk .Delta → ∀ j, j < 6 → L c j = L' c j)
(same_d : ∀ c, c < nk .Delta → kidAt .Delta c = .Sigma → d = d') (holds' : StepOK L' d' ω) : StepOK L d ω
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (22 lines)
by -- the corners are in the same places have same_pos : ∀ c, c < nk .Delta → ∀ v, v ≤ 6 → pos (L c) v = pos (L' c) v := fun c hc v _ => pos_congr v (fun i hi => same_len c hc i (by omega)) -- child 1 is an actual child have one_lt : 1 < nk .Delta := by decide intro u hu s q tgt_eq -- the junction is one of the pieces `1 … 21` obtain ⟨q_pos, q_lt⟩ := tgt_lt tgt_eq rw [tgt_congr (f := L' 1) (fun k hk => (same_pos 1 one_lt k hk).symm)] at tgt_eq obtain ⟨r, walk, at_junction⟩ := holds' u (by rw [← same_pos 1 one_lt 6 (by omega)]; exact hu) s q tgt_eq refine ⟨r, by rw [ofLens_congr same_len same_d]; exact walk, ?_⟩ -- pieces `q` and `q - 1` are sides of actual children obtain ⟨child_lt, side_lt⟩ := piece_ok q q_lt obtain ⟨child_lt', side_lt'⟩ := piece_ok (q - 1) (by omega) -- so the junction's port `R` is the same with either lengths have same_jR : jR L q = jR L' q := by simp only [jR, same_pos _ child_lt _ (show ((pieceD q).2 + 1) % 6 ≤ 6 by omega)] -- and so is its port `L` have same_jL : jL L q = jL L' q := by simp only [jL, same_pos _ child_lt' _ (show (pieceD (q - 1)).2 ≤ 6 by omega)] rw [same_jR, same_jL]; exact at_junction
Statement.StepOK.move
theorem in lean/SpectreKnot/StepMap.lean, line 379 · read it in its file
Formalises Lemma 9.3 The junction map.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1.
Doc comment
The map survives a move whose cut, if on child 1, is at least two edges from either end of its side.
Statement
theorem StepOK.move (clear₀ : μ.c₀ = 1 → 2 ≤ μ.r₀ ∧ μ.r₀ + 3 ≤ L 1 μ.j₀)
(clear₁ : μ.two .Delta = true → μ.c₁ .Delta = 1 → 2 ≤ μ.r₁ L ∧ μ.r₁ L + 3 ≤ L 1 (μ.j₁ .Delta))
(old_map : StepOK L d ω) : StepOK (μ.lens .Delta L) (μ.d' .Delta L d) ω
Names in its proof
Compose.Move.OK.cutOKCompose.Move.OK.sh_lastCompose.Move.OK.sh_oneCompose.Move.OK.shposCompose.Move.OK.sibCompose.adjAtCompose.nkCompose.ofLens_ECompose.ofLens_nCompose.posCompose.pos_monoCompose.pos_succGluing.Cut.OK.nw0_1FGluing.Cut.OK.nw0_1TGluing.Cut.OK.nw0_2FGluing.Cut.OK.nw0_2TGluing.Cut.OK.nw1_1FGluing.Cut.OK.nw1_1TGluing.Cut.OK.nw1_2FGluing.Cut.OK.nw1_2TGluing.Cut.OK.port_reachGluing.Cut.OK.preimageGluing.Cut.OK.sh_lt_iffGluing.Cut.OK.wf_subdivGluing.Equiv.fullReachGluing.FullReachStatement.adj_one_noneStatement.corner_oneStatement.jLStatement.jRStatement.port_jLStatement.port_jRStatement.sh_zeroStatement.sideTgtStatement.tgtStatement.tgt_ltStatement.tgt_mapStatement.tgt_side
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (166 lines)
by intro u' hu' s q tgt_eq -- the cut can be made have cut_ok := ok.cutOK -- and the cut gluing is well formed have wf_cut := cut_ok.wf_subdiv -- child 1 is an actual child have one_lt : 1 < nk .Delta := by decide -- child 1's rim, before the move have rim_old : (G₀).E 1 = pos (L 1) 6 := ofLens_E one_lt -- and after the cut have rim_cut : (Gs).E 1 = pos (μ.lens .Delta L 1) 6 := by rw [← ok.E_eq one_lt, ofLens_E one_lt] -- the junction is one of the pieces `1 … 21` obtain ⟨q_pos, q_lt⟩ := tgt_lt tgt_eq -- the end: from the subdivided gluing to the new composition have to_new : ∀ r, (Gs).FullReach (1, u', s) ((κ).port r) → (r = jR L q ∨ r = jL L q) → ∃ r', (G₁).FullReach (1, u', s) r' ∧ (r' = jR (μ.lens .Delta L) q ∨ r' = jL (μ.lens .Delta L) q) := by intro r cut_walk at_junction refine ⟨_, ok.equiv.symm.fullReach wf_cut ⟨?_, ?_⟩ cut_walk, ?_⟩ · show 1 < (G₀).n rw [ofLens_n]; exact one_lt · show u' < (Gs).E 1 rw [rim_cut]; exact hu' · rcases at_junction with rfl | rfl · exact Or.inl (port_jR ok q_lt) · exact Or.inr (port_jL ok q_pos q_lt) by_cases new₀ : 1 = (κ).c₀ ∧ (κ).e₀ < u' ∧ u' ≤ (κ).e₀ + 2 · -- a new vertex of child `c₀ = 1` obtain ⟨is_c₀, after_cut, within_cut⟩ := new₀ -- the move is on child 1 have μ_c₀ : μ.c₀ = 1 := is_c₀.symm -- and so is the cut have κ_c₀ : (κ).c₀ = 1 := is_c₀.symm -- the cut is two edges clear of both ends of side `j₀` obtain ⟨clear_start, clear_end⟩ := clear₀ μ_c₀ -- `j₀` is a side have j₀_lt := ok.j₀ -- side `j₀` starts where it did have start_j₀ := ok.pos_c₀ μ.j₀ -- and ends two edges later have end_j₀ := ok.pos_c₀ (μ.j₀ + 1) rw [μ_c₀] at start_j₀ end_j₀ rw [ite_eq_right (by omega)] at start_j₀ rw [ite_eq_left (by omega)] at end_j₀ -- side `j₀` has `L 1 j₀` edges have side_len := pos_succ (L 1) μ.j₀ -- and lies within the rim have side_in_rim := pos_mono (L 1) (show μ.j₀ + 1 ≤ 6 by omega) -- where the cut edge is have cut_at : (κ).e₀ = pos (L 1) μ.j₀ + μ.r₀ := by show pos (L μ.c₀) μ.j₀ + μ.r₀ = _; rw [μ_c₀] -- the new vertex is well inside side `j₀` rw [tgt_side s j₀_lt (by omega) (by omega)] at tgt_eq cases glued : μ.two .Delta · -- a rim side: it is side 2, where the map is not defined -- the only rim side of child 1 is side 2 have side_two : μ.j₀ = 2 := by apply adj_one_none _ j₀_lt -- side `j₀` of child 1 has no sibling have no_sib : (adjAt .Delta μ.c₀ μ.j₀).isSome = false := glued rw [μ_c₀] at no_sib cases adj : adjAt .Delta 1 μ.j₀ with | none => rfl | some _ => rw [adj] at no_sib; contradiction rw [side_two] at tgt_eq; simp [sideTgt] at tgt_eq · have cut_shared : (κ).two = true := glued -- the cut edge is shared with a sibling -- the old vertices next to the cut lie well inside side `j₀` too, with the same junction have old_tgt : ∀ x, x = (κ).e₀ ∨ x = (κ).e₀ + 1 → tgt ω (L 1) x s = some q := by intro x next_to_cut rw [tgt_side s j₀_lt (by omega) (by omega)]; exact tgt_eq rcases (show u' = (κ).e₀ + 1 ∨ u' = (κ).e₀ + 2 by omega) with rfl | rfl · -- new vertex `e₀ + 1` follows the old `e₀ + 1` obtain ⟨r, old_walk, at_junction⟩ := old_map _ (by omega) s q (old_tgt _ (Or.inr rfl)) refine to_new r ?_ at_junction cases s · -- port `L` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw0_1F cut_shared (r := r) (by rw [κ_c₀]; exact old_walk) rw [κ_c₀] at new_walk; exact new_walk · -- port `R` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw0_1T cut_shared (by rw [κ_c₀]; exact corner_one (by omega) (by omega)) (r := r) (by rw [κ_c₀]; exact old_walk) rw [κ_c₀] at new_walk; exact new_walk · -- new vertex `e₀ + 2` follows the old `e₀` obtain ⟨r, old_walk, at_junction⟩ := old_map _ (by omega) s q (old_tgt _ (Or.inl rfl)) refine to_new r ?_ at_junction cases s · -- port `L` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw0_2F cut_shared (by rw [κ_c₀]; exact corner_one (by omega) (by omega)) (r := r) (by rw [κ_c₀]; exact old_walk) rw [κ_c₀] at new_walk; exact new_walk · -- port `R` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw0_2T cut_shared (r := r) (by rw [κ_c₀]; exact old_walk) rw [κ_c₀] at new_walk; exact new_walk · by_cases new₁ : (κ).two = true ∧ 1 = (κ).c₁ ∧ (κ).e₁ < u' ∧ u' ≤ (κ).e₁ + 2 · -- a new vertex of child `c₁ = 1` obtain ⟨cut_shared, is_c₁, after_cut, within_cut⟩ := new₁ -- the side cut is glued to a sibling have shared : μ.two .Delta = true := cut_shared -- the sibling is child 1 have μ_c₁ : μ.c₁ .Delta = 1 := is_c₁.symm -- and so is the cut's second child have κ_c₁ : (κ).c₁ = 1 := is_c₁.symm -- the cut is two edges clear of both ends of side `j₁` obtain ⟨clear_start, clear_end⟩ := clear₁ shared μ_c₁ -- `j₁` is a side have j₁_lt := (ok.sib shared).2.1 -- side `j₁` is as long as side `j₀` have same_len := ok.L₁ shared -- the cut edge is not the last edge of side `j₁` have r₁_le := ok.r₁_le -- side `j₁` starts where it did have start_j₁ := ok.pos_c₁ shared (μ.j₁ .Delta) -- and ends two edges later have end_j₁ := ok.pos_c₁ shared (μ.j₁ .Delta + 1) rw [μ_c₁] at start_j₁ end_j₁ same_len rw [ite_eq_right (by omega)] at start_j₁ rw [ite_eq_left (by omega)] at end_j₁ -- side `j₁` has `L 1 j₁` edges have side_len := pos_succ (L 1) (μ.j₁ .Delta) -- and lies within the rim have side_in_rim := pos_mono (L 1) (show μ.j₁ .Delta + 1 ≤ 6 by omega) -- where the cut edge is have cut_at : (κ).e₁ = pos (L 1) (μ.j₁ .Delta) + μ.r₁ L := by show pos (L (μ.c₁ .Delta)) (μ.j₁ .Delta) + μ.r₁ L = _; rw [μ_c₁] -- the new vertex is well inside side `j₁` rw [tgt_side s j₁_lt (by omega) (by omega)] at tgt_eq -- the old vertices next to the cut lie well inside side `j₁` too, with the same junction have old_tgt : ∀ x, x = (κ).e₁ ∨ x = (κ).e₁ + 1 → tgt ω (L 1) x s = some q := by intro x next_to_cut rw [tgt_side s j₁_lt (by omega) (by omega)]; exact tgt_eq rcases (show u' = (κ).e₁ + 1 ∨ u' = (κ).e₁ + 2 by omega) with rfl | rfl · -- new vertex `e₁ + 1` follows the old `e₁ + 1` obtain ⟨r, old_walk, at_junction⟩ := old_map _ (by omega) s q (old_tgt _ (Or.inr rfl)) refine to_new r ?_ at_junction cases s · -- port `L` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw1_1F cut_shared (r := r) (by rw [κ_c₁]; exact old_walk) rw [κ_c₁] at new_walk; exact new_walk · -- port `R` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw1_1T cut_shared (by rw [κ_c₁]; exact corner_one (by omega) (by omega)) (r := r) (by rw [κ_c₁]; exact old_walk) rw [κ_c₁] at new_walk; exact new_walk · -- new vertex `e₁ + 2` follows the old `e₁` obtain ⟨r, old_walk, at_junction⟩ := old_map _ (by omega) s q (old_tgt _ (Or.inl rfl)) refine to_new r ?_ at_junction cases s · -- port `L` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw1_2F cut_shared (by rw [κ_c₁]; exact corner_one (by omega) (by omega)) (r := r) (by rw [κ_c₁]; exact old_walk) rw [κ_c₁] at new_walk; exact new_walk · -- port `R` -- in the cut gluing, the walk from the new vertex ends where the old walk did have new_walk := cut_ok.nw1_2T cut_shared (r := r) (by rw [κ_c₁]; exact old_walk) rw [κ_c₁] at new_walk; exact new_walk · -- an old vertex obtain ⟨u, hu, rfl⟩ := cut_ok.preimage (c := 1) (by rw [rim_cut]; exact hu') new₀ new₁ rw [tgt_map (fun a b => cut_ok.sh_lt_iff) (sh_zero ok) (ok.sh_one 1) (ok.sh_last one_lt) (fun k hk => ok.shpos one_lt hk)] at tgt_eq obtain ⟨r, old_walk, at_junction⟩ := old_map u (by rw [← rim_old]; exact hu) s q tgt_eq exact to_new r (cut_ok.port_reach ⟨by rw [ofLens_n]; exact one_lt, hu⟩ old_walk) at_junction
Statement.TheoremA
def in lean/SpectreKnot/Statement.lean, line 270 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 7.6, Theorem 9.1.
In the statement file: read it line by line.
Doc comment
No supertile contains a closed strand: the last sentence of the paper's Thm 7.6, at every level, level 0 included (Theorem A for supertiles, in combinatorial form). The paper's Theorem A itself, for tilings, is TheoremA_strand (§7). (Proved in ProofA.lean.)
Statement
def TheoremA : Prop := ∀ m K, (super m K).NoClosedStrand
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.TheoremA_strand
def in lean/SpectreKnot/Statement.lean, line 465 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
Theorem A in strand form: in a tiling whose hierarchy covers the plane, every strand is two-way infinite. For any chain that covers, any tiling T of its union that contains every block, and any port p: (1) forwards, no port is met twice; (2) backwards, no port is met twice; (3) no port is met both backwards and forwards, except the start; (4) no piece is run through twice. (Proved in ProofChain.lean.)
Statement
def TheoremA_strand : Prop := ∀ (X : Chain) (T : Tiling), X.Covers → X.Contains T → ∀ p : Port, p.2.1 < 14 → (∀ i j, iter T.forward i p = iter T.forward j p → i = j) ∧ (∀ a a', iter T.backward a p = iter T.backward a' p → a = a') ∧ (∀ a b, iter T.backward a p = iter T.forward b p → a = 0 ∧ b = 0) ∧ (∀ i j, iter T.forward j p ≠ pieceEnd (iter T.forward i p))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.TheoremB
def in lean/SpectreKnot/Statement.lean, line 276 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
In the statement file: read it line by line.
Doc comment
Theorem B (combinatorial form), three claims about the nest: (1) every edge of a block N_b (b ≥ 1) is glued to a tile in N_{b+2}: the nest has no boundary; (2) no block contains a closed strand; (3) any two ports of a block lie on the same strand of a larger block. (Proved in ProofB.lean.)
Statement
def TheoremB : Prop := (∀ b, 1 ≤ b → ∀ t i, t < (N b).tiles → i < 14 → ((N (b + 2)).glue (up b 2 t) i).isSome) ∧ (∀ b, (N b).NoClosedStrand) ∧ (∀ b p q, (N b).IsPort p → (N b).IsPort q → ∃ k, (N (b + k)).Linked (upPort b k p) (upPort b k q))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.TheoremB_exact
def in lean/SpectreKnot/Statement.lean, line 298 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
In the statement file: read it line by line.
Doc comment
The bound is exact (the last two rows of the paper's Table 5): for b ≥ 1, the ports of N_b lie on two strands of N_{b+2}, and, if b is odd, on two strands of N_{b+3}. With TheoremB_sharp: on 2, 1, 1 strands of N_{b+2}, N_{b+3}, N_{b+4} if b is even, and on 2, 2, 1 if b is odd. (Proved in ProofExact.lean.)
Statement
def TheoremB_exact : Prop := ∀ b, 1 ≤ b → TwoStrands b 2 ∧ (b % 2 = 1 → TwoStrands b 3)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.TheoremB_sharp
def in lean/SpectreKnot/Statement.lean, line 283 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
In the statement file: read it line by line.
Doc comment
Theorem B with the paper's bound: for b ≥ 1, any two ports of N_b lie on one strand of N_{b+4}, and of N_{b+3} if b is even. (Proved in ProofB.lean.)
Statement
def TheoremB_sharp : Prop := ∀ b p q, 1 ≤ b → (N b).IsPort p → (N b).IsPort q → (N (b + 4)).Linked (upPort b 4 p) (upPort b 4 q) ∧ (b % 2 = 0 → (N (b + 3)).Linked (upPort b 3 p) (upPort b 3 q))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.TheoremB_strand
def in lean/SpectreKnot/Statement.lean, line 378 · read it in its file
Used, through the names in proofs, for Theorem B.
In the statement file: read it line by line.
Doc comment
Theorem B, final form: one two-way infinite strand. Start at R(v_0) of the original tile, (0, 0, true), and step forwards and backwards along its strand: (1) forwards, no port is met twice; (2) backwards, no port is met twice; (3) no port is met both backwards and forwards, except the start; (4) no piece is run through twice; (5) every port of every tile is met, or is the other end of the piece of one that is. (Proved in ProofStrand.lean.)
Statement
def TheoremB_strand : Prop := (∀ i j, iter nestTiling.forward i (0, 0, true) = iter nestTiling.forward j (0, 0, true) → i = j) ∧ (∀ a a', iter nestTiling.backward a (0, 0, true) = iter nestTiling.backward a' (0, 0, true) → a = a') ∧ (∀ a b, iter nestTiling.backward a (0, 0, true) = iter nestTiling.forward b (0, 0, true) → a = 0 ∧ b = 0) ∧ (∀ i j, iter nestTiling.forward j (0, 0, true) ≠ pieceEnd (iter nestTiling.forward i (0, 0, true))) ∧ (∀ q : Port, q.2.1 < 14 → ∃ k, q = iter nestTiling.forward k (0, 0, true) ∨ q = iter nestTiling.backward k (0, 0, true) ∨ q = pieceEnd (iter nestTiling.forward k (0, 0, true)) ∨ q = pieceEnd (iter nestTiling.backward k (0, 0, true)))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Tiling
structure in lean/SpectreKnot/Statement.lean, line 311 · read it in its file
Used, through the names in proofs, for Theorem A.
In the statement file: read it line by line.
Doc comment
A tiling: infinitely many tiles, numbered 0, 1, 2, …, and what lies across each edge, glue, as in a patch. It is not a patch: it has no number of tiles and no rim, and the notions of §2 (IsPort, NoClosedStrand, …) are not defined for it. Its strands are followed one step at a time.
Statement
structure Tiling where glue : Nat → Nat → Option (Nat × Nat)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Tiling.across
def in lean/SpectreKnot/Statement.lean, line 319 · read it in its file
In the statement file: read it line by line.
Doc comment
The straight-through rule in the tiling.
Statement
def across (p : Port) : Option Port := straightThrough T.glue p
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Tiling.backward
def in lean/SpectreKnot/Statement.lean, line 325 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
In the statement file: read it line by line.
Doc comment
One step backwards: across the edge at p, then along the piece.
Statement
def backward (p : Port) : Port := pieceEnd ((T.across p).getD p)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Tiling.forward
def in lean/SpectreKnot/Statement.lean, line 322 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
In the statement file: read it line by line.
Doc comment
One step forwards along a strand: along the piece at p, then across the edge.
Statement
def forward (p : Port) : Port := (T.across (pieceEnd p)).getD (pieceEnd p)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.TwoStrands
def in lean/SpectreKnot/Statement.lean, line 290 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
In the statement file: read it line by line.
Doc comment
k levels up, the ports of N_b lie on exactly two strands of N_{b+k}: there are two ports p, q of N_b that are not on one strand there, and every port of N_b is on the strand of one of them.
Statement
def TwoStrands (b k : Nat) : Prop := ∃ p q, (N b).IsPort p ∧ (N b).IsPort q ∧ ¬ (N (b + k)).Linked (upPort b k p) (upPort b k q) ∧ ∀ x, (N b).IsPort x → (N (b + k)).Linked (upPort b k x) (upPort b k p) ∨ (N (b + k)).Linked (upPort b k x) (upPort b k q)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.Zp
def in lean/SpectreKnot/ProofB.lean, line 310 · read it in its file
Doc comment
The hook at junction 12 of N_{n+1}, where every strand of the block three or four levels down ends up.
Statement
def Zp (n : Nat) : Port := (N (n + 1)).bport (ori (n + 1)) (jpos (Lk n .Delta) 12, true)
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.aPos
def in lean/SpectreKnot/PatchSig.lean, line 134 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The crossover corner A of a level-m K-supertile: vertex 0, or for Σ the point d_m along side 5 (Lemma 6.4).
Statement
def aPos (m : Nat) (K : Kind) : Nat := if K = .Sigma then vpos m K 5 + dOff m else 0
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.aPos_succ
theorem in lean/SpectreKnot/ProofA.lean, line 84 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**The parent's corner A**: where the induction puts it (aPos, Lemma 6.4) is the rim position cA of its Γ child's corner A (Table 3). For a Σ parent, d_{m+1} is the length of the pieces 0.2, 0.1, 7.0.
Statement
theorem aPos_succ {m : Nat} (m_pos : 1 ≤ m) (T : Kind) : aPos (m + 1) T = cA T (Lk m T)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ by_cases is_sigma : T = .Sigma · subst is_sigma -- `d_{m+1}` is the length of the first three pieces of side 5 have dOff_eq : dOff (m' + 2) = Lk (m' + 1) .Sigma 0 2 + Lk (m' + 1) .Sigma 0 1 + Lk (m' + 1) .Sigma 7 0 := by simp only [dOff, sigma_side5_start.1, List.map_cons, List.map_nil, List.sum_cons, List.sum_nil, Lk] rw [sideLen_eq_letterLen _ (by omega) _ 2 (by omega), sideLen_eq_letterLen _ (by omega) _ 1 (by omega), sideLen_eq_letterLen _ (by omega) _ 0 (by omega)] omega simp only [aPos, cA] rw [vpos_eq m_pos _ (by omega), ← totL_take _ _ 5 (by omega), preS_eq, totL_append, dOff_eq] simp [totL]; omega · simp only [aPos, cA, ite_eq_right is_sigma]
Statement.across_gP
theorem in lean/SpectreKnot/ProofStrand.lean, line 478 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Across a port of N_b, the nest tiling continues as N_b does.
Statement
theorem across_gP {b : Nat} {p q : Port} (p_port : (N b).IsPort p) (across_p : (N b).across p = some q) :
nestTiling.across (gP b p) = some (gP b q)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (30 lines)
by obtain ⟨t, i, s⟩ := p obtain ⟨ht, hi⟩ := p_port simp only at ht hi -- the port, renumbered have renumbered : gP b (t, i, s) = (gid b t, i, s) := rfl rw [renumbered] cases s with | true => simp only [Patch.across, straightThrough] at across_p cases glued : (N b).glue t i with | none => rw [glued] at across_p; contradiction | some e => obtain ⟨t', j⟩ := e rw [glued] at across_p simp only [Option.map_some, Option.some.injEq] at across_p subst across_p show (nestGlue (gid b t) i).map _ = _ rw [nestGlue_ext ht hi glued]; rfl | false => simp only [Patch.across, straightThrough] at across_p cases glued : (N b).glue t ((i + 13) % 14) with | none => rw [glued] at across_p; contradiction | some e => obtain ⟨t', j⟩ := e rw [glued] at across_p simp only [Option.map_some, Option.some.injEq] at across_p subst across_p show (nestGlue (gid b t) ((i + 13) % 14)).map _ = _ rw [nestGlue_ext ht (by omega) glued]; rfl
Statement.across_isSome
theorem in lean/SpectreKnot/ProofStrand.lean, line 511 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Where every edge of a tile is glued, something lies across every port of it.
Statement
theorem across_isSome {P : Patch} {t : Nat} (all_glued : ∀ i, i < 14 → (P.glue t i).isSome) {q : Port}
(on_tile : q.1 = t) (hi : q.2.1 < 14) : (P.across q).isSome
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by obtain ⟨t', i, s⟩ := q simp only at on_tile hi subst on_tile cases s with | true => -- port `R(v_i)` lies on edge `e_i`, which is glued have edge := all_glued i hi simp only [Patch.across, straightThrough] cases glued : P.glue t' i with | none => rw [glued] at edge; contradiction | some _ => rfl | false => -- port `L(v_i)` lies on edge `e_{i-1}`, which is glued have edge := all_glued ((i + 13) % 14) (by omega) simp only [Patch.across, straightThrough] cases glued : P.glue t' ((i + 13) % 14) with | none => rw [glued] at edge; contradiction | some _ => rfl
Statement.adj_one_none
theorem in lean/SpectreKnot/StepMap.lean, line 285 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Child 1 of Δ has only one side on the parent's rim: side 2.
Statement
theorem adj_one_none : ∀ j, j < 6 → adjAt .Delta 1 j = none → j = 2
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.adv_none
theorem in lean/SpectreKnot/ProofB.lean, line 179 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
From a vertex inside side 2 of N_n (on the parent's rim), the strand is, one level up, on the hook at the same vertex of N_{n+1}.
Statement
theorem adv_none {n : Nat} (n_pos : 1 ≤ n) {v : Nat} (inside : Inside n 2 v) :
(N (n + 1)).Linked (upPort n 1 ((N n).bport (ori n) (v, true)))
((N (n + 1)).bport (ori (n + 1)) (stp (Lk n .Delta) v, true))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- `v` lies at least two vertices after the start of side 2 have after_start := inside.1 -- and two before its end, vertex `pos 3` have before_three : v + 2 ≤ pos (Lk n .Delta 1) 3 := inside.2 rw [stretch_eq n_pos (by omega) (by omega), Bool.not_true] -- the parent vertex lies inside side 4 of `N_{n+1}`, so it is a hook have stp_inside := inside_stp n_pos (show pos (Lk n .Delta 1) 2 < v by omega) (by omega) exact hook (by omega) (inside_bounds (by omega) stp_inside).1 (inside_bounds (by omega) stp_inside).2
Statement.adv_some
theorem in lean/SpectreKnot/ProofB.lean, line 169 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
From a vertex inside side J of N_n where the map names junction q, the strand runs on, one level up, to the hook at junction q of N_{n+1}.
Statement
theorem adv_some {n : Nat} (n_pos : 1 ≤ n) {J v q : Nat} (hJ : J < 6) (inside : Inside n J v)
(side_tgt : sideTgt (ori n) J = some q) :
(N (n + 1)).Linked (upPort n 1 ((N n).bport (ori n) (v, true)))
((N (n + 1)).bport (ori (n + 1)) (jpos (Lk n .Delta) q, true))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- `v` is a rim vertex of `N_n`, away from the corners have v_bounds := inside_bounds hJ inside exact step_tile n_pos (by omega) (by rw [tgt_side true hJ inside.1 inside.2]; exact side_tgt)
Statement.all_same
theorem in lean/SpectreKnot/ProofStrand.lean, line 697 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Any two ports of the nest tiling lie on one strand: both tiles lie in a large enough block.
Statement
theorem all_same (x y : NPort) : nestSys.Same x y
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- `N_{x+y+1}` contains both tiles have big := tiles_ge (x.1.1 + y.1.1 + 1) exact same_in_block (b := x.1.1 + y.1.1 + 1) (by omega) (by omega) (by omega)
Statement.bPos
def in lean/SpectreKnot/PatchSig.lean, line 137 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The other crossover corner B = A + ω_m.
Statement
def bPos (m : Nat) (K : Kind) : Nat := if ori m then nxt (vpos m K 6) (aPos m K) else prv (vpos m K 6) (aPos m K)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.bPos_succ
theorem in lean/SpectreKnot/ProofA.lean, line 102 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**The parent's corner B**: where the induction puts it (bPos, B = A + ω_{m+1}) is the rim position cB of its Γ child's corner B.
Statement
theorem bPos_succ {m : Nat} (m_pos : 1 ≤ m) (T : Kind) : bPos (m + 1) T = cB T (Lk m T) (ori m)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
simp only [bPos, cB, aPos_succ m_pos T, ori_succ]
rw [vpos_eq m_pos T (Nat.le_refl _), ← rimN_eq]Statement.bstep
def in lean/SpectreKnot/Turn.lean, line 213 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
One step of turning about a point, at the level of the children's rim vertices, in the sense in which turning about a tile vertex goes. For children oriented clockwise (o = false), across the edge that leaves the vertex, as Rot; for children oriented counter-clockwise, across the edge that arrives, as RotB.
Statement
def bstep (G : Gluing) (o : Bool) (x : Nat × Nat) : Option (Nat × Nat) := if o then G.mate x.1 (prv (G.E x.1) x.2) else (G.mate x.1 x.2).map fun e => (e.1, nxt (G.E e.1) e.2)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.bsteps
def in lean/SpectreKnot/Turn.lean, line 217 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
n such steps.
Statement
def bsteps (G : Gluing) (o : Bool) : Nat → Nat × Nat → Option (Nat × Nat)
| 0, x => some x
| n + 1, x => (bstep G o x).bind (bsteps G o n)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.btau
def in lean/SpectreKnot/Statement.lean, line 154 · read it in its file
Formalises Definition 4.3 Signature.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.1, Lemma 4.2, Lemma 4.4, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
Def 4.3, the signature's pairing of the rim ports, with corners A and B: a hook at every other rim vertex (L(u_k) ↔ R(u_k)), and the crossover R(A) ↔ R(B), L(A) ↔ L(B).
Statement
def btau (A B : Nat) : Nat × Bool → Nat × Bool | (k, s) => if k = A then (B, s) else if k = B then (A, s) else (k, !s)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.cA
def in lean/SpectreKnot/CompSig.lean, line 280 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent rim position of the Γ child's corner A: position 0, or for a Σ parent the position after the pieces preS and the Γ child's side 0 (Table 3).
Statement
def cA (T : Kind) (L : Nat → Nat → Nat) : Nat := if T = .Sigma then totL L preS + L 7 0 else 0
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.cB
def in lean/SpectreKnot/CompSig.lean, line 284 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent rim position of the Γ child's corner B, next to cA: before it in the parent's own order if ω (that is, after it in the children's order), after it otherwise.
Statement
def cB (T : Kind) (L : Nat → Nat → Nat) (ω : Bool) : Nat := if !ω then nxt (rimN T L) (cA T L) else prv (rimN T L) (cA T L)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.chainModel
theorem in lean/SpectreKnot/ProofChain.lean, line 635 · read it in its file
Formalises Theorem A The Daedalus Theorem.
Doc comment
**ChainModel**: the union of a chain is a tiling.
Statement
theorem chainModel : ChainModel
The claim it proves: Statement.ChainModel.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
fun X => ⟨fun g => by -- X_{g+1} has at least `g + 2` tiles have := X.tiles_ge g omega, fun m t m_pos ht => X.loc_gid m t m_pos ht, fun m g m_pos hg => X.gid_loc m g m_pos hg, fun _ _ m_pos ht => (X.gid_up1 m_pos ht).2, ⟨X.chainTiling, X.chainTiling_contains⟩, fun covers _ contains => X.isTiling covers contains⟩
Statement.chain_even
theorem in lean/SpectreKnot/ProofB.lean, line 318 · read it in its file
Formalises Theorem 9.1 Merging, Theorem B The Ariadne Theorem.
Doc comment
**Even b**: every port of N_b lies, in N_{b+3}, on the strand of the hook at junction 12.
Statement
theorem chain_even {b : Nat} (b_pos : 1 ≤ b) (even : b % 2 = 0) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 3)).Linked (upPort b 3 x) (Zp (b + 2))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- level `b` is even have ori_b := ori_even even -- level `b + 1` odd have ori_b1 : ori (b + 1) = false := ori_odd (by omega) -- and level `b + 2` even have ori_b2 : ori (b + 2) = true := ori_even (by omega) -- one level up: inside side 2, 3 or 4 obtain ⟨J, reach_J, sides_even, _, _⟩ := first b_pos x_port -- two levels up: inside side 4 have reach_four : Reach (b + 2) 4 (upPort (b + 1) 1 (upPort b 1 x)) := by -- the port, one level up, is a port of `N_{b+1}` have up_port := isPort_up (show 1 ≤ b + 1 by omega) reach_J.1 rcases sides_even ori_b with rfl | rfl | rfl · exact reach_none (by omega) reach_J · exact reach_of up_port (inside_16 (by omega)) (reach_some (by omega) (by omega) reach_J (by rw [ori_b1]; rfl)) · exact reach_of up_port (inside_16 (by omega)) (reach_some (by omega) (by omega) reach_J (by rw [ori_b1]; rfl)) -- three levels up: the hook at junction 12 exact reach_some (n := b + 2) (by omega) (by omega) reach_four (by rw [ori_b2]; rfl)
Statement.chain_j16
theorem in lean/SpectreKnot/ProofGrand.lean, line 339 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
**At vertex 3 of N_m**, an end of its side 2: a corner on the chain about it is, one level up, on the chain about junction 16 of N_{m+1}.
Statement
theorem chain_j16 {m : Nat} (m_pos : 1 ≤ m) {n : Nat} {x : Nat × Nat}
(on_chain : (N m).turns n ((N m).sC (ori m) (pos (Lk m .Delta 1) 3)) = some x) :
∃ n', (N (m + 1)).turns n' ((N (m + 1)).sC (ori (m + 1)) (jpos (Lk m .Delta) 16)) = some (upC m x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by -- the children of `N_{m+1}` have kids := KD m_pos -- the parent's chain starts at vertex 1 of child 2, or at vertex 3 of child 1 have start : vS .Delta (Lk m .Delta) (dOff m) (ori m) (ori m) (jpos (Lk m .Delta) 16) = if ori m then (2, pos (Lk m .Delta 2) 1) else (1, pos (Lk m .Delta 1) 3) := by simp only [vS, gR_jpos m_pos (show 16 < 22 by omega), gL_jpos m_pos (show 1 ≤ 16 by omega) (show 16 < 22 by omega)] rfl -- from there, the gluing reaches vertex 3 of child 1 in at most one step have path : ∃ a, bsteps (Comp.ofLens .Delta (Lk m .Delta) (dOff m) (ori m)).toGluing (ori m) a (vS .Delta (Lk m .Delta) (dOff m) (ori m) (ori m) (jpos (Lk m .Delta) 16)) = some (1, pos (Lk m .Delta 1) 3) := by rw [start] cases ori m · exact ⟨0, rfl⟩ · exact ⟨1, tsteps_sound kids.len_pos kids.pair 1 (by decide) (by decide) (by decide)⟩ obtain ⟨a, path⟩ := path rw [N_succ m_pos, ori_succ] exact kids.on_parent_chain (kidsD_chains m_pos) (junction_lt m_pos (by omega)) path on_chain
Statement.chain_j17
theorem in lean/SpectreKnot/ProofGrand.lean, line 362 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
**At vertex 2 of N_m**, the other end of its side 2: a corner on the chain about it is, one level up, on the chain about junction 17 of N_{m+1}.
Statement
theorem chain_j17 {m : Nat} (m_pos : 1 ≤ m) {n : Nat} {x : Nat × Nat}
(on_chain : (N m).turns n ((N m).sC (ori m) (pos (Lk m .Delta 1) 2)) = some x) :
∃ n', (N (m + 1)).turns n' ((N (m + 1)).sC (ori (m + 1)) (jpos (Lk m .Delta) 17)) = some (upC m x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by -- the children of `N_{m+1}` have kids := KD m_pos -- the parent's chain starts at vertex 2 of child 1, or at vertex 5 of child 0 have start : vS .Delta (Lk m .Delta) (dOff m) (ori m) (ori m) (jpos (Lk m .Delta) 17) = if ori m then (1, pos (Lk m .Delta 1) 2) else (0, pos (Lk m .Delta 0) 5) := by simp only [vS, gR_jpos m_pos (show 17 < 22 by omega), gL_jpos m_pos (show 1 ≤ 17 by omega) (show 17 < 22 by omega)] rfl -- from there, the gluing reaches vertex 2 of child 1 in at most one step have path : ∃ a, bsteps (Comp.ofLens .Delta (Lk m .Delta) (dOff m) (ori m)).toGluing (ori m) a (vS .Delta (Lk m .Delta) (dOff m) (ori m) (ori m) (jpos (Lk m .Delta) 17)) = some (1, pos (Lk m .Delta 1) 2) := by rw [start] cases ori m · exact ⟨1, tsteps_sound kids.len_pos kids.pair 1 (by decide) (by decide) (by decide)⟩ · exact ⟨0, rfl⟩ obtain ⟨a, path⟩ := path rw [N_succ m_pos, ori_succ] exact kids.on_parent_chain (kidsD_chains m_pos) (junction_lt m_pos (by omega)) path on_chain
Statement.chain_odd
theorem in lean/SpectreKnot/ProofB.lean, line 340 · read it in its file
Formalises Theorem 9.1 Merging, Theorem B The Ariadne Theorem.
Doc comment
**Odd b**: every port of N_b lies, in N_{b+4}, on the strand of the hook at junction 12.
Statement
theorem chain_odd {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 4)).Linked (upPort b 4 x) (Zp (b + 3))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (31 lines)
by -- level `b` is odd have ori_b := ori_odd odd -- level `b + 1` even have ori_b1 : ori (b + 1) = true := ori_even (by omega) -- level `b + 2` odd have ori_b2 : ori (b + 2) = false := ori_odd (by omega) -- and level `b + 3` even have ori_b3 : ori (b + 3) = true := ori_even (by omega) -- one level up: inside side 4 or 5 obtain ⟨J, reach_J, _, sides_odd, _⟩ := first b_pos x_port -- the port, one level up, is a port of `N_{b+1}` have up_port := isPort_up (show 1 ≤ b + 1 by omega) reach_J.1 -- three levels up: inside side 4 have reach_four : Reach (b + 3) 4 (upPort (b + 2) 1 (upPort (b + 1) 1 (upPort b 1 x))) := by -- the port, two levels up, is a port of `N_{b+2}` have up_port2 := isPort_up (show 1 ≤ b + 2 by omega) up_port rcases sides_odd ori_b with rfl | rfl · -- from side 4 -- two levels up, inside side 3 have reach_three : Reach (b + 2) 3 (upPort (b + 1) 1 (upPort b 1 x)) := reach_of up_port (inside_12 (by omega)) (reach_some (by omega) (by omega) reach_J (by rw [ori_b1]; rfl)) exact reach_of up_port2 (inside_16 (by omega)) (reach_some (by omega) (by omega) reach_three (by rw [ori_b2]; rfl)) · -- from side 5 -- two levels up, inside side 2 have reach_two : Reach (b + 2) 2 (upPort (b + 1) 1 (upPort b 1 x)) := reach_of up_port (inside_9 (by omega)) (reach_some (by omega) (by omega) reach_J (by rw [ori_b1]; rfl)) exact reach_none (by omega) reach_two -- four levels up: the hook at junction 12 exact reach_some (n := b + 3) (by omega) (by omega) reach_four (by rw [ori_b3]; rfl)
Statement.chain_stretch
theorem in lean/SpectreKnot/ProofGrand.lean, line 312 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
**Strictly inside side 2 of N_m** (on the rim of N_{m+1}): the chain about rim vertex u of N_m is, one level up, the chain about rim vertex stp u of N_{m+1}, or its start.
Statement
theorem chain_stretch {m : Nat} (m_pos : 1 ≤ m) {u n : Nat} {x : Nat × Nat} (after_two : pos (Lk m .Delta 1) 2 < u)
(before_three : u < pos (Lk m .Delta 1) 3) (on_chain : (N m).turns n ((N m).sC (ori m) u) = some x) :
(N (m + 1)).turns n ((N (m + 1)).sC (ori (m + 1)) (stp (Lk m .Delta) u)) = some (upC m x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by -- the rim of `N_m` have rim_len := E_N m_pos -- vertex 3 is no later than the rim have three_le := pos_mono (Lk m .Delta 1) (show 3 ≤ 6 by omega) -- the start of the chain, one level up have start : (N (m + 1)).sC (ori (m + 1)) (stp (Lk m .Delta) u) = upC m ((N m).sC (ori m) u) := by -- the rim port of `N_m` there is, one level up, the rim port of `N_{m+1}` have same_port := stretch_eq m_pos after_two before_three (ori m) rw [← ori_succ] at same_port show Patch.corner ((N (m + 1)).bport (ori (m + 1)) (stp (Lk m .Delta) u, ori (m + 1))) = _ rw [← same_port]; rfl rw [start] exact turns_up m_pos n (Patch.sC_valid (good m .Delta m_pos).sig (show u < (N m).E by rw [rim_len]; omega)).1 on_chain
Statement.chains_super
theorem in lean/SpectreKnot/ProofGrand.lean, line 44 · read it in its file
Formalises Lemma 8.3 Grandparent Lemma.
Used, through the names in proofs, for Theorem 7.6.
Doc comment
**Every supertile of level m ≥ 1 is a disc at its rim.**
Statement
theorem chains_super : ∀ m K, 1 ≤ m → (super m K).RimChains (ori m)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by intro m induction m with | zero => intro K one_le_zero; omega | succ m ih => intro K _ rcases Nat.eq_zero_or_pos m with rfl | m_pos · exact Patch.chainCheck_sound (level1Chains K) · obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ -- the children satisfy the bridge's hypotheses have kids := kids_at m_pos K (fun K' => good (m' + 1) K' m_pos) rw [ori_succ] exact kids.rimChains (fun c _ => ih (kidAt K c) m_pos)
Statement.child1_cycle
theorem in lean/SpectreKnot/ProofGrand.lean, line 209 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
About a vertex of child 1 of the Δ composition off its side 2, turning comes round: in two steps inside a side, in three at a vertex (delta_cycles).
Statement
theorem child1_cycle {L : Nat → Nat → Nat} {d : Nat} {ω o : Bool} (len_pos : ∀ c j, 1 ≤ L c j)
(pair : ∀ c, c < nk .Delta → ∀ j, j < 6 → ∀ c' j', adjAt .Delta c j = some (c', j') → L c' j' = L c j)
{u : Nat} (u_lt : u < pos (L 1) 6) (off_side2 : u < pos (L 1) 2 ∨ pos (L 1) 3 < u) :
∃ a, 0 < a ∧ bsteps (Comp.ofLens .Delta L d ω).toGluing o a (1, u) = some (1, u)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (31 lines)
by obtain ⟨j, r, j_lt, r_lt, rfl⟩ := decomp (L 1) 6 (Nat.le_refl _) u u_lt -- side 2 ends where side 3 starts have side2_end : pos (L 1) 3 = pos (L 1) 2 + L 1 2 := pos_succ (L 1) 2 rcases Nat.eq_zero_or_pos r with rfl | r_pos · -- at vertex `j`, which is not 2 or 3 (the ends of side 2): three steps by Table 2 have j_mem : j ∈ [0, 1, 4, 5] := by rcases off_side2 with before | after · -- before side 2 have j_lt2 : j < 2 := by refine Nat.lt_of_not_le fun two_le => ?_ -- vertex `j` is at or after vertex 2 have later := pos_mono (L 1) two_le omega simp only [List.mem_cons, List.not_mem_nil, or_false]; omega · -- after side 2 have three_lt : 3 < j := by refine Nat.lt_of_not_le fun le_three => ?_ -- vertex `j` is at or before vertex 3 have earlier := pos_mono (L 1) le_three omega simp only [List.mem_cons, List.not_mem_nil, or_false]; omega refine ⟨3, by omega, ?_⟩ rw [Nat.add_zero] exact tsteps_sound len_pos pair 3 (by decide) j_lt (delta_cycles o j j_mem) · -- inside side `j`, which is not side 2: two steps have j_ne : j ≠ 2 := by intro j_two; subst j_two; rcases off_side2 with before | after <;> omega cases adj_eq : adjAt .Delta 1 j with | none => exact absurd (adj_one_none j j_lt adj_eq) j_ne | some e => exact ⟨2, by omega, side_cycle len_pos pair (by decide) j_lt adj_eq r_pos r_lt⟩
Statement.compSig_of_sig
theorem in lean/SpectreKnot/CompSig.lean, line 333 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**Sig gives "has the signature"**: the turning form that the proof of Lemma 7.1 carries through cuts, read at Table 3's rim positions. A rim vertex found by turning is the one at a position (own_rot); it is a corner only at cA or cB, since different positions are different edges (own_inj); and the crossover walks start at the ports gR of the corners, since turning about a vertex is one to one on rim vertices (Rot.inj).
Statement
theorem compSig_of_sig (len_pos : ∀ c j, 1 ≤ L c j) (side0_ge_two : 2 ≤ L (nk T - 1) 0)
(has_sig : Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)) : CompSig T L d ω
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (48 lines)
by obtain ⟨pA_lt, pB_lt, _, at_A, at_B⟩ := corners_at (d := d) (ω := ω) len_pos side0_ge_two -- the composition is well formed have wf := has_sig.wf -- turning about the vertex of `gR cA` reaches the Γ child's corner `A` have rot_A := gR_rot (d := d) (ω := ω) len_pos pA_lt rw [at_A] at rot_A -- and about that of `gR cB`, its corner `B` have rot_B := gR_rot (d := d) (ω := ω) len_pos pB_lt rw [at_B] at rot_B -- `gL cA` is the port `R` at the Γ child's corner `A` have gL_A : gL T L (cA T L) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.A (nk T - 1), true) := by simp only [gL, at_A] -- `gL cB` is the port `R` at its corner `B` have gL_B : gL T L (cB T L ω) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.B (nk T - 1), true) := by simp only [gL, at_B] refine ⟨wf, has_sig.noLoops, pA_lt, pB_lt, gL_A, gL_B, fun p p_lt ne_A ne_B => ?_, ?_, ?_⟩ · -- a hook: turning about the vertex of `gR p` reaches that of `gL p` obtain ⟨c₂, u₂, turn, corner_or_hook⟩ := has_sig.hooks _ _ (gR_rimL len_pos p_lt) -- the vertex turned to is the start of the child edge at position `p - 1` have same_vtx := Rot.unique turn (gR_rot len_pos p_lt) -- it is not one of the Γ child's corners, since `p` is neither `cA` nor `cB` have not_corner : ¬ (c₂ = nk T - 1 ∧ (u₂ = (Comp.ofLens T L d ω).toGluing.A (nk T - 1) ∨ u₂ = (Comp.ofLens T L d ω).toGluing.B (nk T - 1))) := by rintro ⟨rfl, at_cA | at_cB⟩ · rw [at_cA, ← at_A] at same_vtx exact ne_A (prv_inj p_lt pA_lt (own_inj len_pos (prv_lt pA_lt) (prv_lt p_lt) same_vtx).symm) · rw [at_cB, ← at_B] at same_vtx exact ne_B (prv_inj p_lt pB_lt (own_inj len_pos (prv_lt pB_lt) (prv_lt p_lt) same_vtx).symm) rcases corner_or_hook with corner | hook · exact absurd corner not_corner · have gL_eq : gL T L p = (c₂, u₂, true) := by simp only [gL, ← same_vtx] -- `R` at the vertex turned to rw [gL_eq]; exact hook · -- `R(A) ↔ R(B)`: the crossover of `Sig` rw [gL_A, gL_B]; exact has_sig.crossR · -- `L(A) ↔ L(B)`: the vertices that turn to `A` and `B` are those of `gR cA` and `gR cB` obtain ⟨cA', uA', cB', uB', rim_A, turn_A, rim_B, turn_B, reach⟩ := has_sig.crossL -- the vertex turning to `A` is that of `gR cA` have vtx_A := Rot.inj wf rim_A (gR_rimL len_pos pA_lt) turn_A rot_A -- the vertex turning to `B` is that of `gR cB` have vtx_B := Rot.inj wf rim_B (gR_rimL len_pos pB_lt) turn_B rot_B -- so `gR cA` is the start of the crossover walk have gR_A : gR T L d ω (cA T L) = (cA', uA', false) := by rw [Prod.ext_iff] at vtx_A; exact Prod.ext vtx_A.1.symm (Prod.ext vtx_A.2.symm rfl) -- and `gR cB` its end have gR_B : gR T L d ω (cB T L ω) = (cB', uB', false) := by rw [Prod.ext_iff] at vtx_B; exact Prod.ext vtx_B.1.symm (Prod.ext vtx_B.2.symm rfl) rw [gR_A, gR_B]; exact reach
Statement.compose
def in lean/SpectreKnot/Statement.lean, line 180 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
Prop 2.4, as a construction: the supertile of kind T with children child 0, child 1, … (Table 1). Its tiles are the children's, numbered child by child. Where Table 2 says that side j of child c is side j' of child c', those sides are glued edge by edge, in opposite directions. The rim is the children's sides listed in Table 3, each traversed backwards (a parent's orientation is opposite to its children's).
Statement
def compose (T : Kind) (child : Nat → Patch) : Patch := -- n: the number of children (8, or 7 for Γ). let n := (Pattern.kids T).length -- off c: the number of the first tile of child c. let off : Nat → Nat := fun c => ((List.range c).map fun c' => (child c').tiles).sum -- owner t: the child that tile t belongs to. let owner : Nat → Nat := fun t => ((List.range n).filter fun c => off c ≤ t).length - 1 -- shift c e: edge e of child c, renumbered as an edge of the parent. let shift : Nat → Nat × Nat → Nat × Nat := fun c e => (e.1 + off c, e.2) { -- The parent has the tiles of all its children. tiles := off n glue := fun t i => -- Tile t is tile t₀ of child c. let c := owner t let t₀ := t - off c match (child c).glue t₀ i with -- Glued inside the child: glued in the parent. | some e => some (shift c e) -- On the child's rim: the edge is at position pos of the rim, the o-th edge of side j. | none => let pos := ((child c).rim.findIdx? (· == (t₀, i))).getD 0 let j := ((List.range 6).filter fun j => (child c).vtx.getD j 0 ≤ pos).length - 1 let o := pos - (child c).vtx.getD j 0 -- Table 2 for side j of child c. match ((Pattern.adj T).getD c []).getD j none with -- On the parent's rim: not glued. | none => none -- Side j' of child c': glued to its o-th edge counted from the end. | some (c', j') => let s := (child c').side j' (s[s.length - 1 - o]?).map (shift c') -- Table 3: the children's sides, each backwards, in order. rim := ((Pattern.pside T).flatMap id).flatMap fun (c, j) => ((child c).side j).reverse.map (shift c) -- Vertex J: the total length of the pieces of sides 0 … J-1. vtx := (List.range 7).map fun J => ((((Pattern.pside T).take J).flatMap id).map fun (c, j) => ((child c).side j).length).sum }
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.compose_E
theorem in lean/SpectreKnot/ParentSig.lean, line 105 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim length.
Statement
theorem compose_E (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧
(child c).E = pos (L c) 6) : (compose T child).E = rimN T L
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by show (compose T child).rim.length = _ rw [compose_rim, rimPiece_length shape _ (pcs_valid' T)]
Statement.compose_glue
theorem in lean/SpectreKnot/ComposeTiles.lean, line 194 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
What is glued across edge e_i of tile t of child c, in the parent.
Statement
theorem compose_glue (tiles_pos : ∀ c, c < nk T → 0 < (child c).tiles) {c t : Nat} (c_lt : c < nk T)
(t_lt : t < (child c).tiles) (i : Nat) :
(compose T child).glue (offC child c + t) i = glueAt T child c t i
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
rw [compose_glue_def, ownerC_eq tiles_pos c_lt t_lt, Nat.add_sub_cancel_left]Statement.compose_glue_def
theorem in lean/SpectreKnot/ComposeTiles.lean, line 179 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
compose's gluing, unfolded: find the tile's child, then glue as glueAt says.
Statement
theorem compose_glue_def (t i : Nat) :
(compose T child).glue t i = glueAt T child (ownerC T child t) (t - offC child (ownerC T child t)) i
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Statement.compose_no_default
theorem in lean/SpectreKnot/ProofA.lean, line 181 · read it in its file
Formalises Lemma 4.2 Gluing.
Doc comment
**compose never falls back on a default** in the supertiles of the statement. Let m ≥ 1 and let (t, i) be an unglued edge of child c of super (m + 1) T. Then compose finds the edge on the child's rim list, at the one position k that holds it, so findIdx?'s default is not used; and a side of the child that Table 2 glues to a side of a sibling has as many edges as that side, so the lookup of the edge across stays inside it. (glue_rim says more: across the edge, compose glues exactly what the abstract composition says.)
Statement
theorem compose_no_default {m : Nat} (m_pos : 1 ≤ m) (T : Kind) {c t i : Nat} (c_lt : c < nk T)
(ht : t < (super m (kidAt T c)).tiles) (hi : i < 14) (unglued : (super m (kidAt T c)).glue t i = none) :
(∃ k, (super m (kidAt T c)).rim.findIdx? (· == (t, i)) = some k ∧ (super m (kidAt T c)).edgeAt k = (t, i)) ∧
∀ j c' j', j < 6 → adjAt T c j = some (c', j') →
((super m (kidAt T c')).side j').length = ((super m (kidAt T c)).side j).length
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (26 lines)
by -- the children have the signature, with the side lengths of the composition have kids := kids_at m_pos T (fun K => good m K m_pos) -- in particular child `c`: its rim lists every unglued edge, each once have sig := (good m (kidAt T c) m_pos).sig refine ⟨?_, fun j c' j' j_lt glued => ?_⟩ · obtain ⟨k, k_lt, at_k⟩ := sig.rim_all t i ht hi unglued -- the rim list's entries are the edges `edgeAt` gives have entry_eq : ∀ k', (k'_lt : k' < (super m (kidAt T c)).rim.length) → (super m (kidAt T c)).rim[k'] = (super m (kidAt T c)).edgeAt k' := fun k' k'_lt => by simp only [Patch.edgeAt, List.getD_eq_getElem?_getD, List.getElem?_eq_getElem k'_lt, Option.getD_some] refine ⟨k, List.findIdx?_eq_some_iff_getElem.mpr ⟨k_lt, ?_, ?_⟩, at_k⟩ · rw [entry_eq, at_k]; simp · intro j j_lt same_edge rw [entry_eq, beq_iff_eq] at same_edge -- an earlier position holding the edge would be `k` itself have := sig.rim_inj j k (by omega) k_lt (same_edge.trans at_k.symm) omega · -- the two sides have the lengths of their letters, which Table 2 pairs equally obtain ⟨c'_lt, j'_lt, _, _⟩ := adj_valid c_lt j_lt glued obtain ⟨vtx_eq, len_eq⟩ : (super m (kidAt T c)).vtx = (List.range 7).map (pos (Lk m T c)) ∧ (super m (kidAt T c)).E = pos (Lk m T c) 6 := kids.shape c c_lt obtain ⟨vtx_eq', len_eq'⟩ : (super m (kidAt T c')).vtx = (List.range 7).map (pos (Lk m T c')) ∧ (super m (kidAt T c')).E = pos (Lk m T c') 6 := kids.shape c' c'_lt rw [side_length vtx_eq' len_eq' j'_lt, side_length vtx_eq len_eq j_lt] exact kids.pair c c_lt j j_lt c' j' glued
Statement.compose_rim
theorem in lean/SpectreKnot/ParentSig.lean, line 45 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
compose's rim is made of the children's sides listed in Table 3, each backwards and renumbered.
Statement
theorem compose_rim : (compose T child).rim = (pcs T).flatMap (rimPiece child)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Statement.consecOk
def in lean/SpectreKnot/ParentRim.lean, line 253 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Consecutive pieces a, b of the parent's rim meet at a parent rim vertex: turning about the vertex where side b ends (in the children's sense, where the parent's side runs into piece a) reaches the vertex where side a begins.
Statement
def consecOk (T : Kind) : List (Nat × Nat) → Bool
| a :: b :: rest => tabRot T 30 (b.1, (b.2 + 1) % 6) == some a && consecOk T (b :: rest)
| _ => true
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.consecOk_sound
theorem in lean/SpectreKnot/ParentRim.lean, line 272 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The check consecOk is sound: for consecutive pieces a, b of a checked list, turning about the vertex where side b ends reaches the vertex where side a begins.
Statement
theorem consecOk_sound {T : Kind} : ∀ {l : List (Nat × Nat)} {a b : Nat × Nat}, consecOk T l = true →
Consec l a b → tabRot T 30 (b.1, (b.2 + 1) % 6) = some a
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by intro l a b ok consec induction consec with | here => simp only [consecOk, Bool.and_eq_true, beq_iff_eq] at ok; exact ok.1 | @there x a b rest rest_consec ih => apply ih cases rest with | nil => cases rest_consec | cons y rest => simp only [consecOk, Bool.and_eq_true] at ok; exact ok.2
Statement.cornerA
def in lean/SpectreKnot/Statement.lean, line 252 · read it in its file
Formalises Lemma 6.4 Position of A.
Used, through the names in proofs, for Theorem 7.6.
In the statement file: read it line by line.
Doc comment
The crossover corner A of super m K (m ≥ 1), as a rim vertex: vertex 0, or for Σ the point 2 F_{3m+1} along side 5 from vertex 5 (the paper's Lemma 6.4).
Statement
def cornerA (m : Nat) (K : Kind) : Nat := if K = .Sigma then (super m K).vtx.getD 5 0 + 2 * fib (3 * m + 1) else 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.cornerA_eq_aPos
theorem in lean/SpectreKnot/ProofA.lean, line 150 · read it in its file
Formalises Lemma 6.4 Position of A.
Used, through the names in proofs, for Theorem 7.6.
Doc comment
The claim's corner A (cornerA, placed by position as in Lemma 6.4) is the induction's (aPos), since d_m = 2 F_{3m+1}.
Statement
theorem cornerA_eq_aPos {m : Nat} (m_pos : 1 ≤ m) (K : Kind) : cornerA m K = aPos m K
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- vertex 5 lies where the side lengths put it have vtx5 : (super m K).vtx.getD 5 0 = vpos m K 5 := by rw [(good m K m_pos).vtx]; rfl unfold cornerA aPos rw [vtx5, (dOff_fib m m_pos).1]
Statement.cornerA_succ
theorem in lean/SpectreKnot/ProofA.lean, line 160 · read it in its file
Formalises Theorem 7.6 Signature Theorem.
Doc comment
**The corner A of a supertile is that of its Γ child** (the paper's recursive definition of A, §2.3): for m ≥ 1, the port L of super (m + 1) T at its corner A is the port R of its Γ child, the last child, at the child's own corner A, with the child's tiles numbered as in the parent. (Parent and child are oriented oppositely, so R and L swap.)
Statement
theorem cornerA_succ {m : Nat} (m_pos : 1 ≤ m) (T : Kind) : (super (m + 1) T).bport (ori (m + 1)) (cornerA (m + 1) T, false) = shiftP (fun c => super m (kidAt T c)) (nk T - 1) ((super m .Gamma).bport (ori m) (cornerA m .Gamma, true))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- the children have the signature, with the side lengths of the composition have kids := kids_at m_pos T (fun K => good m K m_pos) obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ -- the parent is the composition of its children have super_eq : super (m' + 1 + 1) T = compose T fun c => super (m' + 1) (kidAt T c) := rfl -- the Γ child's corner `A` is its vertex 0 have gamma_A : aPos (m' + 1) .Gamma = 0 := rfl -- the claim's corners are the induction's; the parent's is where Table 3 puts the Γ child's corner `A` rw [cornerA_eq_aPos (by omega) T, aPos_succ m_pos T, cornerA_eq_aPos m_pos .Gamma, gamma_A, super_eq, ori_succ, kids.bport_L kids.csig.cA_lt, kids.csig.at_A, gA_last (Nat.sub_lt (last_lt T) Nat.one_pos)] show shiftP _ _ ((super (m' + 1) (kidAt T (nk T - 1))).bport _ _) = _ rw [kid_last T]
Statement.cornerB
def in lean/SpectreKnot/Statement.lean, line 256 · read it in its file
Used, through the names in proofs, for Theorem 7.6.
In the statement file: read it line by line.
Doc comment
The other crossover corner, B = A + ω_m in the supertile's own order: the next rim vertex at even levels, the previous one at odd levels.
Statement
def cornerB (m : Nat) (K : Kind) : Nat := if m % 2 = 0 then nxt (super m K).E (cornerA m K) else prv (super m K).E (cornerA m K)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.corner_one
theorem in lean/SpectreKnot/StepMap.lean, line 288 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Child 1's corners are 0 and 1 or E - 1: a vertex x with 2 ≤ x ≤ E - 2 is not a corner.
Statement
theorem corner_one {L : Nat → Nat → Nat} {d : Nat} {ω : Bool} {x : Nat} (two_le_x : 2 ≤ x)
(x_le : x + 2 ≤ pos (L 1) 6) : (Comp.ofLens .Delta L d ω).toGluing.corner 1 x = false
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- child 1 is an actual child have one_lt : 1 < nk .Delta := by decide simp only [Gluing.corner, Bool.or_eq_false_iff, beq_eq_false_iff_ne, ne_eq] rw [ofLens_B one_lt, ofLens_A one_lt, ite_eq_right (by decide)] cases ω <;> simp only [ite_true, ite_false, Bool.false_eq_true, nxt, prv] <;> constructor <;> (try split) <;> omega
Statement.corners_N
theorem in lean/SpectreKnot/NestStep.lean, line 139 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The corners of N_m: A = 0, and B is 1 or E - 1.
Statement
theorem corners_N {m : Nat} (m_pos : 1 ≤ m) :
aPos m .Delta = 0 ∧ (bPos m .Delta = 1 ∨ bPos m .Delta = pos (Lk m .Delta 1) 6 - 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- a Δ is not a Σ, so `A = 0` have A_zero : aPos m .Delta = 0 := by simp [aPos] -- the rim has at least two edges have rim_two : 2 ≤ pos (Lk m .Delta 1) 6 := by -- side 0 has at least 5 edges have := len5 m_pos 1 0 -- and ends no later than the rim have := pos_mono (Lk m .Delta 1) (show 1 ≤ 6 by omega) simp only [pos] at *; omega refine ⟨A_zero, ?_⟩ simp only [bPos, A_zero] show (if ori m = true then nxt (pos (Lk m .Delta 1) 6) 0 else prv (pos (Lk m .Delta 1) 6) 0) = 1 ∨ _ split · left; simp only [nxt]; rw [ite_eq_right (by omega)] · right; simp only [prv, ite_true]; rfl
Statement.corners_at
theorem in lean/SpectreKnot/CompSig.lean, line 293 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Γ child's corners are adjacent rim vertices of the composition, at the positions cA and cB: the child edge before position cA starts at A, the one before cB at B.
Statement
theorem corners_at (len_pos : ∀ c j, 1 ≤ L c j) (side0_ge_two : 2 ≤ L (nk T - 1) 0) :
cA T L < rimN T L ∧ cB T L ω < rimN T L ∧ cA T L ≠ cB T L ω ∧
ownGo L (pcs T) (prv (rimN T L) (cA T L)) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.A (nk T - 1)) ∧
ownGo L (pcs T) (prv (rimN T L) (cB T L ω)) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.B (nk T - 1))
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by by_cases is_sigma : T = .Sigma · subst is_sigma -- a Σ parent: `A` on its side 5 exact corners_sigma len_pos side0_ge_two · -- any other parent: `A` at its vertex 0 simp only [cA, cB, ite_eq_right is_sigma] exact corners_nonSigma is_sigma len_pos side0_ge_two
Statement.corners_nonSigma
theorem in lean/SpectreKnot/CompSig.lean, line 83 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The corners of a non-Σ parent: A at its vertex 0, B next to it.
Statement
theorem corners_nonSigma (not_sigma : T ≠ .Sigma) (len_pos : ∀ c j, 1 ≤ L c j) (side0_ge_two : 2 ≤ L (nk T - 1) 0) : 0 < rimN T L ∧ (if !ω then nxt (rimN T L) 0 else prv (rimN T L) 0) < rimN T L ∧ 0 ≠ (if !ω then nxt (rimN T L) 0 else prv (rimN T L) 0) ∧ ownGo L (pcs T) (prv (rimN T L) 0) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.A (nk T - 1)) ∧ ownGo L (pcs T) (prv (rimN T L) (if !ω then nxt (rimN T L) 0 else prv (rimN T L) 0)) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.B (nk T - 1))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (55 lines)
by -- the Γ child is an actual child have last_lt' : nk T - 1 < nk T := by -- every kind has a child have := last_lt T omega -- the parent's rim begins with the Γ child's side 5 and ends with its side 0 have pcs_shape := pcs_nonSigma T not_sigma generalize ((pcs T).drop 1).dropLast = mid at pcs_shape -- the last rim position is the Γ child's edge 0 have at_last : ownGo L (pcs T) (rimN T L - 1) = (nk T - 1, 0) := by -- the last position of a list ending with side 0 of the Γ child have last := ownGo_last (L := L) (c := nk T - 1) (j := 0) (len_pos _ 0) ((nk T - 1, 5) :: mid) rw [← pcs_shape] at last exact last -- the first rim position is the Γ child's last edge have at_zero : ownGo L (pcs T) 0 = (nk T - 1, pos (L (nk T - 1)) 6 - 1) := by rw [pcs_shape, List.cons_append, ownGo_zero (len_pos _ 5), (pos6 len_pos _).2] -- the rim length, with the last piece split off have total : rimN T L = totL L ((nk T - 1, 5) :: mid) + L (nk T - 1) 0 := by show totL L (pcs T) = _ rw [pcs_shape, totL_append]; simp only [totL]; omega -- the second-last rim position is the Γ child's edge 1 have at_last2 : ownGo L (pcs T) (rimN T L - 2) = (nk T - 1, 1) := by rw [total, pcs_shape, ownGo_append, ite_eq_right (by omega), show totL L ((nk T - 1, 5) :: mid) + L (nk T - 1) 0 - 2 - totL L ((nk T - 1, 5) :: mid) = L (nk T - 1) 0 - 2 by omega] simp only [ownGo] rw [ite_eq_left (by omega)] simp only [pos] congr 1; omega -- the rim has at least two edges have rim_ge_two : 2 ≤ rimN T L := by rw [total]; simp only [totL] -- the Γ child's side 5 has an edge have := len_pos (nk T - 1) 5 omega rw [gA_last last_lt', gB_last len_pos last_lt'] -- the step back from 0 wraps round to the last position have prv_zero : prv (rimN T L) 0 = rimN T L - 1 := by simp [prv] cases ω with | true => -- two steps back from 0 have prv_prv : prv (rimN T L) (prv (rimN T L) 0) = rimN T L - 2 := by rw [prv_zero]; simp only [prv]; rw [ite_eq_right (show ¬ (rimN T L - 1 = 0) by omega)]; omega simp only [Bool.not_true, ite_false, Bool.false_eq_true, ite_true] refine ⟨by omega, prv_lt (by omega), by rw [prv_zero]; omega, by rw [prv_zero, at_last], ?_⟩ rw [prv_prv, at_last2] | false => -- one step forwards from 0 have nxt_zero : nxt (rimN T L) 0 = 1 := by simp only [nxt]; rw [ite_eq_right (show ¬ (0 + 1 = rimN T L) by omega)] -- and back again have prv_nxt_zero : prv (rimN T L) (nxt (rimN T L) 0) = 0 := by rw [nxt_zero]; rfl simp only [Bool.not_false, ite_true, ite_false, Bool.false_eq_true] refine ⟨by omega, by rw [nxt_zero]; omega, by rw [nxt_zero]; omega, by rw [prv_zero, at_last], ?_⟩ rw [prv_nxt_zero, at_zero]
Statement.corners_sigma
theorem in lean/SpectreKnot/CompSig.lean, line 146 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The corners of a Σ parent: A on side 5, after the pieces preS and the Γ child's side 0.
Statement
theorem corners_sigma (len_pos : ∀ c j, 1 ≤ L c j) (side0_ge_two : 2 ≤ L 7 0) : totL L preS + L 7 0 < rimN .Sigma L ∧ (if !ω then nxt (rimN .Sigma L) (totL L preS + L 7 0) else prv (rimN .Sigma L) (totL L preS + L 7 0)) < rimN .Sigma L ∧ totL L preS + L 7 0 ≠ (if !ω then nxt (rimN .Sigma L) (totL L preS + L 7 0) else prv (rimN .Sigma L) (totL L preS + L 7 0)) ∧ ownGo L (pcs .Sigma) (prv (rimN .Sigma L) (totL L preS + L 7 0)) = (7, (Comp.ofLens .Sigma L d ω).toGluing.A 7) ∧ ownGo L (pcs .Sigma) (prv (rimN .Sigma L) (if !ω then nxt (rimN .Sigma L) (totL L preS + L 7 0) else prv (rimN .Sigma L) (totL L preS + L 7 0))) = (7, (Comp.ofLens .Sigma L d ω).toGluing.B 7)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (57 lines)
by -- the Γ child, child 7, is an actual child have last_lt' : nk .Sigma - 1 < nk .Sigma := by decide -- its corner `A` is its vertex 0 have A_zero : (Comp.ofLens .Sigma L d ω).toGluing.A 7 = 0 := gA_last last_lt' -- and its corner `B` is vertex 1 or its last vertex have B_eq : (Comp.ofLens .Sigma L d ω).toGluing.B 7 = if ω then 1 else pos (L 7) 6 - 1 := gB_last len_pos last_lt' -- the rim length, piece by piece have total : rimN .Sigma L = totL L preS + L 7 0 + L 7 5 + L 6 4 := by show totL L (pcs .Sigma) = _ rw [pcs_sigma, totL_append]; simp only [totL]; omega -- past `preS`, the rim is the last three pieces have after_preS : ∀ q, ownGo L (pcs .Sigma) (totL L preS + q) = ownGo L [(7, 0), (7, 5), (6, 4)] q := by intro q rw [pcs_sigma, ownGo_append, ite_eq_right (show ¬ (totL L preS + q < totL L preS) by omega), Nat.add_sub_cancel_left] -- the Γ child's rim starts at vertex 0 have pos_zero : pos (L 7) 0 = 0 := rfl -- the last position in the Γ child's side 0 is its edge 0 have at_edge0 : ownGo L (pcs .Sigma) (totL L preS + (L 7 0 - 1)) = (7, 0) := by rw [after_preS]; simp only [ownGo]; rw [ite_eq_left (show L 7 0 - 1 < L 7 0 by omega), pos_zero, show 0 + L 7 0 - 1 - (L 7 0 - 1) = 0 by omega] -- the one before it is its edge 1 have at_edge1 : ownGo L (pcs .Sigma) (totL L preS + (L 7 0 - 2)) = (7, 1) := by rw [after_preS]; simp only [ownGo]; rw [ite_eq_left (show L 7 0 - 2 < L 7 0 by omega), pos_zero, show 0 + L 7 0 - 1 - (L 7 0 - 2) = 1 by omega] -- the next position, the first of the piece `(7, 5)`, is the Γ child's last edge have at_last : ownGo L (pcs .Sigma) (totL L preS + L 7 0) = (7, pos (L 7) 6 - 1) := by rw [after_preS]; simp only [ownGo] rw [ite_eq_right (show ¬ (L 7 0 < L 7 0) by omega), Nat.sub_self, ite_eq_left (show 0 < L 7 5 from len_pos 7 5), (pos6 len_pos 7).2, Nat.sub_zero] -- the Γ child's side 5 has an edge have len_75 := len_pos 7 5 -- and so does child 6's side 4 have len_64 := len_pos 6 4 -- the step back from the corner position have prv_corner : prv (rimN .Sigma L) (totL L preS + L 7 0) = totL L preS + (L 7 0 - 1) := by simp only [prv]; rw [ite_eq_right (show ¬ (totL L preS + L 7 0 = 0) by omega)]; omega rw [A_zero, B_eq] cases ω with | true => -- two steps back have prv_prv : prv (rimN .Sigma L) (totL L preS + (L 7 0 - 1)) = totL L preS + (L 7 0 - 2) := by simp only [prv]; rw [ite_eq_right (show ¬ (totL L preS + (L 7 0 - 1) = 0) by omega)]; omega simp only [Bool.not_true, Bool.false_eq_true, ↓reduceIte] refine ⟨by omega, by rw [prv_corner]; omega, by rw [prv_corner]; omega, by rw [prv_corner, at_edge0], ?_⟩ rw [prv_corner, prv_prv, at_edge1] | false => -- one step forwards from the corner position have nxt_corner : nxt (rimN .Sigma L) (totL L preS + L 7 0) = totL L preS + L 7 0 + 1 := by simp only [nxt]; rw [ite_eq_right (show ¬ (totL L preS + L 7 0 + 1 = rimN .Sigma L) by omega)] -- and back again have prv_nxt_corner : prv (rimN .Sigma L) (totL L preS + L 7 0 + 1) = totL L preS + L 7 0 := by simp only [prv]; rw [ite_eq_right (show ¬ (totL L preS + L 7 0 + 1 = 0) by omega)]; omega simp only [Bool.not_false, Bool.false_eq_true, ↓reduceIte] refine ⟨by omega, by rw [nxt_corner]; omega, by rw [nxt_corner]; omega, by rw [prv_corner, at_edge0], ?_⟩ rw [nxt_corner, prv_nxt_corner, at_last]
Statement.count_eq
theorem in lean/SpectreKnot/ComposeTiles.lean, line 52 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
In a strictly increasing sequence, the number of entries f 0 … f (n-1) at most x, less one, is the index c with f c ≤ x < f (c + 1).
Statement
theorem count_eq {f : Nat → Nat} {n c x : Nat} (step_lt : ∀ a, a < n → f a < f (a + 1)) (c_lt : c < n) (at_c : f c ≤ x) (below_next : x < f (c + 1)) : ((List.range n).filter fun a => decide (f a ≤ x)).length - 1 = c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by -- the sequence is monotone have mono := mono_of_succ step_lt rw [count_min n c (fun a a_lt => ⟨fun at_most => ?_, fun a_le => ?_⟩)] · omega · by_cases a_le : a ≤ c · exact a_le · have := mono (c + 1) a (by omega) (by omega) -- past `c`, the entries exceed `x` omega · have := mono a c a_le (by omega) -- up to `c`, the entries are at most `f c ≤ x` omega
Statement.count_min
theorem in lean/SpectreKnot/ComposeTiles.lean, line 34 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If, below n, f a ≤ x holds exactly when a ≤ c, then min n (c + 1) of the entries f 0 … f (n-1) are at most x.
Statement
theorem count_min {f : Nat → Nat} {x : Nat} : ∀ n c, (∀ a, a < n → (f a ≤ x ↔ a ≤ c)) → ((List.range n).filter fun a => decide (f a ≤ x)).length = min n (c + 1)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by intro n induction n with | zero => intro c _; simp | succ n ih => intro c at_most_iff rw [List.range_succ, List.filter_append, List.length_append, ih c (fun a a_lt => at_most_iff a (by omega))] by_cases n_le : n ≤ c · have counted : f n ≤ x := (at_most_iff n (by omega)).mpr n_le -- entry `n` is counted simp [counted]; omega · have not_counted : ¬ f n ≤ x := -- entry `n` is not counted fun at_most => n_le ((at_most_iff n (by omega)).mp at_most) simp [not_counted]; omega
Statement.delta_cycles
theorem in lean/SpectreKnot/ProofGrand.lean, line 73 · read it in its file
Formalises Lemma 8.3 Grandparent Lemma.
Doc comment
In the Δ composition, turning by Table 2 about vertex 0, 1, 4 or 5 of child 1 comes round in three steps, for either orientation of the children.
Statement
theorem delta_cycles : ∀ o, ∀ j ∈ [0, 1, 4, 5], tsteps .Delta o 3 (1, j) = some (1, j)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.even_two
theorem in lean/SpectreKnot/ProofExact.lean, line 255 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
**Even b, two levels up**: every port of N_b lies, in N_{b+2}, on the strand of the hook at junction 16, or on that of the hook at junction 9 of N_{b+1}, which lies on the rim of N_{b+2}.
Statement
theorem even_two {b : Nat} (b_pos : 1 ≤ b) (even : b % 2 = 0) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 2)).Linked (upPort b 2 x) (hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 16)) ∨
(N (b + 2)).Linked (upPort b 2 x) (hookAt (b + 2) (stp (Lk (b + 1) .Delta) (jpos (Lk b .Delta) 9)))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by -- level `b` is even have ori_b := ori_even even -- level `b + 1` odd have ori_b1 : ori (b + 1) = false := ori_odd (by omega) -- one level up: inside side 2 (at junction 9), 3 or 4 obtain ⟨J, reach_J, sides_even, _, at_nine⟩ := first b_pos x_port rw [show upPort b 2 x = upPort (b + 1) 1 (upPort b 1 x) from upPort_succ b 1 x] rcases sides_even ori_b with rfl | rfl | rfl · -- inside side 2, at junction 9: a hook of `N_{b+1}` on the rim of `N_{b+2}` exact .inr ((lift_nest (m := b + 1) (by omega) (at_nine rfl) reach_J.1).trans (adv_none (by omega) (inside_9 b_pos))) · -- inside side 3: on to junction 16 exact .inl (reach_some (q := 16) (by omega) (by omega) reach_J (by rw [ori_b1]; rfl)) · -- inside side 4: on to junction 16 exact .inl (reach_some (q := 16) (by omega) (by omega) reach_J (by rw [ori_b1]; rfl))
Statement.findIdx_rim
theorem in lean/SpectreKnot/ComposeTiles.lean, line 204 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
On a rim that lists no edge twice, looking up rim edge k finds position k.
Statement
theorem findIdx_rim {P : Patch} {k : Nat} (k_lt : k < P.E)
(rim_inj : ∀ k', k' < P.E → P.edgeAt k' = P.edgeAt k → k' = k) :
(P.rim.findIdx? (· == ((P.edgeAt k).1, (P.edgeAt k).2))).getD 0 = k
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- `P.E` is the length of the rim list have k_lt_len : k < P.rim.length := k_lt -- on the rim, the list entry is the edge `edgeAt` gives have entry_eq : ∀ k', (k'_lt : k' < P.rim.length) → P.rim[k'] = P.edgeAt k' := fun k' k'_lt => by simp only [Patch.edgeAt, List.getD_eq_getElem?_getD, List.getElem?_eq_getElem k'_lt, Option.getD_some] rw [List.findIdx?_eq_some_iff_getElem.mpr ⟨k_lt_len, ?_, ?_⟩] · rfl · rw [entry_eq]; simp · intro j j_lt same_edge rw [entry_eq, beq_iff_eq] at same_edge -- an earlier position with the same edge would be `k` itself have := rim_inj j (by -- `k` is a rim position have : k < P.E := k_lt show j < P.rim.length; omega) (by rw [same_edge]) omega
Statement.first
theorem in lean/SpectreKnot/ProofB.lean, line 250 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The first step: one level up, every port of N_b reaches a hook inside side 2, 3 or 4 of N_{b+1} (if ω_b = true, that is b even) or inside side 4 or 5 (if ω_b = false). Inside side 2, the hook is the one at junction 9.
Statement
theorem first {b : Nat} (b_pos : 1 ≤ b) {x : Port} (x_port : (N b).IsPort x) :
∃ J, Reach (b + 1) J (upPort b 1 x) ∧ (ori b = true → J = 2 ∨ J = 3 ∨ J = 4) ∧
(ori b = false → J = 4 ∨ J = 5) ∧
(J = 2 → (N (b + 1)).Linked (upPort b 1 x) ((N (b + 1)).bport (ori (b + 1)) (jpos (Lk b .Delta) 9, true)))
Names in its proof
Statement.E_NStatement.Kids.noClosedStatement.LkStatement.NStatement.Patch.Follow.end_Statement.Patch.Linked.transStatement.Patch.rim_portStatement.goodStatement.hookStatement.inside_12Statement.inside_16Statement.inside_17Statement.inside_21Statement.inside_9Statement.inside_boundsStatement.inside_stpStatement.isPort_upStatement.lift_nestStatement.oriStatement.reach_ofStatement.step_tileStatement.stretch_eqStatement.superStatement.tgtStatement.tgt_noneStatement.tgt_vals_fStatement.tgt_vals_t
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (53 lines)
by -- `N_b` has the signature have good_b := good b .Delta b_pos -- following the ribbon from `x` leaves `N_b` at a port `r` obtain ⟨r, follows⟩ := good_b.sig.noClosed x x_port obtain ⟨nothing_across, r_tile, r_vertex⟩ := Patch.Follow.end_ good_b.sig follows x_port.1 x_port.2 -- `r` is port `s` at a rim vertex `u` obtain ⟨u, s, hu, rfl⟩ := Patch.rim_port good_b.sig r_tile r_vertex nothing_across -- the rim of `N_b` have rim_len := E_N b_pos unfold N at rim_len rw [rim_len] at hu -- one level up, `x` is on the strand of that rim port have lifted := lift_nest b_pos (.of_follow follows) x_port -- and is a port of `N_{b+1}` have x_up_port := isPort_up b_pos x_port cases tgt_eq : tgt (ori b) (Lk b .Delta 1) u s with | none => -- strictly inside child 1's side 2: the rim port is a hook of `N_{b+1}`, inside its side 4 obtain ⟨after_two, before_three⟩ := tgt_none tgt_eq refine ⟨4, ⟨x_up_port, _, inside_stp b_pos after_two before_three, lifted.trans ?_⟩, fun _ => by omega, fun _ => by omega, fun wrong => absurd wrong (by decide)⟩ -- the rim port of `N_b`, one level up, is a rim port of `N_{b+1}` have same_port := stretch_eq b_pos after_two before_three s rw [show N b = super b .Delta from rfl] at same_port rw [same_port] -- inside side 4 of `N_{b+1}` have stp_inside := inside_stp b_pos after_two before_three cases s · exact .refl · exact hook (by omega) (inside_bounds (by omega) stp_inside).1 (inside_bounds (by omega) stp_inside).2 | some q => -- one level up, the strand runs on to the hook at junction `q` have to_junction := lifted.trans (step_tile b_pos hu tgt_eq) cases orient : ori b · rw [orient] at tgt_eq rcases tgt_vals_f tgt_eq with rfl | rfl | rfl · exact ⟨5, reach_of x_up_port (inside_21 b_pos) to_junction, fun wrong => by simp at wrong, fun _ => by omega, fun wrong => absurd wrong (by decide)⟩ · exact ⟨4, reach_of x_up_port (inside_16 b_pos) to_junction, fun wrong => by simp at wrong, fun _ => by omega, fun wrong => absurd wrong (by decide)⟩ · exact ⟨4, reach_of x_up_port (inside_17 b_pos) to_junction, fun wrong => by simp at wrong, fun _ => by omega, fun wrong => absurd wrong (by decide)⟩ · rw [orient] at tgt_eq rcases tgt_vals_t tgt_eq with rfl | rfl | rfl | rfl · exact ⟨4, reach_of x_up_port (inside_17 b_pos) to_junction, fun _ => by omega, fun wrong => by simp at wrong, fun wrong => absurd wrong (by decide)⟩ · exact ⟨2, reach_of x_up_port (inside_9 b_pos) to_junction, fun _ => by omega, fun wrong => by simp at wrong, fun _ => to_junction⟩ · exact ⟨4, reach_of x_up_port (inside_16 b_pos) to_junction, fun _ => by omega, fun wrong => by simp at wrong, fun wrong => absurd wrong (by decide)⟩ · exact ⟨3, reach_of x_up_port (inside_12 b_pos) to_junction, fun _ => by omega, fun wrong => by simp at wrong, fun wrong => absurd wrong (by decide)⟩
Statement.flatMap_congr_mem
theorem in lean/SpectreKnot/CompSig.lean, line 420 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Two functions that agree on a list give the same flatMap over it.
Statement
theorem flatMap_congr_mem {α β : Type} {f g : α → List β} : ∀ (l : List α), (∀ x ∈ l, f x = g x) → l.flatMap f = l.flatMap g | [], _ => rfl | x :: rest, agree => by rw [List.flatMap_cons, List.flatMap_cons, agree x List.mem_cons_self, flatMap_congr_mem rest (fun y mem => agree y (List.mem_cons_of_mem _ mem))]
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.follow_bounded
theorem in lean/SpectreKnot/ProofStrand.lean, line 536 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
A strand of the nest tiling cannot stay among the tiles of one block N_B (B ≥ 1): in N_{B+2} every edge of those tiles is glued, so following it from a port there would never reach the rim of N_{B+2}.
Statement
theorem follow_bounded {B : Nat} (B_pos : 1 ≤ B) : ∀ p r, (N (B + 2)).Follow p r → (N (B + 2)).IsPort p →
∀ x : NPort, gP (B + 2) p = x.1 → (∀ k, (nestSys.walk x k).1.1 < (N B).tiles) → False
Names in its proof
Statement.NStatement.Patch.across_validStatement.across_gPStatement.across_isSomeStatement.gPStatement.gidStatement.gid_injStatement.gid_locStatement.gid_upStatement.goodStatement.locStatement.no_boundaryStatement.pieceEndStatement.pieceEnd_gPStatement.pieceEnd_validStatement.upStrandSystem.nextStrandSystem.walkiter_succ'
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (49 lines)
by -- `N_{B+2}` has the signature have sig := (good (B + 2) .Delta (by omega)).sig intro p r follows induction follows with | @leave p nothing_across => intro p_port x x_eq bounded -- the tile of `p` is a tile of `N_B`, seen in `N_{B+2}` have in_B : gid (B + 2) p.1 < (N B).tiles := by -- the strand starts at `x`, on a tile of `N_B` have start := bounded 0 change x.1.1 < _ at start rw [← x_eq] at start; exact start obtain ⟨loc_bound, gid_of_loc⟩ := gid_loc B _ in_B obtain ⟨up_bound, gid_of_up⟩ := gid_up loc_bound 2 -- that tile, taken into `N_B` and back up to `N_{B+2}`, is the tile of `p` have same_tile : up B 2 (loc B (gid (B + 2) p.1)) = p.1 := gid_inj up_bound p_port.1 (by rw [gid_of_up, gid_of_loc]) -- every edge of it is glued in `N_{B+2}` have all_glued : ∀ i, i < 14 → ((N (B + 2)).glue p.1 i).isSome := by intro i hi rw [← same_tile] exact no_boundary B_pos loc_bound hi -- the other end of the piece is on the same tile have end_valid := pieceEnd_valid p_port.2 -- so something lies across it, yet the strand leaves `N_{B+2}` there have across_end := across_isSome all_glued end_valid.1 end_valid.2 rw [nothing_across] at across_end contradiction | @next p q r across_end _ ih => intro p_port x x_eq bounded -- the next port of the strand, in `N_{B+2}` and in the nest tiling -- the other end of the piece is on the same tile have end_valid := pieceEnd_valid p_port.2 -- so it is a port of `N_{B+2}` have end_port : (N (B + 2)).IsPort (pieceEnd p) := ⟨end_valid.1 ▸ p_port.1, end_valid.2⟩ -- and so is the port `q` across from it have q_port : (N (B + 2)).IsPort q := Patch.across_valid sig end_port.1 end_port.2 across_end -- `q` is the next port of the strand in the nest tiling have next_is : (nestSys.next x).1 = gP (B + 2) q := by show (nestTiling.across (pieceEnd x.1)).getD (pieceEnd x.1) = _ rw [← x_eq, pieceEnd_gP, across_gP end_port across_end] rfl -- the strand from there is the rest of the strand from `x` refine ih q_port (nestSys.next x) next_is.symm (fun k => ?_) -- its ports are ports of the strand from `x`, so on tiles of `N_B` have later := bounded (k + 1) rw [StrandSystem.walk, iter_succ'] at later exact later
Statement.found_corner
theorem in lean/SpectreKnot/CompSig.lean, line 489 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
What Comp.check's search for a corner found: if the index it returns is a rim vertex, that vertex's port R is the one searched for.
Statement
theorem found_corner {C : Comp} {u t : Nat} (t_eq : t = (C.rimVertexPorts.findIdx? fun (x : GPort × GPort) => x.2 == (C.kids.length - 1, u, true)).getD C.rimVertexPorts.length) (t_lt : t < C.rimVertexPorts.length) : (C.vtx t).2 = (C.kids.length - 1, u, true)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by cases found : C.rimVertexPorts.findIdx? (fun (x : GPort × GPort) => x.2 == (C.kids.length - 1, u, true)) with | none => rw [found, Option.getD_none] at t_eq; omega | some i => rw [found, Option.getD_some] at t_eq subst t_eq obtain ⟨i_lt, pred_i, _⟩ := List.findIdx?_eq_some_iff_getElem.mp found simp only [Comp.vtx, List.getD_eq_getElem?_getD, List.getElem?_eq_getElem i_lt, Option.getD_some] simpa using pred_i
Statement.gA_last
theorem in lean/SpectreKnot/CompSig.lean, line 54 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Γ child's corner A is its vertex 0.
Statement
theorem gA_last (last_lt' : nk T - 1 < nk T) : (Comp.ofLens T L d ω).toGluing.A (nk T - 1) = 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by rw [ofLens_A last_lt', ite_eq_right (by rw [kid_last]; decide)]
Statement.gB_last
theorem in lean/SpectreKnot/CompSig.lean, line 72 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Γ child's corner B is its vertex 1 if ω, and its last rim vertex otherwise.
Statement
theorem gB_last (len_pos : ∀ c j, 1 ≤ L c j) (last_lt' : nk T - 1 < nk T) : (Comp.ofLens T L d ω).toGluing.B (nk T - 1) = if ω then 1 else pos (L (nk T - 1)) 6 - 1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- the Γ child's rim has at least two edges have rim_ge_two := (pos6 len_pos (nk T - 1)).1 rw [ofLens_B last_lt', gA_last last_lt'] cases ω with | true => simp only [ite_true, nxt]; rw [ite_eq_right (by omega)] | false => rfl
Statement.gL
def in lean/SpectreKnot/CompSig.lean, line 224 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The gluing's port at the parent's port L(p): the start of the child edge at rim position p - 1.
Statement
def gL (T : Kind) (L : Nat → Nat → Nat) (p : Nat) : GPort :=
((ownGo L (pcs T) (prv (rimN T L) p)).1, (ownGo L (pcs T) (prv (rimN T L) p)).2, true)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.gL_jpos
theorem in lean/SpectreKnot/NestStep.lean, line 206 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The gluing's port at the parent's port L of the junction where piece q ≥ 1 starts is jL.
Statement
theorem gL_jpos {m : Nat} (m_pos : 1 ≤ m) {q : Nat} (q_pos : 1 ≤ q) (hq : q < 22) :
gL .Delta (Lk m .Delta) (jpos (Lk m .Delta) q) = jL (Lk m .Delta) q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by -- piece `q - 1` has at least 5 edges have prev_len := len5 m_pos (pieceD (q - 1)).1 (pieceD (q - 1)).2 -- and piece `q` starts where it ends have prev_end := jpos_succ (Lk m .Delta) (show q - 1 < 22 by omega) rw [show q - 1 + 1 = q by omega] at prev_end -- the rim position just before piece `q` is the last edge of piece `q - 1` have before_start : prv (rimN .Delta (Lk m .Delta)) (jpos (Lk m .Delta) q) = jpos (Lk m .Delta) (q - 1) + (Lk m .Delta (pieceD (q - 1)).1 (pieceD (q - 1)).2 - 1) := by simp only [prv]; rw [ite_eq_right (by omega)]; omega -- that edge, as an edge of the child (the first edge of its side) have last_edge := ownGo_jpos (Lk m .Delta) (show q - 1 < 22 by omega) (show Lk m .Delta (pieceD (q - 1)).1 (pieceD (q - 1)).2 - 1 < _ by omega) simp only [gL, before_start, last_edge] simp only [jL] congr 2 omega
Statement.gL_sigma
theorem in lean/SpectreKnot/CompSig.lean, line 268 · read it in its file
Doc comment
gL p is on the parent's rim: nothing lies across it.
Statement
theorem gL_sigma (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.sigma (gL T L p) = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
obtain ⟨_, _, unglued⟩ := own_mate (d := d) (ω := ω) len_pos (prv_lt p_lt)
simp only [gL, Gluing.sigma]
rw [unglued]; rflStatement.gL_valid
theorem in lean/SpectreKnot/CompSig.lean, line 252 · read it in its file
Doc comment
gL p is a port of an actual child, at an actual rim vertex.
Statement
theorem gL_valid (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.Valid (gL T L p)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
obtain ⟨c_lt, k_lt, _⟩ := own_mate (d := d) (ω := ω) len_pos (prv_lt p_lt)
refine ⟨?_, ?_⟩ <;> simp only [gL]
· rw [ofLens_n]; exact c_lt
· rw [ofLens_E c_lt]; exact k_ltStatement.gP
def in lean/SpectreKnot/ProofStrand.lean, line 470 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Port p of N_b, as a port of the nest tiling.
Statement
def gP (b : Nat) (p : Port) : Port := (gid b p.1, p.2.1, p.2.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.gP_toBlock
theorem in lean/SpectreKnot/ProofStrand.lean, line 679 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Taken into N_b and then up k levels, port z keeps its number.
Statement
theorem gP_toBlock {b : Nat} {z : NPort} (in_block : z.1.1 < (N b).tiles) (k : Nat) :
gP (b + k) (upPort b k (toBlock b z)) = z.1
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
obtain ⟨loc_bound, gid_of_loc⟩ := gid_loc b z.1.1 in_block
simp only [gP, upPort, toBlock]
rw [(gid_up loc_bound k).2, gid_of_loc]Statement.gR
def in lean/SpectreKnot/CompSig.lean, line 220 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The gluing's port at the parent's port R(p) (in the parent's orientation): the end of the child edge at rim position p, in the children's sense.
Statement
def gR (T : Kind) (L : Nat → Nat → Nat) (d : Nat) (ω : Bool) (p : Nat) : GPort :=
((ownGo L (pcs T) p).1, nxt ((Comp.ofLens T L d ω).toGluing.E (ownGo L (pcs T) p).1) (ownGo L (pcs T) p).2, false)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.gR_jpos
theorem in lean/SpectreKnot/NestStep.lean, line 179 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The gluing's port at the parent's port R of the junction where piece q starts is jR.
Statement
theorem gR_jpos {m : Nat} (m_pos : 1 ≤ m) {q : Nat} (hq : q < 22) :
gR .Delta (Lk m .Delta) (dOff m) (ori m) (jpos (Lk m .Delta) q) = jR (Lk m .Delta) q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by -- piece `q` is a side of an actual child obtain ⟨hc, hj⟩ := piece_ok q hq -- which has an edge have len_pos : 0 < Lk m .Delta (pieceD q).1 (pieceD q).2 := by -- at least 5, in fact have := len5 m_pos (pieceD q).1 (pieceD q).2 omega -- the first edge of piece `q` (the last edge of the child's side) have first_edge := ownGo_jpos (Lk m .Delta) hq len_pos rw [Nat.add_zero] at first_edge simp only [gR, first_edge, Nat.sub_zero, ofLens_E hc] rw [nxt_last (fun i => by -- every side of the child has an edge have := len5 m_pos (pieceD q).1 i omega) hj] rfl
Statement.gR_rimL
theorem in lean/SpectreKnot/CompSig.lean, line 232 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The vertex of gR p is a parent rim vertex reached along the rim: the edge before it is unglued.
Statement
theorem gR_rimL (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.RimL (gR T L d ω p).1 (gR T L d ω p).2.1
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by obtain ⟨c_lt, k_lt, unglued⟩ := own_mate (d := d) (ω := ω) len_pos p_lt -- the edge is on the child's rim, in the composition's terms have k_lt' : (ownGo L (pcs T) p).2 < (Comp.ofLens T L d ω).toGluing.E (ownGo L (pcs T) p).1 := by rw [ofLens_E c_lt]; exact k_lt exact ⟨by rw [ofLens_n]; exact c_lt, nxt_lt k_lt', by simp only [gR]; rw [prv_nxt k_lt']; exact unglued⟩
Statement.gR_rot
theorem in lean/SpectreKnot/CompSig.lean, line 242 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Turning about the vertex of gR p reaches the start of the child edge at position p - 1, the vertex of gL p.
Statement
theorem gR_rot (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.Rot ((gR T L d ω p).1, (gR T L d ω p).2.1) (ownGo L (pcs T) (prv (rimN T L) p))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
own_rot len_pos p_lt
Statement.gR_sigma
theorem in lean/SpectreKnot/CompSig.lean, line 260 · read it in its file
Doc comment
gR p is on the parent's rim: nothing lies across it.
Statement
theorem gR_sigma (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.sigma (gR T L d ω p) = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the edge before the vertex is unglued have unglued := (gR_rimL (d := d) (ω := ω) len_pos p_lt).2.2 simp only [gR, Gluing.sigma] at unglued ⊢ rw [unglued]; rfl
Statement.gR_valid
theorem in lean/SpectreKnot/CompSig.lean, line 247 · read it in its file
Doc comment
gR p is a port of an actual child, at an actual rim vertex.
Statement
theorem gR_valid (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.Valid (gR T L d ω p)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
⟨(gR_rimL len_pos p_lt).1, (gR_rimL len_pos p_lt).2.1⟩
Statement.gid
def in lean/SpectreKnot/Statement.lean, line 332 · read it in its file
Used, through the names in proofs, for Theorem B.
In the statement file: read it line by line.
Doc comment
**gid b t: the number, in the whole nest tiling, of tile t of N_b.** The numbers are chosen so that the tiles of every block N_b get 0 … |N_b| - 1. In N_{b+1}: a tile of child 1 (N_b) keeps its number in N_b; a tile of child 0 comes next, after those of N_b; a tile of a later child keeps its own number.
Statement
def gid : Nat → Nat → Nat | 0, t => t | b + 1, t => if nestShift b ≤ t ∧ t < nestShift b + (N b).tiles then gid b (t - nestShift b) else if t < nestShift b then (N b).tiles + t else t
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.gid_inj
theorem in lean/SpectreKnot/ProofStrand.lean, line 153 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
gid b is one to one on the tiles of N_b.
Statement
theorem gid_inj {b t t' : Nat} (ht : t < (N b).tiles) (ht' : t' < (N b).tiles) (same : gid b t = gid b t') :
t = t'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- apply `loc b` to both sides: it takes `gid b t` back to `t` have back := (loc_gid b t ht).2 -- and `gid b t'` back to `t'` have back' := (loc_gid b t' ht').2 rw [← back, ← back', same]
Statement.gid_loc
theorem in lean/SpectreKnot/ProofStrand.lean, line 131 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
loc b sends 0 … |N_b| - 1 to tiles of N_b, and gid b undoes it.
Statement
theorem gid_loc : ∀ b g, g < (N b).tiles → loc b g < (N b).tiles ∧ gid b (loc b g) = g | 0, _, hg => ⟨hg, rfl⟩ | b + 1, g, hg => by -- `N_{b+1}` holds `N_b` and child 0 have grow := tiles_succ b by_cases old : g < (N b).tiles · -- a number of N_b: its tile in child 1 obtain ⟨bound, inverse⟩
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
gid_loc b g old
simp only [loc, ite_eq_left old, gid]
rw [ite_eq_left ⟨by omega, by omega⟩, Nat.add_sub_cancel, inverse]
exact ⟨by omega, rfl⟩
· by_cases from_child0 : g < (N b).tiles + nestShift b
· -- a number just after N_b: a tile of child 0
simp only [loc, ite_eq_right old, ite_eq_left from_child0, gid]
rw [ite_eq_right (by omega), ite_eq_left (by omega)]
exact ⟨by omega, by omega⟩
· -- a later number: a tile of a later child, same number
simp only [loc, ite_eq_right old, ite_eq_right from_child0, gid]
rw [ite_eq_right (by omega), ite_eq_right (by omega)]
exact ⟨hg, rfl⟩Statement.gid_up
theorem in lean/SpectreKnot/ProofStrand.lean, line 173 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Any number of levels up, a tile of N_b is still a tile, and keeps its number.
Statement
theorem gid_up {b t : Nat} (ht : t < (N b).tiles) : ∀ k, up b k t < (N (b + k)).tiles ∧ gid (b + k) (up b k t) = gid b t | 0 => ⟨ht, rfl⟩ | k + 1 => by -- one more level on top of `k` levels obtain ⟨bound, same⟩
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
gid_up ht k
obtain ⟨bound', same'⟩ := gid_up1 bound
rw [up_succ]
exact ⟨bound', same'.trans same⟩Statement.gid_up1
theorem in lean/SpectreKnot/ProofStrand.lean, line 162 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
One level up, a tile of N_b is still a tile, and keeps its number.
Statement
theorem gid_up1 {b t : Nat} (ht : t < (N b).tiles) :
up b 1 t < (N (b + 1)).tiles ∧ gid (b + 1) (up b 1 t) = gid b t
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by -- `N_{b+1}` holds child 0 and then `N_b` have grow := tiles_succ b -- `up b 1 t` is `t` moved past child 0 show t + nestShift b < _ ∧ gid (b + 1) (t + nestShift b) = gid b t refine ⟨by omega, ?_⟩ simp only [gid] rw [ite_eq_left ⟨by omega, by omega⟩, Nat.add_sub_cancel]
Statement.glueAt
def in lean/SpectreKnot/ComposeTiles.lean, line 165 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
What compose glues across edge e_i of tile t of child c.
Statement
def glueAt (T : Kind) (child : Nat → Patch) (c t i : Nat) : Option (Nat × Nat) := match (child c).glue t i with | some e => some (e.1 + offC child c, e.2) | none => let pos := ((child c).rim.findIdx? (· == (t, i))).getD 0 let j := ((List.range 6).filter fun j => (child c).vtx.getD j 0 ≤ pos).length - 1 let o := pos - (child c).vtx.getD j 0 match ((Pattern.adj T).getD c []).getD j none with | none => none | some (c', j') => let s := (child c').side j' (s[s.length - 1 - o]?).map fun e => (e.1 + offC child c', e.2)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.glue_lift
theorem in lean/SpectreKnot/ProofStrand.lean, line 202 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
An edge glued in N_b is glued the same way any number of levels up.
Statement
theorem glue_lift {b t i t' j : Nat} (ht : t < (N b).tiles) (glued : (N b).glue t i = some (t', j)) : ∀ k, (N (b + k)).glue (up b k t) i = some (up b k t', j) | 0 => glued | k + 1 => by rw [up_succ k b t, up_succ k b t'] exact glue_lift1 (gid_up ht k).1 (glue_lift ht glued k)
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.glue_lift1
theorem in lean/SpectreKnot/ProofStrand.lean, line 186 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
An edge glued in N_b is glued the same way, renumbered, in N_{b+1}.
Statement
theorem glue_lift1 {b t i t' j : Nat} (ht : t < (N b).tiles) (glued : (N b).glue t i = some (t', j)) :
(N (b + 1)).glue (up b 1 t) i = some (up b 1 t', j)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by rcases Nat.eq_zero_or_pos b with rfl | b_pos · -- `N_0` is a single tile: nothing is glued exact absurd glued (by simp [N, super, tile]) · rw [N_succ b_pos] -- the children of `N_{b+1}` have kids := KD b_pos -- the same gluing, seen in child 1 have glued_child : (kidsD b 1).glue t i = some (t', j) := glued show (Par b).glue (t + offC (kidsD b) 1) i = some (t' + offC (kidsD b) 1, j) rw [kids.glue_shift (c := 1) (by decide) ht] unfold glueAt rw [glued_child]
Statement.glue_ok_N
theorem in lean/SpectreKnot/ProofStrand.lean, line 318 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
A gluing in N_b joins actual tiles and edges.
Statement
theorem glue_ok_N (b : Nat) {t i t' j : Nat} (ht : t < (N b).tiles) (hi : i < 14)
(glued : (N b).glue t i = some (t', j)) : t' < (N b).tiles ∧ j < 14
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by rcases Nat.eq_zero_or_pos b with rfl | b_pos · -- `N_0` is a single tile: nothing is glued exact absurd glued (by simp [N, super, tile]) · exact (good b .Delta b_pos).sig.glue_ok t i t' j ht hi glued
Statement.glue_rim
theorem in lean/SpectreKnot/ComposeTiles.lean, line 233 · read it in its file
Formalises Lemma 4.2 Gluing.
Used, through the names in proofs, for Theorem A, Theorem B, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**Across a child's rim edge, compose glues what Comp.mate says.** Edge k of child c's rim (counted in its own orientation, from its vertex 0) is glued to edge k' of child c''s rim exactly when the abstract composition with these side lengths says so. Here L c j is the length of side j of child c.
Statement
theorem glue_rim (len_pos : ∀ c, c < nk T → ∀ j, j < 6 → 1 ≤ L c j) (pair_len : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j) (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧ (child c).E = pos (L c) 6) {c k : Nat} (c_lt : c < nk T) (k_lt : k < pos (L c) 6) (unglued : (child c).glue ((child c).edgeAt k).1 ((child c).edgeAt k).2 = none) (rim_inj : ∀ k', k' < (child c).E → (child c).edgeAt k' = (child c).edgeAt k → k' = k) : glueAt T child c ((child c).edgeAt k).1 ((child c).edgeAt k).2 = ((Comp.ofLens T L d ω).mate c k).map fun (c', k') => (((child c').edgeAt k').1 + offC child c', ((child c').edgeAt k').2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (33 lines)
by obtain ⟨vtx_eq, len_eq⟩ := shape c c_lt obtain ⟨j, o, j_lt, o_lt, rfl⟩ := decomp (L c) 6 (Nat.le_refl _) k k_lt -- `compose` finds the edge at its own rim position have found_at := findIdx_rim (P := child c) (k := pos (L c) j + o) (by rw [len_eq]; exact k_lt) rim_inj -- and finds that it lies on side `j` have side_eq : ((List.range 6).filter fun a => decide ((child c).vtx.getD a 0 ≤ pos (L c) j + o)).length - 1 = j := by refine count_eq (f := fun j => (child c).vtx.getD j 0) (fun a a_lt => ?_) j_lt ?_ ?_ · simp only [vtx_eq, range7_getD _ (show a < 7 by omega), range7_getD _ (show a + 1 < 7 by omega), pos_succ] have := len_pos c c_lt a a_lt -- side `a` has an edge, so vertex `a + 1` comes after vertex `a` omega · simp only [vtx_eq, range7_getD _ (show j < 7 by omega)]; omega · simp only [vtx_eq, range7_getD _ (show j + 1 < 7 by omega), pos_succ]; omega unfold glueAt rw [unglued] simp only [] rw [found_at, side_eq, vtx_eq, range7_getD _ (show j < 7 by omega), ofLens_mate len_pos c_lt j_lt o_lt, show pos (L c) j + o - pos (L c) j = o by omega] simp only [adjAt] cases adj_eq : ((Pattern.adj T).getD c []).getD j none with | none => rfl | some p => obtain ⟨c', j'⟩ := p obtain ⟨c_lt', j_lt', _, _⟩ := adj_valid c_lt j_lt adj_eq -- the two glued sides have the same length have same_len := pair_len c c_lt j j_lt c' j' adj_eq obtain ⟨vtx_eq', len_eq'⟩ := shape c' c_lt' simp only [Option.map_some] rw [side_length vtx_eq' len_eq' j_lt', side_getElem? vtx_eq' len_eq' j_lt' (show L c' j' - 1 - o < L c' j' by omega), show pos (L c') j' + L c' j' - 1 - o = pos (L c') j' + (L c' j' - 1 - o) by omega] rfl
Statement.glue_up
theorem in lean/SpectreKnot/ProofB.lean, line 401 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
An edge glued in N_m stays glued in N_{m+1}.
Statement
theorem glue_up {m : Nat} (m_pos : 1 ≤ m) {t i : Nat} (ht : t < (N m).tiles) {e : Nat × Nat}
(glued : (N m).glue t i = some e) : ∃ e', (N (m + 1)).glue (up m 1 t) i = some e'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by rw [N_succ m_pos] -- the children of `N_{m+1}` have kids := KD m_pos -- the same gluing, in child 1 have glued_child : (kidsD m 1).glue t i = some e := glued show ∃ e', (Par m).glue (t + offC (kidsD m) 1) i = some e' rw [kids.glue_shift (c := 1) (by decide) ht] unfold glueAt rw [glued_child] exact ⟨_, rfl⟩
Statement.gmate
theorem in lean/SpectreKnot/ProofGrand.lean, line 80 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
The gluing's mate at offset r in side j of child c, as Table 2 gives it.
Statement
theorem gmate (len_pos : ∀ c j, 1 ≤ L c j) {c j r c' j' : Nat} (c_lt : c < nk T) (j_lt : j < 6) (r_lt : r < L c j)
(adj_eq : adjAt T c j = some (c', j')) :
(Comp.ofLens T L d ω).toGluing.mate c (pos (L c) j + r) = some (c', pos (L c') j' + L c' j' - 1 - r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by show (Comp.ofLens T L d ω).mate c (pos (L c) j + r) = _ rw [ofLens_mate (fun c _ j _ => len_pos c j) c_lt j_lt r_lt, adj_eq]; rfl
Statement.good
theorem in lean/SpectreKnot/ProofA.lean, line 132 · read it in its file
Formalises Theorem 7.6 Signature Theorem.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Thm 7.6, at tile level: every supertile of level m ≥ 1 has the signature.
Statement
theorem good : ∀ m K, 1 ≤ m → Good m K
Names in its proof
Named in the proofs of
Statement.super_glueSymmStatement.linked_symmStatement.KDStatement.E_NStatement.hookStatement.super_side_lengthStatement.cornerA_eq_aPosStatement.cornerA_succStatement.compose_no_defaultStatement.theoremAStatement.firstStatement.no_boundaryStatement.Chain.kids_okStatement.Chain.glue_okStatement.Chain.follow_staysStatement.hook_endsStatement.hooks_apartStatement.hook_portStatement.chains_superStatement.chain_stretchStatement.grandparentStatement.signatureTheoremStatement.nestShift_posStatement.super_noSelfStatement.glue_ok_NStatement.follow_boundedStatement.linked_same
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by intro m induction m with | zero => intro K one_le_zero; omega | succ m ih => intro K _ rcases Nat.eq_zero_or_pos m with rfl | m_pos · exact good_one K · exact good_succ m_pos (fun K' => ih K' m_pos) K
Statement.good_one
theorem in lean/SpectreKnot/PatchSig.lean, line 190 · read it in its file
Formalises Computation 7.5 Base case.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The base of the induction: the level-1 supertiles have the signature (Computation 7.5).
Statement
theorem good_one (K : Kind) : Good 1 K
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- the kernel's check for this kind, split into its three parts have check := level1Check_all K simp only [level1Check, Bool.and_eq_true, beq_iff_eq] at check obtain ⟨⟨sig_ok, vtx_eq⟩, len_eq⟩ := check exact ⟨(level1 K).sigCheck_sound sig_ok, vtx_eq, len_eq⟩
Statement.good_succ
theorem in lean/SpectreKnot/ProofA.lean, line 107 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The induction step: if every level-m supertile has the signature, so does every level-(m+1) one.
Statement
theorem good_succ {m : Nat} (m_pos : 1 ≤ m) (good_m : ∀ K, Good m K) (T : Kind) : Good (m + 1) T
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (23 lines)
by obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ -- the children satisfy the bridge's hypotheses have kids := kids_at m_pos T good_m -- the parent is the composition of its children have super_eq : super (m' + 1 + 1) T = compose T fun c => super (m' + 1) (kidAt T c) := rfl -- the parent's rim length is where its vertex 6 sits have rim_len : rimN T (Lk (m' + 1) T) = vpos (m' + 1 + 1) T 6 := by rw [rimN_eq, vpos_eq m_pos T (Nat.le_refl _)] -- the parent's vertices sit where the lengths ℓ_{m+1} put them have vtx_eq : (compose T fun c => super (m' + 1) (kidAt T c)).vtx = (List.range 7).map (vpos (m' + 1 + 1) T) := by rw [parent_vtx kids.shape] apply List.map_congr_left intro J J_mem rw [vpos_eq m_pos T (by rw [List.mem_range] at J_mem; omega)] -- the parent's rim length have len_eq : (compose T fun c => super (m' + 1) (kidAt T c)).E = vpos (m' + 1 + 1) T 6 := by rw [compose_E kids.shape, rim_len] refine ⟨?_, by rw [super_eq]; exact vtx_eq, by rw [super_eq]; exact len_eq⟩ -- the parent has the signature at its Γ child's corners, which are where the induction puts them rw [super_eq, ori_succ, bPos_succ m_pos T, aPos_succ m_pos T] exact kids.parent_sig
Statement.grandparent
theorem in lean/SpectreKnot/ProofGrand.lean, line 407 · read it in its file
Formalises Lemma 8.3 Grandparent Lemma.
Doc comment
The Grandparent Lemma (as stated in Statement.lean).
Statement
theorem grandparent : Grandparent
The claim it proves: Statement.Grandparent.
Names in its proof
Compose.posCompose.pos_succStatement.LkStatement.NStatement.Patch.surrounded_or_chainStatement.chain_j16Statement.chain_j17Statement.chain_stretchStatement.goodStatement.inside_16Statement.inside_17Statement.inside_stpStatement.isPort_upStatement.super_glueSymmStatement.surrounded_off_side2Statement.surrounded_side4Statement.surrounded_upStatement.upStatement.up_succ
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (31 lines)
by intro b b_pos t i t_lt i_lt -- `N_b` has the signature have good_b := good b .Delta b_pos -- one level up, the tile is a tile of `N_{b+1}` have t_up : up b 1 t < (N (b + 1)).tiles := (isPort_up b_pos (x := (t, i, true)) ⟨t_lt, i_lt⟩).1 rw [show up b 2 t = up (b + 1) 1 (up b 1 t) from up_succ 1 b t] rcases Patch.surrounded_or_chain good_b.sig (super_glueSymm b .Delta) t_lt i_lt with surrounded | ⟨u, u_lt, n, on_chain⟩ · -- surrounded in `N_b` already exact surrounded_up (by omega) t_up (surrounded_up b_pos t_lt surrounded) · -- on the chain about rim vertex `u` of `N_b` -- side 2 ends where side 3 starts have side2_end : pos (Lk b .Delta 1) 3 = pos (Lk b .Delta 1) 2 + Lk b .Delta 1 2 := pos_succ (Lk b .Delta 1) 2 by_cases off_side2 : u < pos (Lk b .Delta 1) 2 ∨ pos (Lk b .Delta 1) 3 < u · -- off the closed side 2: surrounded in `N_{b+1}` exact surrounded_up (by omega) t_up (surrounded_off_side2 b_pos u_lt off_side2 on_chain) · -- on the closed side 2: on a chain of `N_{b+1}` about a vertex well inside its side 4 rcases (show u = pos (Lk b .Delta 1) 2 ∨ (pos (Lk b .Delta 1) 2 < u ∧ u < pos (Lk b .Delta 1) 3) ∨ u = pos (Lk b .Delta 1) 3 by omega) with at_two | inside | at_three · -- vertex 2: junction 17 of `N_{b+1}` subst at_two obtain ⟨n', up_chain⟩ := chain_j17 b_pos on_chain exact surrounded_side4 (by omega) (inside_17 b_pos) up_chain · -- strictly inside: the rim vertex `stp u` of `N_{b+1}` exact surrounded_side4 (by omega) (inside_stp b_pos inside.1 inside.2) (chain_stretch b_pos inside.1 inside.2 on_chain) · -- vertex 3: junction 16 of `N_{b+1}` subst at_three obtain ⟨n', up_chain⟩ := chain_j16 b_pos on_chain exact surrounded_side4 (by omega) (inside_16 b_pos) up_chain
Statement.hook
theorem in lean/SpectreKnot/NestStep.lean, line 158 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A hook: at a rim vertex of N_m other than the corners, the two ports lie on one strand.
Statement
theorem hook {m : Nat} (m_pos : 1 ≤ m) {v : Nat} (two_le_v : 2 ≤ v) (v_le : v + 2 ≤ pos (Lk m .Delta 1) 6) :
(N m).Linked ((N m).bport (ori m) (v, false)) ((N m).bport (ori m) (v, true))
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- `N_m` has the signature have good_m := good m .Delta m_pos -- with corners `0` and `1` or `E - 1` obtain ⟨A_zero, B_next⟩ := corners_N m_pos -- and its rim length have rim_len := E_N m_pos unfold N at rim_len -- from `L(v)` the ribbon leads to the port the signature pairs it with have follows := good_m.sig.sig v false (by rw [rim_len]; omega) -- which is `R(v)`, since `v` is not a corner have paired : btau (aPos m .Delta) (bPos m .Delta) (v, false) = (v, true) := by simp only [btau] rw [ite_eq_right (by omega), ite_eq_right (by omega)]; rfl rw [paired] at follows exact .of_follow follows
Statement.hookAt
abbrev in lean/SpectreKnot/ProofExact.lean, line 152 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
The port R at rim vertex v of N_m, a port of the hook there.
Statement
abbrev hookAt (m v : Nat) : Port := (N m).bport (ori m) (v, true)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.hook_ends
theorem in lean/SpectreKnot/ProofExact.lean, line 155 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
At a rim vertex of N_m other than the corners, the strand of the hook ends at the vertex's two ports.
Statement
theorem hook_ends {m : Nat} (m_pos : 1 ≤ m) {v : Nat} (two_le_v : 2 ≤ v) (v_le : v + 2 ≤ pos (Lk m .Delta 1) 6) :
(N m).Ends (hookAt m v) ((N m).bport (ori m) (v, false)) (hookAt m v)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- `N_m` has the signature have good_m := good m .Delta m_pos -- with corners `0` and `1` or `E - 1` obtain ⟨A_zero, B_next⟩ := corners_N m_pos -- and its rim length have rim_len := E_N m_pos unfold N at rim_len -- from `R(v)` the ribbon leads to the port the signature pairs it with have follows := good_m.sig.sig v true (by rw [rim_len]; omega) -- which is `L(v)`, since `v` is not a corner have paired : btau (aPos m .Delta) (bPos m .Delta) (v, true) = (v, false) := by simp only [btau] rw [ite_eq_right (by omega), ite_eq_right (by omega)]; rfl rw [paired] at follows exact ⟨follows, .inl ⟨Patch.across_bport good_m.sig (by rw [rim_len]; omega) true, rfl⟩⟩
Statement.hook_port
theorem in lean/SpectreKnot/ProofExact.lean, line 232 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
The hook port at a vertex inside a side of N_n is a port of N_n.
Statement
theorem hook_port {n J v : Nat} (n_pos : 1 ≤ n) (hJ : J < 6) (inside : Inside n J v) : (N n).IsPort (hookAt n v)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- `v` is a rim vertex away from the corners have bounds := inside_bounds hJ inside -- of a rim of this length have rim_len := E_N n_pos unfold N at rim_len exact Patch.bport_isPort (good n .Delta n_pos).sig (by rw [rim_len]; omega) true
Statement.hooks_apart
theorem in lean/SpectreKnot/ProofExact.lean, line 174 · read it in its file
Formalises Theorem 9.1 Merging.
Doc comment
**Hooks at different rim vertices of N_m (other than the corners) lie on different strands.**
Statement
theorem hooks_apart {m : Nat} (m_pos : 1 ≤ m) {v w : Nat} (two_le_v : 2 ≤ v) (v_le : v + 2 ≤ pos (Lk m .Delta 1) 6)
(two_le_w : 2 ≤ w) (w_le : w + 2 ≤ pos (Lk m .Delta 1) 6) (v_ne_w : v ≠ w) :
¬ (N m).Linked (hookAt m v) (hookAt m w)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (20 lines)
by intro linked -- `N_m` has the signature have good_m := good m .Delta m_pos -- and its rim length have rim_len := E_N m_pos unfold N at rim_len -- seen from `R(w)`, the ends are those of the hook at `v`, one way round or the other have ends_v := linked.ends good_m.sig (super_glueSymm m .Delta) (Patch.bport_isPort good_m.sig (by rw [rim_len]; omega) true) (hook_ends m_pos two_le_v v_le) -- but they are those of the hook at `w` have ends_w := hook_ends m_pos two_le_w w_le rcases ends_v with same | swapped · -- the same way round: `R(v) = R(w)` have equal := (same.unique ends_w).2 exact v_ne_w (Patch.bport_inj good_m.sig (by rw [rim_len]; omega) (by rw [rim_len]; omega) equal).1 · -- the other way round: `R(v) = L(w)` have equal := (swapped.unique ends_w).1 exact absurd (Patch.bport_inj good_m.sig (by rw [rim_len]; omega) (by rw [rim_len]; omega) equal).2 (by decide)
Statement.inside_12
theorem in lean/SpectreKnot/ProofB.lean, line 127 · read it in its file
Formalises Lemma 9.4 Where the junctions lie.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Junction 12 lies inside side 3 of N_{n+1}.
Statement
theorem inside_12 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 3 (jpos (Lk n .Delta) 12)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
inside_of n_pos (k₁ := 1) (k₂ := 2) (by omega) rfl rfl (by omega) (by omega)
Statement.inside_16
theorem in lean/SpectreKnot/ProofB.lean, line 130 · read it in its file
Formalises Lemma 9.4 Where the junctions lie.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Junction 16 lies inside side 4 of N_{n+1}.
Statement
theorem inside_16 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 4 (jpos (Lk n .Delta) 16)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
inside_of n_pos (k₁ := 2) (k₂ := 3) (by omega) rfl rfl (by omega) (by omega)
Statement.inside_17
theorem in lean/SpectreKnot/ProofB.lean, line 133 · read it in its file
Formalises Lemma 9.4 Where the junctions lie.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Junction 17 lies inside side 4 of N_{n+1}.
Statement
theorem inside_17 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 4 (jpos (Lk n .Delta) 17)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
inside_of n_pos (k₁ := 3) (k₂ := 2) (by omega) rfl rfl (by omega) (by omega)
Statement.inside_21
theorem in lean/SpectreKnot/ProofB.lean, line 136 · read it in its file
Formalises Lemma 9.4 Where the junctions lie.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Junction 21 lies inside side 5 of N_{n+1}.
Statement
theorem inside_21 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 5 (jpos (Lk n .Delta) 21)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
inside_of n_pos (k₁ := 2) (k₂ := 1) (by omega) rfl rfl (by omega) (by omega)
Statement.inside_9
theorem in lean/SpectreKnot/ProofB.lean, line 124 · read it in its file
Formalises Lemma 9.4 Where the junctions lie.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Junction 9 lies inside side 2 of N_{n+1}.
Statement
theorem inside_9 {n : Nat} (n_pos : 1 ≤ n) : Inside (n + 1) 2 (jpos (Lk n .Delta) 9)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
inside_of n_pos (k₁ := 2) (k₂ := 2) (by omega) rfl rfl (by omega) (by omega)
Statement.inside_bounds
theorem in lean/SpectreKnot/ProofB.lean, line 159 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A vertex inside a side is at least two vertices from both ends of the rim.
Statement
theorem inside_bounds {n J v : Nat} (hJ : J < 6) (inside : Inside n J v) :
2 ≤ v ∧ v + 2 ≤ pos (Lk n .Delta 1) 6
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- `v` is at least two vertices after the start of side `J` have after_start := inside.1 exact ⟨by omega, Nat.le_trans inside.2 (pos_mono _ (by omega))⟩
Statement.inside_of
theorem in lean/SpectreKnot/ProofB.lean, line 108 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
A junction q at least one piece after the start of side J and one piece before its end lies inside side J of N_{n+1}.
Statement
theorem inside_of {n J q k₁ k₂ : Nat} (n_pos : 1 ≤ n) (hJ : J < 6) (after_start : sJ J + k₁ = q)
(before_end : q + k₂ = sJ (J + 1)) (k₁_pos : 1 ≤ k₁) (k₂_pos : 1 ≤ k₂) :
Inside (n + 1) J (jpos (Lk n .Delta) q)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by -- the side ends within the rim's 22 pieces have end_le := sJ_le (J + 1) (by omega) -- `k₁` pieces from the side's start to `q`, each of at least 5 edges have from_start := jpos_le_add (Lk n .Delta) (len5 n_pos) (sJ J) k₁ (by omega) -- and `k₂` pieces from `q` to the side's end have to_end := jpos_le_add (Lk n .Delta) (len5 n_pos) q k₂ (by omega) rw [after_start] at from_start rw [before_end] at to_end refine ⟨?_, ?_⟩ · rw [pos_up n_pos (by omega)]; omega · rw [pos_up n_pos (by omega)]; omega
Statement.inside_stp
theorem in lean/SpectreKnot/ProofB.lean, line 140 · read it in its file
Formalises Lemma 9.4 Where the junctions lie.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent vertex at a vertex strictly inside child 1's side 2 lies inside side 4 of N_{n+1}.
Statement
theorem inside_stp {n : Nat} (n_pos : 1 ≤ n) {u : Nat} (after_two : pos (Lk n .Delta 1) 2 < u)
(before_three : u < pos (Lk n .Delta 1) 3) : Inside (n + 1) 4 (stp (Lk n .Delta) u)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- child 1's side 2 ends `L 1 2` edges after it starts have side_two_len : pos (Lk n .Delta 1) 3 = pos (Lk n .Delta 1) 2 + Lk n .Delta 1 2 := pos_succ _ 2 -- piece 17 starts where piece 16 ends have piece17 := jpos17 (Lk n .Delta) -- side 4 starts (at piece 14) at least 10 edges before piece 16 have side4_start := jpos_le (Lk n .Delta) (len5 n_pos) (q := 14) (q' := 16) (by omega) (by omega) -- and ends (at piece 19) at least 10 edges after piece 17 have side4_end := jpos_le (Lk n .Delta) (len5 n_pos) (q := 17) (q' := 19) (by omega) (by omega) refine ⟨?_, ?_⟩ · rw [pos_up n_pos (by omega)] show jpos (Lk n .Delta) 14 + 2 ≤ jpos (Lk n .Delta) 16 + (pos (Lk n .Delta 1) 3 - u) omega · rw [pos_up n_pos (by omega)] show jpos (Lk n .Delta) 16 + (pos (Lk n .Delta 1) 3 - u) + 2 ≤ jpos (Lk n .Delta) 19 omega
Statement.inside_two
theorem in lean/SpectreKnot/ProofExact.lean, line 224 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
A rim vertex well inside side J of N_n: two edges after the side's start.
Statement
theorem inside_two {n J : Nat} (n_pos : 1 ≤ n) : Inside n J (pos (Lk n .Delta 1) J + 2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- side `J` has at least 5 edges have side_len := len5 n_pos 1 J -- and ends where side `J + 1` starts have side_end := pos_succ (Lk n .Delta 1) J exact ⟨Nat.le_refl _, by omega⟩
Statement.iota1
theorem in lean/SpectreKnot/ProofB.lean, line 41 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The gluing's port (1, u, s) of N_{m+1} is port (u, s) of N_m, taken one level up.
Statement
theorem iota1 (m : Nat) (u : Nat) (s : Bool) :
ιP (kidsD m) (ori m) (1, u, s) = upPort m 1 ((N m).bport (ori m) (u, s))
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Statement.isPort_up
theorem in lean/SpectreKnot/NestStep.lean, line 124 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
One level up, a port of N_m is still a port.
Statement
theorem isPort_up {m : Nat} (m_pos : 1 ≤ m) {x : Port} (x_port : (N m).IsPort x) :
(N (m + 1)).IsPort (upPort m 1 x)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by rw [N_succ m_pos] exact ⟨tile_lt (kidsD m) (show 1 < nk .Delta by decide) x_port.1, x_port.2⟩
Statement.isPort_upk
theorem in lean/SpectreKnot/ProofB.lean, line 374 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
Any number of levels up, a port of N_b is still a port.
Statement
theorem isPort_upk {b : Nat} (b_pos : 1 ≤ b) {x : Port} (x_port : (N b).IsPort x) : ∀ k, (N (b + k)).IsPort (upPort b k x) | 0 => x_port | k + 1 => by rw [upPort_succ]; exact isPort_up (m := b + k) (by omega) (isPort_upk b_pos x_port k)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.jL
def in lean/SpectreKnot/StepMap.lean, line 27 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The port L of the same parent hook: the child vertex where piece q - 1's side begins (port R there).
Statement
def jL (L : Nat → Nat → Nat) (q : Nat) : GPort :=
((pieceD (q - 1)).1, pos (L (pieceD (q - 1)).1) (pieceD (q - 1)).2, true)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.jR
def in lean/SpectreKnot/StepMap.lean, line 23 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The port R of the parent hook at the start of piece q, as a port of the composition: the child vertex where piece q's side ends, in the children's sense (port L there).
Statement
def jR (L : Nat → Nat → Nat) (q : Nat) : GPort :=
((pieceD q).1, pos (L (pieceD q).1) (((pieceD q).2 + 1) % 6), false)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.jpos
def in lean/SpectreKnot/NestStep.lean, line 17 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Where piece q of the Δ-supertile's rim starts, for children's side lengths L.
Statement
def jpos (L : Nat → Nat → Nat) (q : Nat) : Nat := totL L ((pcs .Delta).take q)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.jpos17
theorem in lean/SpectreKnot/ProofB.lean, line 26 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Piece 17 starts where piece 16, child 1's side 2, ends.
Statement
theorem jpos17 (L : Nat → Nat → Nat) : jpos L 17 = jpos L 16 + L 1 2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- piece 17 starts where piece 16 does, plus its length have next_start := jpos_succ L (q := 16) (by omega) rw [piece16] at next_start exact next_start
Statement.jpos_full
theorem in lean/SpectreKnot/NestStep.lean, line 58 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The 22 pieces make up the whole rim.
Statement
theorem jpos_full (L : Nat → Nat → Nat) : jpos L 22 = rimN .Delta L
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by simp only [jpos, rimN] rw [List.take_of_length_le (by rw [pcs_len]; exact Nat.le_refl _)]
Statement.jpos_le
theorem in lean/SpectreKnot/NestStep.lean, line 51 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
With every side at least 5 edges long, piece q' starts at least 5 (q' - q) edges after piece q.
Statement
theorem jpos_le (L : Nat → Nat → Nat) (len_ge : ∀ c j, 5 ≤ L c j) {q q' : Nat} (q_le : q ≤ q') (q'_le : q' ≤ 22) :
jpos L q + 5 * (q' - q) ≤ jpos L q'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- `q' - q` pieces on from piece `q` have spread := jpos_le_add L len_ge q (q' - q) (by omega) rwa [show q + (q' - q) = q' by omega] at spread
Statement.jpos_le_add
theorem in lean/SpectreKnot/NestStep.lean, line 36 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
With every side at least 5 edges long, the piece k places after piece q starts at least 5 k edges later.
Statement
theorem jpos_le_add (L : Nat → Nat → Nat) (len_ge : ∀ c j, 5 ≤ L c j) (q : Nat) :
∀ k, q + k ≤ 22 → jpos L q + 5 * k ≤ jpos L (q + k)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by intro k induction k with | zero => intro _; simp | succ k ih => intro fits -- the first `k` pieces have := ih (by omega) rw [← Nat.add_assoc, jpos_succ L (by omega)] -- then piece `q + k`, of at least 5 edges have := len_ge (pieceD (q + k)).1 (pieceD (q + k)).2 omega
Statement.jpos_pos
theorem in lean/SpectreKnot/NestStep.lean, line 199 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Piece q ≥ 1 starts at least 5 edges along the rim.
Statement
theorem jpos_pos {m : Nat} (m_pos : 1 ≤ m) {q : Nat} (q_pos : 1 ≤ q) (hq : q ≤ 22) : 5 ≤ jpos (Lk m .Delta) q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- `q` pieces from the start, each of at least 5 edges have spread := jpos_le_add (Lk m .Delta) (len5 m_pos) 0 q (by omega) simp only [Nat.zero_add] at spread omega
Statement.jpos_succ
theorem in lean/SpectreKnot/NestStep.lean, line 29 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Piece q + 1 starts where piece q starts, plus the length of piece q.
Statement
theorem jpos_succ (L : Nat → Nat → Nat) {q : Nat} (hq : q < 22) :
jpos L (q + 1) = jpos L q + L (pieceD q).1 (pieceD q).2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
simp only [jpos]
rw [List.take_add_one, totL_append, pcs_get hq]
simp [totL]Statement.junction_lt
theorem in lean/SpectreKnot/ProofGrand.lean, line 331 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Junction q of N_{m+1} is a rim position.
Statement
theorem junction_lt {m q : Nat} (m_pos : 1 ≤ m) (q_lt : q < 22) : jpos (Lk m .Delta) q < rimN .Delta (Lk m .Delta)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the pieces from `q` to the end have spread := jpos_le (Lk m .Delta) (len5 m_pos) (q := q) (q' := 22) (by omega) (Nat.le_refl _) rw [jpos_full] at spread omega
Statement.kid_last
theorem in lean/SpectreKnot/CompSig.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The last child is the Γ child.
Statement
theorem kid_last : ∀ T : Kind, kidAt T (nk T - 1) = .Gamma
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro T; cases T <;> rflStatement.kid_one
theorem in lean/SpectreKnot/StepMap.lean, line 584 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Child 1 of Δ is not a Σ.
Statement
theorem kid_one : kidAt .Delta 1 ≠ .Sigma
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.kidsD
abbrev in lean/SpectreKnot/NestStep.lean, line 96 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The children of N_{m+1}: the level-m supertiles of the kinds Table 1 lists for Δ.
Statement
abbrev kidsD (m : Nat) : Nat → Patch := fun c => super m (kidAt .Delta c)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.kidsD_chains
theorem in lean/SpectreKnot/ProofGrand.lean, line 257 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
The children of N_{m+1} are discs at their rims.
Statement
theorem kidsD_chains {m : Nat} (m_pos : 1 ≤ m) : ∀ c, c < nk .Delta → (kidsD m c).RimChains (ori m)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
fun c _ => chains_super m (kidAt .Delta c) m_posStatement.kids_at
theorem in lean/SpectreKnot/ProofA.lean, line 53 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The children of a composition of level-m supertiles satisfy the bridge's hypotheses.
Statement
theorem kids_at {m : Nat} (m_pos : 1 ≤ m) (T : Kind) (good_m : ∀ K, Good m K) : Kids T (fun c => super m (kidAt T c)) (Lk m T) (dOff m) (ori m) (ori m) where len_pos c j
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by -- every side is at least 5 long (Lemma 6.5) have := (bounds m m_pos).1 (letterOf (kidAt T c) j) simp only [Lk]; omega pair c c_lt j j_lt c' j' adj_eq := by simp only [Lk, pair_letter c_lt j_lt adj_eq] shape c _ := ⟨(good_m (kidAt T c)).vtx, (good_m (kidAt T c)).len⟩ sig c c_lt := by -- the child has the signature at `aPos`, `bPos` have has_sig := (good_m (kidAt T c)).sig -- which is where the composition puts its corner `A` have A_eq : (Comp.ofLens T (Lk m T) (dOff m) (ori m)).toGluing.A c = aPos m (kidAt T c) := by rw [ofLens_A c_lt]; rfl -- and its corner `B` have B_eq : (Comp.ofLens T (Lk m T) (dOff m) (ori m)).toGluing.B c = bPos m (kidAt T c) := by rw [ofLens_B c_lt, A_eq]; rfl rw [A_eq, B_eq]; exact has_sig csig := prop_7_4 m m_pos T (ori m)
Statement.last_lt
theorem in lean/SpectreKnot/CompSig.lean, line 31 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every kind has a child.
Statement
theorem last_lt : ∀ T : Kind, 0 < nk T
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro T; cases T <;> decideStatement.len5
theorem in lean/SpectreKnot/NestStep.lean, line 121 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Every side of a level-m supertile has at least 5 edges (Lemma 6.5).
Statement
theorem len5 {m : Nat} (m_pos : 1 ≤ m) (c j : Nat) : 5 ≤ Lk m .Delta c j
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
(bounds m m_pos).1 _
Statement.lenAt
def in lean/SpectreKnot/PatchSig.lean, line 123 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
ℓ_m(K, j), as a function of the side j.
Statement
def lenAt (m : Nat) (K : Kind) (j : Nat) : Nat := letterLen m (letterOf K j)
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.level1
def in lean/SpectreKnot/Statement.lean, line 221 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
The level-1 supertile of kind K, from the data file (the spectre paper's Fig. 4.1 clusters).
Statement
def level1 (K : Kind) : Patch := ⟨Clusters.tiles K, fun t i => ((Clusters.glue K).getD t []).getD i none, Clusters.rim K, Clusters.vtx K⟩
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.level1Chains
theorem in lean/SpectreKnot/ProofGrand.lean, line 40 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
The kernel's check passes for the nine level-1 supertiles.
Statement
theorem level1Chains : ∀ K, (level1 K).chainCheck (ori 1) 8 = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro K; cases K <;> decide +kernelStatement.level1Check
def in lean/SpectreKnot/PatchSig.lean, line 154 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check of the nine level-1 supertiles.
Statement
def level1Check (K : Kind) : Bool :=
(level1 K).sigCheck (ori 1) (aPos 1 K) (bPos 1 K) 300 &&
(level1 K).vtx == (List.range 7).map (vpos 1 K) && (level1 K).E == vpos 1 K 6
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.level1Check_Delta
theorem in lean/SpectreKnot/PatchSig.lean, line 161 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Δ-supertile.
Statement
theorem level1Check_Delta : level1Check .Delta = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Gamma
theorem in lean/SpectreKnot/PatchSig.lean, line 159 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Γ-supertile.
Statement
theorem level1Check_Gamma : level1Check .Gamma = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Lambda
theorem in lean/SpectreKnot/PatchSig.lean, line 165 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Λ-supertile.
Statement
theorem level1Check_Lambda : level1Check .Lambda = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Phi
theorem in lean/SpectreKnot/PatchSig.lean, line 173 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Φ-supertile.
Statement
theorem level1Check_Phi : level1Check .Phi = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Pi
theorem in lean/SpectreKnot/PatchSig.lean, line 169 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Π-supertile.
Statement
theorem level1Check_Pi : level1Check .Pi = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Psi
theorem in lean/SpectreKnot/PatchSig.lean, line 175 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Ψ-supertile.
Statement
theorem level1Check_Psi : level1Check .Psi = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Sigma
theorem in lean/SpectreKnot/PatchSig.lean, line 171 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Σ-supertile.
Statement
theorem level1Check_Sigma : level1Check .Sigma = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Theta
theorem in lean/SpectreKnot/PatchSig.lean, line 163 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Θ-supertile.
Statement
theorem level1Check_Theta : level1Check .Theta = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_Xi
theorem in lean/SpectreKnot/PatchSig.lean, line 167 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for the level-1 Ξ-supertile.
Statement
theorem level1Check_Xi : level1Check .Xi = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.level1Check_all
theorem in lean/SpectreKnot/PatchSig.lean, line 178 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The kernel's check passes for all nine level-1 supertiles.
Statement
theorem level1Check_all : ∀ K, level1Check K = true
| .Gamma => level1Check_Gamma
| .Delta => level1Check_Delta
| .Theta => level1Check_Theta
| .Lambda => level1Check_Lambda
| .Xi => level1Check_Xi
| .Pi => level1Check_Pi
| .Sigma => level1Check_Sigma
| .Phi => level1Check_Phi
| .Psi => level1Check_Psi
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.level1NoSelf
def in lean/SpectreKnot/ProofStrand.lean, line 215 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
The kernel's check of the level-1 data.
Statement
def level1NoSelf (K : Kind) : Bool := (List.range (level1 K).tiles).all fun t => (List.range 14).all fun i => match (level1 K).glue t i with | none => true | some (t', _) => t' != t
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.level1NoSelf_all
theorem in lean/SpectreKnot/ProofStrand.lean, line 222 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
The check passes for all nine kinds.
Statement
theorem level1NoSelf_all : ∀ K, level1NoSelf K = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro K; cases K <;> decide +kernelStatement.level1Symm
def in lean/SpectreKnot/Linked.lean, line 186 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
The kernel's check of the level-1 data.
Statement
def level1Symm (K : Kind) : Bool := (List.range (level1 K).tiles).all fun t => (List.range 14).all fun i => match (level1 K).glue t i with | none => true | some (t', j) => (level1 K).glue t' j == some (t, i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.level1Symm_all
theorem in lean/SpectreKnot/Linked.lean, line 193 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
The check passes for all nine kinds.
Statement
theorem level1Symm_all : ∀ K, level1Symm K = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro K; cases K <;> decide +kernelStatement.level1_glueSymm
theorem in lean/SpectreKnot/Linked.lean, line 196 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
Every level-1 supertile has symmetric gluing.
Statement
theorem level1_glueSymm (K : Kind) : (level1 K).GlueSymm
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by intro t i t' j ht hi glued -- the kernel's check have check := level1Symm_all K simp only [level1Symm, List.all_eq_true, List.mem_range] at check -- at tile `t` and edge `i` have at_edge := check t ht i hi rw [glued] at at_edge simpa using at_edge
Statement.level1_noSelf
theorem in lean/SpectreKnot/ProofStrand.lean, line 225 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
No level-1 supertile glues a tile to itself.
Statement
theorem level1_noSelf (K : Kind) : NoSelf (level1 K)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by intro t i t' j ht hi glued -- the kernel's check have check := level1NoSelf_all K simp only [level1NoSelf, List.all_eq_true, List.mem_range] at check -- at tile `t` and edge `i` have at_edge := check t ht i hi rw [glued] at at_edge simpa using at_edge
Statement.lift_nest
theorem in lean/SpectreKnot/NestStep.lean, line 130 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**A strand of N_m is part of a strand of N_{m+1}.**
Statement
theorem lift_nest {m : Nat} (m_pos : 1 ≤ m) {x y : Port} (linked : (N m).Linked x y) (x_port : (N m).IsPort x) :
(N (m + 1)).Linked (upPort m 1 x) (upPort m 1 y)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by rw [N_succ m_pos] exact (KD m_pos).linked_lift (c := 1) (by decide) linked x_port
Statement.linked_same
theorem in lean/SpectreKnot/ProofStrand.lean, line 641 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
A strand of a block is part of a strand of the nest tiling.
Statement
theorem linked_same {m : Nat} (m_pos : 1 ≤ m) {u v : Port} (linked : (N m).Linked u v) (u_port : (N m).IsPort u) :
∀ x y : NPort, x.1 = gP m u → y.1 = gP m v → nestSys.Same x y
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
by -- `N_m` has the signature have sig := (good m .Delta m_pos).sig intro x y x_eq y_eq induction linked generalizing y with | refl => -- the same port have same_port : x = y := Subtype.ext (x_eq.trans y_eq.symm) subst same_port exact .refl | @piece q reach ih => -- along the piece at `q`, a port of `N_m` have q_port := reach.valid sig u_port -- one move along the piece, in the nest tiling have step := StrandSystem.Same.inside (S := nestSys) (ih ⟨gP m q, q_port.2⟩ rfl) -- which lands on `y` have is_y : nestSys.inside ⟨gP m q, q_port.2⟩ = y := Subtype.ext (by rw [y_eq]; exact pieceEnd_gP m q) rwa [is_y] at step | @edge q q' reach across_q ih => -- across the edge at `q`, a port of `N_m` have q_port := reach.valid sig u_port -- one move across the edge, in the nest tiling have step := StrandSystem.Same.across (S := nestSys) (ih ⟨gP m q, q_port.2⟩ rfl) -- which lands on `y` have is_y : nestSys.across ⟨gP m q, q_port.2⟩ = y := Subtype.ext (by show (nestTiling.across (gP m q)).getD _ = _ rw [across_gP q_port across_q, y_eq]; rfl) rwa [is_y] at step
Statement.linked_symm
theorem in lean/SpectreKnot/Linked.lean, line 214 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
**Same strand is symmetric in every supertile of level m ≥ 1.**
Statement
theorem linked_symm {m : Nat} (m_pos : 1 ≤ m) {K : Kind} {p q : Port} (linked : (super m K).Linked p q)
(p_port : (super m K).IsPort p) : (super m K).Linked q p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
linked.symm (good m K m_pos).sig (super_glueSymm m K) p_port
Statement.loc
def in lean/SpectreKnot/Statement.lean, line 340 · read it in its file
Used, through the names in proofs, for Theorem B.
In the statement file: read it line by line.
Doc comment
**loc b g**: the tile of N_b whose number in the nest tiling is g; it undoes gid b.
Statement
def loc : Nat → Nat → Nat | 0, g => g | b + 1, g => if g < (N b).tiles then loc b g + nestShift b else if g < (N b).tiles + nestShift b then g - (N b).tiles else g
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.loc_gid
theorem in lean/SpectreKnot/ProofStrand.lean, line 110 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
gid b sends the tiles of N_b into 0 … |N_b| - 1, and loc b undoes it.
Statement
theorem loc_gid : ∀ b t, t < (N b).tiles → gid b t < (N b).tiles ∧ loc b (gid b t) = t | 0, _, ht => ⟨ht, rfl⟩ | b + 1, t, ht => by -- `N_{b+1}` holds `N_b` and child 0 have grow := tiles_succ b by_cases in_child1 : nestShift b ≤ t ∧ t < nestShift b + (N b).tiles · -- a tile of child 1 (that is, of N_b): numbered as in N_b obtain ⟨bound, inverse⟩
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
loc_gid b (t - nestShift b) (by omega) simp only [gid, loc, ite_eq_left in_child1, ite_eq_left bound, inverse] exact ⟨by omega, by omega⟩ · by_cases in_child0 : t < nestShift b · -- a tile of child 0: numbered just after N_b simp only [gid, loc, ite_eq_right in_child1, ite_eq_left in_child0] rw [ite_eq_right (by omega), ite_eq_left (by omega)] exact ⟨by omega, by omega⟩ · -- a tile of a later child: keeps its number simp only [gid, loc, ite_eq_right in_child1, ite_eq_right in_child0] rw [ite_eq_right (by omega), ite_eq_right (by omega)] exact ⟨ht, rfl⟩
Statement.loopPatch
def in lean/SpectreKnot/ProofA.lean, line 224 · read it in its file
Doc comment
A one-tile patch with a made-up gluing (not a real one) that traps a ribbon: edges e_5 and e_3 are both glued to e_4.
Statement
def loopPatch : Patch := ⟨1, fun _ i => if i = 5 ∨ i = 3 then some (0, 4) else none, [], []⟩
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.loopPatch_closed
theorem in lean/SpectreKnot/ProofA.lean, line 229 · read it in its file
Doc comment
Negative control: NoClosedStrand can fail, so TheoremA is not true by definition. In loopPatch the ribbon from L(v_5) goes round v_5 to R(v_5), across e_5 to R(v_4), round v_4 to L(v_4), and across e_3 back to L(v_5), for ever.
Statement
theorem loopPatch_closed : ¬ loopPatch.NoClosedStrand
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by intro no_closed obtain ⟨r, follow⟩ := no_closed (0, 5, false) ⟨by decide, by decide⟩ -- no finite walk starts at `L(v_5)` or `R(v_4)`: each only leads on to the other have key : ∀ p r, loopPatch.Follow p r → p ≠ (0, 5, false) ∧ p ≠ (0, 4, true) := by intro p r follow_pr induction follow_pr with | @leave p leaves => constructor <;> rintro rfl <;> simp [loopPatch, Patch.across, straightThrough, pieceEnd] at leaves | @next p q r crosses _ ih => constructor <;> rintro rfl · have q_eq : q = (0, 4, true) := by -- from `L(v_5)` the walk goes on to `R(v_4)` simp [loopPatch, Patch.across, straightThrough, pieceEnd] at crosses; exact crosses.symm exact ih.2 q_eq · have q_eq : q = (0, 5, false) := by -- from `R(v_4)` the walk goes on to `L(v_5)` simp [loopPatch, Patch.across, straightThrough, pieceEnd] at crosses; exact crosses.symm exact ih.1 q_eq exact (key _ _ follow).1 rfl
Statement.mate_other_child
theorem in lean/SpectreKnot/ProofStrand.lean, line 236 · read it in its file
Doc comment
A sibling glued to side j of child c is a different child.
Statement
theorem mate_other_child {T : Kind} {L : Nat → Nat → Nat} {d : Nat} {ω : Bool} (len_pos : ∀ c j, 1 ≤ L c j)
{c k c' k' : Nat} (hc : c < nk T) (hk : k < pos (L c) 6)
(mated : (Comp.ofLens T L d ω).toGluing.mate c k = some (c', k')) : c' ≠ c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- the side `j` and offset `o` of the edge `k` obtain ⟨j, o, hj, ho, rfl⟩ := decomp (L c) 6 (Nat.le_refl _) k hk -- the gluing formula: across side `j` lies whatever Table 2 says have formula := ofLens_mate (d := d) (ω := ω) (fun c _ j _ => len_pos c j) hc hj ho change (Comp.ofLens T L d ω).mate c (pos (L c) j + o) = some (c', k') at mated rw [formula] at mated cases table : adjAt T c j with | none => rw [table] at mated; contradiction | some sib => obtain ⟨sib_child, sib_side⟩ := sib rw [table] at mated simp only [Option.map_some, Option.some.injEq, Prod.mk.injEq] at mated obtain ⟨rfl, _⟩ := mated -- Table 2 never glues a child to itself exact (adj_valid hc hj table).2.2.1
Statement.mate_some
theorem in lean/SpectreKnot/ProofB.lean, line 415 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
Child 1's sides other than side 2 are glued to siblings.
Statement
theorem mate_some {n : Nat} (n_pos : 1 ≤ n) {p j : Nat} (hj : j < 6) (not_two : j ≠ 2)
(after_start : pos (Lk n .Delta 1) j ≤ p) (before_end : p < pos (Lk n .Delta 1) (j + 1)) :
∃ e, (Comp.ofLens .Delta (Lk n .Delta) (dOff n) (ori n)).toGluing.mate 1 p = some e
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by -- side `j` has `L 1 j` edges have side_len := pos_succ (Lk n .Delta 1) j obtain ⟨o, rfl⟩ : ∃ o, p = pos (Lk n .Delta 1) j + o := ⟨p - pos (Lk n .Delta 1) j, by omega⟩ show ∃ e, (Comp.ofLens .Delta (Lk n .Delta) (dOff n) (ori n)).mate 1 (pos (Lk n .Delta 1) j + o) = some e rw [ofLens_mate (fun c _ j _ => by -- every side has an edge have := len5 n_pos c j omega) (by decide) hj (by omega)] cases adj : adjAt .Delta 1 j with | none => exact absurd (adj_one_none j hj adj) not_two | some _ => exact ⟨_, rfl⟩
Statement.mod14
theorem in lean/SpectreKnot/Bridge.lean, line 35 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The edge before vertex i + 1 (counted round the 14 vertices) is edge i.
Statement
theorem mod14 {i : Nat} (i_lt : i < 14) : ((i + 1) % 14 + 13) % 14 = i
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by omegaStatement.mono_of_succ
theorem in lean/SpectreKnot/ComposeTiles.lean, line 16 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A sequence that increases at every step below n is monotone on 0 … n.
Statement
theorem mono_of_succ {f : Nat → Nat} {n : Nat} (step_lt : ∀ a, a < n → f a < f (a + 1)) :
∀ a b, a ≤ b → b ≤ n → f a ≤ f b
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by intro a b a_le b_le induction b with | zero => -- `a ≤ 0`, so `a = 0` have a_zero : a = 0 := by omega subst a_zero; exact Nat.le_refl _ | succ b ih => by_cases a_eq : a = b + 1 · subst a_eq; exact Nat.le_refl _ · have le_b := ih (by omega) (by omega) -- up to `b` by induction -- and one step more have step := step_lt b (by omega) omega
Statement.nestAcross_some
theorem in lean/SpectreKnot/ProofStrand.lean, line 420 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Across every port of the nest tiling there is a port of another tile, and across that one lies the first.
Statement
theorem nestAcross_some {p : Port} (hp : p.2.1 < 14) :
∃ q, nestTiling.across p = some q ∧ q.2.1 < 14 ∧ q.1 ≠ p.1 ∧ nestTiling.across q = some p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (23 lines)
by obtain ⟨g, i, s⟩ := p simp only at hp cases s with | true => -- port `R(v_i)` lies on edge `e_i` obtain ⟨g', j, glued, other, hj, back⟩ := nestGlue_some g i hp refine ⟨(g', j, true), ?_, hj, other, ?_⟩ · show (nestGlue g i).map _ = _ rw [glued]; rfl · show (nestGlue g' j).map _ = _ rw [back]; rfl | false => -- port `L(v_i)` lies on edge `e_{i-1}` obtain ⟨g', j, glued, other, hj, back⟩ := nestGlue_some g ((i + 13) % 14) (by omega) refine ⟨(g', (j + 1) % 14, false), ?_, Nat.mod_lt _ (by omega), other, ?_⟩ · show (nestGlue g ((i + 13) % 14)).map _ = _ rw [glued]; rfl · show (nestGlue g' (((j + 1) % 14 + 13) % 14)).map _ = _ -- vertex `i - 1`, then one on, is vertex `i` again have round : ((i + 13) % 14 + 1) % 14 = i := by omega rw [mod14 hj, back] simp only [Option.map_some, round]
Statement.nestChain
def in lean/SpectreKnot/ProofChain.lean, line 691 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
The nest as a chain: every block a Δ, child 1 of the next (Table 1: child 1 of a Δ is a Δ).
Statement
def nestChain : Chain where K _ := .Delta c _ := 1 child_lt _ _ := show 1 < (Pattern.kids .Delta).length by decide child_kind _ _ := rfl
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.nestChain_shift
theorem in lean/SpectreKnot/ProofChain.lean, line 698 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
In the nest chain, a block starts where it does in the nest: after child 0, a Ξ.
Statement
theorem nestChain_shift (b : Nat) : nestChain.shift b = nestShift b
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Statement.nestChain_up
theorem in lean/SpectreKnot/ProofChain.lean, line 701 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
In the nest chain, a tile goes up as in the nest.
Statement
theorem nestChain_up : ∀ k b t, nestChain.up b k t = up b k t | 0, _, _ => rfl | k + 1, b, t => by show nestChain.up (b + 1) k (t + nestChain.shift b) = up (b + 1) k (t + nestShift b) rw [nestChain_shift] exact nestChain_up k (b + 1) _
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.nestCovers
theorem in lean/SpectreKnot/ProofChain.lean, line 710 · read it in its file
Formalises Theorem A The Daedalus Theorem.
Doc comment
**NestCovers** (as stated in Statement.lean): the nest chain covers, since every edge of N_b is glued in N_{b+2} (no_boundary, the paper's Lemma 8.3(b)).
Statement
theorem nestCovers : NestCovers
The claim it proves: Statement.NestCovers.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by refine ⟨nestChain, fun _ => ⟨rfl, rfl⟩, fun b t i b_pos ht hi => ⟨2, ?_⟩⟩ -- two levels up, as in the nest rw [nestChain_up] -- where the edge is glued exact no_boundary b_pos ht hi
Statement.nestGlue
def in lean/SpectreKnot/Statement.lean, line 349 · read it in its file
Used, through the names in proofs, for Theorem B.
In the statement file: read it line by line.
Doc comment
The gluing of the nest tiling: what lies across edge e_i of the tile numbered g. It is read off N_{g+3}, which contains the tile with two levels to spare. (By NestModel (d), every block gives the same answer.)
Statement
def nestGlue (g i : Nat) : Option (Nat × Nat) := ((N (g + 3)).glue (up (g + 1) 2 (loc (g + 1) g)) i).map fun (t', j) => (gid (g + 3) t', j)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.nestGlue_ext
theorem in lean/SpectreKnot/ProofStrand.lean, line 326 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Part (d): the nest tiling glues as every block does.
Statement
theorem nestGlue_ext {b t i t' j : Nat} (ht : t < (N b).tiles) (hi : i < 14)
(glued : (N b).glue t i = some (t', j)) : nestGlue (gid b t) i = some (gid b t', j)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (40 lines)
by -- the far tile is an actual tile of `N_b` have far_bound := (glue_ok_N b ht hi glued).1 generalize gid_eq : gid b t = g -- `nestGlue` reads tile number `g` off `N_{g+3}`, where it is `up (g + 1) 2 (loc (g + 1) g)` have big := tiles_ge (g + 1) obtain ⟨loc_bound, gid_of_loc⟩ := gid_loc (g + 1) g (by omega) obtain ⟨up_bound, gid_of_up⟩ := gid_up loc_bound 2 -- `N_{g+3}` glues every edge of that tile have edge_glued := no_boundary (b := g + 1) (by omega) loc_bound hi obtain ⟨⟨t'', j''⟩, glued''⟩ := Option.isSome_iff_exists.mp edge_glued -- the far tile there is an actual tile of `N_{g+3}` have far_bound'' := (glue_ok_N (g + 1 + 2) up_bound hi glued'').1 -- both gluings, seen in `N_{b+g+3}`, which contains both blocks: the gluing in `N_b` have lift_b := glue_lift ht glued (g + 1 + 2) -- and the gluing in `N_{g+3}` have lift_g := glue_lift up_bound glued'' b -- the tile keeps its number up there, from `N_b` have tile_b := gid_up ht (g + 1 + 2) -- and from `N_{g+3}` have tile_g := gid_up up_bound b -- so do the far tiles, from `N_b` have far_b := gid_up far_bound (g + 1 + 2) -- and from `N_{g+3}` have far_g := gid_up far_bound'' b rw [show g + 1 + 2 + b = b + (g + 1 + 2) by omega] at lift_g tile_g far_g -- the tile has the same number either way, so it is the same tile up there have same_tile : up (g + 1 + 2) b (up (g + 1) 2 (loc (g + 1) g)) = up b (g + 1 + 2) t := by apply gid_inj tile_g.1 tile_b.1 rw [tile_g.2, tile_b.2, gid_of_up, gid_of_loc, gid_eq] rw [same_tile, lift_b] at lift_g -- so the two gluings agree: the same far tile, the same edge simp only [Option.some.injEq, Prod.mk.injEq] at lift_g obtain ⟨same_far, rfl⟩ := lift_g -- the far tile's number, read off either block have far_number := far_g.2 rw [← same_far, far_b.2] at far_number unfold nestGlue rw [show g + 3 = g + 1 + 2 from rfl, glued''] simp only [Option.map_some, far_number]
Statement.nestGlue_some
theorem in lean/SpectreKnot/ProofStrand.lean, line 370 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Part (e): every edge of every tile of the nest tiling is glued, to an edge of another tile, which is glued back to it.
Statement
theorem nestGlue_some (g i : Nat) (hi : i < 14) :
∃ g' j, nestGlue g i = some (g', j) ∧ g' ≠ g ∧ j < 14 ∧ nestGlue g' j = some (g, i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (25 lines)
by -- tile number `g` as a tile of `N_{g+1}`, and of `N_{g+3}` have big := tiles_ge (g + 1) obtain ⟨loc_bound, gid_of_loc⟩ := gid_loc (g + 1) g (by omega) obtain ⟨up_bound, gid_of_up⟩ := gid_up loc_bound 2 -- `N_{g+3}` glues the edge, to an actual edge of an actual tile obtain ⟨⟨t', j⟩, glued⟩ := Option.isSome_iff_exists.mp (no_boundary (b := g + 1) (by omega) loc_bound hi) obtain ⟨far_bound, hj⟩ := glue_ok_N (g + 1 + 2) up_bound hi glued -- and glues it back have back := super_glueSymm (g + 1 + 2) .Delta _ i t' j up_bound hi glued -- the tile's number in the nest tiling is `g` have number : gid (g + 1 + 2) (up (g + 1) 2 (loc (g + 1) g)) = g := by rw [gid_of_up, gid_of_loc] refine ⟨gid (g + 1 + 2) t', j, ?_, ?_, hj, ?_⟩ · -- `nestGlue` reads exactly this gluing unfold nestGlue rw [show g + 3 = g + 1 + 2 from rfl, glued] rfl · -- a different tile of `N_{g+3}`, so a different number intro same -- `N_{g+3}` glues no tile to itself have differ := super_noSelf (g + 1 + 2) .Delta _ i t' j up_bound hi glued exact differ (gid_inj far_bound up_bound (same.trans number.symm)) · have glued_back := nestGlue_ext far_bound hj back -- the gluing back, read by part (d) rw [number] at glued_back exact glued_back
Statement.nestModel
theorem in lean/SpectreKnot/ProofStrand.lean, line 398 · read it in its file
Formalises Theorem B The Ariadne Theorem.
Doc comment
**NestModel**: the nest tiling is a tiling, and it is the union of the blocks.
Statement
theorem nestModel : NestModel
The claim it proves: Statement.NestModel.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
⟨fun g => by -- `N_{g+1}` has more than `g + 1` tiles have := tiles_ge (g + 1) omega, loc_gid, gid_loc, fun _ _ ht => (gid_up1 ht).2, fun _ _ _ _ _ ht hi glued => nestGlue_ext ht hi glued, nestGlue_some⟩
Statement.nestShift
def in lean/SpectreKnot/Statement.lean, line 238 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
In the statement file: read it line by line.
Doc comment
N_b is child 1 of N_{b+1}, after child 0, a Ξ: tile t of N_b is tile t + nestShift b of N_{b+1}.
Statement
def nestShift (b : Nat) : Nat := (super b .Xi).tiles
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.nestShift_pos
theorem in lean/SpectreKnot/ProofStrand.lean, line 74 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Child 0 of N_{b+1}, which comes before N_b, has at least one tile.
Statement
theorem nestShift_pos (b : Nat) : 1 ≤ nestShift b
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by rcases Nat.eq_zero_or_pos b with rfl | b_pos · -- level 0: child 0 is a single tile decide · -- level b ≥ 1: a supertile with the signature has a tile exact (good b .Xi b_pos).sig.tiles_pos
Statement.nestSys
def in lean/SpectreKnot/ProofStrand.lean, line 447 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
The nest tiling's ports, with its two pairings: the two ends of a piece (pieceEnd), and straight across an edge (nestTiling.across). Both pair every port with a different port, and undo themselves.
Statement
def nestSys : StrandSystem NPort where inside x := ⟨pieceEnd x.1, (pieceEnd_valid x.2).2⟩ across x := ⟨(nestTiling.across x.1).getD x.1, by obtain ⟨q, across_x, q_valid, _, _⟩ := nestAcross_some x.2 rw [across_x]; exact q_valid⟩ inside_inside x := Subtype.ext (Patch.pieceEnd_pieceEnd x.1) across_across x := by obtain ⟨q, across_x, _, _, back⟩ := nestAcross_some x.2 apply Subtype.ext show (nestTiling.across ((nestTiling.across x.1).getD x.1)).getD ((nestTiling.across x.1).getD x.1) = x.1 rw [across_x] simp only [Option.getD_some, back] inside_ne x same := pieceEnd_ne x.1 (congrArg Subtype.val same) across_ne x same := by obtain ⟨q, across_x, _, other, _⟩ := nestAcross_some x.2 -- the port across lies on another tile have same_tile := congrArg (fun y : NPort => y.1.1) same simp only [across_x, Option.getD_some] at same_tile exact other same_tile
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.nestTiling
def in lean/SpectreKnot/Statement.lean, line 353 · read it in its file
In the statement file: read it line by line.
Doc comment
The nest tiling: the tiles of all the blocks, numbered by gid, glued by nestGlue.
Statement
def nestTiling : Tiling := ⟨nestGlue⟩
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.no_boundary
theorem in lean/SpectreKnot/ProofB.lean, line 431 · read it in its file
Formalises Lemma 8.3 Grandparent Lemma.
Used, through the names in proofs, for Theorem A, Theorem B, Theorem 9.1.
Doc comment
No boundary (Lemma 8.3(b)): every edge of N_b is glued in N_{b+2}.
Statement
theorem no_boundary {b : Nat} (b_pos : 1 ≤ b) {t i : Nat} (ht : t < (N b).tiles) (hi : i < 14) :
((N (b + 2)).glue (up b 2 t) i).isSome
Names in its proof
Compose.Comp.mateCompose.Comp.ofLensCompose.decompCompose.posCompose.pos_succStatement.E_NStatement.KDStatement.Kids.glue_rimEdgeStatement.LkStatement.NStatement.N_succStatement.ParStatement.compose_EStatement.glue_upStatement.goodStatement.isPort_upStatement.jposStatement.jpos17Statement.jpos_fullStatement.jpos_leStatement.kidsDStatement.len5Statement.mate_someStatement.ofLens_mate_noneStatement.offCStatement.oriStatement.ownGo16Statement.own_injStatement.own_surjStatement.pos_upStatement.rim_edgeAtStatement.updOff
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (96 lines)
by -- `N_b` has the signature have good_b := good b .Delta b_pos -- so does `N_{b+1}`, of level at least 1 have b1_pos : 1 ≤ b + 1 := by omega -- the tile, one level up, is a tile of `N_{b+1}` have t_up : up b 1 t < (N (b + 1)).tiles := (isPort_up b_pos (x := (t, i, true)) ⟨ht, hi⟩).1 -- an edge glued in `N_{b+1}` is glued in `N_{b+2}` have glued_up : ∀ e, (N (b + 1)).glue (up b 1 t) i = some e → ((N (b + 2)).glue (up b 2 t) i).isSome := by intro e glued obtain ⟨e', glued'⟩ := glue_up b1_pos t_up glued rw [show up b 2 t = up (b + 1) 1 (up b 1 t) from rfl, glued']; rfl cases glued_b : (N b).glue t i with | some e => -- glued in `N_b`, so in `N_{b+1}` obtain ⟨e', glued'⟩ := glue_up b_pos ht glued_b exact glued_up e' glued' | none => -- a rim edge of `N_b`, at rim position `k` obtain ⟨k, hk, at_k⟩ := good_b.sig.rim_all t i ht hi glued_b -- the children of `N_{b+1}` have kids := KD b_pos -- the rim of `N_b` have rim_len := E_N b_pos unfold N at rim_len -- so `k` is a rim position of child 1 have k_lt : k < pos (Lk b .Delta 1) 6 := by rw [← rim_len]; exact hk -- `N_{b+1}` glues the edge as the gluing's `mate` says have formula := kids.glue_rimEdge (c := 1) (by decide) hk -- the edge, as rim edge `k` of child 1 have at_k' : (kidsD b 1).edgeAt k = (t, i) := at_k rw [at_k'] at formula -- its side `j` and offset `o` obtain ⟨j, o, hj, ho, k_eq⟩ := decomp (Lk b .Delta 1) 6 (Nat.le_refl _) k k_lt -- side `j` has `L 1 j` edges have side_len := pos_succ (Lk b .Delta 1) j by_cases side_two : j = 2 · -- on child 1's side 2: a rim edge of `N_{b+1}`, on its side 4 subst side_two -- side 2 of child 1 lies on the parent's rim have on_rim : (Comp.ofLens .Delta (Lk b .Delta) (dOff b) (ori b)).toGluing.mate 1 k = none := by rw [k_eq] exact ofLens_mate_none (fun c j => by -- every side has an edge have := len5 b_pos c j omega) (by decide) (by omega) ho rfl -- so the edge is the parent's rim edge at some position `p` obtain ⟨p, hp, own_p⟩ := own_surj (d := dOff b) (ω := ori b) kids.len_pos (by decide) k_lt on_rim -- piece 17 starts where piece 16 ends have piece17 := jpos17 (Lk b .Delta) -- and the rim ends at least 25 edges later have to_end := jpos_le (Lk b .Delta) (len5 b_pos) (q := 17) (q' := 22) (by omega) (by omega) -- where the pieces end have pieces_end := jpos_full (Lk b .Delta) -- `p` is on piece 16, child 1's side 2 have p_eq : p = jpos (Lk b .Delta) 16 + (Lk b .Delta 1 2 - 1 - o) := by apply own_inj kids.len_pos hp (by omega) rw [own_p, ownGo16 _ (by omega), k_eq] -- the same edge of child 1 have edge_eq : pos (Lk b .Delta 1) 2 + Lk b .Delta 1 2 - 1 - (Lk b .Delta 1 2 - 1 - o) = pos (Lk b .Delta 1) 2 + o := by omega rw [edge_eq] -- the edge at rim position `p` of `N_{b+1}` is `(up b 1 t, i)` have edge_p : (kidsD (b + 1) 1).edgeAt p = (up b 1 t, i) := by show (N (b + 1)).edgeAt p = _ rw [N_succ b_pos, rim_edgeAt kids.shape hp, own_p, at_k'] rfl -- the children of `N_{b+2}` have kids' := KD b1_pos -- `p` is a rim position of `N_{b+1}`, child 1 of `N_{b+2}` have p_lt : p < (kidsD (b + 1) 1).E := by show p < (N (b + 1)).E rw [N_succ b_pos, compose_E kids.shape]; exact hp -- `N_{b+2}` glues it as `mate` says have formula' := kids'.glue_rimEdge (c := 1) (by decide) p_lt rw [edge_p] at formula' -- side 4 of `N_{b+1}` starts at piece 14 have side4_start := pos_up b_pos (J := 4) (by omega) -- and side 5 at piece 19 have side5_start := pos_up b_pos (J := 5) (by omega) -- piece 16 starts at least 10 edges after piece 14 have from14 := jpos_le (Lk b .Delta) (len5 b_pos) (q := 14) (q' := 16) (by omega) (by omega) -- and piece 19 at least 10 edges after piece 17 have to19 := jpos_le (Lk b .Delta) (len5 b_pos) (q := 17) (q' := 19) (by omega) (by omega) -- side 4 of child 1 of `N_{b+2}` is glued to a sibling obtain ⟨e, mated⟩ := mate_some b1_pos (j := 4) (p := p) (by omega) (by omega) (by rw [side4_start]; show jpos (Lk b .Delta) 14 ≤ p; omega) (by rw [side5_start]; show p < jpos (Lk b .Delta) 19; omega) rw [mated] at formula' rw [N_succ (show 1 ≤ b + 1 by omega)] show ((Par (b + 1)).glue (up b 1 t + offC (kidsD (b + 1)) 1) i).isSome rw [formula']; rfl · -- on another side: glued to a sibling in `N_{b+1}` obtain ⟨e, mated⟩ := mate_some b_pos (j := j) (p := k) hj side_two (by omega) (by omega) rw [mated, Option.map_some] at formula exact glued_up _ (by rw [N_succ b_pos]; exact formula)
Statement.not_closed
theorem in lean/SpectreKnot/ProofStrand.lean, line 589 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
No strand of the nest tiling is closed. A closed strand visits finitely many tiles, so it stays in one block.
Statement
theorem not_closed (x : NPort) : ¬ nestSys.Closed x
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (48 lines)
by rintro ⟨n, n_pos, back⟩ -- the strand only ever visits the ports reached in its first `n` steps have periodic : ∀ k, ∃ j, j < n ∧ nestSys.walk x k = nestSys.walk x j := by intro k induction k with | zero => exact ⟨0, n_pos, rfl⟩ | succ k ih => obtain ⟨j, hj, same⟩ := ih by_cases wraps : j + 1 = n · refine ⟨0, n_pos, ?_⟩ rw [StrandSystem.walk_succ, same, ← StrandSystem.walk_succ, wraps, back] rfl · exact ⟨j + 1, by omega, by rw [StrandSystem.walk_succ, same, ← StrandSystem.walk_succ]⟩ -- the tiles of those ports have numbers below some bound `M` have bounded : ∀ m, ∃ M, ∀ j, j < m → (nestSys.walk x j).1.1 < M := by intro m induction m with | zero => exact ⟨0, fun j hj => absurd hj (by omega)⟩ | succ m ih => obtain ⟨M, below⟩ := ih refine ⟨M + (nestSys.walk x m).1.1 + 1, fun j hj => ?_⟩ by_cases earlier : j < m · have := below j earlier -- an earlier port: below `M` omega · have is_m : j = m := by omega -- port `m` itself subst is_m; omega obtain ⟨M, below⟩ := bounded n -- so they are all tiles of `N_{M+1}`, which has more than `M` tiles have big := tiles_ge (M + 1) -- every port of the strand is on a tile of `N_{M+1}` have in_block : ∀ k, (nestSys.walk x k).1.1 < (N (M + 1)).tiles := by intro k obtain ⟨j, hj, same⟩ := periodic k rw [same] -- the `j`-th port is below `M` have := below j hj omega -- start at the port `x`, seen in `N_{M+3}` obtain ⟨loc_bound, gid_of_loc⟩ := gid_loc (M + 1) x.1.1 (in_block 0) obtain ⟨up_bound, gid_of_up⟩ := gid_up loc_bound 2 -- it is a port of `N_{M+3}` have start : (N (M + 1 + 2)).IsPort (up (M + 1) 2 (loc (M + 1) x.1.1), x.1.2.1, x.1.2.2) := ⟨up_bound, x.2⟩ -- Theorem A says the strand leaves `N_{M+3}` obtain ⟨r, follows⟩ := theoremA (M + 1 + 2) .Delta _ start refine follow_bounded (B := M + 1) (by omega) _ r follows start x ?_ in_block show (gid (M + 1 + 2) (up (M + 1) 2 (loc (M + 1) x.1.1)), x.1.2.1, x.1.2.2) = x.1 rw [gid_of_up, gid_of_loc]
Statement.nxt_last
theorem in lean/SpectreKnot/ParentRim.lean, line 344 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
With positive side lengths f, the position after the last edge of side j is vertex j + 1 (vertex 0 after side 5).
Statement
theorem nxt_last {f : Nat → Nat} (len_pos : ∀ i, 1 ≤ f i) {j : Nat} (j_lt : j < 6) :
nxt (pos f 6) (pos f j + f j - 1) = pos f ((j + 1) % 6)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- side `j` has an edge have len_j := len_pos j rcases (show j = 5 ∨ j < 5 by omega) with rfl | j_lt5 · -- the last side -- its last edge is the last on the rim, so the next position wraps round to 0 have wraps : pos f 5 + f 5 - 1 + 1 = pos f 6 := by rw [show pos f 6 = pos f 5 + f 5 from pos_succ f 5]; omega simp only [nxt]; rw [ite_eq_left wraps]; rfl · -- an earlier side: no wrap-around -- vertex `j + 1` is before the end of the rim have before_end := pos_lt_of_pos f (fun i _ => len_pos i) (show j + 1 < 6 by omega) (Nat.le_refl 6) -- and is where side `j` ends have pos_next : pos f (j + 1) = pos f j + f j := pos_succ f j -- side `j + 1` has an edge have len_next := len_pos (j + 1) simp only [nxt] rw [ite_eq_right (show ¬ (pos f j + f j - 1 + 1 = pos f 6) by omega), Nat.mod_eq_of_lt (show j + 1 < 6 by omega)] omega
Statement.odd_two
theorem in lean/SpectreKnot/ProofExact.lean, line 308 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
**Odd b, two levels up**: every port of N_b lies, in N_{b+2}, on the strand of the hook at junction 12 or of the hook at junction 9.
Statement
theorem odd_two {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) {x : Port} (x_port : (N b).IsPort x) :
(N (b + 2)).Linked (upPort b 2 x) (hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 12)) ∨
(N (b + 2)).Linked (upPort b 2 x) (hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 9))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- level `b` is odd have ori_b := ori_odd odd -- level `b + 1` even have ori_b1 : ori (b + 1) = true := ori_even (by omega) -- one level up: inside side 4 or 5 obtain ⟨J, reach_J, _, sides_odd, _⟩ := first b_pos x_port rw [show upPort b 2 x = upPort (b + 1) 1 (upPort b 1 x) from upPort_succ b 1 x] rcases sides_odd ori_b with rfl | rfl · -- inside side 4: on to junction 12 exact .inl (reach_some (q := 12) (by omega) (by omega) reach_J (by rw [ori_b1]; rfl)) · -- inside side 5: on to junction 9 exact .inr (reach_some (q := 9) (by omega) (by omega) reach_J (by rw [ori_b1]; rfl))
Statement.odd_up_12
theorem in lean/SpectreKnot/ProofExact.lean, line 326 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Odd b, from two levels up to three: the strand of the hook at junction 12 of N_{b+2} runs on to the hook at junction 16 of N_{b+3}.
Statement
theorem odd_up_12 {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) {x : Port} (x_port : (N b).IsPort x)
(linked : (N (b + 2)).Linked (upPort b 2 x) (hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 12))) :
(N (b + 3)).Linked (upPort b 3 x) (hookAt (b + 3) (jpos (Lk (b + 2) .Delta) 16))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by -- level `b + 2` is odd have ori_b2 : ori (b + 2) = false := ori_odd (by omega) rw [show upPort b 3 x = upPort (b + 2) 1 (upPort b 2 x) from upPort_succ b 2 x] exact reach_some (q := 16) (by omega) (by omega) ⟨isPort_upk b_pos x_port 2, _, inside_12 (n := b + 1) (by omega), linked⟩ (by rw [ori_b2]; rfl)
Statement.odd_up_9
theorem in lean/SpectreKnot/ProofExact.lean, line 337 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Odd b, from two levels up to three: the hook at junction 9 of N_{b+2} lies on the rim of N_{b+3}, and its strand is a hook there.
Statement
theorem odd_up_9 {b : Nat} (b_pos : 1 ≤ b) {x : Port} (x_port : (N b).IsPort x)
(linked : (N (b + 2)).Linked (upPort b 2 x) (hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 9))) :
(N (b + 3)).Linked (upPort b 3 x) (hookAt (b + 3) (stp (Lk (b + 2) .Delta) (jpos (Lk (b + 1) .Delta) 9)))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by rw [show upPort b 3 x = upPort (b + 2) 1 (upPort b 2 x) from upPort_succ b 2 x] exact (lift_nest (m := b + 2) (by omega) linked (isPort_upk b_pos x_port 2)).trans (adv_none (by omega) (inside_9 (n := b + 1) (by omega)))
Statement.odd_witnesses
theorem in lean/SpectreKnot/ProofExact.lean, line 346 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
The two witnesses for odd b: a hook well inside side 4 of N_b reaches junction 12 of N_{b+2}, and one well inside side 0 reaches junction 9.
Statement
theorem odd_witnesses {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) :
(N (b + 2)).Linked (upPort b 2 (hookAt b (pos (Lk b .Delta 1) 4 + 2)))
(hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 12)) ∧
(N (b + 2)).Linked (upPort b 2 (hookAt b (pos (Lk b .Delta 1) 0 + 2)))
(hookAt (b + 2) (jpos (Lk (b + 1) .Delta) 9))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (21 lines)
by -- level `b` is odd have ori_b := ori_odd odd -- level `b + 1` even have ori_b1 : ori (b + 1) = true := ori_even (by omega) -- a hook well inside side 4 of `N_b` have inside_A := inside_two (n := b) (J := 4) b_pos -- and one well inside side 0 have inside_B := inside_two (n := b) (J := 0) b_pos -- one level up, the first reaches junction 16, inside side 4 of `N_{b+1}` have A_one := adv_some (q := 16) b_pos (by omega) inside_A (by rw [ori_b]; rfl) -- and the second junction 21, inside side 5 have B_one := adv_some (q := 21) b_pos (by omega) inside_B (by rw [ori_b]; rfl) rw [show upPort b 2 (hookAt b (pos (Lk b .Delta 1) 4 + 2)) = upPort (b + 1) 1 (upPort b 1 (hookAt b (pos (Lk b .Delta 1) 4 + 2))) from upPort_succ b 1 _, show upPort b 2 (hookAt b (pos (Lk b .Delta 1) 0 + 2)) = upPort (b + 1) 1 (upPort b 1 (hookAt b (pos (Lk b .Delta 1) 0 + 2))) from upPort_succ b 1 _] exact ⟨reach_some (q := 12) (by omega) (by omega) ⟨isPort_up b_pos (hook_port b_pos (by omega) inside_A), _, inside_16 b_pos, A_one⟩ (by rw [ori_b1]; rfl), reach_some (q := 9) (by omega) (by omega) ⟨isPort_up b_pos (hook_port b_pos (by omega) inside_B), _, inside_21 b_pos, B_one⟩ (by rw [ori_b1]; rfl)⟩
Statement.ofLens_kids_length
theorem in lean/SpectreKnot/CompSig.lean, line 484 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The composition has the kind's children.
Statement
theorem ofLens_kids_length : (Comp.ofLens T L d ω).kids.length = nk T
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [Comp.ofLens]Statement.ofLens_mate_none
theorem in lean/SpectreKnot/ParentRim.lean, line 366 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
An edge of a side that Table 2 puts on the parent's rim is unglued in the composition.
Statement
theorem ofLens_mate_none (len_pos : ∀ c j, 1 ≤ L c j) {c j o : Nat} (c_lt : c < nk T) (j_lt : j < 6)
(o_lt : o < L c j) (on_rim : adjAt T c j = none) :
(Comp.ofLens T L d ω).toGluing.mate c (pos (L c) j + o) = none
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by show (Comp.ofLens T L d ω).mate c (pos (L c) j + o) = none rw [ofLens_mate (fun c _ j _ => len_pos c j) c_lt j_lt o_lt, on_rim]; rfl
Statement.offC
def in lean/SpectreKnot/ComposeTiles.lean, line 109 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The number of the first tile of child c in the parent.
Statement
def offC (child : Nat → Patch) (c : Nat) : Nat := ((List.range c).map fun c' => (child c').tiles).sum
Names in its proof
Named in the proofs of
Statement.shiftPStatement.Kids.noClosedStatement.offC_succStatement.owner_existsStatement.owner_uniqueStatement.ownerCStatement.glueAtStatement.ownerC_eqStatement.Kids.glue_symmStatement.rimPieceStatement.Kids.parent_sigStatement.glue_upStatement.no_boundaryStatement.Chain.tiles_succStatement.Chain.glue_lift1Statement.tiles_succStatement.glue_lift1Statement.Kids.noSelfStatement.shiftCStatement.Kids.turn_fC
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.offC_mono
theorem in lean/SpectreKnot/ParentSig.lean, line 15 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Later children start later: the first tile number offC child c grows with c.
Statement
theorem offC_mono (child : Nat → Patch) {a b : Nat} (a_le : a ≤ b) : offC child a ≤ offC child b
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by induction b with | zero => -- `a ≤ 0`, so `a = 0` have a_zero : a = 0 := by omega subst a_zero; exact Nat.le_refl _ | succ b ih => by_cases a_eq : a = b + 1 · subst a_eq; exact Nat.le_refl _ · have := ih (by omega) -- up to `b` by induction rw [offC_succ]; omega
Statement.offC_succ
theorem in lean/SpectreKnot/ComposeTiles.lean, line 112 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Child c + 1 starts right after the tiles of child c.
Statement
theorem offC_succ (child : Nat → Patch) (c : Nat) : offC child (c + 1) = offC child c + (child c).tiles
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [offC, List.range_succ, List.map_append, List.sum_append]Statement.ori
def in lean/SpectreKnot/PatchSig.lean, line 127 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The own orientation at level m: counter-clockwise (as the tiles) at even levels, clockwise at odd ones (Def 2.2). It is also the sign ω_m: B = A + 1 at even levels and B = A - 1 at odd ones.
Statement
def ori (m : Nat) : Bool := m % 2 == 0
Names in its proof
none
Named in the proofs of
Statement.corners_NStatement.step_tileStatement.bPosStatement.GoodStatement.level1CheckStatement.kids_atStatement.ori_succStatement.stretch_eqStatement.ReachStatement.firstStatement.ZpStatement.ori_evenStatement.ori_oddStatement.chain_evenStatement.chain_oddStatement.mate_someStatement.no_boundaryStatement.hookAtStatement.even_twoStatement.two_evenStatement.odd_twoStatement.odd_up_12Statement.odd_witnessesStatement.surrounded_off_side2Statement.surrounded_side4Statement.chain_stretchStatement.chain_j16Statement.chain_j17Statement.signatureTheorem
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.ori_even
theorem in lean/SpectreKnot/ProofB.lean, line 313 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
Even levels have ω = true.
Statement
theorem ori_even {n : Nat} (even : n % 2 = 0) : ori n = true
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by simp [ori, even]Statement.ori_odd
theorem in lean/SpectreKnot/ProofB.lean, line 315 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
Odd levels have ω = false.
Statement
theorem ori_odd {n : Nat} (odd : n % 2 = 1) : ori n = false
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by simp [ori, odd]Statement.ori_succ
theorem in lean/SpectreKnot/ProofA.lean, line 74 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The orientation flips from each level to the next.
Statement
theorem ori_succ (m : Nat) : ori (m + 1) = !ori m
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by simp only [ori] rcases Nat.mod_two_eq_zero_or_one m with even | odd · have succ_odd : (m + 1) % 2 = 1 := by omega -- `m` even, so `m + 1` odd simp [even, succ_odd] · have succ_even : (m + 1) % 2 = 0 := by omega -- `m` odd, so `m + 1` even simp [odd, succ_even]
Statement.ownGo
def in lean/SpectreKnot/ParentRim.lean, line 27 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Position p of a rim made of the pieces pcs, each a side j of a child c traversed backwards: the edge (c, k) of the child there.
Statement
def ownGo : List (Nat × Nat) → Nat → Nat × Nat | [], _ => (0, 0) | (c, j) :: rest, p => if p < L c j then (c, pos (L c) j + L c j - 1 - p) else ownGo rest (p - L c j)
Names in its proof
Named in the proofs of
Statement.corners_nonSigmaStatement.corners_sigmaStatement.gRStatement.gLStatement.gR_rimLStatement.ownList_getElem?Statement.vtx_eqStatement.sig_of_checkStatement.ownGo_jposStatement.ownGo_appendStatement.ownGo_memStatement.ownGo_surjStatement.ownGo_injStatement.ownGo_zeroStatement.ownGo_lastStatement.ownGo_predStatement.own_rotStatement.rimPiece_getDStatement.Kids.bport_RStatement.Kids.parent_sig
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.ownGo16
theorem in lean/SpectreKnot/ProofB.lean, line 33 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Rim position jpos 16 + i of the Δ-supertile is child 1's edge pos 2 + L 1 2 - 1 - i, on its side 2.
Statement
theorem ownGo16 (L : Nat → Nat → Nat) {i : Nat} (hi : i < L 1 2) :
ownGo L (pcs .Delta) (jpos L 16 + i) = (1, pos (L 1) 2 + L 1 2 - 1 - i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the `i`-th edge of piece 16 have on_piece := ownGo_jpos L (q := 16) (by omega) (by rw [piece16]; exact hi) rw [piece16] at on_piece exact on_piece
Statement.ownGo_append
theorem in lean/SpectreKnot/ParentRim.lean, line 52 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A position in two lists of pieces, one after the other: in the first list if it is below the first's length, otherwise in the second, counted from the second's start.
Statement
theorem ownGo_append (l₁ l₂ : List (Nat × Nat)) (p : Nat) : ownGo L (l₁ ++ l₂) p = if p < totL L l₁ then ownGo L l₁ p else ownGo L l₂ (p - totL L l₁)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by induction l₁ generalizing p with | nil => simp [totL] | cons x l ih => obtain ⟨c, j⟩ := x simp only [List.cons_append, ownGo, totL] by_cases in_head : p < L c j · have in_l₁ : p < L c j + totL L l := by omega -- in the first piece, so within `l₁` simp [in_head, in_l₁] · rw [ih] by_cases in_rest : p - L c j < totL L l · have in_l₁ : p < L c j + totL L l := by omega -- past the first piece, but within `l₁` simp [in_head, in_rest, in_l₁] · have past_l₁ : ¬ p < L c j + totL L l := by omega -- past the whole of `l₁` simp only [in_head, in_rest, past_l₁, ite_false] congr 1; omega
Statement.ownGo_inj
theorem in lean/SpectreKnot/ParentRim.lean, line 129 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
On a list of distinct sides, different positions are different edges.
Statement
theorem ownGo_inj (len_pos : ∀ c j, j < 6 → 1 ≤ L c j) : ∀ (pcs : List (Nat × Nat)), pcs.Nodup →
(∀ x ∈ pcs, x.2 < 6) → ∀ p p', p < totL L pcs → p' < totL L pcs → ownGo L pcs p = ownGo L pcs p' → p = p'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (38 lines)
by intro pcs induction pcs with | nil => intro _ _ p p' p_lt; simp [totL] at p_lt | cons x rest ih => obtain ⟨c, j⟩ := x intro nodup sides_lt p p' p_lt p_lt' same_edge rw [List.nodup_cons] at nodup simp only [totL] at p_lt p_lt' simp only [ownGo] at same_edge -- the first piece is an actual side have j_lt : j < 6 := sides_lt (c, j) List.mem_cons_self -- and so are the later pieces have rest_lt : ∀ x ∈ rest, x.2 < 6 := fun x mem => sides_lt x (List.mem_cons_of_mem _ mem) -- an edge of the first piece is not an edge of a later piece have sep : ∀ q q', q < L c j → q' < totL L rest → (c, pos (L c) j + L c j - 1 - q) ≠ ownGo L rest q' := by intro q q' q_lt q_lt' same obtain ⟨c₂, j₂, o₂, mem, o₂_lt, at_q'⟩ := ownGo_mem rest q' q_lt' rw [at_q'] at same simp only [Prod.mk.injEq] at same obtain ⟨rfl, same_pos⟩ := same -- the same edge of the same child: the same side, which the list would then hold twice have same_side := side_pos_inj (len_pos c) j_lt (rest_lt _ mem) (show L c j - 1 - q < L c j by omega) o₂_lt (by rw [← same_pos]; omega) exact nodup.1 (same_side.1 ▸ mem) by_cases in_head : p < L c j <;> by_cases in_head' : p' < L c j · -- both in the first piece rw [ite_eq_left in_head, ite_eq_left in_head'] at same_edge simp only [Prod.mk.injEq] at same_edge omega · rw [ite_eq_left in_head, ite_eq_right in_head'] at same_edge exact absurd same_edge (sep p (p' - L c j) in_head (by omega)) · rw [ite_eq_right in_head, ite_eq_left in_head'] at same_edge exact absurd same_edge.symm (sep p' (p - L c j) in_head' (by omega)) · rw [ite_eq_right in_head, ite_eq_right in_head'] at same_edge -- both in later pieces: by induction have := ih nodup.2 rest_lt (p - L c j) (p' - L c j) (by omega) (by omega) same_edge omega
Statement.ownGo_jpos
theorem in lean/SpectreKnot/NestStep.lean, line 63 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The rim position jpos q + i lies on piece q, at its i-th edge (counted in the parent's sense).
Statement
theorem ownGo_jpos (L : Nat → Nat → Nat) {q i : Nat} (hq : q < 22) (hi : i < L (pieceD q).1 (pieceD q).2) :
ownGo L (pcs .Delta) (jpos L q + i) =
((pieceD q).1, pos (L (pieceD q).1) (pieceD q).2 + L (pieceD q).1 (pieceD q).2 - 1 - i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by -- the pieces from `q` on: piece `q`, then the rest have drop_q : (pcs .Delta).drop q = pieceD q :: (pcs .Delta).drop (q + 1) := by rw [List.drop_eq_getElem_cons (by rw [pcs_len]; exact hq)] congr 1 -- piece `q` of the list have get_q := pcs_get hq rw [List.getElem?_eq_getElem (by rw [pcs_len]; exact hq)] at get_q simpa using get_q conv => lhs; rw [← List.take_append_drop q (pcs .Delta)] rw [ownGo_append, drop_q, show totL L ((pcs .Delta).take q) = jpos L q from rfl, ite_eq_right (by omega), Nat.add_sub_cancel_left] simp only [ownGo] rw [ite_eq_left hi]
Statement.ownGo_last
theorem in lean/SpectreKnot/ParentRim.lean, line 175 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The last position is the first edge of the last piece's side.
Statement
theorem ownGo_last {c j : Nat} (len_pos : 1 ≤ L c j) : ∀ (pcs : List (Nat × Nat)),
ownGo L (pcs ++ [(c, j)]) (totL L (pcs ++ [(c, j)]) - 1) = (c, pos (L c) j)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by intro pcs -- the last piece adds its side's length have total : totL L (pcs ++ [(c, j)]) = totL L pcs + L c j := by rw [totL_append]; simp [totL] rw [ownGo_append, total, ite_eq_right (show ¬ (totL L pcs + L c j - 1 < totL L pcs) by omega), show totL L pcs + L c j - 1 - totL L pcs = L c j - 1 by omega] simp only [ownGo] rw [ite_eq_left (show L c j - 1 < L c j by omega)] congr 1; omega
Statement.ownGo_mem
theorem in lean/SpectreKnot/ParentRim.lean, line 72 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every position below the total length is an edge pos j + o of a listed side (c, j), with o inside the side.
Statement
theorem ownGo_mem : ∀ (pcs : List (Nat × Nat)) (p : Nat), p < totL L pcs →
∃ c j o, (c, j) ∈ pcs ∧ o < L c j ∧ ownGo L pcs p = (c, pos (L c) j + o)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by intro pcs induction pcs with | nil => intro p p_lt; simp [totL] at p_lt | cons x rest ih => obtain ⟨c, j⟩ := x intro p p_lt simp only [totL] at p_lt simp only [ownGo] by_cases in_head : p < L c j · -- in the first piece, counted from the end of its side rw [ite_eq_left in_head] exact ⟨c, j, L c j - 1 - p, List.mem_cons_self, by omega, by congr 1; omega⟩ · -- in a later piece rw [ite_eq_right in_head] obtain ⟨c', j', o, mem, o_lt, at_p⟩ := ih (p - L c j) (by omega) exact ⟨c', j', o, List.mem_cons_of_mem _ mem, o_lt, at_p⟩
Statement.ownGo_pred
theorem in lean/SpectreKnot/ParentRim.lean, line 188 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Going back one position: inside a piece, the next edge of the same side (in the children's sense); at the start of a piece, the first edge of the previous piece.
Statement
theorem ownGo_pred (len_pos : ∀ c j, 1 ≤ L c j) : ∀ (pcs : List (Nat × Nat)) (p : Nat), 0 < p → p < totL L pcs →
(∃ c j o, (c, j) ∈ pcs ∧ o + 1 < L c j ∧ ownGo L pcs p = (c, pos (L c) j + o) ∧
ownGo L pcs (p - 1) = (c, pos (L c) j + o + 1)) ∨
(∃ c j c' j', Consec pcs (c', j') (c, j) ∧ ownGo L pcs p = (c, pos (L c) j + L c j - 1) ∧
ownGo L pcs (p - 1) = (c', pos (L c') j'))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (41 lines)
by intro pcs induction pcs with | nil => intro p _ p_lt; simp [totL] at p_lt | cons x rest ih => obtain ⟨c, j⟩ := x intro p p_pos p_lt simp only [totL] at p_lt by_cases in_head : p < L c j · -- inside the first piece left refine ⟨c, j, L c j - 1 - p, List.mem_cons_self, by omega, ?_, ?_⟩ · simp only [ownGo]; rw [ite_eq_left in_head]; congr 1; omega · simp only [ownGo]; rw [ite_eq_left (by omega)]; congr 1; omega · by_cases at_start : p = L c j · -- at the start of the second piece: the step back is into the first right subst at_start cases rest with | nil => simp [totL] at p_lt | cons y rest' => obtain ⟨c₂, j₂⟩ := y refine ⟨c₂, j₂, c, j, .here, ?_, ?_⟩ · simp only [ownGo] rw [ite_eq_right (show ¬ (L c j < L c j) by omega), Nat.sub_self, ite_eq_left (show 0 < L c₂ j₂ from len_pos c₂ j₂)] rfl · simp only [ownGo]; rw [ite_eq_left (by omega)]; congr 1; omega · -- further on: by induction, in the rest of the list -- a positive position in the rest of the list have past_pos : 0 < p - L c j := by omega rcases ih (p - L c j) past_pos (by omega) with ⟨c', j', o, mem, o_lt, at_p, at_prev⟩ | ⟨c', j', c'', j'', consec, at_p, at_prev⟩ · left refine ⟨c', j', o, List.mem_cons_of_mem _ mem, o_lt, ?_, ?_⟩ · simp only [ownGo]; rw [ite_eq_right in_head]; exact at_p · simp only [ownGo]; rw [ite_eq_right (by omega), show p - 1 - L c j = p - L c j - 1 by omega]; exact at_prev · right refine ⟨c', j', c'', j'', .there consec, ?_, ?_⟩ · simp only [ownGo]; rw [ite_eq_right in_head]; exact at_p · simp only [ownGo]; rw [ite_eq_right (by omega), show p - 1 - L c j = p - L c j - 1 by omega]; exact at_prev
Statement.ownGo_surj
theorem in lean/SpectreKnot/ParentRim.lean, line 92 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every edge of every listed side is at some position.
Statement
theorem ownGo_surj : ∀ (pcs : List (Nat × Nat)) {c j o : Nat}, (c, j) ∈ pcs → o < L c j →
∃ p, p < totL L pcs ∧ ownGo L pcs p = (c, pos (L c) j + o)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (21 lines)
by intro pcs induction pcs with | nil => intro c j o mem; simp at mem | cons x rest ih => obtain ⟨c', j'⟩ := x intro c j o mem o_lt rcases List.mem_cons.mp mem with is_head | in_rest · -- the first piece: counted from the end of its side simp only [Prod.mk.injEq] at is_head obtain ⟨rfl, rfl⟩ := is_head refine ⟨L c j - 1 - o, by simp only [totL]; omega, ?_⟩ simp only [ownGo] rw [ite_eq_left (by omega)] congr 1; omega · -- a later piece: after the first obtain ⟨p, p_lt, at_p⟩ := ih in_rest o_lt refine ⟨L c' j' + p, by simp only [totL]; omega, ?_⟩ simp only [ownGo] rw [ite_eq_right (by omega), Nat.add_sub_cancel_left] exact at_p
Statement.ownGo_zero
theorem in lean/SpectreKnot/ParentRim.lean, line 170 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Position 0 is the last edge of the first piece's side (sides are traversed backwards).
Statement
theorem ownGo_zero {c j : Nat} {rest : List (Nat × Nat)} (len_pos : 1 ≤ L c j) :
ownGo L ((c, j) :: rest) 0 = (c, pos (L c) j + L c j - 1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by simp only [ownGo]; rw [ite_eq_left (show 0 < L c j by omega)]; rfl
Statement.ownList
def in lean/SpectreKnot/CompSig.lean, line 391 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 3's rim as a list, in the parent's own order: the edges of each listed side, from its last edge to its first (as ownGo reads them).
Statement
def ownList (L : Nat → Nat → Nat) (l : List (Nat × Nat)) : List (Nat × Nat) := l.flatMap fun x => (List.range (L x.1 x.2)).map fun i => (x.1, pos (L x.1) x.2 + L x.1 x.2 - 1 - i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.ownList_getElem?
theorem in lean/SpectreKnot/CompSig.lean, line 402 · read it in its file
Doc comment
Entry p of the list is the edge ownGo finds at position p.
Statement
theorem ownList_getElem? (L : Nat → Nat → Nat) : ∀ l p, p < totL L l → (ownList L l)[p]? = some (ownGo L l p) | [], p, p_lt => by simp [totL] at p_lt | (c, j) :: rest, p, p_lt => by simp only [totL] at p_lt simp only [ownList, List.flatMap_cons] by_cases in_head : p < L c j · -- in the first piece rw [List.getElem?_append_left (by simp only [List.length_map, List.length_range]; exact in_head), List.getElem?_map, List.getElem?_range in_head] simp only [ownGo, ite_eq_left in_head, Option.map_some] · -- in a later piece: by induction rw [List.getElem?_append_right (by simp only [List.length_map, List.length_range]; omega)] simp only [List.length_map, List.length_range] rw [show (rest.flatMap fun x => (List.range (L x.1 x.2)).map fun i => (x.1, pos (L x.1) x.2 + L x.1 x.2 - 1 - i)) = ownList L rest from rfl, ownList_getElem? L rest (p - L c j) (by omega)] simp only [ownGo, ite_eq_right in_head]
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.ownList_length
theorem in lean/SpectreKnot/CompSig.lean, line 395 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The list has the total length of its pieces.
Statement
theorem ownList_length (L : Nat → Nat → Nat) : ∀ l, (ownList L l).length = totL L l | [] => rfl | (c, j) :: rest => by simp only [ownList, List.flatMap_cons, List.length_append, List.length_map, List.length_range, totL] rw [← ownList_length L rest]; rfl
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.own_inj
theorem in lean/SpectreKnot/ParentRim.lean, line 453 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Different parent rim positions are different edges.
Statement
theorem own_inj (len_pos : ∀ c j, 1 ≤ L c j) {p p' : Nat} (p_lt : p < rimN T L) (p_lt' : p' < rimN T L)
(same_edge : ownGo L (pcs T) p = ownGo L (pcs T) p') : p = p'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
ownGo_inj (fun c j _ => len_pos c j) (pcs T) (pcs_nodup T) (fun x mem => (pcs_valid T x mem).2.1) p p' p_lt p_lt' same_edge
Statement.own_mate
theorem in lean/SpectreKnot/ParentRim.lean, line 425 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every parent rim position is a rim edge of the composition.
Statement
theorem own_mate (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(ownGo L (pcs T) p).1 < nk T ∧ (ownGo L (pcs T) p).2 < pos (L (ownGo L (pcs T) p).1) 6 ∧
(Comp.ofLens T L d ω).toGluing.mate (ownGo L (pcs T) p).1 (ownGo L (pcs T) p).2 = none
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by obtain ⟨c, j, o, _, c_lt, j_lt, on_rim, o_lt, at_p⟩ := own_valid p_lt rw [at_p] dsimp only refine ⟨c_lt, ?_, ofLens_mate_none len_pos c_lt j_lt o_lt on_rim⟩ -- side `j` ends where side `j + 1` starts have := pos_lt_of_pos (L c) (fun i _ => len_pos c i) (show j < j + 1 by omega) (show j + 1 ≤ 6 by omega) -- and ends no later than the rim have side_end := pos_mono (L c) (show j + 1 ≤ 6 by omega) rw [pos_succ] at side_end; omega
Statement.own_rot
theorem in lean/SpectreKnot/ParentRim.lean, line 460 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim, read from Table 3, is consistent with turning about its vertices: from the end of the edge at position p (in the children's sense), turning about the vertex reaches the edge at position p - 1.
Statement
theorem own_rot (len_pos : ∀ c j, 1 ≤ L c j) {p : Nat} (p_lt : p < rimN T L) :
(Comp.ofLens T L d ω).toGluing.Rot ((ownGo L (pcs T) p).1,
nxt ((Comp.ofLens T L d ω).toGluing.E (ownGo L (pcs T) p).1) (ownGo L (pcs T) p).2)
(ownGo L (pcs T) (prv (rimN T L) p))
Names in its proof
Compose.ofLens_ECompose.posCompose.pos_monoCompose.pos_succStatement.Consec.memStatement.nxt_lastStatement.ofLens_mate_noneStatement.ownGoStatement.ownGo_lastStatement.ownGo_predStatement.ownGo_zeroStatement.pcsStatement.pcs_consecStatement.pcs_neStatement.pcs_validStatement.pcs_wrapStatement.rimNStatement.rot_tabnxtprv
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (50 lines)
by by_cases p_zero : p = 0 · -- position 0: the step back wraps round to the last position, and Table 3's wrap check applies subst p_zero -- Table 3 is not empty have nonempty := pcs_ne T -- Table 3 is its last piece after the others have split_last := List.dropLast_concat_getLast nonempty obtain ⟨c_lt, j_lt, _⟩ := pcs_valid T _ (List.head_mem nonempty) obtain ⟨c_lt_last, j_lt_last, _⟩ := pcs_valid T _ (List.getLast_mem nonempty) -- position 0 is the last edge of the first piece's side have at_zero : ownGo L (pcs T) 0 = (((pcs T).head nonempty).1, pos (L ((pcs T).head nonempty).1) ((pcs T).head nonempty).2 + L ((pcs T).head nonempty).1 ((pcs T).head nonempty).2 - 1) := by conv => lhs; rw [← List.cons_head_tail nonempty] exact ownGo_zero (len_pos _ _) -- the last position is the first edge of the last piece's side have at_last : ownGo L (pcs T) (prv (rimN T L) 0) = (((pcs T).getLast nonempty).1, pos (L ((pcs T).getLast nonempty).1) ((pcs T).getLast nonempty).2) := by simp only [prv, rimN, ite_true] conv => lhs; rw [← split_last] exact ownGo_last (len_pos _ _) _ rw [at_zero, at_last, ofLens_E c_lt, nxt_last (len_pos _) j_lt] exact rot_tab len_pos 30 _ _ _ _ (pcs_wrap T) c_lt (Nat.mod_lt _ (by omega)) · -- a later position -- the step back is to `p - 1` have prv_eq : prv (rimN T L) p = p - 1 := by simp only [prv]; rw [ite_eq_right p_zero] rw [prv_eq] rcases ownGo_pred len_pos (pcs T) p (by omega) p_lt with ⟨c, j, o, mem, o_lt, at_p, at_prev⟩ | ⟨c, j, c', j', consec, at_p, at_prev⟩ · -- inside a piece: the next edge of the same side, and that side is on the parent's rim obtain ⟨c_lt, j_lt, on_rim⟩ := pcs_valid T _ mem rw [at_p, at_prev, ofLens_E c_lt] -- side `j` ends no later than the rim have side_end := pos_mono (L c) (show j + 1 ≤ 6 by omega) rw [pos_succ] at side_end -- so the next position does not wrap round have nxt_eq : nxt (pos (L c) 6) (pos (L c) j + o) = pos (L c) j + (o + 1) := by simp only [nxt]; rw [ite_eq_right (by omega)]; omega rw [nxt_eq, ← Nat.add_assoc] -- the next edge is unglued, so turning stops at once have unglued := ofLens_mate_none (d := d) (ω := ω) len_pos c_lt j_lt o_lt on_rim rw [← Nat.add_assoc] at unglued exact .stop unglued · -- at the start of a piece: turning about the vertex leads to the previous piece, by Table 3's check -- the piece is in Table 3 have mem : (c, j) ∈ pcs T := (Consec.mem consec).2 obtain ⟨c_lt, j_lt, _⟩ := pcs_valid T _ mem rw [at_p, at_prev, ofLens_E c_lt, nxt_last (len_pos _) j_lt] exact rot_tab len_pos 30 _ _ _ _ (pcs_consec T consec) c_lt (Nat.mod_lt _ (by omega))
Statement.own_surj
theorem in lean/SpectreKnot/ParentRim.lean, line 439 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every rim edge of the composition is a parent rim position.
Statement
theorem own_surj (len_pos : ∀ c j, 1 ≤ L c j) {c k : Nat} (c_lt : c < nk T) (k_lt : k < pos (L c) 6)
(unglued : (Comp.ofLens T L d ω).toGluing.mate c k = none) :
∃ p, p < rimN T L ∧ ownGo L (pcs T) p = (c, k)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by obtain ⟨j, o, j_lt, o_lt, rfl⟩ := decomp (L c) 6 (Nat.le_refl _) k k_lt -- an unglued edge lies on a side that Table 2 puts on the parent's rim have on_rim : adjAt T c j = none := by -- Table 2's gluing at this edge have mate_formula := ofLens_mate (d := d) (ω := ω) (fun c _ j _ => len_pos c j) c_lt j_lt o_lt cases adj_eq : adjAt T c j with | none => rfl | some q => rw [adj_eq] at mate_formula; exact absurd (unglued.symm.trans mate_formula) (by simp) exact ownGo_surj (pcs T) (pcs_cover T c_lt j_lt on_rim) o_lt
Statement.own_valid
theorem in lean/SpectreKnot/ParentRim.lean, line 417 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Each parent rim position is an edge of a listed side, which Table 2 puts on the parent's rim.
Statement
theorem own_valid {p : Nat} (p_lt : p < rimN T L) :
∃ c j o, (c, j) ∈ pcs T ∧ c < nk T ∧ j < 6 ∧ adjAt T c j = none ∧ o < L c j ∧
ownGo L (pcs T) p = (c, pos (L c) j + o)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
obtain ⟨c, j, o, mem, o_lt, at_p⟩ := ownGo_mem (pcs T) p p_lt
obtain ⟨c_lt, j_lt, on_rim⟩ := pcs_valid T _ mem
exact ⟨c, j, o, mem, c_lt, j_lt, on_rim, o_lt, at_p⟩Statement.ownerC
def in lean/SpectreKnot/ComposeTiles.lean, line 161 · read it in its file
Doc comment
The child that tile t of the parent belongs to (as compose computes it).
Statement
def ownerC (T : Kind) (child : Nat → Patch) (t : Nat) : Nat := ((List.range (Pattern.kids T).length).filter fun c => decide (offC child c ≤ t)).length - 1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.ownerC_eq
theorem in lean/SpectreKnot/ComposeTiles.lean, line 183 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If every child has a tile, compose finds the right child for tile t of child c.
Statement
theorem ownerC_eq (tiles_pos : ∀ c, c < nk T → 0 < (child c).tiles) {c t : Nat} (c_lt : c < nk T)
(t_lt : t < (child c).tiles) : ownerC T child (offC child c + t) = c
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
count_eq (f := offC child)
(fun a a_lt => by
rw [offC_succ]
-- child `a` has a tile, so child `a + 1` starts later
have := tiles_pos a a_lt
omega)
c_lt (by omega) (by rw [offC_succ]; omega)Statement.owner_exists
theorem in lean/SpectreKnot/ComposeTiles.lean, line 117 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every tile of the parent belongs to a child: it lies between that child's first tile and the next child's. (owner_unique: to only one.)
Statement
theorem owner_exists (child : Nat → Patch) : ∀ n t, t < offC child n → ∃ c, c < n ∧ offC child c ≤ t ∧
t < offC child c + (child c).tiles
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by intro n induction n with | zero => intro t t_lt; simp [offC] at t_lt | succ n ih => intro t t_lt rw [offC_succ] at t_lt by_cases before_n : t < offC child n · -- a tile of one of the first `n` children obtain ⟨c, c_lt, start_le, lt_end⟩ := ih t before_n exact ⟨c, by omega, start_le, lt_end⟩ · -- a tile of child `n` exact ⟨n, by omega, by omega, t_lt⟩
Statement.owner_unique
theorem in lean/SpectreKnot/ComposeTiles.lean, line 134 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Tile numbers of the parent do not overlap: tile t of child c and tile t' of child c' have the same number only if c = c' and t = t'.
Statement
theorem owner_unique (child : Nat → Patch) {c c' t t' : Nat} (t_lt : t < (child c).tiles)
(t_lt' : t' < (child c').tiles) (same_num : offC child c + t = offC child c' + t') : c = c' ∧ t = t'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (20 lines)
by -- later children start later have mono : ∀ a b, a ≤ b → offC child a ≤ offC child b := by intro a b a_le induction b with | zero => -- `a ≤ 0`, so `a = 0` have a_zero : a = 0 := by omega subst a_zero; exact Nat.le_refl _ | succ b ih => by_cases a_eq : a = b + 1 · subst a_eq; exact Nat.le_refl _ · have := ih (by omega) -- up to `b` by induction rw [offC_succ]; omega rcases Nat.lt_trichotomy c c' with c_lt | rfl | c_gt · have c'_after := mono (c + 1) c' c_lt -- child `c'` starts after child `c` ends rw [offC_succ] at c'_after; omega · exact ⟨rfl, by omega⟩ · have c_after := mono (c' + 1) c c_gt -- child `c` starts after child `c'` ends rw [offC_succ] at c_after; omega
Statement.parentLen
def in lean/SpectreKnot/ParentSig.lean, line 121 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The parent's side lengths: the sum over Table 3's pieces.
Statement
def parentLen (T : Kind) (L : Nat → Nat → Nat) (J : Nat) : Nat := totL L ((pside T).getD J [])
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.parentLen_eq
theorem in lean/SpectreKnot/ProofA.lean, line 35 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The parent's sides have the lengths ℓ_{m+1} (Prop 2.4(c) with Prop 6.1).
Statement
theorem parentLen_eq {m : Nat} (m_pos : 1 ≤ m) (T : Kind) {J : Nat} (J_lt : J < 6) :
parentLen T (Lk m T) J = lenAt (m + 1) T J
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by obtain ⟨m', rfl⟩ : ∃ m', m = m' + 1 := ⟨m - 1, by omega⟩ rw [lenAt, ← sideLen_eq_letterLen (m' + 2) (by omega) T J J_lt] simp only [sideLen, parentLen, totL_eq] congr 1 apply List.map_congr_left intro p mem rw [sideLen_eq_letterLen (m' + 1) (by omega) _ _ (pieces_valid T J J_lt p mem)]
Statement.parent_vtx
theorem in lean/SpectreKnot/ParentSig.lean, line 157 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's vertices sit where the parent's side lengths put them.
Statement
theorem parent_vtx (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧
(child c).E = pos (L c) 6) : (compose T child).vtx = (List.range 7).map (pos (parentLen T L))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (14 lines)
by show (List.range 7).map (fun J => ((((Pattern.pside T).take J).flatMap id).map fun (c, j) => ((child c).side j).length).sum) = _ apply List.map_congr_left intro J J_mem rw [List.mem_range] at J_mem -- the pieces of the first `J` sides are sides of actual children have first_valid : ∀ x ∈ ((pside T).take J).flatMap id, x.1 < nk T ∧ x.2 < 6 := by intro x mem apply pcs_valid' T simp only [pcs, List.mem_flatMap, id] at mem ⊢ obtain ⟨l, l_mem, x_mem⟩ := mem exact ⟨l, List.mem_of_mem_take l_mem, x_mem⟩ rw [sideLens_sum shape _ first_valid, totL_take L T J (by omega)]
Statement.pcs
def in lean/SpectreKnot/ParentRim.lean, line 239 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
The parent's rim pieces, in order (Table 3 flattened).
Statement
def pcs (T : Kind) : List (Nat × Nat) := (pside T).flatMap id
Names in its proof
Named in the proofs of
Statement.corners_nonSigmaStatement.corners_sigmaStatement.gRStatement.gLStatement.gR_rimLStatement.vtx_eqStatement.sig_of_checkStatement.jposStatement.pcs_getStatement.ownGo_jposStatement.ownGo_memStatement.ownGo_surjStatement.ownGo_injStatement.ownGo_lastStatement.ownGo_predStatement.rimTablesOkStatement.rimNStatement.own_validStatement.own_surjStatement.own_injStatement.own_rotStatement.parent_vtxStatement.rimN_eqStatement.Kids.bport_RStatement.Kids.parent_sigStatement.pieceD
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.pcs_consec
theorem in lean/SpectreKnot/ParentRim.lean, line 314 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Consecutive pieces of Table 3 meet at a vertex: turning about the vertex where side b ends reaches the vertex where side a begins.
Statement
theorem pcs_consec {a b : Nat × Nat} (consec : Consec (pcs T) a b) : tabRot T 30 (b.1, (b.2 + 1) % 6) = some a
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the table checks for this kind have ok := rimTablesOk_all T simp only [rimTablesOk, Bool.and_eq_true] at ok exact consecOk_sound ok.1.2 consec
Statement.pcs_cover
theorem in lean/SpectreKnot/ParentRim.lean, line 303 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Every side of a child that Table 2 puts on the parent's rim is listed in Table 3.
Statement
theorem pcs_cover {c j : Nat} (c_lt : c < nk T) (j_lt : j < 6) (on_rim : adjAt T c j = none) : (c, j) ∈ pcs T
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by -- the table checks for this kind have ok := rimTablesOk_all T simp only [rimTablesOk, Bool.and_eq_true, List.all_eq_true, List.mem_range, Bool.or_eq_true, Option.isSome_iff_exists, List.contains_iff_mem] at ok rcases ok.1.1.2 c c_lt j j_lt with ⟨x, glued⟩ | mem · rw [on_rim] at glued; contradiction · exact mem
Statement.pcs_get
theorem in lean/SpectreKnot/NestStep.lean, line 23 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Piece q < 22 of the flattened Table 3 is pieceD q.
Statement
theorem pcs_get {q : Nat} (hq : q < 22) : (pcs .Delta)[q]? = some (pieceD q)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by rw [List.getElem?_eq_getElem (by rw [pcs_len]; exact hq)] simp only [pieceD, List.getD_eq_getElem?_getD, List.getElem?_eq_getElem (show q < (pcs .Delta).length by rw [pcs_len]; exact hq), Option.getD_some]
Statement.pcs_len
theorem in lean/SpectreKnot/NestStep.lean, line 20 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Table 3 lists 22 pieces for the Δ-supertile's rim.
Statement
theorem pcs_len : (pcs .Delta).length = 22
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.pcs_ne
theorem in lean/SpectreKnot/ParentRim.lean, line 321 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 3 is not empty.
Statement
theorem pcs_ne : pcs T ≠ []
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by cases T <;> decideStatement.pcs_nodup
theorem in lean/SpectreKnot/ParentRim.lean, line 296 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 3 lists no side twice.
Statement
theorem pcs_nodup : (pcs T).Nodup
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- the table checks for this kind have ok := rimTablesOk_all T simp only [rimTablesOk, Bool.and_eq_true, decide_eq_true_eq] at ok exact ok.1.1.1.2
Statement.pcs_nonSigma
theorem in lean/SpectreKnot/CompSig.lean, line 34 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
For every kind but Σ, the parent's rim begins with side 5 of the Γ child and ends with its side 0.
Statement
theorem pcs_nonSigma : ∀ T : Kind, T ≠ .Sigma →
pcs T = (nk T - 1, 5) :: ((pcs T).drop 1).dropLast ++ [(nk T - 1, 0)]
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T not_sigma; cases T <;> first | exact absurd rfl not_sigma | decideStatement.pcs_sigma
theorem in lean/SpectreKnot/CompSig.lean, line 44 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Σ-supertile's rim: preS, then sides 0 and 5 of the Γ child (child 7), then side 4 of child 6.
Statement
theorem pcs_sigma : pcs .Sigma = preS ++ [(7, 0), (7, 5), (6, 4)]
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.pcs_valid
theorem in lean/SpectreKnot/ParentRim.lean, line 288 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Each piece of Table 3 is a side of an actual child, and Table 2 puts that side on the parent's rim.
Statement
theorem pcs_valid : ∀ x ∈ pcs T, x.1 < nk T ∧ x.2 < 6 ∧ adjAt T x.1 x.2 = none
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by intro x mem -- the table checks for this kind have ok := rimTablesOk_all T simp only [rimTablesOk, Bool.and_eq_true, List.all_eq_true, decide_eq_true_eq, Option.isNone_iff_eq_none] at ok exact ⟨(ok.1.1.1.1 x mem).1.1, (ok.1.1.1.1 x mem).1.2, (ok.1.1.1.1 x mem).2⟩
Statement.pcs_valid'
theorem in lean/SpectreKnot/ParentSig.lean, line 101 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Table 3's pieces are sides of actual children.
Statement
theorem pcs_valid' : ∀ x ∈ pcs T, x.1 < nk T ∧ x.2 < 6
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
fun x mem => ⟨(pcs_valid T x mem).1, (pcs_valid T x mem).2.1⟩Statement.pcs_wrap
theorem in lean/SpectreKnot/ParentRim.lean, line 324 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim closes up: the last piece of Table 3 meets the first, as consecutive pieces do.
Statement
theorem pcs_wrap : tabRot T 30 (((pcs T).head (pcs_ne T)).1, (((pcs T).head (pcs_ne T)).2 + 1) % 6) =
some ((pcs T).getLast (pcs_ne T))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by -- the table checks for this kind have ok := rimTablesOk_all T simp only [rimTablesOk, Bool.and_eq_true] at ok -- the last check: the wrap-around, in terms of `head?` and `getLast?` have wrap_ok := ok.2 rw [List.head?_eq_some_head (pcs_ne T), List.getLast?_eq_some_getLast (pcs_ne T)] at wrap_ok simpa using wrap_ok
Statement.piece16
theorem in lean/SpectreKnot/ProofB.lean, line 23 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Piece 16 of the Δ-supertile's rim is child 1's side 2.
Statement
theorem piece16 : pieceD 16 = (1, 2)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.pieceD
abbrev in lean/SpectreKnot/StepMap.lean, line 19 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
Piece q of the Δ-supertile's rim (Table 3, flattened).
Statement
abbrev pieceD (q : Nat) : Nat × Nat := (pcs .Delta).getD q (0, 0)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.pieceEnd
def in lean/SpectreKnot/Statement.lean, line 47 · read it in its file
Formalises Definition 3.1 The decoration, Definition 3.2 Straight-through rule.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 4.4, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
Def 3.1, the decoration. pieceEnd p is the other end of the ribbon piece that ends at port p.
Statement
def pieceEnd : Port → Port -- The crossover: R(v_0) ↔ R(v_1) and L(v_0) ↔ L(v_1), two pieces that cross inside the tile. | (t, 0, s) => (t, 1, s) | (t, 1, s) => (t, 0, s) -- Every other vertex: a hook round the corner, L(v_i) ↔ R(v_i). | (t, i, s) => (t, i, !s)
Names in its proof
none
Named in the proofs of
Statement.Patch.pieceEnd_pieceEndStatement.Patch.Linked.symmStatement.Patch.followStatement.Patch.follow_soundStatement.loopPatch_closedStatement.tilingSysStatement.Chain.follow_staysStatement.Patch.Ends.pieceStatement.pieceEnd_neStatement.nestSysStatement.follow_boundedStatement.Patch.FollowStatement.Patch.LinkedStatement.Tiling.forwardStatement.Tiling.backwardStatement.TheoremB_strandStatement.TheoremA_strand
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.pieceEnd_gP
theorem in lean/SpectreKnot/ProofStrand.lean, line 473 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
The other end of a piece, before or after renumbering.
Statement
theorem pieceEnd_gP (b : Nat) (p : Port) : pieceEnd (gP b p) = gP b (pieceEnd p)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by obtain ⟨t, i, s⟩ := p rcases i with _ | _ | i <;> rfl
Statement.pieceEnd_ne
theorem in lean/SpectreKnot/ProofStrand.lean, line 415 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
The other end of a piece is a different port.
Statement
theorem pieceEnd_ne (p : Port) : pieceEnd p ≠ p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by obtain ⟨t, i, s⟩ := p rcases i with _ | _ | i <;> cases s <;> simp [pieceEnd]
Statement.pieceEnd_shift
theorem in lean/SpectreKnot/Bridge.lean, line 21 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Renumbering a child's port into the parent commutes with going to the other end of its piece.
Statement
theorem pieceEnd_shift (child : Nat → Patch) (c : Nat) (q : Port) :
pieceEnd (shiftP child c q) = shiftP child c (pieceEnd q)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by obtain ⟨t, i, s⟩ := q rcases i with _ | _ | i <;> rfl
Statement.pieceEnd_valid
theorem in lean/SpectreKnot/Bridge.lean, line 27 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The other end of a piece is on the same tile, at an actual vertex.
Statement
theorem pieceEnd_valid {q : Port} (i_lt : q.2.1 < 14) : (pieceEnd q).1 = q.1 ∧ (pieceEnd q).2.1 < 14
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (6 lines)
by obtain ⟨t, i, s⟩ := q rcases i with _ | _ | i · exact ⟨rfl, (by decide : (1 : Nat) < 14)⟩ · exact ⟨rfl, (by decide : (0 : Nat) < 14)⟩ · exact ⟨rfl, i_lt⟩
Statement.piece_ok
theorem in lean/SpectreKnot/StepMap.lean, line 282 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Each of the Δ supertile's 22 rim pieces is a side of an actual child.
Statement
theorem piece_ok : ∀ q, q < 22 → (pieceD q).1 < nk .Delta ∧ (pieceD q).2 < 6
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.pigeonhole
theorem in lean/SpectreKnot/Turn.lean, line 22 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Pigeonhole: among M + 1 numbers below M, two are equal.
Statement
theorem pigeonhole : ∀ (M : Nat) (f : Nat → Nat), (∀ j, j ≤ M → f j < M) → ∃ a b, a < b ∧ b ≤ M ∧ f a = f b
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (20 lines)
by intro M induction M with | zero => intro f below; exact absurd (below 0 (Nat.le_refl 0)) (Nat.not_lt_zero _) | succ M ih => intro f below by_cases hit : ∃ a, a ≤ M ∧ f a = f (M + 1) · obtain ⟨a, a_le, same⟩ := hit exact ⟨a, M + 1, by omega, Nat.le_refl _, same⟩ · -- no earlier number equals the last, so squeezing out its value leaves `M + 1` numbers below `M` have missed : ∀ a, a ≤ M → f a ≠ f (M + 1) := fun a a_le same => hit ⟨a, a_le, same⟩ obtain ⟨a, b, a_lt, b_le, same⟩ := ih (fun j => if f j < f (M + 1) then f j else f j - 1) (fun j j_le => by have below_j := below j (by omega) -- the number `j` have below_last := below (M + 1) (Nat.le_refl _) -- the last number have missed_j := missed j j_le -- they differ split <;> omega) refine ⟨a, b, a_lt, by omega, ?_⟩ have missed_a := missed a (by omega) -- `f a` is not the last value have missed_b := missed b b_le -- nor is `f b` split at same <;> split at same <;> omega
Statement.port_jL
theorem in lean/SpectreKnot/StepMap.lean, line 366 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A move takes port L of the hook at junction q (as jL reads it) to the same port with the new lengths.
Statement
theorem port_jL {q : Nat} (q_pos : 1 ≤ q) (hq : q < 22) : (κ).port (jL L q) = jL (μ.lens .Delta L) q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- piece `q - 1` is a side of an actual child obtain ⟨child_lt, side_lt⟩ := piece_ok (q - 1) (by omega) show ((pieceD (q - 1)).1, (κ).sh (pieceD (q - 1)).1 (pos (L (pieceD (q - 1)).1) (pieceD (q - 1)).2), true) = _ rw [ok.shpos child_lt (by omega)]; rfl
Statement.port_jR
theorem in lean/SpectreKnot/StepMap.lean, line 359 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A move takes port R of the hook at junction q (as jR reads it) to the same port with the new lengths.
Statement
theorem port_jR {q : Nat} (hq : q < 22) : (κ).port (jR L q) = jR (μ.lens .Delta L) q
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by -- piece `q` is a side of an actual child obtain ⟨child_lt, _⟩ := piece_ok q hq show ((pieceD q).1, (κ).sh (pieceD q).1 (pos (L (pieceD q).1) (((pieceD q).2 + 1) % 6)), false) = _ rw [ok.shpos child_lt (by omega)]; rfl
Statement.pos6
theorem in lean/SpectreKnot/CompSig.lean, line 58 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
With positive side lengths, a child's rim has at least two edges, and ends after its side 5.
Statement
theorem pos6 (len_pos : ∀ c j, 1 ≤ L c j) (c : Nat) : 2 ≤ pos (L c) 6 ∧ pos (L c) 6 = pos (L c) 5 + L c 5
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by -- sides 0 … 4 come before vertex 5 have before_5 := pos_lt_of_pos (L c) (fun i _ => len_pos c i) (show 0 < 5 by omega) (by omega) -- side 5 has an edge have len_5 := len_pos c 5 -- the rim ends after side 5 have pos_6 : pos (L c) 6 = pos (L c) 5 + L c 5 := pos_succ _ 5 -- the rim starts at vertex 0 have pos_0 : pos (L c) 0 = 0 := rfl -- side 0 has an edge have len_0 := len_pos c 0 exact ⟨by omega, pos_6⟩
Statement.pos_congr
theorem in lean/SpectreKnot/ProofA.lean, line 22 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
pos f J depends only on the side lengths before J.
Statement
theorem pos_congr {f g : Nat → Nat} : ∀ J, (∀ i, i < J → f i = g i) → pos f J = pos g J | 0, _ => rfl | J + 1, agree => by rw [pos_succ, pos_succ, pos_congr J (fun i i_lt => agree i (by omega)), agree J (by omega)]
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.pos_up
theorem in lean/SpectreKnot/ProofB.lean, line 99 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Side J of N_{n+1} starts where piece sJ J of its rim starts (with the level-n lengths).
Statement
theorem pos_up {n : Nat} (n_pos : 1 ≤ n) {J : Nat} (hJ : J ≤ 6) :
pos (Lk (n + 1) .Delta 1) J = jpos (Lk n .Delta) (sJ J)
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by rw [show pos (Lk (n + 1) .Delta 1) J = vpos (n + 1) .Delta J from rfl, vpos_eq n_pos .Delta hJ, vpos_jpos _ hJ]
Statement.preS
def in lean/SpectreKnot/CompSig.lean, line 39 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The pieces of the Σ-supertile's rim before its crossover corner.
Statement
def preS : List (Nat × Nat) :=
[(6, 3), (6, 2), (5, 4), (5, 3), (5, 2), (5, 1), (4, 2), (3, 4), (3, 3), (3, 2), (2, 4), (2, 3), (2, 2), (2, 1),
(1, 2), (0, 4), (0, 3), (0, 2), (0, 1)]
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.preS_eq
theorem in lean/SpectreKnot/CompSig.lean, line 47 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
preS is the pieces of the Σ-supertile's sides 0–4, then the first two pieces of its side 5.
Statement
theorem preS_eq : preS = ((pside .Sigma).take 5).flatMap id ++ [(0, 2), (0, 1)]
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.prv_inj
theorem in lean/SpectreKnot/CompSig.lean, line 22 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Stepping back one position round a rim of length N is one to one.
Statement
theorem prv_inj {N p p' : Nat} (p_lt : p < N) (p_lt' : p' < N) (same : prv N p = prv N p') : p = p'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
unfold prv at same; split at same <;> split at same <;> omegaStatement.pside_length
theorem in lean/SpectreKnot/ParentSig.lean, line 124 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Table 3 has a row for each of the parent's six sides.
Statement
theorem pside_length : ∀ T, (pside T).length = 6
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro T; cases T <;> rflStatement.pside_take
theorem in lean/SpectreKnot/NestStep.lean, line 84 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Table 3's pieces for sides 0 … J - 1 of the Δ-supertile are its first sJ J pieces.
Statement
theorem pside_take : ∀ J, J ≤ 6 → ((pside .Delta).take J).flatMap id = (pcs .Delta).take (sJ J)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.range7_getD
theorem in lean/SpectreKnot/ComposeTiles.lean, line 69 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Entry j (for j < 7) of the list g 0, …, g 6 is g j.
Statement
theorem range7_getD (g : Nat → Nat) {j : Nat} (j_lt : j < 7) : ((List.range 7).map g).getD j 0 = g j
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by rcases (show j = 0 ∨ j = 1 ∨ j = 2 ∨ j = 3 ∨ j = 4 ∨ j = 5 ∨ j = 6 by omega) with rfl | rfl | rfl | rfl | rfl | rfl | rfl <;> rfl
Statement.reach_none
theorem in lean/SpectreKnot/ProofB.lean, line 205 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
A strand that reaches a hook inside side 2 of N_n (on the parent's rim) reaches, one level up, a hook inside side 4 of N_{n+1}.
Statement
theorem reach_none {n : Nat} (n_pos : 1 ≤ n) {x : Port} (reach : Reach n 2 x) : Reach (n + 1) 4 (upPort n 1 x)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by obtain ⟨x_port, v, inside, linked⟩ := reach -- `v` lies at least two vertices after the start of side 2 have after_start := inside.1 -- and two before its end, vertex `pos 3` have before_three : v + 2 ≤ pos (Lk n .Delta 1) 3 := inside.2 exact ⟨isPort_up n_pos x_port, _, inside_stp n_pos (by omega) (by omega), (lift_nest n_pos linked x_port).trans (adv_none n_pos inside)⟩
Statement.reach_of
theorem in lean/SpectreKnot/ProofB.lean, line 215 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
A port of N_{n+1} on the strand of the hook at a junction inside side J reaches side J.
Statement
theorem reach_of {n J q : Nat} {y : Port} (y_port : (N (n + 1)).IsPort y)
(inside : Inside (n + 1) J (jpos (Lk n .Delta) q))
(linked : (N (n + 1)).Linked y ((N (n + 1)).bport (ori (n + 1)) (jpos (Lk n .Delta) q, true))) :
Reach (n + 1) J y
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
⟨y_port, _, inside, linked⟩
Statement.reach_some
theorem in lean/SpectreKnot/ProofB.lean, line 197 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
A strand that reaches a hook inside side J of N_n reaches, one level up, the hook at the junction the map names for side J.
Statement
theorem reach_some {n : Nat} (n_pos : 1 ≤ n) {J q : Nat} (hJ : J < 6) {x : Port} (reach : Reach n J x)
(side_tgt : sideTgt (ori n) J = some q) :
(N (n + 1)).Linked (upPort n 1 x) ((N (n + 1)).bport (ori (n + 1)) (jpos (Lk n .Delta) q, true))
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨x_port, v, inside, linked⟩ := reach
exact (lift_nest n_pos linked x_port).trans (adv_some n_pos hJ inside side_tgt)Statement.rimEdges_eq
theorem in lean/SpectreKnot/CompSig.lean, line 430 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Comp.check lists Table 3's rim (rimEdges, in the children's sense) as ownList backwards.
Statement
theorem rimEdges_eq : (Comp.ofLens T L d ω).rimEdges = (ownList L (pcs T)).reverse
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by show (((pside T).flatMap id).flatMap fun (x : Nat × Nat) => (List.range (((Comp.ofLens T L d ω).kid x.1).len.getD x.2 0)).map fun i => (x.1, ((Comp.ofLens T L d ω).kid x.1).U.getD x.2 0 + ((Comp.ofLens T L d ω).kid x.1).len.getD x.2 0 - 1 - i)).reverse = _ congr 1 apply flatMap_congr_mem intro x mem -- the piece is a side of an actual child obtain ⟨c_lt, j_lt, _⟩ := pcs_valid T x mem rw [ofLens_len c_lt j_lt, ofLens_U c_lt (by omega)]
Statement.rimN
abbrev in lean/SpectreKnot/ParentRim.lean, line 412 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim length.
Statement
abbrev rimN : Nat := totL L (pcs T)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.rimN_eq
theorem in lean/SpectreKnot/ParentSig.lean, line 174 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim length is the total of its six side lengths.
Statement
theorem rimN_eq (L : Nat → Nat → Nat) (T : Kind) : rimN T L = pos (parentLen T L) 6
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by rw [← totL_take L T 6 (Nat.le_refl _)] simp only [rimN, pcs] rw [List.take_of_length_le (by simp [pside_length])]
Statement.rimPiece
abbrev in lean/SpectreKnot/ParentSig.lean, line 41 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim edges, child by child (compose's rim).
Statement
abbrev rimPiece (child : Nat → Patch) : Nat × Nat → List (Nat × Nat) | (c, j) => ((child c).side j).reverse.map fun e => (e.1 + offC child c, e.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.rimPiece_getD
theorem in lean/SpectreKnot/ParentSig.lean, line 65 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If the children's vertices sit where the side lengths L put them, entry p of the rim made of the pieces l is the child's edge ownGo L l p, renumbered as an edge of the parent.
Statement
theorem rimPiece_getD (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧
(child c).E = pos (L c) 6) : ∀ (l : List (Nat × Nat)), (∀ x ∈ l, x.1 < nk T ∧ x.2 < 6) →
∀ p, p < totL L l → (l.flatMap (rimPiece child)).getD p (0, 0) =
(((child (ownGo L l p).1).edgeAt (ownGo L l p).2).1 + offC child (ownGo L l p).1,
((child (ownGo L l p).1).edgeAt (ownGo L l p).2).2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (29 lines)
by intro l induction l with | nil => intro _ p p_lt; simp [totL] at p_lt | cons x rest ih => obtain ⟨c, j⟩ := x intro valid p p_lt obtain ⟨c_lt, j_lt⟩ := valid (c, j) List.mem_cons_self obtain ⟨vtx_eq, len_eq⟩ := shape c c_lt -- the first piece has the length of its side have piece_len : (rimPiece child (c, j)).length = L c j := by simp only [rimPiece, List.length_map, List.length_reverse, side_length vtx_eq len_eq j_lt] simp only [totL] at p_lt rw [List.flatMap_cons, List.getD_eq_getElem?_getD] by_cases in_head : p < L c j · -- in the first piece: an edge of side `j`, counted from its end rw [List.getElem?_append_left (by rw [piece_len]; exact in_head)] simp only [ownGo, ite_eq_left in_head] -- side `j` has `L c j` edges have side_len := side_length vtx_eq len_eq j_lt simp only [rimPiece, List.getElem?_map] rw [List.getElem?_reverse (by rw [side_len]; exact in_head), side_len, side_getElem? vtx_eq len_eq j_lt (show L c j - 1 - p < L c j by omega), show pos (L c) j + (L c j - 1 - p) = pos (L c) j + L c j - 1 - p by omega] rfl · -- in a later piece: by induction rw [List.getElem?_append_right (by rw [piece_len]; omega), piece_len, ← List.getD_eq_getElem?_getD, ih (fun x mem => valid x (List.mem_cons_of_mem _ mem)) (p - L c j) (by omega)] simp only [ownGo, ite_eq_right in_head]
Statement.rimPiece_length
theorem in lean/SpectreKnot/ParentSig.lean, line 49 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If the children's vertices sit where the side lengths L put them, the rim made of the pieces l has length totL L l.
Statement
theorem rimPiece_length (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧
(child c).E = pos (L c) 6) : ∀ (l : List (Nat × Nat)), (∀ x ∈ l, x.1 < nk T ∧ x.2 < 6) →
(l.flatMap (rimPiece child)).length = totL L l
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by intro l induction l with | nil => intro _; rfl | cons x rest ih => obtain ⟨c, j⟩ := x intro valid obtain ⟨c_lt, j_lt⟩ := valid (c, j) List.mem_cons_self obtain ⟨vtx_eq, len_eq⟩ := shape c c_lt rw [List.flatMap_cons, List.length_append, ih (fun x mem => valid x (List.mem_cons_of_mem _ mem))] simp only [rimPiece, List.length_map, List.length_reverse, side_length vtx_eq len_eq j_lt, totL]
Statement.rimTablesOk
def in lean/SpectreKnot/ParentRim.lean, line 258 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The checks on Tables 2 and 3 that make Table 3 the rim of the glued children.
Statement
def rimTablesOk (T : Kind) : Bool := ((pcs T).all fun x => decide (x.1 < nk T) && decide (x.2 < 6) && (adjAt T x.1 x.2).isNone) && decide (pcs T).Nodup && ((List.range (nk T)).all fun c => (List.range 6).all fun j => (adjAt T c j).isSome || (pcs T).contains (c, j)) && consecOk T (pcs T) && match (pcs T).head?, (pcs T).getLast? with | some a, some b => tabRot T 30 (a.1, (a.2 + 1) % 6) == some b | _, _ => false
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.rimTablesOk_all
theorem in lean/SpectreKnot/ParentRim.lean, line 268 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The table checks pass for all nine kinds.
Statement
theorem rimTablesOk_all : ∀ T, rimTablesOk T = true
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by intro T; cases T <;> decideStatement.rimVertexPorts_length
theorem in lean/SpectreKnot/CompSig.lean, line 443 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The rim that Comp.check reads has rimN T L vertices.
Statement
theorem rimVertexPorts_length : (Comp.ofLens T L d ω).rimVertexPorts.length = rimN T L
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
simp only [Comp.rimVertexPorts, List.length_map, List.length_range, rimEdges_eq, List.length_reverse,
ownList_length]Statement.rim_edgeAt
theorem in lean/SpectreKnot/ParentSig.lean, line 111 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent's rim is Table 3's: rim edge p of the parent is edge k of child c, (c, k) = ownGo p.
Statement
theorem rim_edgeAt (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧
(child c).E = pos (L c) 6) {p : Nat} (p_lt : p < rimN T L) :
(compose T child).edgeAt p =
(((child (ownGo L (pcs T) p).1).edgeAt (ownGo L (pcs T) p).2).1 + offC child (ownGo L (pcs T) p).1,
((child (ownGo L (pcs T) p).1).edgeAt (ownGo L (pcs T) p).2).2)
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by show (compose T child).rim.getD p (0, 0) = _ rw [compose_rim] exact rimPiece_getD shape _ (pcs_valid' T) p p_lt
Statement.rim_not_surrounded
theorem in lean/SpectreKnot/ProofGrand.lean, line 387 · read it in its file
Doc comment
Negative control: in a patch with the signature, no vertex on the rim is surrounded (the corner where the chain about a rim vertex ends looks across a rim edge). So "surrounded" is not built into the definitions.
Statement
theorem rim_not_surrounded {P : Patch} {o : Bool} {A B : Nat} (sig : P.HasSig o A B) {k : Nat} (k_lt : k < P.E) :
¬ P.Surrounded (P.fC o k).1 (P.fC o k).2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by rintro ⟨n, n_pos, round⟩ obtain ⟨n', rfl⟩ : ∃ n', n = n' + 1 := ⟨n - 1, by omega⟩ -- the corner looks across a rim edge have on_rim : P.turn ((P.fC o k).1, (P.fC o k).2) = none := by cases o · -- clockwise: across rim edge `k` obtain ⟨_, i_lt, unglued⟩ := sig.rim_ok k k_lt show P.glue (P.edgeAt k).1 ((((P.edgeAt k).2 + 1) % 14 + 13) % 14) = none rw [mod14 i_lt]; exact unglued · -- counter-clockwise: across rim edge `k - 1` obtain ⟨_, i_lt, unglued⟩ := sig.rim_ok _ (prv_lt k_lt) show P.glue (P.edgeAt (prv P.E k)).1 ((((P.edgeAt (prv P.E k)).2 + 1) % 14 + 13) % 14) = none rw [mod14 i_lt]; exact unglued simp only [Patch.turns, on_rim, Option.bind_none, reduceCtorEq] at round
Statement.rotB_bsteps
theorem in lean/SpectreKnot/Turn.lean, line 232 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning backwards about a vertex (RotB) is a number of steps, for children oriented counter-clockwise.
Statement
theorem rotB_bsteps {G : Gluing} {x r : Nat × Nat} (turn : G.RotB x r) : ∃ n, bsteps G true n x = some r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by induction turn with | stop _ => exact ⟨0, rfl⟩ | @step c u c' k' r glued _ ih => obtain ⟨n, rest⟩ := ih refine ⟨n + 1, ?_⟩ simp only [bsteps, bstep, ite_true, glued, Option.bind_some] exact rest
Statement.rot_bsteps
theorem in lean/SpectreKnot/Turn.lean, line 222 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Turning about a vertex (Rot) is a number of steps, for children oriented clockwise.
Statement
theorem rot_bsteps {G : Gluing} {x r : Nat × Nat} (turn : G.Rot x r) : ∃ n, bsteps G false n x = some r
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by induction turn with | stop _ => exact ⟨0, rfl⟩ | @step c u c' k' r glued _ ih => obtain ⟨n, rest⟩ := ih refine ⟨n + 1, ?_⟩ simp only [bsteps, bstep, Bool.false_eq_true, ite_false, glued, Option.map_some, Option.bind_some] exact rest
Statement.rot_tab
theorem in lean/SpectreKnot/ParentRim.lean, line 373 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Turning about a vertex of a child, in the composition, follows Table 2.
Statement
theorem rot_tab (len_pos : ∀ c j, 1 ≤ L c j) : ∀ f c v c' v', tabRot T f (c, v) = some (c', v') → c < nk T → v < 6 →
(Comp.ofLens T L d ω).toGluing.Rot (c, pos (L c) v) (c', pos (L c') v')
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (34 lines)
by intro f induction f with | zero => intro c v c' v' found; simp [tabRot] at found | succ f ih => intro c v c' v' found c_lt v_lt simp only [tabRot] at found cases adj_eq : adjAt T c v with | none => -- side `v` is on the parent's rim: turning stops here rw [adj_eq] at found simp only [Option.some.injEq, Prod.mk.injEq] at found obtain ⟨rfl, rfl⟩ := found -- the first edge of the side is unglued have unglued := ofLens_mate_none (d := d) (ω := ω) len_pos c_lt v_lt (show 0 < L c v from len_pos c v) adj_eq rw [Nat.add_zero] at unglued exact .stop unglued | some p => -- side `v` is glued to side `j₂` of `c₂`: turn on from the end of that side obtain ⟨c₂, j₂⟩ := p rw [adj_eq] at found obtain ⟨c₂_lt, j₂_lt, _, _⟩ := adj_valid c_lt v_lt adj_eq -- the first edge of side `v` is glued to the last edge of side `j₂` of `c₂` have mate_eq : (Comp.ofLens T L d ω).toGluing.mate c (pos (L c) v) = some (c₂, pos (L c₂) j₂ + L c₂ j₂ - 1) := by show (Comp.ofLens T L d ω).mate c (pos (L c) v) = _ -- Table 2's gluing, at offset 0 have mate_formula := ofLens_mate (d := d) (ω := ω) (fun c _ j _ => len_pos c j) c_lt v_lt (show 0 < L c v from len_pos c v) rw [Nat.add_zero, adj_eq] at mate_formula rw [mate_formula]; rfl refine .step mate_eq ?_ rw [ofLens_E c₂_lt, nxt_last (len_pos c₂) j₂_lt] exact ih _ _ _ _ found c₂_lt (Nat.mod_lt _ (by omega))
Statement.sJ
def in lean/SpectreKnot/NestStep.lean, line 81 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Where side J of the Δ-supertile starts, as a piece number.
Statement
def sJ (J : Nat) : Nat := [0, 5, 7, 11, 14, 19, 22].getD J 0
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.sJ_le
theorem in lean/SpectreKnot/ProofB.lean, line 104 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The sides start at pieces 0 … 22.
Statement
theorem sJ_le : ∀ J, J ≤ 6 → sJ J ≤ 22
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideStatement.same_in_block
theorem in lean/SpectreKnot/ProofStrand.lean, line 687 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Two ports of the nest tiling whose tiles lie in N_b (b ≥ 1) lie on one strand: they do in N_{b+4} (Theorem B with the paper's bound).
Statement
theorem same_in_block {b : Nat} (b_pos : 1 ≤ b) {x y : NPort} (x_in : x.1.1 < (N b).tiles)
(y_in : y.1.1 < (N b).tiles) : nestSys.Same x y
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by -- one strand of `N_{b+4}` have linked := (theoremB_sharp b (toBlock b x) (toBlock b y) b_pos (toBlock_port x_in) (toBlock_port y_in)).1 -- with `x`, four levels up, a port of `N_{b+4}` have x_port := isPort_upk b_pos (toBlock_port x_in) 4 -- read in the nest tiling exact linked_same (m := b + 4) (by omega) linked x_port x y (gP_toBlock x_in 4).symm (gP_toBlock y_in 4).symm
Statement.sh_zero
theorem in lean/SpectreKnot/StepMap.lean, line 373 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Vertex 0 of child 1 stays put under a move.
Statement
theorem sh_zero : (κ).sh 1 0 = 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by rcases ok.cutOK.sh_cases 1 0 with ⟨stays, _⟩ | ⟨_, after_cut⟩ · exact stays · rcases after_cut with ⟨_, past_cut⟩ | ⟨_, _, past_cut⟩ <;> omega
Statement.shiftC
def in lean/SpectreKnot/Turn.lean, line 244 · read it in its file
Used, through the names in proofs, for Theorem 7.6, Lemma 8.3.
Doc comment
Corner x of child c, renumbered as a corner of the parent.
Statement
def shiftC (child : Nat → Patch) (c : Nat) (x : Nat × Nat) : Nat × Nat := (x.1 + offC child c, x.2)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.shiftP
def in lean/SpectreKnot/Bridge.lean, line 18 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Port q of child c, renumbered as a port of the parent.
Statement
def shiftP (child : Nat → Patch) (c : Nat) (q : Port) : Port := (q.1 + offC child c, q.2.1, q.2.2)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.side4_cycle
theorem in lean/SpectreKnot/ProofGrand.lean, line 245 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Inside side 4 of child 1 of the Δ composition (glued to child 3), turning comes round in two steps.
Statement
theorem side4_cycle {L : Nat → Nat → Nat} {d : Nat} {ω o : Bool} (len_pos : ∀ c j, 1 ≤ L c j)
(pair : ∀ c, c < nk .Delta → ∀ j, j < 6 → ∀ c' j', adjAt .Delta c j = some (c', j') → L c' j' = L c j)
{v : Nat} (after_start : pos (L 1) 4 < v) (before_end : v < pos (L 1) 5) :
bsteps (Comp.ofLens .Delta L d ω).toGluing o 2 (1, v) = some (1, v)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by obtain ⟨r, rfl⟩ : ∃ r, v = pos (L 1) 4 + r := ⟨v - pos (L 1) 4, by omega⟩ -- side 4 ends where side 5 starts have side4_end : pos (L 1) 5 = pos (L 1) 4 + L 1 4 := pos_succ (L 1) 4 exact side_cycle len_pos pair (c' := 3) (j' := 0) (by decide) (by omega) (by decide) (by omega) (by omega)
Statement.sideLens_sum
theorem in lean/SpectreKnot/ParentSig.lean, line 142 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If the children's vertices sit where the side lengths L put them, the sides listed in l have total length totL L l.
Statement
theorem sideLens_sum (shape : ∀ c, c < nk T → (child c).vtx = (List.range 7).map (pos (L c)) ∧ (child c).E = pos (L c) 6) : ∀ (l : List (Nat × Nat)), (∀ x ∈ l, x.1 < nk T ∧ x.2 < 6) → (l.map fun (c, j) => ((child c).side j).length).sum = totL L l
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by intro l induction l with | nil => intro _; rfl | cons x rest ih => obtain ⟨c, j⟩ := x intro valid obtain ⟨c_lt, j_lt⟩ := valid (c, j) List.mem_cons_self obtain ⟨vtx_eq, len_eq⟩ := shape c c_lt simp only [List.map_cons, List.sum_cons, totL, side_length vtx_eq len_eq j_lt, ih (fun x mem => valid x (List.mem_cons_of_mem _ mem))]
Statement.sideTgt
def in lean/SpectreKnot/StepMap.lean, line 43 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The junction for a vertex well inside side j of child 1.
Statement
def sideTgt (ω : Bool) (j : Nat) : Option Nat := if ω then (if j ≤ 1 then some 17 else if j = 2 then none else if j = 3 then some 16 else if j = 4 then some 12 else some 9) else (if j = 0 then some 21 else if j = 1 then some 17 else if j = 2 then none else some 16)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.side_cycle
theorem in lean/SpectreKnot/ProofGrand.lean, line 163 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Inside a side, turning comes round in two steps: about a vertex of child c strictly inside a side j that is glued to a sibling, the gluing turns into the sibling and straight back.
Statement
theorem side_cycle (len_pos : ∀ c j, 1 ≤ L c j)
(pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j) {o : Bool}
{c j c' j' r : Nat} (c_lt : c < nk T) (j_lt : j < 6) (adj_eq : adjAt T c j = some (c', j')) (r_pos : 0 < r)
(r_lt : r < L c j) :
bsteps (Comp.ofLens T L d ω).toGluing o 2 (c, pos (L c) j + r) = some (c, pos (L c) j + r)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (37 lines)
by -- the side across has the same length have same_len := pair c c_lt j j_lt c' j' adj_eq obtain ⟨c'_lt, j'_lt, _, back⟩ := adj_valid c_lt j_lt adj_eq -- side `j` ends no later than the rim have end_c := side_end_le (L c) j_lt -- and so does the side across have end_c' := side_end_le (L c') j'_lt cases o · -- clockwise: across the edge leaving the vertex, and back across the edge leaving the next -- the edge leaving the vertex is glued to the side across, `r` edges from its end have first := gmate (d := d) (ω := ω) len_pos c_lt j_lt r_lt adj_eq -- the edge leaving the vertex reached is glued back have second := gmate (d := d) (ω := ω) len_pos c'_lt j'_lt (r := L c j - r) (by omega) back -- the vertex reached have next1 : nxt (pos (L c') 6) (pos (L c') j' + L c' j' - 1 - r) = pos (L c') j' + (L c j - r) := by unfold nxt; rw [ite_eq_right (by omega)]; omega -- and the vertex reached back have next2 : nxt (pos (L c) 6) (pos (L c) j + L c j - 1 - (L c j - r)) = pos (L c) j + r := by unfold nxt; rw [ite_eq_right (by omega)]; omega simp only [bsteps, bstep, Bool.false_eq_true, ite_false, first, Option.map_some, Option.bind_some, ofLens_E c'_lt, next1, second, ofLens_E c_lt, next2] · -- counter-clockwise: across the edge arriving at the vertex, and back across the edge arriving at the next -- the edge before the vertex have prev0 : prv (pos (L c) 6) (pos (L c) j + r) = pos (L c) j + (r - 1) := by unfold prv; rw [ite_eq_right (by omega)]; omega -- is glued to the side across, `r - 1` edges from its end have first := gmate (d := d) (ω := ω) len_pos c_lt j_lt (r := r - 1) (by omega) adj_eq -- the edge before the vertex reached have prev1 : prv (pos (L c') 6) (pos (L c') j' + L c' j' - 1 - (r - 1)) = pos (L c') j' + (L c j - r - 1) := by unfold prv; rw [ite_eq_right (by omega)]; omega -- is glued back have second := gmate (d := d) (ω := ω) len_pos c'_lt j'_lt (r := L c j - r - 1) (by omega) back -- to the edge before the start vertex have back_eq : pos (L c) j + L c j - 1 - (L c j - r - 1) = pos (L c) j + r := by omega simp only [bsteps, bstep, ite_true, ofLens_E c_lt, prev0, first, Option.bind_some, ofLens_E c'_lt, prev1, second, back_eq]
Statement.side_end_le
theorem in lean/SpectreKnot/ProofGrand.lean, line 87 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
A side ends no later than the rim.
Statement
theorem side_end_le (f : Nat → Nat) {j : Nat} (j_lt : j < 6) : pos f j + f j ≤ pos f 6
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by rw [← pos_succ]; exact pos_mono f (by omega)
Statement.side_getElem?
theorem in lean/SpectreKnot/ComposeTiles.lean, line 92 · read it in its file
Doc comment
If a patch's vertices sit where the side lengths f put them, edge r of side j is rim edge pos f j + r.
Statement
theorem side_getElem? (vtx_eq : P.vtx = (List.range 7).map (pos f)) (len_eq : P.E = pos f 6) {j r : Nat}
(j_lt : j < 6) (r_lt : r < f j) : (P.side j)[r]? = some (P.edgeAt (pos f j + r))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by simp only [Patch.side, vtx_eq, range7_getD _ (show j < 7 by omega), range7_getD _ (show j + 1 < 7 by omega), pos_succ] rw [List.getElem?_take_of_lt (by omega), List.getElem?_drop] -- side `j` ends no later than the rim have side_end := pos_mono f (show j + 1 ≤ 6 by omega) rw [pos_succ] at side_end -- so the position is on the rim have in_rim : pos f j + r < P.rim.length := by rw [show P.rim.length = P.E from rfl, len_eq]; omega simp only [Patch.edgeAt, List.getD_eq_getElem?_getD, List.getElem?_eq_getElem in_rim, Option.getD_some]
Statement.side_length
theorem in lean/SpectreKnot/ComposeTiles.lean, line 80 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
If a patch's vertices sit where the side lengths f put them, side j has f j edges.
Statement
theorem side_length (vtx_eq : P.vtx = (List.range 7).map (pos f)) (len_eq : P.E = pos f 6) {j : Nat}
(j_lt : j < 6) : (P.side j).length = f j
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by simp only [Patch.side, vtx_eq, range7_getD _ (show j < 7 by omega), range7_getD _ (show j + 1 < 7 by omega), List.length_take, List.length_drop, pos_succ] -- the rim has `pos f 6` edges have rim_len : P.rim.length = pos f 6 := len_eq -- side `j` ends no later than the rim have side_end := pos_mono f (show j + 1 ≤ 6 by omega) rw [pos_succ] at side_end omega
Statement.side_pos_inj
theorem in lean/SpectreKnot/ParentRim.lean, line 116 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Positions in a side are distinct from those in another side of the same child.
Statement
theorem side_pos_inj {f : Nat → Nat} (len_pos : ∀ i, i < 6 → 1 ≤ f i) {j j' o o' : Nat} (j_lt : j < 6)
(j_lt' : j' < 6) (o_lt : o < f j) (o_lt' : o' < f j') (same_pos : pos f j + o = pos f j' + o') :
j = j' ∧ o = o'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- the side lookup at the position finds `j` have side_j := sideIdx_eq f len_pos j_lt o_lt -- and at the same position it finds `j'` have side_j' := sideIdx_eq f len_pos j_lt' o_lt' rw [same_pos] at side_j rw [side_j] at side_j' subst side_j' exact ⟨rfl, by omega⟩
Statement.sig_of_check
theorem in lean/SpectreKnot/CompSig.lean, line 505 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**Computation 7.3's check gives Sig**, the form in which the proof of Lemma 7.1 carries the signature through cuts: every rim vertex found by turning about a child's vertex is the check's rim vertex at some position (own_surj, own_rot, vtx_eq), so the check's hooks, corners and crossover are Sig's.
Statement
theorem sig_of_check (len_pos : ∀ c j, 1 ≤ L c j) (checked : (Comp.ofLens T L d ω).check ω = true) :
Sig (Comp.ofLens T L d ω).toGluing (nk T - 1)
Names in its proof
Compose.Comp.check_soundCompose.Comp.ofLensCompose.nkCompose.ofLens_ECompose.ofLens_nStatement.found_cornerStatement.gLStatement.gRStatement.gR_rimLStatement.gR_rotStatement.hookStatement.last_ltStatement.ofLens_kids_lengthStatement.ownGoStatement.own_mateStatement.own_surjStatement.pcsStatement.rimNStatement.rimVertexPorts_lengthStatement.vtx_eqnxt_prvprvprv_lt
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (78 lines)
by obtain ⟨wf, no_loops, hooks, tA_lt, tB_lt, _, cross_R, cross_L⟩ := Comp.check_sound _ checked -- what the searches for the corners found, at the check's indices `tA` and `tB` have found_A := found_corner (C := Comp.ofLens T L d ω) (t := (Comp.ofLens T L d ω).tA) rfl tA_lt -- (and for `B`) have found_B := found_corner (C := Comp.ofLens T L d ω) (t := (Comp.ofLens T L d ω).tB) rfl tB_lt rw [rimVertexPorts_length] at tA_lt tB_lt hooks rw [ofLens_kids_length] at found_A found_B -- the check's vertices at `tA` and `tB` are the rim vertices at the positions `N - 1 - tA` and `N - 1 - tB` rw [vtx_eq tA_lt] at found_A cross_R cross_L rw [vtx_eq tB_lt] at found_B cross_R cross_L generalize pA_def : rimN T L - 1 - (Comp.ofLens T L d ω).tA = pA at found_A cross_R cross_L generalize pB_def : rimN T L - 1 - (Comp.ofLens T L d ω).tB = pB at found_B cross_R cross_L -- the positions are on the rim have pA_lt : pA < rimN T L := by omega -- (both of them) have pB_lt : pB < rimN T L := by omega -- the child edge before `pA` starts at the Γ child's corner `A` have own_A : ownGo L (pcs T) (prv (rimN T L) pA) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.A (nk T - 1)) := by simp only [gL, Prod.mk.injEq] at found_A exact Prod.ext found_A.1 found_A.2.1 -- and the one before `pB` at its corner `B` have own_B : ownGo L (pcs T) (prv (rimN T L) pB) = (nk T - 1, (Comp.ofLens T L d ω).toGluing.B (nk T - 1)) := by simp only [gL, Prod.mk.injEq] at found_B exact Prod.ext found_B.1 found_B.2.1 refine ⟨wf, no_loops, fun c u rim_L => ?_, ?_, ?_, ?_, ?_, ?_⟩ · -- a parent rim vertex: the check's rim vertex at some position `p` obtain ⟨c_lt_n, u_lt, unglued⟩ := rim_L -- `c` is a child have c_lt : c < nk T := by rwa [ofLens_n] at c_lt_n -- the edge before `u` is a parent rim edge, at some position `p` obtain ⟨p, p_lt, at_p⟩ := own_surj (d := d) (ω := ω) len_pos c_lt (by rw [← ofLens_E (d := d) (ω := ω) c_lt]; exact prv_lt u_lt) unglued -- `gR p` is the port `L` at `u` have gR_eq : gR T L d ω p = (c, u, false) := by simp only [gR, at_p]; rw [nxt_prv u_lt] -- turning about `u` reaches the start of the child edge at position `p - 1` have turn := gR_rot (d := d) (ω := ω) len_pos p_lt rw [gR_eq] at turn refine ⟨_, _, turn, ?_⟩ -- the check's index of the vertex at position `p` have vtx_t := vtx_eq (d := d) (ω := ω) (show rimN T L - 1 - p < rimN T L by omega) rw [show rimN T L - 1 - (rimN T L - 1 - p) = p by omega] at vtx_t by_cases is_A : rimN T L - 1 - p = (Comp.ofLens T L d ω).tA · -- at the corner `A` have p_eq : p = pA := by omega subst p_eq exact Or.inl ⟨by rw [own_A], Or.inl (by rw [own_A])⟩ · by_cases is_B : rimN T L - 1 - p = (Comp.ofLens T L d ω).tB · -- at the corner `B` have p_eq : p = pB := by omega subst p_eq exact Or.inl ⟨by rw [own_B], Or.inr (by rw [own_B])⟩ · -- a hook, by the check have hook := hooks _ (by omega) is_A is_B rw [vtx_t, gR_eq] at hook exact Or.inr hook · -- the Γ child is a child rw [ofLens_n] -- every kind has a child have := last_lt T omega · -- the Γ child's edge at `A` is on the parent's rim have unglued := (own_mate (d := d) (ω := ω) len_pos (prv_lt pA_lt)).2.2 rwa [own_A] at unglued · -- and so is its edge at `B` have unglued := (own_mate (d := d) (ω := ω) len_pos (prv_lt pB_lt)).2.2 rwa [own_B] at unglued · -- `R(A) ↔ R(B)` rwa [found_A, found_B] at cross_R · -- `L(A) ↔ L(B)`, from the vertices of `gR pA` and `gR pB` -- turning about the vertex of `gR pA` reaches `A` have rot_A := gR_rot (d := d) (ω := ω) len_pos pA_lt rw [own_A] at rot_A -- and about that of `gR pB`, `B` have rot_B := gR_rot (d := d) (ω := ω) len_pos pB_lt rw [own_B] at rot_B exact ⟨_, _, _, _, gR_rimL len_pos pA_lt, rot_A, gR_rimL len_pos pB_lt, rot_B, cross_L⟩
Statement.sig_partner
theorem in lean/SpectreKnot/StepMap.lean, line 587 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The sibling glued to side 5 of Δ's Σ child is not child 1.
Statement
theorem sig_partner : ∀ c, c < nk .Delta → kidAt .Delta c = .Sigma → ((adjAt .Delta c 5).getD (0, 0)).1 ≠ 1
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
decideStatement.signatureTheorem
theorem in lean/SpectreKnot/ProofGrand.lean, line 443 · read it in its file
Formalises Theorem 7.6 Signature Theorem.
Doc comment
The Signature Theorem (the claim SignatureTheorem of Statement.lean, the paper's Thm 7.6): the induction's conclusion good and chains_super, with the corners written out as the claim writes them.
Statement
theorem signatureTheorem : SignatureTheorem
The claim it proves: Statement.SignatureTheorem.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (31 lines)
by intro m K m_pos -- the induction's conclusion at level `m` have good_m := good m K m_pos -- the claim's `A` is the induction's: d_m = 2 F_{3m+1} (Lemma 6.4) have a_eq := cornerA_eq_aPos m_pos K -- and so is its `B` have b_eq : cornerB m K = bPos m K := by unfold cornerB bPos ori rw [a_eq, good_m.len] by_cases even : m % 2 = 0 <;> simp [even] -- vertex 6, the end of the rim, is one side 5 after vertex 5 have v6 : vpos m K 6 = vpos m K 5 + lenAt m K 5 := pos_succ (lenAt m K) 5 -- every side has at least 5 edges, and the Σ corner lies at least 4 edges before the end of side 5 (Lemma 6.5) have bnd := bounds m m_pos -- `A` is a rim vertex have a_lt : aPos m K < (super m K).E := by rw [good_m.len, v6] unfold aPos by_cases is_sigma : K = .Sigma · subst is_sigma -- side 5 of a Σ is a δ side have side5 : lenAt m .Sigma 5 = letterLen m .delta := rfl rw [ite_eq_left rfl, side5] omega · -- side 5 has at least 5 edges have side5 : 5 ≤ lenAt m K 5 := bnd.1 (letterOf K 5) rw [ite_eq_right is_sigma] omega rw [a_eq, b_eq] exact ⟨a_lt, chains_super m K m_pos, good_m.sig⟩
Statement.stepCheck
def in lean/SpectreKnot/StepMap.lean, line 97 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The checks of StepOK at (ℓ₁, d₁).
Statement
def stepCheck (ω : Bool) : Bool := let C := Comp.ofLens .Delta (L₁ .Delta) (dOff 1) ω (List.range (pos (L₁ .Delta 1) 6)).all fun u => [true, false].all fun s => match tgt ω (L₁ .Delta 1) u s with | none => true | some q => C.toGluing.fullWalk C.fuel (1, u, s) == some (jR (L₁ .Delta) q) || C.toGluing.fullWalk C.fuel (1, u, s) == some (jL (L₁ .Delta) q)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.stepCheck_false
theorem in lean/SpectreKnot/StepMap.lean, line 109 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The kernel's check passes at the level-1 lengths for ω = false.
Statement
theorem stepCheck_false : stepCheck false = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.stepCheck_sound
theorem in lean/SpectreKnot/StepMap.lean, line 112 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The check is sound: if it passes, the junction map holds at (ℓ₁, d₁).
Statement
theorem stepCheck_sound {ω : Bool} (check : stepCheck ω = true) : StepOK (L₁ .Delta) (dOff 1) ω
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (10 lines)
by intro u hu s q tgt_eq simp only [stepCheck, List.all_eq_true, List.mem_range] at check -- the check at vertex `u` and port `s` have at_port := check u hu s (by cases s <;> simp) rw [tgt_eq] at at_port simp only [Bool.or_eq_true, beq_iff_eq] at at_port rcases at_port with walk_R | walk_L · exact ⟨_, fullWalk_sound _ walk_R, Or.inl rfl⟩ · exact ⟨_, fullWalk_sound _ walk_L, Or.inr rfl⟩
Statement.stepCheck_true
theorem in lean/SpectreKnot/StepMap.lean, line 107 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
The kernel's check passes at the level-1 lengths for ω = true.
Statement
theorem stepCheck_true : stepCheck true = true
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decide +kernelStatement.step_base
theorem in lean/SpectreKnot/StepMap.lean, line 124 · read it in its file
Formalises Computation 9.2 The junction map at the level-1 lengths.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The base case: the junction map holds at the level-1 lengths (ℓ₁, d₁), for both signs.
Statement
theorem step_base (ω : Bool) : StepOK (L₁ .Delta) (dOff 1) ω
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by
cases ω
· exact stepCheck_sound stepCheck_false
· exact stepCheck_sound stepCheck_trueStatement.step_level
theorem in lean/SpectreKnot/StepMap.lean, line 591 · read it in its file
Formalises Lemma 9.3 The junction map.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1.
Doc comment
The junction map at every level m ≥ 1.
Statement
theorem step_level (m : Nat) (m_pos : 1 ≤ m) (ω : Bool) : StepOK (Lk m .Delta) (dOff m) ω
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (23 lines)
by refine adm_induct .Delta ω (fun L d => StepOK L d ω) (fun L L' d d' same_len same_d holds' => StepOK.congr same_len same_d holds') (step_base ω) ?_ _ _ (adm_level .Delta m m_pos) intro μ L d move_ok clear old_map refine StepOK.move move_ok ?_ ?_ old_map · -- a cut on child 1 is two edges clear of the ends of its side (child 1 is not a Σ) intro on_child_one rcases clear with ⟨clear_start, clear_end⟩ | ⟨is_sigma, _⟩ · rw [on_child_one] at clear_end; exact ⟨clear_start, clear_end⟩ · rw [on_child_one] at is_sigma; exact absurd is_sigma kid_one · -- and so is the same cut seen from the sibling, if that is child 1 intro shared sib_child_one rcases clear with ⟨clear_start, clear_end⟩ | ⟨is_sigma, side_five⟩ · have same_len := move_ok.L₁ shared -- the sibling's side is as long as side `j₀` rw [sib_child_one] at same_len simp only [Move.r₁] omega · exfalso -- the sibling glued to the Σ child's side 5 is not child 1 have not_one := sig_partner _ move_ok.c₀ is_sigma rw [← side_five] at not_one exact not_one sib_child_one
Statement.step_tile
theorem in lean/SpectreKnot/NestStep.lean, line 227 · read it in its file
Formalises Lemma 9.3 The junction map.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1.
Doc comment
The junction map at tile level: a rim port of N_m (outside child 1's side 2) lies, in N_{m+1}, on the strand of the parent hook at junction q.
Statement
theorem step_tile {m : Nat} (m_pos : 1 ≤ m) {u : Nat} (hu : u < pos (Lk m .Delta 1) 6) {s : Bool} {q : Nat}
(tgt_eq : tgt (ori m) (Lk m .Delta 1) u s = some q) :
(N (m + 1)).Linked (upPort m 1 ((N m).bport (ori m) (u, s)))
((N (m + 1)).bport (ori (m + 1)) (jpos (Lk m .Delta) q, true))
Names in its proof
Compose.nkCompose.ofLens_ECompose.ofLens_nStatement.E_NStatement.KDStatement.Kids.bport_LStatement.Kids.bport_RStatement.Kids.follow_of_fullReachStatement.LkStatement.NStatement.N_succStatement.Patch.Linked.of_followStatement.compose_EStatement.gL_jposStatement.gR_jposStatement.hookStatement.jposStatement.jpos_fullStatement.jpos_le_addStatement.jpos_posStatement.jpos_succStatement.junction_ltStatement.len5Statement.oriStatement.ori_succStatement.pieceDStatement.rimNStatement.step_levelStatement.tgt_lt
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (42 lines)
by -- the junction is one of the pieces `1 … 21` obtain ⟨q_pos, q_lt⟩ := tgt_lt tgt_eq -- the children of `N_{m+1}` have kids := KD m_pos -- the pieces end where the rim does have pieces_end := jpos_full (Lk m .Delta) -- so the junction is on the rim have junction_lt : jpos (Lk m .Delta) q < rimN .Delta (Lk m .Delta) := by -- the pieces from `q` to the end have spread := jpos_le_add (Lk m .Delta) (len5 m_pos) q (22 - q) (by omega) rw [show q + (22 - q) = 22 by omega] at spread; omega -- the rim of `N_{m+1}` have rim_len : (N (m + 1)).E = rimN .Delta (Lk m .Delta) := by rw [N_succ m_pos, compose_E kids.shape] -- the junction is a hook of `N_{m+1}`: its two ports lie on one strand have junction_hook : (N (m + 1)).Linked ((N (m + 1)).bport (ori (m + 1)) (jpos (Lk m .Delta) q, false)) ((N (m + 1)).bport (ori (m + 1)) (jpos (Lk m .Delta) q, true)) := by -- the last piece has at least 5 edges have := len5 m_pos (pieceD 21).1 (pieceD 21).2 -- piece 21 starts at least `5 (21 - q)` edges after piece `q` have to_last := jpos_le_add (Lk m .Delta) (len5 m_pos) q (21 - q) (by omega) rw [show q + (21 - q) = 21 by omega] at to_last -- and the rim ends where piece 21 does have last_end : jpos (Lk m .Delta) 22 = jpos (Lk m .Delta) 21 + Lk m .Delta (pieceD 21).1 (pieceD 21).2 := jpos_succ (Lk m .Delta) (q := 21) (by omega) refine hook (by omega) (by -- the junction is at least 5 edges along have := jpos_pos m_pos q_pos (by omega) omega) ?_ rw [← E_N (by omega), rim_len]; omega -- the junction map: the walk from `(1, u, s)` ends at a port of the junction's hook obtain ⟨r, walk, at_junction⟩ := step_level m m_pos (ori m) u hu s q tgt_eq -- at tile level: following the ribbon from the port of `N_m` leads there have follows := kids.follow_of_fullReach walk ⟨by rw [ofLens_n]; exact (by decide : 1 < nk .Delta), show u < _ by rw [ofLens_E (c := 1) (by decide)]; exact hu⟩ rw [N_succ m_pos, ori_succ] at junction_hook ⊢ rcases at_junction with rfl | rfl · rw [kids.bport_R junction_lt, gR_jpos m_pos q_lt] exact .of_follow follows · rw [kids.bport_L junction_lt, gL_jpos m_pos q_pos q_lt] at junction_hook exact (Patch.Linked.of_follow follows).trans junction_hook
Statement.stp
def in lean/SpectreKnot/ProofB.lean, line 20 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The parent vertex at child 1's vertex u on its side 2 (piece 16 of the parent's rim, traversed backwards).
Statement
def stp (L : Nat → Nat → Nat) (u : Nat) : Nat := jpos L 16 + (pos (L 1) 3 - u)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.stp_apart
theorem in lean/SpectreKnot/ProofExact.lean, line 242 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
The hook at a vertex u strictly inside child 1's side 2 lies at a different vertex of N_{n+1} from junction 16 (where that side ends), and both lie well inside side 4 of N_{n+1}.
Statement
theorem stp_apart {n u : Nat} (n_pos : 1 ≤ n) (after_two : pos (Lk n .Delta 1) 2 + 2 ≤ u)
(before_three : u + 2 ≤ pos (Lk n .Delta 1) 3) :
(2 ≤ jpos (Lk n .Delta) 16 ∧ jpos (Lk n .Delta) 16 + 2 ≤ pos (Lk (n + 1) .Delta 1) 6) ∧
(2 ≤ stp (Lk n .Delta) u ∧ stp (Lk n .Delta) u + 2 ≤ pos (Lk (n + 1) .Delta 1) 6) ∧
jpos (Lk n .Delta) 16 ≠ stp (Lk n .Delta) u
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by refine ⟨inside_bounds (by omega) (inside_16 n_pos), inside_bounds (by omega) (inside_stp n_pos (by omega) (by omega)), ?_⟩ simp only [stp]; omega
Statement.straightThrough
def in lean/SpectreKnot/Statement.lean, line 68 · read it in its file
Formalises Definition 3.1 The decoration, Definition 3.2 Straight-through rule.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
Def 3.2, the straight-through rule, for a gluing glue like a patch's (or a tiling's, §6): the port where the ribbon at p continues across its edge, or none if nothing is glued there.
Statement
def straightThrough (glue : Nat → Nat → Option (Nat × Nat)) : Port → Option Port -- R(v_i) is on e_i. If e_i is e_j of t', the ribbon continues as R(v_j) of t'. | (t, i, true) => (glue t i).map fun (t', j) => (t', j, true) -- L(v_i) is on e_{i-1} (`(i + 13) % 14` is i - 1, round 14). If that is e_j of t', it continues as L(v_{j+1}). | (t, i, false) => (glue t ((i + 13) % 14)).map fun (t', j) => (t', (j + 1) % 14, false)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.stretch_eq
theorem in lean/SpectreKnot/ProofB.lean, line 46 · read it in its file
Formalises Lemma 9.3 The junction map.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1.
Doc comment
**On child 1's side 2, rim ports of N_m are rim ports of N_{m+1}**: for u strictly inside side 2, port (u, s) of N_m, one level up, is port (stp u, !s) of N_{m+1} (the hand swaps with the orientation).
Statement
theorem stretch_eq {m : Nat} (m_pos : 1 ≤ m) {u : Nat} (after_two : pos (Lk m .Delta 1) 2 < u)
(before_three : u < pos (Lk m .Delta 1) 3) (s : Bool) :
upPort m 1 ((N m).bport (ori m) (u, s)) = (N (m + 1)).bport (ori (m + 1)) (stp (Lk m .Delta) u, !s)
Names in its proof
Compose.nkCompose.ofLens_ECompose.posCompose.pos_monoCompose.pos_succStatement.KDStatement.Kids.bport_LStatement.Kids.bport_RStatement.LkStatement.N_succStatement.gLStatement.gRStatement.iota1Statement.jposStatement.jpos17Statement.jpos_fullStatement.jpos_leStatement.jpos_posStatement.len5Statement.oriStatement.ori_succStatement.ownGo16Statement.rimNStatement.stpdOffnxtprv
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (44 lines)
by -- the children of `N_{m+1}` have kids := KD m_pos -- child 1's side 2 ends `L 1 2` edges after it starts have side_two_len : pos (Lk m .Delta 1) 3 = pos (Lk m .Delta 1) 2 + Lk m .Delta 1 2 := pos_succ _ 2 -- and no later than the rim have three_le_six := pos_mono (Lk m .Delta 1) (show 3 ≤ 6 by omega) -- piece 17 starts where piece 16 ends have piece17 := jpos17 (Lk m .Delta) -- and the rim ends at least 25 edges later have to_end := jpos_le (Lk m .Delta) (len5 m_pos) (q := 17) (q' := 22) (by omega) (by omega) -- so the parent vertex is on the parent's rim have stp_lt : stp (Lk m .Delta) u < rimN .Delta (Lk m .Delta) := by rw [← jpos_full]; simp only [stp]; omega -- piece 16 starts at least 5 edges along have piece16_far := jpos_pos m_pos (q := 16) (by omega) (by omega) rw [N_succ m_pos, ori_succ] cases s · rw [Bool.not_false, kids.bport_R stp_lt] -- the parent's rim edge at `stp u` is child 1's edge `u - 1` have edge_at := ownGo16 (Lk m .Delta) (i := pos (Lk m .Delta 1) 3 - u) (by omega) -- so the gluing's port there is `L` at child 1's vertex `u` have gR_eq : gR .Delta (Lk m .Delta) (dOff m) (ori m) (stp (Lk m .Delta) u) = (1, u, false) := by -- the end of edge `u - 1` is vertex `u` have next_vertex : nxt (pos (Lk m .Delta 1) 6) (pos (Lk m .Delta 1) 2 + Lk m .Delta 1 2 - 1 - (pos (Lk m .Delta 1) 3 - u)) = u := by simp only [nxt]; rw [ite_eq_right (by omega)]; omega simp only [gR, stp, edge_at, ofLens_E (show 1 < nk .Delta by decide), next_vertex] rw [gR_eq, iota1] · rw [Bool.not_true, kids.bport_L stp_lt] -- the rim position before `stp u` have before_stp : prv (rimN .Delta (Lk m .Delta)) (stp (Lk m .Delta) u) = jpos (Lk m .Delta) 16 + (pos (Lk m .Delta 1) 3 - u - 1) := by -- `stp u` is not rim position 0 have stp_ne : stp (Lk m .Delta) u ≠ 0 := by simp only [stp]; omega simp only [prv]; rw [ite_eq_right stp_ne]; simp only [stp]; omega -- the parent's rim edge there is child 1's edge `u` have edge_at := ownGo16 (Lk m .Delta) (i := pos (Lk m .Delta 1) 3 - u - 1) (by omega) -- so the gluing's port there is `R` at child 1's vertex `u` have gL_eq : gL .Delta (Lk m .Delta) (stp (Lk m .Delta) u) = (1, u, true) := by -- the edge's number is `u` have edge_u : pos (Lk m .Delta 1) 2 + Lk m .Delta 1 2 - 1 - (pos (Lk m .Delta 1) 3 - u - 1) = u := by omega simp only [gL, before_stp, edge_at, edge_u] rw [gL_eq, iota1]
Statement.super
def in lean/SpectreKnot/Statement.lean, line 227 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
**super m K: the supertile of level m and kind K.** Level 0 is a single tile, for every kind (the paper's level-0 Γ, the Mystic, is not used), and level 1 the data; level m + 2 is composed from children of level m + 1, of the kinds Table 1 lists.
Statement
def super : Nat → Kind → Patch | 0, _ => tile | 1, K => level1 K | m + 2, T => compose T fun c => super (m + 1) ((Pattern.kids T).getD c .Gamma)
Names in its proof
Named in the proofs of
Statement.ParStatement.kidsDStatement.GoodStatement.good_succStatement.cornerA_eq_aPosStatement.cornerA_succStatement.compose_no_defaultStatement.firstStatement.Chain.kidsAtStatement.Chain.kid_eqStatement.signatureTheoremStatement.glue_lift1Statement.super_noSelfStatement.glue_ok_NStatement.NStatement.nestShiftStatement.cornerAStatement.cornerBStatement.SignatureTheoremStatement.TheoremAStatement.Chain.blockStatement.Chain.shift
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.super_glueSymm
theorem in lean/SpectreKnot/Linked.lean, line 207 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
Every supertile has symmetric gluing, by induction on the level.
Statement
theorem super_glueSymm : ∀ m K, (super m K).GlueSymm | 0, _ => tile_glueSymm | 1, K => level1_glueSymm K | m + 2, T => (kids_at (m := m + 1) (by omega) T (fun K => good (m + 1) K (by omega))).glue_symm (fun c _ => super_glueSymm (m + 1) _)
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.super_noSelf
theorem in lean/SpectreKnot/ProofStrand.lean, line 309 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
No supertile glues a tile to itself.
Statement
theorem super_noSelf : ∀ m K, NoSelf (super m K) | 0, _ => fun _ _ _ _ _ _ glued => by simp [super, tile] at glued | 1, K => level1_noSelf K | m + 2, T => (kids_at (m := m + 1) (by omega) T (fun K => good (m + 1) K (by omega))).noSelf (fun c _ => super_noSelf (m + 1) _)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.super_side_length
theorem in lean/SpectreKnot/ProofA.lean, line 144 · read it in its file
Formalises Proposition 6.1 Lengths by letter.
Doc comment
Prop 6.1 for the supertiles themselves (m ≥ 1): side j of super m K has ℓ_m(K, j) edges, the length letterLen m of its letter (Table 4); this is also sideLen m K j, the count by Table 3 (sideLen_eq_letterLen).
Statement
theorem super_side_length {m : Nat} (m_pos : 1 ≤ m) (K : Kind) {j : Nat} (j_lt : j < 6) :
((super m K).side j).length = letterLen m (letterOf K j) ∧ letterLen m (letterOf K j) = sideLen m K j
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
⟨side_length (good m K m_pos).vtx (good m K m_pos).len j_lt, (sideLen_eq_letterLen m m_pos K j j_lt).symm⟩
Statement.surrounded_off_side2
theorem in lean/SpectreKnot/ProofGrand.lean, line 277 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
**Off its side 2, N_m lies inside N_{m+1}**: a corner on the chain about a rim vertex of N_m that is not on the closed side 2 is surrounded in N_{m+1}.
Statement
theorem surrounded_off_side2 {m : Nat} (m_pos : 1 ≤ m) {u n : Nat} {x : Nat × Nat} (u_lt : u < (N m).E)
(off_side2 : u < pos (Lk m .Delta 1) 2 ∨ pos (Lk m .Delta 1) 3 < u)
(on_chain : (N m).turns n ((N m).sC (ori m) u) = some x) : (N (m + 1)).Surrounded (up m 1 x.1) x.2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by -- the children of `N_{m+1}` have kids := KD m_pos -- the rim of `N_m` have rim_len := E_N m_pos obtain ⟨a, a_pos, cycle⟩ := child1_cycle (d := dOff m) (ω := ori m) (o := ori m) kids.len_pos kids.pair (by rw [← rim_len]; exact u_lt) off_side2 rw [N_succ m_pos] exact kids.surrounded_of_cycle (kidsD_chains m_pos) (c := 1) (by decide) u_lt a_pos cycle on_chain
Statement.surrounded_side4
theorem in lean/SpectreKnot/ProofGrand.lean, line 291 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
**Around side 4 of N_m, N_m lies inside N_{m+1}**: a corner on the chain about a rim vertex well inside side 4 of N_m (which child 1's side 4, glued to child 3, is) is surrounded in N_{m+1}.
Statement
theorem surrounded_side4 {m : Nat} (m_pos : 1 ≤ m) {v n : Nat} {x : Nat × Nat} (inside : Inside m 4 v)
(on_chain : (N m).turns n ((N m).sC (ori m) v) = some x) : (N (m + 1)).Surrounded (up m 1 x.1) x.2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by -- the children of `N_{m+1}` have kids := KD m_pos -- the rim of `N_m` have rim_len := E_N m_pos -- `v` lies two edges inside side 4 have after_start := inside.1 -- and two before its end have before_end : v + 2 ≤ pos (Lk m .Delta 1) 5 := inside.2 -- which is no later than the rim have five_le := pos_mono (Lk m .Delta 1) (show 5 ≤ 6 by omega) -- turning about `v` comes round in two steps have cycle := side4_cycle (d := dOff m) (ω := ori m) (o := ori m) kids.len_pos kids.pair (v := v) (by omega) (by omega) rw [N_succ m_pos] exact kids.surrounded_of_cycle (kidsD_chains m_pos) (c := 1) (by decide) (show v < (N m).E by rw [rim_len]; omega) (by omega) cycle on_chain
Statement.surrounded_up
theorem in lean/SpectreKnot/ProofGrand.lean, line 270 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
A vertex surrounded in N_m is surrounded in N_{m+1}.
Statement
theorem surrounded_up {m : Nat} (m_pos : 1 ≤ m) {t i : Nat} (t_lt : t < (N m).tiles)
(surrounded : (N m).Surrounded t i) : (N (m + 1)).Surrounded (up m 1 t) i
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
obtain ⟨n, n_pos, round⟩ := surrounded
exact ⟨n, n_pos, turns_up m_pos n (x := (t, i)) t_lt round⟩Statement.tabRot
def in lean/SpectreKnot/ParentRim.lean, line 243 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Turning about vertex v of child c by Table 2 alone: while the side starting at the vertex is glued to side j₂ of a sibling c₂, go on to the vertex where that side ends, vertex j₂ + 1 of c₂.
Statement
def tabRot (T : Kind) : Nat → Nat × Nat → Option (Nat × Nat) | 0, _ => none | f + 1, (c, v) => match adjAt T c v with | none => some (c, v) | some (c₂, j₂) => tabRot T f (c₂, (j₂ + 1) % 6)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.tgt
def in lean/SpectreKnot/StepMap.lean, line 33 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
Where an arc of child 1 goes: the junction (a piece number) of the parent hook it lies on, for the port s at rim vertex u of child 1 (side lengths f); none for a vertex inside side 2 (a parent hook itself). Child 1's corners are A = 0 and B = 1 (ω) or B = E - 1 (not ω); their arcs are the crossover arcs.
Statement
def tgt (ω : Bool) (f : Nat → Nat) (u : Nat) (s : Bool) : Option Nat := if ω then if u = 0 ∨ u = 1 then some (if s then 17 else 9) else if u ≤ pos f 2 then some 17 else if u < pos f 3 then none else if u < pos f 4 then some 16 else if u < pos f 5 then some 12 else some 9 else if u = 0 ∨ u = pos f 6 - 1 then some (if s then 21 else 16) else if u ≤ pos f 1 then some 21 else if u ≤ pos f 2 then some 17 else if u < pos f 3 then none else some 16
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.tgt_congr
theorem in lean/SpectreKnot/StepMap.lean, line 553 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The map depends on the side lengths only through the positions of the corners.
Statement
theorem tgt_congr {ω : Bool} {f f' : Nat → Nat} (same_pos : ∀ k, k ≤ 6 → pos f k = pos f' k) (u : Nat) (s : Bool) :
tgt ω f' u s = tgt ω f u s
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
tgt_map (φ := fun x => x) (fun _ _ => Iff.rfl) rfl rfl (by rw [same_pos 6 (by omega)]) same_pos u s
Statement.tgt_lt
theorem in lean/SpectreKnot/StepMap.lean, line 274 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The junctions the map names are pieces 1 … 21.
Statement
theorem tgt_lt {ω : Bool} {f : Nat → Nat} {u : Nat} {s : Bool} {q : Nat} (tgt_eq : tgt ω f u s = some q) :
1 ≤ q ∧ q < 22
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
unfold tgt at tgt_eq
revert tgt_eq
cases ω <;> cases s <;> simp only [Bool.false_eq_true, ite_false, ite_true] <;> (repeat' split) <;> intro tgt_eq <;>
simp only [Option.some.injEq, reduceCtorEq] at tgt_eq <;> omegaStatement.tgt_map
theorem in lean/SpectreKnot/StepMap.lean, line 298 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The map, read through a renumbering φ of child 1's rim that keeps the order, the first two vertices, the last vertex and the six corners (from side lengths f to f').
Statement
theorem tgt_map {ω : Bool} {f f' φ : Nat → Nat} (keeps_lt : ∀ a b, φ a < φ b ↔ a < b) (fixes_zero : φ 0 = 0)
(fixes_one : φ 1 = 1) (maps_last : φ (pos f 6 - 1) = pos f' 6 - 1)
(maps_corners : ∀ k, k ≤ 6 → φ (pos f k) = pos f' k) (u : Nat) (s : Bool) :
tgt ω f' (φ u) s = tgt ω f u s
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (44 lines)
by -- `φ` is one to one have keeps_eq : ∀ a b, φ a = φ b ↔ a = b := fun a b => by constructor · intro same rcases Nat.lt_trichotomy a b with a_lt_b | a_eq_b | b_lt_a · have := (keeps_lt a b).mpr a_lt_b -- `φ` keeps the strict order omega · exact a_eq_b · have := (keeps_lt b a).mpr b_lt_a -- `φ` keeps the strict order omega · intro same; rw [same] -- `φ` keeps `≤` have keeps_le : ∀ a b, φ a ≤ φ b ↔ a ≤ b := fun a b => by rw [← Nat.not_lt, ← Nat.not_lt, keeps_lt] -- each test in `tgt` gives the same answer after the renumbering: the test `u = 0` have is_zero : (φ u = 0) = (u = 0) := propext (by -- `φ u = φ 0` exactly when `u = 0` have at_zero := keeps_eq u 0 rwa [fixes_zero] at at_zero) -- the test `u = 1` have is_one : (φ u = 1) = (u = 1) := propext (by -- `φ u = φ 1` exactly when `u = 1` have at_one := keeps_eq u 1 rwa [fixes_one] at at_one) -- the test for the last vertex have is_last : (φ u = pos f' 6 - 1) = (u = pos f 6 - 1) := propext (by -- `φ u` is the last vertex exactly when `u` is have at_last := keeps_eq u (pos f 6 - 1) rwa [maps_last] at at_last) -- the tests `u ≤` a corner have le_corner : ∀ k, k ≤ 6 → (φ u ≤ pos f' k) = (u ≤ pos f k) := fun k hk => propext (by -- `φ u` is at most corner `k` exactly when `u` is have at_corner := keeps_le u (pos f k) rwa [maps_corners k hk] at at_corner) -- the tests `u <` a corner have lt_corner : ∀ k, k ≤ 6 → (φ u < pos f' k) = (u < pos f k) := fun k hk => propext (by -- `φ u` is before corner `k` exactly when `u` is have at_corner := keeps_lt u (pos f k) rwa [maps_corners k hk] at at_corner) simp only [tgt, is_zero, is_one, is_last, le_corner 1 (by omega), le_corner 2 (by omega), lt_corner 3 (by omega), lt_corner 4 (by omega), lt_corner 5 (by omega)]
Statement.tgt_none
theorem in lean/SpectreKnot/ProofB.lean, line 224 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The map names no junction only strictly inside side 2.
Statement
theorem tgt_none {ω : Bool} {f : Nat → Nat} {u : Nat} {s : Bool} (tgt_eq : tgt ω f u s = none) :
pos f 2 < u ∧ u < pos f 3
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
unfold tgt at tgt_eq
revert tgt_eq
cases ω <;> simp only [Bool.false_eq_true, ite_false, ite_true] <;> (repeat' split) <;> intro tgt_eq <;>
first | omega | (exfalso; simp at tgt_eq)Statement.tgt_side
theorem in lean/SpectreKnot/StepMap.lean, line 56 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Well inside side j, the map depends only on j: at a vertex u at least two edges from both ends of side j of child 1 (side lengths f), tgt is sideTgt ω j, for either port s.
Statement
theorem tgt_side {ω : Bool} {f : Nat → Nat} {j u : Nat} (s : Bool) (hj : j < 6) (after_start : pos f j + 2 ≤ u)
(before_end : u + 2 ≤ pos f (j + 1)) : tgt ω f u s = sideTgt ω j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (36 lines)
by -- the sides start in order round the rim have mono : ∀ a b, a ≤ b → pos f a ≤ pos f b := fun a b a_le_b => pos_mono f a_le_b -- side 0 starts at vertex 0 have p0 : pos f 0 = 0 := rfl -- side `j` ends before the rim does have end_le := mono (j + 1) 6 (by omega) -- the starts of sides 1 to 5, in order have order : pos f 1 ≤ pos f 2 ∧ pos f 2 ≤ pos f 3 ∧ pos f 3 ≤ pos f 4 ∧ pos f 4 ≤ pos f 5 := ⟨mono 1 2 (by omega), mono 2 3 (by omega), mono 3 4 (by omega), mono 4 5 (by omega)⟩ rcases (show j = 0 ∨ j = 1 ∨ j = 2 ∨ j = 3 ∨ j = 4 ∨ j = 5 by omega) with rfl | rfl | rfl | rfl | rfl | rfl · have before_end : u + 2 ≤ pos f 1 := before_end -- side 0 ends where side 1 starts cases ω <;> simp only [tgt, sideTgt, Bool.false_eq_true, ite_false, ite_true] <;> rw [ite_eq_right (by omega), ite_eq_left (by omega)] <;> simp · have before_end : u + 2 ≤ pos f 2 := before_end -- side 1 ends where side 2 starts cases ω <;> simp only [tgt, sideTgt, Bool.false_eq_true, ite_false, ite_true] · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_left (by omega)]; simp · rw [ite_eq_right (by omega), ite_eq_left (by omega)]; simp · have before_end : u + 2 ≤ pos f 3 := before_end -- side 2 ends where side 3 starts cases ω <;> simp only [tgt, sideTgt, Bool.false_eq_true, ite_false, ite_true] · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_left (by omega)]; simp · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_left (by omega)]; simp · have before_end : u + 2 ≤ pos f 4 := before_end -- side 3 ends where side 4 starts cases ω <;> simp only [tgt, sideTgt, Bool.false_eq_true, ite_false, ite_true] · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega)]; simp · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_left (by omega)]; simp · have before_end : u + 2 ≤ pos f 5 := before_end -- side 4 ends where side 5 starts cases ω <;> simp only [tgt, sideTgt, Bool.false_eq_true, ite_false, ite_true] · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega)]; simp · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_left (by omega)]; simp · have before_end : u + 2 ≤ pos f 6 := before_end -- side 5 ends where the rim ends cases ω <;> simp only [tgt, sideTgt, Bool.false_eq_true, ite_false, ite_true] · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega)]; simp · rw [ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega), ite_eq_right (by omega)]; simp
Statement.tgt_vals_f
theorem in lean/SpectreKnot/ProofB.lean, line 240 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
For ω = false the map names only junctions 21, 16 and 17.
Statement
theorem tgt_vals_f {f : Nat → Nat} {u : Nat} {s : Bool} {q : Nat} (tgt_eq : tgt false f u s = some q) :
q = 21 ∨ q = 16 ∨ q = 17
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
unfold tgt at tgt_eq
revert tgt_eq
cases s <;> simp only [Bool.false_eq_true, ite_false] <;> (repeat' split) <;> intro tgt_eq <;>
simp only [Option.some.injEq, reduceCtorEq] at tgt_eq <;> omegaStatement.tgt_vals_t
theorem in lean/SpectreKnot/ProofB.lean, line 232 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
For ω = true the map names only junctions 17, 9, 16 and 12.
Statement
theorem tgt_vals_t {f : Nat → Nat} {u : Nat} {s : Bool} {q : Nat} (tgt_eq : tgt true f u s = some q) :
q = 17 ∨ q = 9 ∨ q = 16 ∨ q = 12
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
unfold tgt at tgt_eq
revert tgt_eq
cases s <;> simp only [ite_true] <;> (repeat' split) <;> intro tgt_eq <;>
simp only [Option.some.injEq, reduceCtorEq] at tgt_eq <;> omegaStatement.theoremA
theorem in lean/SpectreKnot/ProofA.lean, line 214 · read it in its file
Formalises Theorem 7.6 Signature Theorem.
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
Theorem A (as stated in Statement.lean): for every level m and every kind K, the supertile super m K contains no closed strand.
Statement
theorem theoremA : TheoremA
The claim it proves: Statement.TheoremA.
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by intro m K rcases Nat.eq_zero_or_pos m with rfl | m_pos · exact tile_hasSig.noClosed · exact (good m K m_pos).sig.noClosed
Statement.theoremA_strand
theorem in lean/SpectreKnot/ProofChain.lean, line 648 · read it in its file
Formalises Theorem A The Daedalus Theorem.
Doc comment
Theorem A in strand form (as stated in Statement.lean): in a tiling whose hierarchy covers the plane, every strand is a two-way infinite path.
Statement
theorem theoremA_strand : TheoremA_strand
The claim it proves: Statement.TheoremA_strand.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (39 lines)
by intro X T covers contains p hp -- the union of the chain is a tiling have tiling := X.isTiling covers contains -- its strand system, and the start let S := tilingSys tiling let start : NPort := ⟨p, hp⟩ -- following the strand forwards, as ports have forwards : ∀ k, iter T.forward k p = (S.walk start k).1 := by intro k induction k with | zero => rfl | succ k ih => rw [iter_succ, ih]; rfl -- and backwards have backwards : ∀ k, iter T.backward k p = (iter S.prev k start).1 := by intro k induction k with | zero => rfl | succ k ih => rw [iter_succ, ih]; rfl -- Lemma 3.4: the strand is closed or a two-way infinite path; it is not closed obtain ⟨distinct, back_distinct, apart, no_piece_twice⟩ := (S.closed_or_path start).resolve_left (X.not_closed covers contains tiling start) refine ⟨?_, ?_, ?_, ?_⟩ · -- (1) forwards, no port twice intro i j same rw [forwards, forwards] at same exact distinct i j (Subtype.ext same) · -- (2) backwards, no port twice intro a a' same rw [backwards, backwards] at same exact back_distinct a a' (Subtype.ext same) · -- (3) backwards never meets forwards, except at the start intro a b same rw [backwards, forwards] at same exact apart a b (Subtype.ext same) · -- (4) no piece twice intro i j same rw [forwards, forwards] at same exact no_piece_twice i j (Subtype.ext same)
Statement.theoremB
theorem in lean/SpectreKnot/ProofB.lean, line 532 · read it in its file
Formalises Theorem 9.1 Merging, Theorem B The Ariadne Theorem.
Doc comment
Theorem B (as stated in Statement.lean).
Statement
theorem theoremB : TheoremB
The claim it proves: Statement.TheoremB.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by refine ⟨fun b b_pos t i ht hi => no_boundary b_pos ht hi, fun b => theoremA b .Delta, ?_⟩ intro b p q hp hq rcases Nat.eq_zero_or_pos b with rfl | b_pos · -- `N_0` is one tile, tile 1 of `N_1` -- `N_1` has nine tiles have nine : (N 1).tiles = 9 := by decide -- `p` is on the one tile of `N_0` have p_tile : p.1 < 1 := hp.1 -- and so is `q` have q_tile : q.1 < 1 := hq.1 -- one level up, `p` is a port of `N_1` have p_up : (N 1).IsPort (upPort 0 1 p) := ⟨show p.1 + 1 < (N 1).tiles by omega, hp.2⟩ -- and so is `q` have q_up : (N 1).IsPort (upPort 0 1 q) := ⟨show q.1 + 1 < (N 1).tiles by omega, hq.2⟩ exact ⟨5, (theoremB_sharp 1 _ _ (Nat.le_refl _) p_up q_up).1⟩ · exact ⟨4, (theoremB_sharp b p q b_pos hp hq).1⟩
Statement.theoremB_exact
theorem in lean/SpectreKnot/ProofExact.lean, line 414 · read it in its file
Formalises Theorem 9.1 Merging.
Doc comment
The bound is exact (as stated in Statement.lean).
Statement
theorem theoremB_exact : TheoremB_exact
The claim it proves: Statement.TheoremB_exact.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by intro b b_pos rcases Nat.mod_two_eq_zero_or_one b with even | odd · exact ⟨two_even b_pos even, fun odd => absurd odd (by omega)⟩ · exact ⟨two_odd b_pos odd, fun _ => three_odd b_pos odd⟩
Statement.theoremB_sharp
theorem in lean/SpectreKnot/ProofB.lean, line 380 · read it in its file
Formalises Theorem 9.1 Merging, Theorem B The Ariadne Theorem.
Doc comment
Theorem B with the paper's bound.
Statement
theorem theoremB_sharp : TheoremB_sharp
The claim it proves: Statement.TheoremB_sharp.
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by intro b p q b_pos hp hq rcases Nat.mod_two_eq_zero_or_one b with even | odd · -- even `b` -- both ports reach the hook at junction 12 of `N_{b+3}`, so they lie on one strand there have linked3 : (N (b + 3)).Linked (upPort b 3 p) (upPort b 3 q) := (chain_even b_pos even hp).trans (linked_symm (m := b + 3) (by omega) (chain_even b_pos even hq) (isPort_upk b_pos hq 3)) refine ⟨?_, fun _ => linked3⟩ -- and one level further up, in `N_{b+4}` have linked4 := lift_nest (m := b + 3) (by omega) linked3 (isPort_upk b_pos hp 3) rw [← upPort_succ, ← upPort_succ] at linked4 exact linked4 · -- odd `b`: both ports reach the hook at junction 12 of `N_{b+4}` exact ⟨(chain_odd b_pos odd hp).trans (linked_symm (m := b + 4) (by omega) (chain_odd b_pos odd hq) (isPort_upk b_pos hq 4)), fun is_even => absurd is_even (by omega)⟩
Statement.theoremB_strand
theorem in lean/SpectreKnot/ProofStrand.lean, line 706 · read it in its file
Formalises Theorem B The Ariadne Theorem.
Doc comment
Theorem B, final form (as stated in Statement.lean): the ribbons of the nest tiling form one two-way infinite strand.
Statement
theorem theoremB_strand : TheoremB_strand
The claim it proves: Statement.TheoremB_strand.
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (42 lines)
by -- the start: port `R(v_0)` of the original tile let start : NPort := ⟨(0, 0, true), by decide⟩ -- following the strand forwards, as ports have forwards : ∀ k, iter nestTiling.forward k (0, 0, true) = (nestSys.walk start k).1 := by intro k induction k with | zero => rfl | succ k ih => rw [iter_succ, ih]; rfl -- and backwards have backwards : ∀ k, iter nestTiling.backward k (0, 0, true) = (iter nestSys.prev k start).1 := by intro k induction k with | zero => rfl | succ k ih => rw [iter_succ, ih]; rfl -- Lemma 3.4: the strand is closed or a two-way infinite path; it is not closed obtain ⟨distinct, back_distinct, apart, no_piece_twice⟩ := (nestSys.closed_or_path start).resolve_left (not_closed start) refine ⟨?_, ?_, ?_, ?_, ?_⟩ · -- (1) forwards, no port twice intro i j same rw [forwards, forwards] at same exact distinct i j (Subtype.ext same) · -- (2) backwards, no port twice intro a a' same rw [backwards, backwards] at same exact back_distinct a a' (Subtype.ext same) · -- (3) backwards never meets forwards, except at the start intro a b same rw [backwards, forwards] at same exact apart a b (Subtype.ext same) · -- (4) no piece twice intro i j same rw [forwards, forwards] at same exact no_piece_twice i j (Subtype.ext same) · -- (5) every port is on the strand intro q hq obtain ⟨k, reached | reached | reached | reached⟩ := nestSys.same_orbit (all_same start ⟨q, hq⟩) · exact ⟨k, Or.inl (by rw [forwards]; exact congrArg Subtype.val reached)⟩ · exact ⟨k, Or.inr (Or.inl (by rw [backwards]; exact congrArg Subtype.val reached))⟩ · exact ⟨k, Or.inr (Or.inr (Or.inl (by rw [forwards]; exact congrArg Subtype.val reached)))⟩ · exact ⟨k, Or.inr (Or.inr (Or.inr (by rw [backwards]; exact congrArg Subtype.val reached)))⟩
Statement.three_odd
theorem in lean/SpectreKnot/ProofExact.lean, line 391 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
**Odd b**: the ports of N_b lie on exactly two strands of N_{b+3}.
Statement
theorem three_odd {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) : TwoStrands b 3
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (19 lines)
by -- junction 9 of `N_{b+2}` lies well inside its side 2 have nine_start : pos (Lk (b + 2) .Delta 1) 2 + 2 ≤ jpos (Lk (b + 1) .Delta) 9 := (inside_9 (n := b + 1) (by omega)).1 -- (its end) have nine_end : jpos (Lk (b + 1) .Delta) 9 + 2 ≤ pos (Lk (b + 2) .Delta 1) 3 := (inside_9 (n := b + 1) (by omega)).2 -- the two hooks of `N_{b+3}`: different, and away from the corners obtain ⟨⟨two_le_A, A_le⟩, ⟨two_le_B, B_le⟩, A_ne_B⟩ := stp_apart (n := b + 2) (by omega) nine_start nine_end -- the two witnesses, two levels up obtain ⟨to_A, to_B⟩ := odd_witnesses b_pos odd -- the first witness is a port of `N_b` have pA_port := hook_port b_pos (by omega) (inside_two (n := b) (J := 4) b_pos) -- and so is the second have pB_port := hook_port b_pos (by omega) (inside_two (n := b) (J := 0) b_pos) refine twoStrands_of b_pos two_le_A A_le two_le_B B_le A_ne_B pA_port pB_port (odd_up_12 b_pos odd pA_port to_A) (odd_up_9 b_pos pB_port to_B) (fun x x_port => ?_) rcases odd_two b_pos odd x_port with to_12 | to_9 · exact .inl (odd_up_12 b_pos odd x_port to_12) · exact .inr (odd_up_9 b_pos x_port to_9)
Statement.tile
def in lean/SpectreKnot/Statement.lean, line 218 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
In the statement file: read it line by line.
Doc comment
A single tile: nothing glued, its 14 edges round the rim.
Statement
def tile : Patch := ⟨1, fun _ _ => none, (List.range 14).map fun i => (0, i), []⟩
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.tile_glueSymm
theorem in lean/SpectreKnot/Linked.lean, line 183 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
A single tile glues nothing, so its gluing is symmetric.
Statement
theorem tile_glueSymm : tile.GlueSymm
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
fun _ _ _ _ _ _ glued => by simp [tile] at glued
Statement.tile_hasSig
theorem in lean/SpectreKnot/PatchSig.lean, line 151 · read it in its file
Formalises Lemma 4.4 Signature of the tile.
Doc comment
Lemma 4.4: a tile has the signature, at its corners A = v_0 and B = v_1, its rim listed counter-clockwise (checked by the kernel). In particular it has no closed strand.
Statement
theorem tile_hasSig : tile.HasSig true 0 1
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
tile.sigCheck_sound (f := 2) (by decide +kernel)Statement.tile_lt
theorem in lean/SpectreKnot/ParentSig.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Tile t of child c, renumbered in the parent, comes before the first tile of any later child n.
Statement
theorem tile_lt (child : Nat → Patch) {c t n : Nat} (c_lt : c < n) (t_lt : t < (child c).tiles) :
t + offC child c < offC child n
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by -- child `n` starts no earlier than child `c + 1` have later_start := offC_mono child (show c + 1 ≤ n by omega) rw [offC_succ] at later_start; omega
Statement.tiles_ge
theorem in lean/SpectreKnot/ProofStrand.lean, line 96 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
N_b has more than b tiles.
Statement
theorem tiles_ge : ∀ b, b + 1 ≤ (N b).tiles | 0 => by decide | b + 1 => by -- one more tile at least, at each level: `N_{b+1}` holds `N_b` and child 0 have grow := tiles_succ b -- which has a tile have shift_pos := nestShift_pos b -- and `N_b` has more than `b` tiles have before := tiles_ge b omega
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.tiles_succ
theorem in lean/SpectreKnot/ProofStrand.lean, line 82 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
N_{b+1} holds child 0 (nestShift b tiles) and then N_b, so it has at least that many tiles.
Statement
theorem tiles_succ (b : Nat) : (N b).tiles + nestShift b ≤ (N (b + 1)).tiles
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by rcases Nat.eq_zero_or_pos b with rfl | b_pos · -- N_0 is one tile and N_1 has nine decide · rw [N_succ b_pos] -- the first two children together: child 0, then child 1 = N_b have first_two : offC (kidsD b) 2 = nestShift b + (N b).tiles := by rw [offC_succ, offC_succ, show offC (kidsD b) 0 = 0 from rfl, Nat.zero_add]; rfl -- the parent has at least the tiles of its first two children have two_le_all := offC_mono (kidsD b) (show 2 ≤ nk .Delta by decide) show _ ≤ offC (kidsD b) (nk .Delta) omega
Statement.tilingAcross_some
theorem in lean/SpectreKnot/ProofChain.lean, line 356 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
Across every port of a tiling there is a port of another tile, and across that one lies the first.
Statement
theorem tilingAcross_some {T : Tiling} (tiling : IsTiling T) {p : Port} (hp : p.2.1 < 14) :
∃ q, T.across p = some q ∧ q.2.1 < 14 ∧ q.1 ≠ p.1 ∧ T.across q = some p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (23 lines)
by obtain ⟨g, i, s⟩ := p simp only at hp cases s with | true => -- port `R(v_i)` lies on edge `e_i` obtain ⟨g', j, glued, other, hj, back⟩ := tiling g i hp refine ⟨(g', j, true), ?_, hj, other, ?_⟩ · show (T.glue g i).map _ = _ rw [glued]; rfl · show (T.glue g' j).map _ = _ rw [back]; rfl | false => -- port `L(v_i)` lies on edge `e_{i-1}` obtain ⟨g', j, glued, other, hj, back⟩ := tiling g ((i + 13) % 14) (by omega) refine ⟨(g', (j + 1) % 14, false), ?_, Nat.mod_lt _ (by omega), other, ?_⟩ · show (T.glue g ((i + 13) % 14)).map _ = _ rw [glued]; rfl · show (T.glue g' (((j + 1) % 14 + 13) % 14)).map _ = _ -- vertex `i - 1`, then one on, is vertex `i` again have round : ((i + 13) % 14 + 1) % 14 = i := by omega rw [mod14 hj, back] simp only [Option.map_some, round]
Statement.tilingSys
def in lean/SpectreKnot/ProofChain.lean, line 383 · read it in its file
Used, through the names in proofs, for Theorem A.
Doc comment
A tiling's ports, with its two pairings: the two ends of a piece (pieceEnd), and straight across an edge. Both pair every port with a different port, and undo themselves.
Statement
def tilingSys {T : Tiling} (tiling : IsTiling T) : StrandSystem NPort where inside x := ⟨pieceEnd x.1, (pieceEnd_valid x.2).2⟩ across x := ⟨(T.across x.1).getD x.1, by obtain ⟨q, across_x, q_valid, _, _⟩ := tilingAcross_some tiling x.2 rw [across_x]; exact q_valid⟩ inside_inside x := Subtype.ext (Patch.pieceEnd_pieceEnd x.1) across_across x := by obtain ⟨q, across_x, _, _, back⟩ := tilingAcross_some tiling x.2 apply Subtype.ext show (T.across ((T.across x.1).getD x.1)).getD ((T.across x.1).getD x.1) = x.1 rw [across_x] simp only [Option.getD_some, back] inside_ne x same := pieceEnd_ne x.1 (congrArg Subtype.val same) across_ne x same := by obtain ⟨q, across_x, _, other, _⟩ := tilingAcross_some tiling x.2 -- the port across lies on another tile have same_tile := congrArg (fun y : NPort => y.1.1) same simp only [across_x, Option.getD_some] at same_tile exact other same_tile
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.toBlock
def in lean/SpectreKnot/ProofStrand.lean, line 672 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Port z of the nest tiling, as a port of the block N_b.
Statement
def toBlock (b : Nat) (z : NPort) : Port := (loc b z.1.1, z.1.2.1, z.1.2.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.toBlock_port
theorem in lean/SpectreKnot/ProofStrand.lean, line 675 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
Port z of the nest tiling is a port of N_b if its tile is.
Statement
theorem toBlock_port {b : Nat} {z : NPort} (in_block : z.1.1 < (N b).tiles) : (N b).IsPort (toBlock b z)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
⟨(gid_loc b z.1.1 in_block).1, z.2⟩
Statement.totL
def in lean/SpectreKnot/ParentRim.lean, line 21 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The total length of the pieces.
Statement
def totL : List (Nat × Nat) → Nat
| [] => 0
| (c, j) :: rest => L c j + totL rest
Names in its proof
none
Named in the proofs of
Statement.corners_nonSigmaStatement.corners_sigmaStatement.cAStatement.ownList_lengthStatement.ownList_getElem?Statement.jposStatement.jpos_succStatement.ownGo_jposStatement.totL_appendStatement.ownGo_appendStatement.ownGo_memStatement.ownGo_surjStatement.ownGo_injStatement.ownGo_lastStatement.ownGo_predStatement.rimNStatement.rimPiece_lengthStatement.rimPiece_getDStatement.parentLenStatement.sideLens_sumStatement.totL_eqStatement.aPos_succ
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.totL_append
theorem in lean/SpectreKnot/ParentRim.lean, line 45 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Two lists of pieces, one after the other, have the sum of their lengths.
Statement
theorem totL_append (l₁ l₂ : List (Nat × Nat)) : totL L (l₁ ++ l₂) = totL L l₁ + totL L l₂
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction l₁ with | nil => simp [totL] | cons x l ih => obtain ⟨c, j⟩ := x; simp only [List.cons_append, totL, ih]; omega
Statement.totL_eq
theorem in lean/SpectreKnot/ProofA.lean, line 27 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
totL is the sum of the side lengths of the pieces.
Statement
theorem totL_eq (L : Nat → Nat → Nat) : ∀ l : List (Nat × Nat), totL L l = (l.map fun p => L p.1 p.2).sum | [] => rfl | (c, j) :: rest => by simp only [totL, List.map_cons, List.sum_cons, totL_eq L rest]
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.totL_take
theorem in lean/SpectreKnot/ParentSig.lean, line 127 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The pieces of the parent's first J sides have total length pos (parentLen T L) J: where vertex J sits.
Statement
theorem totL_take (L : Nat → Nat → Nat) (T : Kind) : ∀ J, J ≤ 6 →
totL L (((pside T).take J).flatMap id) = pos (parentLen T L) J
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by intro J induction J with | zero => intro _; rfl | succ J ih => intro J_le -- Table 3 has a row for side `J` have J_lt : J < (pside T).length := by rw [pside_length]; omega rw [List.take_add_one, List.flatMap_append, totL_append, ih (by omega), pos_succ, List.getElem?_eq_getElem J_lt] simp only [Option.toList_some, List.flatMap_cons, List.flatMap_nil, List.append_nil, id, parentLen, List.getD_eq_getElem?_getD, List.getElem?_eq_getElem J_lt, Option.getD_some]
Statement.tstep
def in lean/SpectreKnot/ProofGrand.lean, line 63 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
One step of turning about vertex j of child c by Table 2 alone, in the sense of bstep: for clockwise children, across the side that starts at the vertex, to the vertex of the sibling where that side ends; for counter-clockwise children, across the side that ends at the vertex, to the vertex of the sibling where it starts.
Statement
def tstep (T : Kind) (o : Bool) (x : Nat × Nat) : Option (Nat × Nat) := if o then adjAt T x.1 ((x.2 + 5) % 6) else (adjAt T x.1 x.2).map fun e => (e.1, (e.2 + 1) % 6)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.tstep_sound
theorem in lean/SpectreKnot/ProofGrand.lean, line 91 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
A step by Table 2 is a step of the gluing, at the children's vertices.
Statement
theorem tstep_sound (len_pos : ∀ c j, 1 ≤ L c j)
(pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j) {o : Bool}
{c j c' j' : Nat} (c_lt : c < nk T) (j_lt : j < 6) (stepped : tstep T o (c, j) = some (c', j')) :
c' < nk T ∧ j' < 6 ∧ bstep (Comp.ofLens T L d ω).toGluing o (c, pos (L c) j) = some (c', pos (L c') j')
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (46 lines)
by cases o · -- clockwise: across the first edge of side `j`, to the end of the side across simp only [tstep, Bool.false_eq_true, ite_false] at stepped cases adj_eq : adjAt T c j with | none => rw [adj_eq] at stepped; contradiction | some e => rw [adj_eq] at stepped simp only [Option.map_some, Option.some.injEq, Prod.mk.injEq] at stepped obtain ⟨rfl, rfl⟩ := stepped obtain ⟨e_lt, e_side_lt, _, _⟩ := adj_valid c_lt j_lt adj_eq refine ⟨e_lt, Nat.mod_lt _ (by omega), ?_⟩ -- the first edge of side `j` is glued to the last edge of the side across have mate_eq := gmate (d := d) (ω := ω) len_pos c_lt j_lt (len_pos c j) adj_eq rw [Nat.add_zero, Nat.sub_zero] at mate_eq simp only [bstep, Bool.false_eq_true, ite_false, mate_eq, Option.map_some, ofLens_E e_lt, nxt_last (len_pos e.1) e_side_lt] · -- counter-clockwise: across the last edge of side `j - 1`, to the start of the side across simp only [tstep, ite_true] at stepped -- the side before vertex `j` have prev_lt : (j + 5) % 6 < 6 := Nat.mod_lt _ (by omega) obtain ⟨c'_lt, j'_lt, _, _⟩ := adj_valid c_lt prev_lt stepped refine ⟨c'_lt, j'_lt, ?_⟩ -- the side before vertex `j` has an edge have prev_len := len_pos c ((j + 5) % 6) -- the edge before vertex `j` is the last edge of side `j - 1` have before : prv (pos (L c) 6) (pos (L c) j) = pos (L c) ((j + 5) % 6) + (L c ((j + 5) % 6) - 1) := by rcases Nat.eq_zero_or_pos j with rfl | j_pos · -- vertex 0: the edge before it is the last edge of side 5 show prv (pos (L c) 6) 0 = pos (L c) 5 + (L c 5 - 1) -- the rim ends where side 5 does have last : pos (L c) 6 = pos (L c) 5 + L c 5 := pos_succ (L c) 5 -- side 5 has an edge have len5' := len_pos c 5 simp only [prv, ite_true]; omega · -- vertex `j ≥ 1`: the edge before it is the last edge of side `j - 1` obtain ⟨j₀, rfl⟩ : ∃ j₀, j = j₀ + 1 := ⟨j - 1, by omega⟩ rw [show (j₀ + 1 + 5) % 6 = j₀ by omega] at prev_len ⊢ -- side `j₀` ends at vertex `j₀ + 1` have side_end := pos_succ (L c) j₀ simp only [prv]; rw [ite_eq_right (by omega)]; omega -- which is glued to the first edge of the side across have mate_eq := gmate (d := d) (ω := ω) len_pos c_lt prev_lt (r := L c ((j + 5) % 6) - 1) (by omega) stepped rw [pair c c_lt _ prev_lt _ _ stepped] at mate_eq simp only [bstep, ite_true, ofLens_E c_lt, before, mate_eq, Option.some.injEq, Prod.mk.injEq, true_and] omega
Statement.tsteps
def in lean/SpectreKnot/ProofGrand.lean, line 67 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
n such steps.
Statement
def tsteps (T : Kind) (o : Bool) : Nat → Nat × Nat → Option (Nat × Nat)
| 0, x => some x
| n + 1, x => (tstep T o x).bind (tsteps T o n)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.tsteps_sound
theorem in lean/SpectreKnot/ProofGrand.lean, line 142 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Steps by Table 2 are steps of the gluing, at the children's vertices.
Statement
theorem tsteps_sound (len_pos : ∀ c j, 1 ≤ L c j)
(pair : ∀ c, c < nk T → ∀ j, j < 6 → ∀ c' j', adjAt T c j = some (c', j') → L c' j' = L c j) {o : Bool} :
∀ n {c j c' j' : Nat}, c < nk T → j < 6 → tsteps T o n (c, j) = some (c', j') →
bsteps (Comp.ofLens T L d ω).toGluing o n (c, pos (L c) j) = some (c', pos (L c') j')
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (15 lines)
by intro n induction n with | zero => intro c j c' j' _ _ stepped; cases stepped; rfl | succ n ih => intro c j c' j' c_lt j_lt stepped simp only [tsteps] at stepped cases step_eq : tstep T o (c, j) with | none => rw [step_eq] at stepped; contradiction | some y => rw [step_eq] at stepped obtain ⟨c₁, j₁⟩ := y obtain ⟨c₁_lt, j₁_lt, first⟩ := tstep_sound (d := d) (ω := ω) len_pos pair c_lt j_lt step_eq simp only [bsteps, first, Option.bind_some] exact ih c₁_lt j₁_lt stepped
Statement.turns_up
theorem in lean/SpectreKnot/ProofGrand.lean, line 264 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Turning in N_m is turning in N_{m+1}.
Statement
theorem turns_up {m : Nat} (m_pos : 1 ≤ m) (n : Nat) {x y : Nat × Nat} (x_tile : x.1 < (N m).tiles)
(turned : (N m).turns n x = some y) : (N (m + 1)).turns n (upC m x) = some (upC m y)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by rw [N_succ m_pos] exact (KD m_pos).turns_lift (c := 1) (by decide) n x_tile turned
Statement.twoStrands_of
theorem in lean/SpectreKnot/ProofExact.lean, line 200 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
Two strands, from two hooks: if every port of N_b lies, in N_{b+k}, on the strand of the hook at vA or of the hook at vB (two different rim vertices, not corners), and some port of N_b lies on each, then the ports of N_b lie on exactly two strands of N_{b+k}.
Statement
theorem twoStrands_of {b k vA vB : Nat} (b_pos : 1 ≤ b) (two_le_vA : 2 ≤ vA)
(vA_le : vA + 2 ≤ pos (Lk (b + k) .Delta 1) 6) (two_le_vB : 2 ≤ vB) (vB_le : vB + 2 ≤ pos (Lk (b + k) .Delta 1) 6)
(vA_ne_vB : vA ≠ vB) {pA pB : Port} (pA_port : (N b).IsPort pA) (pB_port : (N b).IsPort pB)
(to_A : (N (b + k)).Linked (upPort b k pA) (hookAt (b + k) vA))
(to_B : (N (b + k)).Linked (upPort b k pB) (hookAt (b + k) vB))
(to_either : ∀ x, (N b).IsPort x →
(N (b + k)).Linked (upPort b k x) (hookAt (b + k) vA) ∨ (N (b + k)).Linked (upPort b k x) (hookAt (b + k) vB)) :
TwoStrands b k
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by -- the level `b + k` is at least 1 have level_pos : 1 ≤ b + k := by omega -- back from the hook at `vA` to `pA` have from_A := linked_symm (m := b + k) level_pos to_A (isPort_upk b_pos pA_port k) -- and from the hook at `vB` to `pB` have from_B := linked_symm (m := b + k) level_pos to_B (isPort_upk b_pos pB_port k) refine ⟨pA, pB, pA_port, pB_port, fun linked => ?_, fun x x_port => ?_⟩ · -- `pA` and `pB` on one strand would put the two hooks on one strand exact hooks_apart level_pos two_le_vA vA_le two_le_vB vB_le vA_ne_vB (from_A.trans (linked.trans to_B)) · rcases to_either x x_port with to_vA | to_vB · exact .inl (to_vA.trans from_A) · exact .inr (to_vB.trans from_B)
Statement.two_even
theorem in lean/SpectreKnot/ProofExact.lean, line 274 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
**Even b**: the ports of N_b lie on exactly two strands of N_{b+2}.
Statement
theorem two_even {b : Nat} (b_pos : 1 ≤ b) (even : b % 2 = 0) : TwoStrands b 2
Names in its proof
Compose.posStatement.LkStatement.adv_noneStatement.adv_someStatement.even_twoStatement.hookAtStatement.hook_portStatement.inside_12Statement.inside_9Statement.inside_twoStatement.isPort_upStatement.jposStatement.lift_nestStatement.oriStatement.ori_evenStatement.ori_oddStatement.reach_someStatement.stp_apartStatement.twoStrands_ofStatement.upPortStatement.upPort_succ
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (29 lines)
by -- level `b` is even have ori_b := ori_even even -- level `b + 1` odd have ori_b1 : ori (b + 1) = false := ori_odd (by omega) -- junction 9 of `N_{b+1}` lies well inside its side 2 have nine_start : pos (Lk (b + 1) .Delta 1) 2 + 2 ≤ jpos (Lk b .Delta) 9 := (inside_9 b_pos).1 -- (its end) have nine_end : jpos (Lk b .Delta) 9 + 2 ≤ pos (Lk (b + 1) .Delta 1) 3 := (inside_9 b_pos).2 -- the two hooks of `N_{b+2}`: different, and away from the corners obtain ⟨⟨two_le_A, A_le⟩, ⟨two_le_B, B_le⟩, A_ne_B⟩ := stp_apart (n := b + 1) (by omega) nine_start nine_end -- a hook well inside side 4 of `N_b` have inside_A := inside_two (n := b) (J := 4) b_pos -- and one well inside side 5 have inside_B := inside_two (n := b) (J := 5) b_pos -- one level up, the first reaches junction 12, inside side 3 of `N_{b+1}` have A_one := adv_some (q := 12) b_pos (by omega) inside_A (by rw [ori_b]; rfl) -- and the second junction 9, inside side 2 have B_one := adv_some (q := 9) b_pos (by omega) inside_B (by rw [ori_b]; rfl) refine twoStrands_of b_pos two_le_A A_le two_le_B B_le A_ne_B (hook_port b_pos (by omega) inside_A) (hook_port b_pos (by omega) inside_B) ?_ ?_ (fun x x_port => even_two b_pos even x_port) · -- two levels up, the first reaches junction 16 rw [show upPort b 2 (hookAt b _) = upPort (b + 1) 1 (upPort b 1 (hookAt b _)) from upPort_succ b 1 _] exact reach_some (q := 16) (by omega) (by omega) ⟨isPort_up b_pos (hook_port b_pos (by omega) inside_A), _, inside_12 b_pos, A_one⟩ (by rw [ori_b1]; rfl) · -- and the second the hook at junction 9 of `N_{b+1}` rw [show upPort b 2 (hookAt b _) = upPort (b + 1) 1 (upPort b 1 (hookAt b _)) from upPort_succ b 1 _] exact (lift_nest (m := b + 1) (by omega) B_one (isPort_up b_pos (hook_port b_pos (by omega) inside_B))).trans (adv_none (by omega) (inside_9 b_pos))
Statement.two_odd
theorem in lean/SpectreKnot/ProofExact.lean, line 373 · read it in its file
Used, through the names in proofs, for Theorem 9.1.
Doc comment
**Odd b**: the ports of N_b lie on exactly two strands of N_{b+2}.
Statement
theorem two_odd {b : Nat} (b_pos : 1 ≤ b) (odd : b % 2 = 1) : TwoStrands b 2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by -- junction 9 lies well inside side 2 of `N_{b+2}` have nine_end : jpos (Lk (b + 1) .Delta) 9 + 2 ≤ pos (Lk (b + 2) .Delta 1) 3 := (inside_9 (n := b + 1) (by omega)).2 -- and junction 12 well inside side 3 have twelve_start : pos (Lk (b + 2) .Delta 1) 3 + 2 ≤ jpos (Lk (b + 1) .Delta) 12 := (inside_12 (n := b + 1) (by omega)).1 -- both away from the corners obtain ⟨two_le_A, A_le⟩ := inside_bounds (by omega) (inside_12 (n := b + 1) (by omega)) -- (the second) obtain ⟨two_le_B, B_le⟩ := inside_bounds (by omega) (inside_9 (n := b + 1) (by omega)) -- the two witnesses obtain ⟨to_A, to_B⟩ := odd_witnesses b_pos odd exact twoStrands_of b_pos two_le_A A_le two_le_B B_le (by omega) (hook_port b_pos (by omega) (inside_two (n := b) (J := 4) b_pos)) (hook_port b_pos (by omega) (inside_two (n := b) (J := 0) b_pos)) to_A to_B (fun x x_port => odd_two b_pos odd x_port)
Statement.up
def in lean/SpectreKnot/Statement.lean, line 241 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 8.3, Theorem 9.1.
In the statement file: read it line by line.
Doc comment
up b k t: tile t of N_b, renumbered as a tile of N_{b+k}.
Statement
def up (b : Nat) : Nat → Nat → Nat
| 0, t => t
| k + 1, t => up (b + 1) k (t + nestShift b)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.upC
abbrev in lean/SpectreKnot/ProofGrand.lean, line 261 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
Corner x of N_m, as a corner of N_{m+1}.
Statement
abbrev upC (m : Nat) (x : Nat × Nat) : Nat × Nat := (up m 1 x.1, x.2)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.upPort
def in lean/SpectreKnot/Statement.lean, line 246 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
In the statement file: read it line by line.
Doc comment
upPort b k p: port p of N_b, as a port of N_{b+k}.
Statement
def upPort (b k : Nat) (p : Port) : Port := (up b k p.1, p.2.1, p.2.2)
Names in its proof
Named in the proofs of
Statement.upPort_succStatement.chain_evenStatement.chain_oddStatement.isPort_upkStatement.theoremB_sharpStatement.theoremBStatement.even_twoStatement.two_evenStatement.odd_twoStatement.odd_up_12Statement.odd_up_9Statement.odd_witnessesStatement.gP_toBlockStatement.TheoremBStatement.TheoremB_sharpStatement.TwoStrands
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.upPort_succ
theorem in lean/SpectreKnot/NestStep.lean, line 112 · read it in its file
Used, through the names in proofs, for Theorem B, Theorem 9.1.
Doc comment
The same for ports: k + 1 levels up is k levels up, then one more.
Statement
theorem upPort_succ (b k : Nat) (p : Port) : upPort b (k + 1) p = upPort (b + k) 1 (upPort b k p)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp only [upPort]; rw [up_succ]Statement.up_succ
theorem in lean/SpectreKnot/NestStep.lean, line 104 · read it in its file
Used, through the names in proofs, for Theorem B, Lemma 8.3, Theorem 9.1.
Doc comment
Going k + 1 levels up the nest is going k levels up, then one more.
Statement
theorem up_succ : ∀ (k b t : Nat), up b (k + 1) t = up (b + k) 1 (up b k t) | 0, _, _ => rfl | k + 1, b, t => by show up (b + 1) (k + 1) (t + nestShift b) = _ rw [up_succ k (b + 1) (t + nestShift b), show b + 1 + k = b + (k + 1) by omega] rfl
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.vS
def in lean/SpectreKnot/Turn.lean, line 248 · read it in its file
Used, through the names in proofs, for Lemma 8.3.
Doc comment
The child vertex where the parent's chain about its rim position p starts: that of the parent's port R(p) for clockwise children, of L(p) for counter-clockwise ones.
Statement
def vS (T : Kind) (L : Nat → Nat → Nat) (d : Nat) (ω o : Bool) (p : Nat) : Nat × Nat := if o then ((gL T L p).1, (gL T L p).2.1) else ((gR T L d ω p).1, (gR T L d ω p).2.1)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.vpos
def in lean/SpectreKnot/PatchSig.lean, line 130 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Where vertex j of a level-m K-supertile sits on its rim.
Statement
def vpos (m : Nat) (K : Kind) (j : Nat) : Nat := Compose.pos (lenAt m K) j
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Statement.vpos_eq
theorem in lean/SpectreKnot/ProofA.lean, line 46 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The parent's vertices sit where the lengths ℓ_{m+1} put them.
Statement
theorem vpos_eq {m : Nat} (m_pos : 1 ≤ m) (T : Kind) {J : Nat} (J_le : J ≤ 6) :
vpos (m + 1) T J = pos (parentLen T (Lk m T)) J
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
pos_congr J (fun i i_lt => (parentLen_eq m_pos T (by omega)).symm)
Statement.vpos_jpos
theorem in lean/SpectreKnot/NestStep.lean, line 87 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Side J of the Δ-supertile starts where piece sJ J does.
Statement
theorem vpos_jpos (L : Nat → Nat → Nat) {J : Nat} (hJ : J ≤ 6) : pos (parentLen .Delta L) J = jpos L (sJ J)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
rw [← totL_take L .Delta J hJ, pside_take J hJ]; rflStatement.vtx_eq
theorem in lean/SpectreKnot/CompSig.lean, line 449 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
**The rim vertex that Comp.check numbers t is the one at position N - 1 - t** (the check counts in the children's sense, positions in the parent's own order): its ports are gR and gL there.
Statement
theorem vtx_eq {t : Nat} (t_lt : t < rimN T L) :
(Comp.ofLens T L d ω).vtx t = (gR T L d ω (rimN T L - 1 - t), gL T L (rimN T L - 1 - t))
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (24 lines)
by -- entry `t` of the rim list, read backwards have entry : ∀ s, s < rimN T L → (Comp.ofLens T L d ω).rimEdges.getD s (0, 0) = ownGo L (pcs T) (rimN T L - 1 - s) := by intro s s_lt rw [List.getD_eq_getElem?_getD, rimEdges_eq, List.getElem?_reverse (by rw [ownList_length]; exact s_lt), ownList_length, ownList_getElem? L _ _ (by show rimN T L - 1 - s < rimN T L; omega)] rfl -- the next entry, cyclically, is the edge at the position before have next : (Comp.ofLens T L d ω).rimEdges.getD ((t + 1) % rimN T L) (0, 0) = ownGo L (pcs T) (prv (rimN T L) (rimN T L - 1 - t)) := by rw [entry _ (Nat.mod_lt _ (by omega))] congr 1 simp only [prv] by_cases at_end : t + 1 = rimN T L · rw [at_end, Nat.mod_self, ite_eq_left (by omega)]; omega · rw [Nat.mod_eq_of_lt (by omega), ite_eq_right (by omega)]; omega simp only [Comp.vtx, Comp.rimVertexPorts] rw [List.getD_eq_getElem?_getD, List.getElem?_map, List.getElem?_range (by rw [rimEdges_eq, List.length_reverse, ownList_length]; exact t_lt)] simp only [Option.map_some, Option.getD_some] rw [show (Comp.ofLens T L d ω).rimEdges.length = rimN T L by rw [rimEdges_eq, List.length_reverse, ownList_length], entry t t_lt, next] rfl
Statement.ιP
def in lean/SpectreKnot/Bridge.lean, line 134 · read it in its file
Doc comment
The parent's port for the gluing's port (c, u, s): the port of child c at its rim vertex u.
Statement
def ιP (child : Nat → Patch) (o : Bool) : GPort → Port
| (c, u, s) => shiftP child c ((child c).bport o (u, s))
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem
structure in lean/SpectreKnot/Strands.lean, line 15 · read it in its file
Doc comment
Ports with the two pairings of Def 3.1 (inside: the two ends of a piece) and Def 3.2 (across: the straight-through rule). In a tiling of the plane both are defined everywhere and have no fixed points.
Statement
structure StrandSystem (P : Type) where inside : P → P across : P → P inside_inside : ∀ p, inside (inside p) = p across_across : ∀ p, across (across p) = p inside_ne : ∀ p, inside p ≠ p across_ne : ∀ p, across p ≠ p
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem.Closed
def in lean/SpectreKnot/Strands.lean, line 58 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
The strand through p is closed if following it returns to p.
Statement
def Closed (p : P) : Prop := ∃ n, 0 < n ∧ S.walk p n = p
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem.Same
inductive in lean/SpectreKnot/ProofStrand.lean, line 22 · read it in its file
Doc comment
S.Same p q: port q is reached from port p by moving along pieces and across edges, any number of times: q is on the strand of p.
Statement
inductive Same (p : P) : P → Prop | refl : Same p p | inside {q : P} : Same p q → Same p (S.inside q) | across {q : P} : Same p q → Same p (S.across q)
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem.back_ne_forward_of_not_closed
theorem in lean/SpectreKnot/Strands.lean, line 122 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
Following a strand that is not closed backwards never meets the ports reached forwards, except at p.
Statement
theorem back_ne_forward_of_not_closed (p : P) (not_closed : ¬ S.Closed p) :
∀ a b, iter S.prev a p = S.walk p b → a = 0 ∧ b = 0
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (18 lines)
by -- `a` steps back, then `a` steps forwards, return to the start have back_then_forward : ∀ a x, iter S.next a (iter S.prev a x) = x := by intro a induction a with | zero => intro x; rfl | succ a ih => intro x; rw [iter_succ', iter_succ, next_prev, ih] intro a b meet -- going `a` steps forwards from the meeting point: `a + b` steps from `p` return to `p` have returns : p = S.walk p (a + b) := by -- the meeting point, moved `a` steps forwards on both sides have moved := congrArg (iter S.next a) meet rw [back_then_forward] at moved calc p = iter S.next a (iter S.next b p) := moved _ = iter S.next (a + b) p := (iter_add _ _ _ _).symm -- an open strand never returns to `p`, so `a + b = 0` have no_steps := S.walk_injective_of_not_closed p not_closed 0 (a + b) returns omega
StrandSystem.closed_or_path
theorem in lean/SpectreKnot/Strands.lean, line 176 · read it in its file
Formalises Lemma 3.4 Strands are cycles or lines.
Used, through the names in proofs, for Theorem A, Theorem B.
Doc comment
Lemma 3.4 (in the port model). Every strand is either closed, or a two-way infinite path: following it forwards from a port p, the ports met are distinct; so are those met backwards; the two walks meet only at p; and no piece is passed twice (in either direction).
Statement
theorem closed_or_path (p : P) :
S.Closed p ∨
((∀ i j, S.walk p i = S.walk p j → i = j) ∧
(∀ a a', iter S.prev a p = iter S.prev a' p → a = a') ∧
(∀ a b, iter S.prev a p = S.walk p b → a = 0 ∧ b = 0) ∧
(∀ i j, S.walk p j ≠ S.inside (S.walk p i)))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (5 lines)
by
by_cases closed : S.Closed p
· exact Or.inl closed
· exact Or.inr ⟨S.walk_injective_of_not_closed p closed, S.prev_injective_of_not_closed p closed,
S.back_ne_forward_of_not_closed p closed, S.walk_ne_inside_walk p⟩StrandSystem.iter_next_injective
theorem in lean/SpectreKnot/Strands.lean, line 48 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
Two ports that reach the same port after n steps are the same port (each step can be undone).
Statement
theorem iter_next_injective (n : Nat) {x y : P} (same_end : iter S.next n x = iter S.next n y) : x = y
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (8 lines)
by induction n with | zero => simpa using same_end | succ n ih => apply ih -- one step back from the common end: the two walks already met after `n` steps have one_back := congrArg S.prev same_end simpa [iter_succ, prev_next] using one_back
StrandSystem.next
def in lean/SpectreKnot/Strands.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
One step along a strand: from a port, through its piece to the other end, then across the edge.
Statement
def next (p : P) : P := S.across (S.inside p)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem.next_prev
theorem in lean/SpectreKnot/Strands.lean, line 38 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
A step forwards undoes a step back.
Statement
theorem next_prev (p : P) : S.next (S.prev p) = p
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [prev, next, S.across_across, S.inside_inside]StrandSystem.prev
def in lean/SpectreKnot/Strands.lean, line 31 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
One step back.
Statement
def prev (p : P) : P := S.inside (S.across p)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem.prev_injective_of_not_closed
theorem in lean/SpectreKnot/Strands.lean, line 143 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
If a strand is not closed, the ports reached by following it backwards are pairwise distinct.
Statement
theorem prev_injective_of_not_closed (p : P) (not_closed : ¬ S.Closed p) :
∀ a a', iter S.prev a p = iter S.prev a' p → a = a'
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (28 lines)
by -- `a` steps back, then `a` steps forwards, return to the start have back_then_forward : ∀ a x, iter S.next a (iter S.prev a x) = x := by intro a induction a with | zero => intro x; rfl | succ a ih => intro x; rw [iter_succ', iter_succ, next_prev, ih] -- going back `d` steps never returns to the start, unless `d = 0` have back_ne : ∀ d, iter S.prev d p = p → d = 0 := fun d back_at_start => (S.back_ne_forward_of_not_closed p not_closed d 0 back_at_start).1 -- if `a` and `a + d` steps back meet, then `d` steps back return to the start have key : ∀ a d, iter S.prev a p = iter S.prev (a + d) p → d = 0 := by intro a d same rw [iter_add] at same -- go `a` steps forwards from both have undone := congrArg (iter S.next a) same rw [back_then_forward, back_then_forward] at undone exact back_ne d undone.symm intro a a' same rcases Nat.le_total a a' with le | le · obtain ⟨d, rfl⟩ : ∃ d, a' = a + d := ⟨a' - a, by omega⟩ -- the gap between the two visits is zero have no_gap := key a d same omega · obtain ⟨d, rfl⟩ : ∃ d, a = a' + d := ⟨a - a', by omega⟩ -- the gap between the two visits is zero have no_gap := key a' d same.symm omega
StrandSystem.prev_next
theorem in lean/SpectreKnot/Strands.lean, line 34 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
A step back undoes a step forwards.
Statement
theorem prev_next (p : P) : S.prev (S.next p) = p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
simp [prev, next, S.across_across, S.inside_inside]StrandSystem.same_orbit
theorem in lean/SpectreKnot/ProofStrand.lean, line 29 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
A strand, port by port: every port on the strand of p is reached by following it forwards or backwards from p, or is the other end of the piece of a port so reached.
Statement
theorem same_orbit {p q : P} (same : S.Same p q) : ∃ k, q = S.walk p k ∨ q = iter S.prev k p ∨
q = S.inside (S.walk p k) ∨ q = S.inside (iter S.prev k p)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (34 lines)
by induction same with | refl => exact ⟨0, Or.inl rfl⟩ | @inside q _ ih => -- the other end of the piece swaps the first two forms with the last two obtain ⟨k, reached | reached | reached | reached⟩ := ih <;> subst reached · exact ⟨k, Or.inr (Or.inr (Or.inl rfl))⟩ · exact ⟨k, Or.inr (Or.inr (Or.inr rfl))⟩ · exact ⟨k, Or.inl (S.inside_inside _)⟩ · exact ⟨k, Or.inr (Or.inl (S.inside_inside _))⟩ | @across q _ ih => obtain ⟨k, reached | reached | reached | reached⟩ := ih <;> subst reached · cases k with | zero => -- across the start: the other end of the piece of the port one step back refine ⟨1, Or.inr (Or.inr (Or.inr ?_))⟩ show S.across p = S.inside (S.inside (S.across p)) rw [S.inside_inside] | succ k => -- across a port reached forwards: the other end of the piece of the port before it exact ⟨k, Or.inr (Or.inr (Or.inl (by rw [walk_succ, next, S.across_across])))⟩ · -- across a port reached backwards: the other end of the piece of the next port back exact ⟨k + 1, Or.inr (Or.inr (Or.inr (by rw [iter_succ, prev, S.inside_inside])))⟩ · -- across the other end of the piece of a port reached forwards: one step further forwards exact ⟨k + 1, Or.inl rfl⟩ · cases k with | zero => -- across the other end of the start's piece: one step forwards exact ⟨1, Or.inl rfl⟩ | succ k => -- across the other end of the piece of a port reached backwards: one step less back refine ⟨k, Or.inr (Or.inl ?_)⟩ show S.next (iter S.prev (k + 1) p) = _ rw [iter_succ, next_prev]
StrandSystem.walk
def in lean/SpectreKnot/Strands.lean, line 42 · read it in its file
Used, through the names in proofs, for Theorem B.
Doc comment
The port reached after k steps.
Statement
def walk (p : P) (k : Nat) : P := iter S.next k p
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
StrandSystem.walk_injective_of_not_closed
theorem in lean/SpectreKnot/Strands.lean, line 97 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
If a strand is not closed, the ports reached by following it are pairwise distinct.
Statement
theorem walk_injective_of_not_closed (p : P) (not_closed : ¬ S.Closed p) :
∀ i j, S.walk p i = S.walk p j → i = j
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (22 lines)
by -- if walk i = walk (i + d) with d > 0 then walk d = p have key : ∀ i d, S.walk p i = S.walk p (i + d) → d = 0 := by intro i d same_port apply Classical.byContradiction intro d_ne_zero apply not_closed refine ⟨d, by omega, ?_⟩ apply S.iter_next_injective i show iter S.next i (iter S.next d p) = iter S.next i p rw [← iter_add] exact same_port.symm intro i j same_port by_cases i_le_j : i ≤ j · obtain ⟨d, rfl⟩ : ∃ d, j = i + d := ⟨j - i, by omega⟩ -- the gap between the two visits is zero have no_gap := key i d same_port omega · obtain ⟨d, rfl⟩ : ∃ d, i = j + d := ⟨i - j, by omega⟩ -- the gap between the two visits is zero have no_gap := key j d same_port.symm omega
StrandSystem.walk_ne_inside_walk
theorem in lean/SpectreKnot/Strands.lean, line 62 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
A strand never runs through a piece in both directions: no port reached from p is the other end of the piece of another port reached from p. (In the multigraph language: a strand passes through each piece only once.)
Statement
theorem walk_ne_inside_walk (p : P) : ∀ i j, S.walk p j ≠ S.inside (S.walk p i)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (33 lines)
by -- the claim for i and j = i + d, by two-step induction on d have key : ∀ d i, S.walk p (i + d) ≠ S.inside (S.walk p i) ∧ S.walk p (i + (d + 1)) ≠ S.inside (S.walk p i) := by intro d induction d with | zero => intro i refine ⟨fun same_piece => S.inside_ne _ same_piece.symm, fun next_is_inside => ?_⟩ -- walk (i+1) = across (inside (walk i)) = across (walk (i+1)), but `across` has no fixed point have fixed_by_across : S.walk p (i + 1) = S.across (S.walk p (i + 1)) := by conv => lhs; rw [walk_succ, next, ← next_is_inside] exact S.across_ne _ fixed_by_across.symm | succ d ih => intro i refine ⟨(ih i).2, fun far_is_inside => ?_⟩ -- from walk (i + (d+2)) = inside (walk i) we get walk (i+1 + d) = inside (walk (i+1)) apply (ih (i + 1)).1 -- the step after `walk i`, written as `across` of the far port have after_start : S.walk p (i + 1) = S.across (S.walk p (i + (d + 1 + 1))) := by rw [far_is_inside, walk_succ, next] -- the far port is one step after `walk (i + 1 + d)` have far_step : S.walk p (i + (d + 1 + 1)) = S.next (S.walk p (i + 1 + d)) := by rw [← walk_succ]; congr 1; omega rw [after_start, far_step, next, S.across_across, S.inside_inside] intro i j is_inside by_cases i_le_j : i ≤ j · obtain ⟨d, rfl⟩ : ∃ d, j = i + d := ⟨j - i, by omega⟩ exact (key d i).1 is_inside · -- `j` comes first: swap the two ends of the piece obtain ⟨d, rfl⟩ : ∃ d, i = j + d := ⟨i - j, by omega⟩ apply (key d j).1 rw [is_inside, S.inside_inside]
StrandSystem.walk_succ
theorem in lean/SpectreKnot/Strands.lean, line 45 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
k + 1 steps are k steps and one more.
Statement
theorem walk_succ (p : P) (k : Nat) : S.walk p (k + 1) = S.next (S.walk p k)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
Strip
inductive in lean/SpectreKnot/Zigzag.lean, line 20 · read it in its file
Doc comment
Ports along the shared path: c h k = h_c(u_k), d h k = h_{c'}(u_k).
Statement
inductive Strip where | c (h : Hand) (k : Nat) | d (h : Hand) (k : Nat) deriving DecidableEq, Repr
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Zigzag.Chain
inductive in lean/SpectreKnot/Zigzag.lean, line 29 · read it in its file
Doc comment
A connection: Chain σ τ p q says that from p, crossing an edge (σ, defined there) and then, until q is reached, going through a piece (τ) and crossing again, leads to q.
Statement
inductive Chain {P : Type} (σ : P → Option P) (τ : P → P) : P → P → Prop | one {p q : P} : σ p = some q → Chain σ τ p q | more {p p₁ q : P} : σ p = some p₁ → Chain σ τ (τ p₁) q → Chain σ τ p q
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Zigzag.Chain.snoc
theorem in lean/SpectreKnot/Zigzag.lean, line 34 · read it in its file
Doc comment
A chain goes on through one more piece and crossing at its end.
Statement
theorem Chain.snoc {P : Type} {σ : P → Option P} {τ : P → P} {p q q' : P} (chain : Chain σ τ p q) (next : σ (τ q) = some q') : Chain σ τ p q'
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction chain with | one crosses => exact .more crosses (.one next) | more crosses _ ih => exact .more crosses (ih next)
Zigzag.swap
def in lean/SpectreKnot/Zigzag.lean, line 72 · read it in its file
Used, through the names in proofs, for Lemma 5.1, Lemma 7.1.
Doc comment
The relabelling that exchanges the two children and L with R. It turns the connection through L_{c'}(u_0) into a connection through R_c(u_0), so walk_chain also describes the second connection.
Statement
def swap : Strip → Strip
| .c .R k => .d .L k
| .c .L k => .d .R k
| .d .R k => .c .L k
| .d .L k => .c .R k
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
Zigzag.walk_chain
theorem in lean/SpectreKnot/Zigzag.lean, line 48 · read it in its file
Used, through the names in proofs, for Lemma 5.1, Lemma 7.1.
Doc comment
The connection through R_c(u_0), crossing by crossing: after its k + 1-th crossing (k < n) it has arrived at R_{c'}(u_{k+1}) (k even) or L_c(u_{k+1}) (k odd). The four rules: across edge k from R_c(u_k) (across_R) and from L_{c'}(u_k) (across_L), and the hooks of X_{c'} (hook_d) and of X_c (hook_c) at the inner vertices.
Statement
theorem walk_chain (across_R : ∀ k, k < n → σ (ι (.c .R k)) = some (ι (.d .R (k + 1)))) (hook_d : ∀ k, 0 < k → k < n → τ (ι (.d .R k)) = ι (.d .L k)) (across_L : ∀ k, k < n → σ (ι (.d .L k)) = some (ι (.c .L (k + 1)))) (hook_c : ∀ k, 0 < k → k < n → τ (ι (.c .L k)) = ι (.c .R k)) : ∀ k, k < n → Chain σ τ (ι (.c .R 0)) (if k % 2 = 0 then ι (.d .R (k + 1)) else ι (.c .L (k + 1)))
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (16 lines)
by intro k k_lt induction k with | zero => exact .one (across_R 0 k_lt) | succ k ih => -- the first `k + 1` crossings have before := ih (by omega) by_cases k_even : k % 2 = 0 · -- arrived at `R_{c'}(u_{k+1})`: the hook of `X_{c'}` there, then across edge `k + 1` from `L_{c'}(u_{k+1})` rw [ite_eq_left k_even] at before rw [ite_eq_right (show ¬ ((k + 1) % 2 = 0) by omega)] exact before.snoc (by rw [hook_d (k + 1) (by omega) k_lt]; exact across_L (k + 1) k_lt) · -- arrived at `L_c(u_{k+1})`: the hook of `X_c` there, then across edge `k + 1` from `R_c(u_{k+1})` rw [ite_eq_right k_even] at before rw [ite_eq_left (show (k + 1) % 2 = 0 by omega)] exact before.snoc (by rw [hook_c (k + 1) (by omega) k_lt]; exact across_R (k + 1) k_lt)
Zigzag.zigzag
theorem in lean/SpectreKnot/Zigzag.lean, line 88 · read it in its file
Formalises Lemma 5.1 Zigzag Lemma.
Used, through the names in proofs, for Lemma 7.1.
Doc comment
Lemma 5.1 (the Zigzag Lemma). Let σ be the straight-through rule across the edges u_k u_{k+1} of the path, and τ the hooks of both children at u_1, …, u_{n-1}. Alternately applying them joins the ports at the ends of the path as follows:
neven:R_c(u_0) ↔ L_c(u_n)andL_{c'}(u_0) ↔ R_{c'}(u_n);nodd:R_c(u_0) ↔ R_{c'}(u_n)andL_{c'}(u_0) ↔ L_c(u_n).
These two connections use every port on the edges of the path: after k + 1 crossings they have arrived at the two ports R_{c'}(u_{k+1}) and L_c(u_{k+1}) of edge k, one each, so each crosses every edge once, and between them they leave from its other two ports, R_c(u_k) and L_{c'}(u_k).
Statement
theorem zigzag (len_pos : 1 ≤ n) (across_R : ∀ k, k < n → σ (ι (.c .R k)) = some (ι (.d .R (k + 1)))) (across_L : ∀ k, k < n → σ (ι (.d .L k)) = some (ι (.c .L (k + 1)))) (hook_c : ∀ k, 0 < k → k < n → τ (ι (.c .L k)) = ι (.c .R k)) (hook_d : ∀ k, 0 < k → k < n → τ (ι (.d .R k)) = ι (.d .L k)) : -- the connection through R_c(u_0) Chain σ τ (ι (.c .R 0)) (if n % 2 = 0 then ι (.c .L n) else ι (.d .R n)) ∧ -- the connection through L_{c'}(u_0) Chain σ τ (ι (.d .L 0)) (if n % 2 = 0 then ι (.d .R n) else ι (.c .L n)) ∧ -- every port on the edges of the path is used (∀ k, k < n → Chain σ τ (ι (.c .R 0)) (if k % 2 = 0 then ι (.d .R (k + 1)) else ι (.c .L (k + 1))) ∧ Chain σ τ (ι (.d .L 0)) (if k % 2 = 0 then ι (.c .L (k + 1)) else ι (.d .R (k + 1))))
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (21 lines)
by -- the connection through `R_c(u_0)`, crossing by crossing have from_R := walk_chain σ τ ι n across_R hook_d across_L hook_c -- the connection through `L_{c'}(u_0)`: the same rules for the relabelled strip have from_L := walk_chain σ τ (fun s => ι (swap s)) n (fun k k_lt => by simp only [swap]; exact across_L k k_lt) (fun k k_pos k_lt => by simp only [swap]; exact hook_c k k_pos k_lt) (fun k k_lt => by simp only [swap]; exact across_R k k_lt) (fun k k_pos k_lt => by simp only [swap]; exact hook_d k k_pos k_lt) simp only [swap] at from_L refine ⟨?_, ?_, fun k k_lt => ⟨from_R k k_lt, from_L k k_lt⟩⟩ · have last := from_R (n - 1) (by omega) -- the last crossing of the connection through `R_c(u_0)` rw [show n - 1 + 1 = n by omega] at last by_cases n_even : n % 2 = 0 · rw [ite_eq_right (show ¬ ((n - 1) % 2 = 0) by omega)] at last; rw [ite_eq_left n_even]; exact last · rw [ite_eq_left (show (n - 1) % 2 = 0 by omega)] at last; rw [ite_eq_right n_even]; exact last · have last := from_L (n - 1) (by omega) -- the last crossing of the connection through `L_{c'}(u_0)` rw [show n - 1 + 1 = n by omega] at last by_cases n_even : n % 2 = 0 · rw [ite_eq_right (show ¬ ((n - 1) % 2 = 0) by omega)] at last; rw [ite_eq_left n_even]; exact last · rw [ite_eq_left (show (n - 1) % 2 = 0 by omega)] at last; rw [ite_eq_right n_even]; exact last
bounds
theorem in lean/SpectreKnot/Lengths.lean, line 244 · read it in its file
Formalises Lemma 6.5 Lower bounds.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Lemma 6.5. For every m ≥ 1: every side has length at least 5; d_m ≥ 6; and δ_m − d_m ≥ 4.
Statement
theorem bounds (m : Nat) (level_pos : 1 ≤ m) :
(∀ x, 5 ≤ letterLen m x) ∧ 6 ≤ dOff m ∧ dOff m + 4 ≤ letterLen m .delta
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (40 lines)
by obtain ⟨k, rfl⟩ : ∃ k, m = k + 1 := ⟨m - 1, by omega⟩ -- every side has length at least 5, at every level have five : ∀ k x, 5 ≤ letterLen (k + 1) x := by intro k induction k with | zero => intro x; cases x <;> decide | succ k ih => rw [show k + 1 + 1 = k + 2 from rfl] -- the recurrence (6.1): each letter at level `k + 2` is a sum of letters at level `k + 1` have recurrence := letterLen_succ k -- the bound one level down, letter by letter have alpha5 := ih .alpha have beta5 := ih .beta -- likewise for β have gamma5 := ih .gamma -- likewise for γ have delta5 := ih .delta -- likewise for δ have epsilon5 := ih .epsilon -- likewise for ε have zeta5 := ih .zeta -- likewise for ζ have eta5 := ih .eta -- likewise for η have theta5 := ih .theta -- likewise for θ intro x; cases x <;> omega refine ⟨five k, ?_, ?_⟩ · cases k with | zero => decide | succ k => rw [show k + 1 + 1 = k + 2 from rfl, dOff_succ] -- d_{k+2} = θ + ε + α, each at least 5 have theta5 := five k .theta have epsilon5 := five k .epsilon -- likewise for ε have alpha5 := five k .alpha -- likewise for α omega · cases k with | zero => decide | succ k => rw [show k + 1 + 1 = k + 2 from rfl, dOff_succ] -- δ_{k+2} = α + β + ε + 2θ, so δ − d = β + θ have delta_rec := (letterLen_succ k).2.2.2.1 have beta5 := five k .beta -- β is at least 5 have theta5 := five k .theta -- θ is at least 5 omega
dOff
def in lean/SpectreKnot/Lengths.lean, line 205 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
dOff m = d_m, the distance along side 5 of a level-m Σ-supertile from its vertex 5 to its crossover corner: measured on the level-1 supertile for m = 1, and the length of the pieces before the Γ child's vertex 0 above.
Statement
def dOff : Nat → Nat | 0 => 0 | 1 => d1 | m + 2 => (((pieces .Sigma 5).take 3).map (fun p => sideLen (m + 1) (kidAt .Sigma p.1) p.2)).sum
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
dOff_fib
theorem in lean/SpectreKnot/Lengths.lean, line 226 · read it in its file
Formalises Lemma 6.4 Position of A.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Lemma 6.4. d_m = 2F_{3m+1}, and the crossover corner is at distance δ_m − d_m = 2F_{3m} from vertex 0.
Statement
theorem dOff_fib (m : Nat) (level_pos : 1 ≤ m) :
dOff m = 2 * fib (3 * m + 1) ∧ letterLen m .delta = dOff m + 2 * fib (3 * m)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (13 lines)
by obtain ⟨k, rfl⟩ : ∃ k, m = k + 1 := ⟨m - 1, by omega⟩ cases k with | zero => decide | succ k => rw [show k + 1 + 1 = k + 2 from rfl, dOff_succ, (letterLen_succ k).2.2.2.1] rw [show 3 * (k + 2) + 1 = 3 * k + 7 by omega, show 3 * (k + 2) = 3 * k + 6 by omega] -- the closed forms of Prop 6.2 at level `k + 1` have closed_forms := letterLen_fib_aux k -- the Fibonacci recurrence at F_{3k+6} and F_{3k+7}, for `omega` have fib6 : fib (3 * k + 6) = fib (3 * k + 4) + fib (3 * k + 5) := fib_add_two _ have fib7 : fib (3 * k + 7) = fib (3 * k + 5) + fib (3 * k + 6) := fib_add_two _ -- likewise for F_{3k+7} omega
dOff_succ
theorem in lean/SpectreKnot/Lengths.lean, line 211 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
d_{m+2} is the sum of the lengths of the pieces 0.2, 0.1 and 7.0 at level m + 1: θ + ε + α.
Statement
theorem dOff_succ (m : Nat) :
dOff (m + 2) = letterLen (m + 1) .theta + letterLen (m + 1) .epsilon + letterLen (m + 1) .alpha
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (12 lines)
by -- the length of piece 0.2, side 2 of the Ξ child 0, by its letter have piece_0_2 := sideLen_eq_letterLen (m + 1) (by omega) .Xi 2 (by omega) -- the length of piece 0.1, side 1 of the Ξ child 0, by its letter have piece_0_1 := sideLen_eq_letterLen (m + 1) (by omega) .Xi 1 (by omega) -- the length of piece 7.0, side 0 of the Γ child 7, by its letter have piece_7_0 := sideLen_eq_letterLen (m + 1) (by omega) .Gamma 0 (by omega) simp only [dOff, sigma_side5_start.1, List.map, List.sum_cons, List.sum_nil, sigma_side5_start.2.1, sigma_side5_start.2.2, piece_0_2, piece_0_1, piece_7_0] rw [show letterOf .Xi 2 = .theta from rfl, show letterOf .Xi 1 = .epsilon from rfl, show letterOf .Gamma 0 = .alpha from rfl] omega
fib
def in lean/SpectreKnot/Basic.lean, line 47 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Fibonacci numbers, fib 1 = fib 2 = 1.
Statement
def fib : Nat → Nat
| 0 => 0
| 1 => 1
| n + 2 => fib n + fib (n + 1)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
fib_add_two
theorem in lean/SpectreKnot/Lengths.lean, line 113 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The Fibonacci recurrence.
Statement
theorem fib_add_two (n : Nat) : fib (n + 2) = fib n + fib (n + 1)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
iter
def in lean/SpectreKnot/Basic.lean, line 18 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
iter f n x = f (f (... (f x))), n times. (Core Lean has no f^[n].)
Statement
def iter {α : Type} (f : α → α) : Nat → α → α | 0, x => x | n + 1, x => f (iter f n x)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
iter_add
theorem in lean/SpectreKnot/Basic.lean, line 35 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
m + n steps are n steps followed by m steps.
Statement
theorem iter_add {α : Type} (f : α → α) (m n : Nat) (x : α) : iter f (m + n) x = iter f m (iter f n x)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction m with | zero => simp | succ m ih => rw [Nat.add_right_comm, iter_succ, ih, iter_succ]
iter_succ
theorem in lean/SpectreKnot/Basic.lean, line 26 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
n + 1 steps are n steps, then one more application of f.
Statement
theorem iter_succ {α : Type} (f : α → α) (n : Nat) (x : α) : iter f (n + 1) x = f (iter f n x)
Names in its proof
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
iter_succ'
theorem in lean/SpectreKnot/Basic.lean, line 29 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 3.4.
Doc comment
The extra step can also be taken first: n + 1 steps from x are n steps from f x.
Statement
theorem iter_succ' {α : Type} (f : α → α) (n : Nat) (x : α) : iter f (n + 1) x = iter f n (f x)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (4 lines)
by induction n with | zero => rfl | succ n ih => rw [iter_succ, ih, iter_succ]
iter_zero
theorem in lean/SpectreKnot/Basic.lean, line 23 · read it in its file
Doc comment
Zero steps leave x where it is.
Statement
@[simp] theorem iter_zero {α : Type} (f : α → α) (x : α) : iter f 0 x = x
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
rfl
kidAt
def in lean/SpectreKnot/Lengths.lean, line 18 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
Child c of a T-supertile (Table 1).
Statement
def kidAt (T : Kind) (c : Nat) : Kind := (kids T).getD c .Gamma
Names in its proof
Named in the proofs of
Compose.sig_baseCompose.Comp.ofLensCompose.Comp.ofPatternsideLensideLen_eq_letterLendOffCompose.Move.d'Compose.Move.OKCompose.Move.d'_eqCompose.Move.d'_c₀Compose.Move.d'_c₁Compose.Move.OK.A_eqCompose.Move.OK.A_clear₀Compose.Move.OK.A_clear₁Statement.ParStatement.kidsDCompose.pairOkCompose.L₁Compose.AdmCompose.L₁_sigCompose.ofLens_congrCompose.Move.hit_bigCompose.adm_inductCompose.adm_levelCompose.prop_7_4Statement.LkStatement.kids_atStatement.good_succStatement.cornerA_succStatement.compose_no_defaultStatement.Chain.kidsAtStatement.Chain.kid_eqStatement.chains_superStatement.kidsD_chains
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
len1_by_letter
theorem in lean/SpectreKnot/Lengths.lean, line 58 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The level-1 counts depend only on the letter.
Statement
theorem len1_by_letter : ∀ K : Kind, ∀ j, j < 6 → (len1 K).getD j 0 = letterLen1 (letterOf K j)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro K; cases K <;> decideletterLen
def in lean/SpectreKnot/Lengths.lean, line 50 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
letterLen m x = x_m, the common length of the sides with letter x at level m ≥ 1, by the recurrence (6.1).
Statement
def letterLen : Nat → Letter → Nat
| 0, _ => 0
| 1, x => letterLen1 x
| m + 2, x => ((recLetters x).map (letterLen (m + 1))).sum
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
letterLen1
def in lean/SpectreKnot/Lengths.lean, line 45 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The level-1 letter lengths (α₁, …, θ₁) = (7, 5, 10, 10, 8, 6, 10, 11).
Statement
def letterLen1 : Letter → Nat
| .alpha => 7 | .beta => 5 | .gamma => 10 | .delta => 10
| .epsilon => 8 | .zeta => 6 | .eta => 10 | .theta => 11
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
letterLen_fib
theorem in lean/SpectreKnot/Lengths.lean, line 148 · read it in its file
Formalises Proposition 6.2 Fibonacci side lengths.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Prop 6.2. For every m ≥ 1: α_m = F_{3m+2} + 2, β_m = F_{3m+1} + 2, γ_m = δ_m = η_m = 2F_{3m+2}, ε_m = F_{3m+3}, ζ_m = 2F_{3m+1}, θ_m = F_{3m+4} − 2.
Statement
theorem letterLen_fib (m : Nat) (level_pos : 1 ≤ m) :
letterLen m .alpha = fib (3 * m + 2) + 2 ∧
letterLen m .beta = fib (3 * m + 1) + 2 ∧
letterLen m .gamma = 2 * fib (3 * m + 2) ∧
letterLen m .delta = 2 * fib (3 * m + 2) ∧
letterLen m .epsilon = fib (3 * m + 3) ∧
letterLen m .zeta = 2 * fib (3 * m + 1) ∧
letterLen m .eta = 2 * fib (3 * m + 2) ∧
letterLen m .theta = fib (3 * m + 4) - 2
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (11 lines)
by obtain ⟨k, rfl⟩ : ∃ k, m = k + 1 := ⟨m - 1, by omega⟩ -- the indices at level `k + 1` in the form of `letterLen_fib_aux`: 3k + 4 for β and ζ have idx1 : 3 * (k + 1) + 1 = 3 * k + 4 := by omega have idx2 : 3 * (k + 1) + 2 = 3 * k + 5 := by omega -- for α, γ, δ and η have idx3 : 3 * (k + 1) + 3 = 3 * k + 6 := by omega -- for ε have idx4 : 3 * (k + 1) + 4 = 3 * k + 7 := by omega -- for θ rw [idx1, idx2, idx3, idx4] -- the closed forms, with the indices written out have closed_forms := letterLen_fib_aux k omega
letterLen_fib_aux
theorem in lean/SpectreKnot/Lengths.lean, line 116 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Prop 6.2 at level k + 1, with the Fibonacci indices written out (3(k+1)+1 = 3k+4, …).
Statement
theorem letterLen_fib_aux (k : Nat) :
letterLen (k + 1) .alpha = fib (3 * k + 5) + 2 ∧
letterLen (k + 1) .beta = fib (3 * k + 4) + 2 ∧
letterLen (k + 1) .gamma = 2 * fib (3 * k + 5) ∧
letterLen (k + 1) .delta = 2 * fib (3 * k + 5) ∧
letterLen (k + 1) .epsilon = fib (3 * k + 6) ∧
letterLen (k + 1) .zeta = 2 * fib (3 * k + 4) ∧
letterLen (k + 1) .eta = 2 * fib (3 * k + 5) ∧
letterLen (k + 1) .theta + 2 = fib (3 * k + 7)
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (21 lines)
by induction k with | zero => decide | succ k ih => rw [show k + 1 + 1 = k + 2 from rfl] -- the closed forms at level `k + 1`, and the recurrence (6.1) from level `k + 1` to `k + 2` obtain ⟨alpha_k, beta_k, gamma_k, delta_k, epsilon_k, zeta_k, eta_k, theta_k⟩ := ih obtain ⟨alpha_rec, beta_rec, gamma_rec, delta_rec, epsilon_rec, zeta_rec, eta_rec, theta_rec⟩ := letterLen_succ k -- the Fibonacci recurrence up to F_{3k+10}, so that `omega` can write everything in F_{3k+4} and F_{3k+5} have fib6 : fib (3 * k + 6) = fib (3 * k + 4) + fib (3 * k + 5) := fib_add_two _ have fib7 : fib (3 * k + 7) = fib (3 * k + 5) + fib (3 * k + 6) := fib_add_two _ -- likewise for F_{3k+7} have fib8 : fib (3 * k + 8) = fib (3 * k + 6) + fib (3 * k + 7) := fib_add_two _ -- likewise for F_{3k+8} have fib9 : fib (3 * k + 9) = fib (3 * k + 7) + fib (3 * k + 8) := fib_add_two _ -- likewise for F_{3k+9} have fib10 : fib (3 * k + 10) = fib (3 * k + 8) + fib (3 * k + 9) := fib_add_two _ -- likewise for F_{3k+10} -- the indices at level `k + 2` in the form of those above: 3k + 7 for β and ζ have idx4 : 3 * (k + 1) + 4 = 3 * k + 7 := by omega have idx5 : 3 * (k + 1) + 5 = 3 * k + 8 := by omega -- for α, γ, δ and η have idx6 : 3 * (k + 1) + 6 = 3 * k + 9 := by omega -- for ε have idx7 : 3 * (k + 1) + 7 = 3 * k + 10 := by omega -- for θ rw [idx4, idx5, idx6, idx7] omega
letterLen_parity
theorem in lean/SpectreKnot/Lengths.lean, line 172 · read it in its file
Formalises Corollary 6.3 Parities are constant.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
Cor 6.3. For every m ≥ 1, α_m, β_m, θ_m are odd and γ_m, δ_m, ε_m, ζ_m, η_m are even. (Proved from the recurrence: the parity vector is a fixed point of (6.1) mod 2.)
Statement
theorem letterLen_parity (m : Nat) (level_pos : 1 ≤ m) :
letterLen m .alpha % 2 = 1 ∧ letterLen m .beta % 2 = 1 ∧ letterLen m .gamma % 2 = 0 ∧
letterLen m .delta % 2 = 0 ∧ letterLen m .epsilon % 2 = 0 ∧ letterLen m .zeta % 2 = 0 ∧
letterLen m .eta % 2 = 0 ∧ letterLen m .theta % 2 = 1
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (9 lines)
by obtain ⟨k, rfl⟩ : ∃ k, m = k + 1 := ⟨m - 1, by omega⟩ induction k with | zero => decide | succ k ih => rw [show k + 1 + 1 = k + 2 from rfl] -- the recurrence (6.1) keeps the parities have recurrence := letterLen_succ k omega
letterLen_succ
theorem in lean/SpectreKnot/Lengths.lean, line 93 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The recurrence (6.1) written out.
Statement
theorem letterLen_succ (m : Nat) :
letterLen (m + 2) .alpha = letterLen (m + 1) .beta + letterLen (m + 1) .epsilon + letterLen (m + 1) .eta ∧
letterLen (m + 2) .beta = letterLen (m + 1) .alpha + letterLen (m + 1) .epsilon ∧
letterLen (m + 2) .gamma = letterLen (m + 1) .beta + 2 * letterLen (m + 1) .epsilon
+ letterLen (m + 1) .eta + letterLen (m + 1) .theta ∧
letterLen (m + 2) .delta = letterLen (m + 1) .alpha + letterLen (m + 1) .beta
+ letterLen (m + 1) .epsilon + 2 * letterLen (m + 1) .theta ∧
letterLen (m + 2) .epsilon = 3 * letterLen (m + 1) .epsilon + letterLen (m + 1) .eta ∧
letterLen (m + 2) .zeta = letterLen (m + 1) .alpha + letterLen (m + 1) .epsilon + letterLen (m + 1) .theta ∧
letterLen (m + 2) .eta = 4 * letterLen (m + 1) .epsilon + letterLen (m + 1) .eta ∧
letterLen (m + 2) .theta = 4 * letterLen (m + 1) .epsilon + letterLen (m + 1) .eta
+ letterLen (m + 1) .theta
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (3 lines)
by
simp only [letterLen, recLetters, List.map, List.sum_cons, List.sum_nil]
omegaletterOf
def in lean/SpectreKnot/Lengths.lean, line 21 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The letter of side j of a K-supertile (Table 4).
Statement
def letterOf (K : Kind) (j : Nat) : Letter := (letters K).getD j .alpha
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
nxt
def in lean/SpectreKnot/Basic.lean, line 41 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
Cyclic successor on 0 … E-1.
Statement
def nxt (E x : Nat) : Nat := if x + 1 = E then 0 else x + 1
Names in its proof
none
Named in the proofs of
Statement.Patch.rim_portStatement.gB_lastStatement.corners_nonSigmaStatement.corners_sigmaStatement.gRStatement.cBCompose.mkKidLCompose.Comp.rimVertexPortsnxt_ltprv_nxtnxt_prvGluing.sigmaStatement.corners_NStatement.nxt_lastStatement.own_rotCompose.sig_adjStatement.bPosStatement.stretch_eqStatement.side_cycleGluing.RotStatement.cornerBStatement.corner_oneGluing.nxt_of_lt'Gluing.Cut.OK.nxt_shStatement.Patch.surrounded_or_chainStatement.bstep
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
nxt_lt
theorem in lean/SpectreKnot/Gluing.lean, line 19 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The successor of a vertex is a vertex.
Statement
theorem nxt_lt {E x : Nat} (x_lt : x < E) : nxt E x < E
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by unfold nxt; split <;> omeganxt_prv
theorem in lean/SpectreKnot/Gluing.lean, line 29 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The successor undoes the predecessor.
Statement
theorem nxt_prv {E x : Nat} (x_lt : x < E) : nxt E (prv E x) = x
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
unfold nxt prv; split <;> split <;> omegapieces
def in lean/SpectreKnot/Lengths.lean, line 24 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
The children's sides (c, j) that make up side J of a T-supertile (Table 3).
Statement
def pieces (T : Kind) (J : Nat) : List (Nat × Nat) := (pside T).getD J []
Names in its proof
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
pieces_perm
theorem in lean/SpectreKnot/Lengths.lean, line 67 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
"Inspection of Tables 1, 3, 4" in the proof of Prop 6.1: the letters of the pieces of side J of T are, up to order, the letters of the recurrence for the letter of side J.
Statement
theorem pieces_perm : ∀ T : Kind, ∀ J, J < 6 → ((pieces T J).map (fun p => letterOf (kidAt T p.1) p.2)).Perm (recLetters (letterOf T J))
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decidepieces_valid
theorem in lean/SpectreKnot/Lengths.lean, line 62 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Every piece listed in Table 3 is a side 0..5 of a child.
Statement
theorem pieces_valid : ∀ T : Kind, ∀ J, J < 6 → ∀ p ∈ pieces T J, p.2 < 6
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
intro T; cases T <;> decideprv
def in lean/SpectreKnot/Basic.lean, line 44 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Lemma 4.4, Lemma 5.1, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3.
Doc comment
Cyclic predecessor on 0 … E-1.
Statement
def prv (E x : Nat) : Nat := if x = 0 then E - 1 else x - 1
Names in its proof
none
Named in the proofs of
Statement.Kids.across_rimStatement.prv_injStatement.corners_nonSigmaStatement.corners_sigmaStatement.gLStatement.cBStatement.vtx_eqStatement.sig_of_checkCompose.mkKidLprv_ltprv_nxtnxt_prvGluing.sigmaStatement.corners_NStatement.gL_jposStatement.own_rotStatement.Kids.bport_LCompose.sig_adjStatement.bPosStatement.stretch_eqStatement.tstep_soundStatement.side_cycleStatement.rim_not_surroundedGluing.sigma_symmGluing.RotBGluing.RimLGluing.Cut.OK.rimL_preStatement.Patch.bportStatement.cornerBStatement.corner_oneGluing.Equiv.sigmaGluing.prv_succ'Gluing.Cut.OK.prv_shGluing.Cut.OK.prv_cutGluing.Cut.OK.prv_cut₁Gluing.Cut.OK.simStatement.Patch.surrounded_or_chainStatement.bstepStatement.Kids.turn_fC
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
prv_lt
theorem in lean/SpectreKnot/Gluing.lean, line 22 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.1, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The predecessor of a vertex is a vertex.
Statement
theorem prv_lt {E x : Nat} (x_lt : x < E) : prv E x < E
Names in its proof
Named in the proofs of
Statement.Kids.across_rimStatement.Kids.bport_validStatement.corners_nonSigmaStatement.gL_validStatement.gL_sigmaStatement.compSig_of_sigStatement.sig_of_checkStatement.Kids.bport_LStatement.Patch.across_bportStatement.Patch.bport_isPortStatement.Patch.bport_injStatement.rim_not_surroundedGluing.sigma_symmGluing.Equiv.rimLGluing.sigma_validGluing.Equiv.sigmaGluing.Cut.OK.simStatement.Patch.sC_validStatement.Kids.bstep_validStatement.Kids.turn_fC
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by unfold prv; split <;> omegaprv_nxt
theorem in lean/SpectreKnot/Gluing.lean, line 25 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Lemma 6.4, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3.
Doc comment
The predecessor undoes the successor.
Statement
theorem prv_nxt {E x : Nat} (_x_lt : x < E) : prv E (nxt E x) = x
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
unfold nxt prv; split <;> split <;> omegarecLetters
def in lean/SpectreKnot/Lengths.lean, line 34 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Proposition 6.2, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
The letters on the right-hand side of the recurrence (6.1), with multiplicity.
Statement
def recLetters : Letter → List Letter
| .alpha => [.beta, .epsilon, .eta]
| .beta => [.alpha, .epsilon]
| .gamma => [.beta, .epsilon, .epsilon, .eta, .theta]
| .delta => [.alpha, .beta, .epsilon, .theta, .theta]
| .epsilon => [.epsilon, .epsilon, .epsilon, .eta]
| .zeta => [.alpha, .epsilon, .theta]
| .eta => [.epsilon, .epsilon, .epsilon, .epsilon, .eta]
| .theta => [.epsilon, .epsilon, .epsilon, .epsilon, .eta, .theta]
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
sideLen
def in lean/SpectreKnot/Lengths.lean, line 28 · read it in its file
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Proposition 6.1, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Computation 7.5, Theorem 7.6, Lemma 8.3, Theorem 9.1, Computation 9.2, Lemma 9.3, Lemma 9.4.
Doc comment
sideLen m K j = ℓ_m(K, j), the number of edges of side j of a level-m K-supertile (m ≥ 1): the level-1 counts, and then Prop 2.4(c). (Level 0 is not a hexagon level; the value 0 there is a placeholder.)
Statement
def sideLen : Nat → Kind → Nat → Nat | 0, _, _ => 0 | 1, K, j => (len1 K).getD j 0 | m + 2, T, J => ((pieces T J).map (fun p => sideLen (m + 1) (kidAt T p.1) p.2)).sum
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
sideLen_eq_letterLen
theorem in lean/SpectreKnot/Lengths.lean, line 73 · read it in its file
Formalises Proposition 6.1 Lengths by letter.
Used, through the names in proofs, for Theorem A, Theorem B, Lemma 4.2, Corollary 6.3, Lemma 6.4, Lemma 6.5, Lemma 7.2, Computation 7.3, Proposition 7.4, Theorem 7.6, Lemma 8.3, Theorem 9.1, Lemma 9.3, Lemma 9.4.
Doc comment
Prop 6.1. For every m ≥ 1, ℓ_m(K, j) depends only on the letter of side j of K, and the letter lengths satisfy (6.1).
Statement
theorem sideLen_eq_letterLen (m : Nat) (level_pos : 1 ≤ m) (K : Kind) (j : Nat) (side_lt : j < 6) :
sideLen m K j = letterLen m (letterOf K j)
Names in its proof
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (17 lines)
by obtain ⟨m, rfl⟩ : ∃ k, m = k + 1 := ⟨m - 1, by omega⟩ clear level_pos induction m generalizing K j with | zero => exact len1_by_letter K j side_lt | succ m ih => show ((pieces K j).map (fun p => sideLen (m + 1) (kidAt K p.1) p.2)).sum = ((recLetters (letterOf K j)).map (letterLen (m + 1))).sum -- each piece's length is the length of its letter one level down (by induction) have by_letter : (pieces K j).map (fun p => sideLen (m + 1) (kidAt K p.1) p.2) = ((pieces K j).map (fun p => letterOf (kidAt K p.1) p.2)).map (letterLen (m + 1)) := by rw [List.map_map] apply List.map_congr_left intro p piece_mem exact ih _ _ (pieces_valid K j side_lt p piece_mem) rw [by_letter] exact ((pieces_perm K j side_lt).map _).sum_nat
sideLen_parity
theorem in lean/SpectreKnot/Lengths.lean, line 186 · read it in its file
Formalises Corollary 6.3 Parities are constant.
Doc comment
Cor 6.3 for sides: the parity of ℓ_m(K, j) does not depend on m ≥ 1.
Statement
theorem sideLen_parity (m m' : Nat) (level_pos : 1 ≤ m) (level_pos' : 1 ≤ m') (K : Kind) (j : Nat) (side_lt : j < 6) :
sideLen m K j % 2 = sideLen m' K j % 2
Names in its proof
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (7 lines)
by rw [sideLen_eq_letterLen m level_pos K j side_lt, sideLen_eq_letterLen m' level_pos' K j side_lt] -- the parities of the letter lengths at level `m` have parity := letterLen_parity m level_pos -- and the same parities at level `m'` have parity' := letterLen_parity m' level_pos' cases letterOf K j <;> omega
sigma_side5_start
theorem in lean/SpectreKnot/Lengths.lean, line 199 · read it in its file
Doc comment
In a Σ-supertile of level ≥ 2, side 5 begins with the pieces 0.2, 0.1, 7.0, and child 7 is the Γ child, whose vertex 0 (the end of piece 7.0) is the crossover corner (Prop 2.4(d)).
Statement
theorem sigma_side5_start :
(pieces .Sigma 5).take 3 = [(0, 2), (0, 1), (7, 0)] ∧ kidAt .Sigma 0 = .Xi ∧ kidAt .Sigma 7 = .Gamma
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (2 lines)
by
decidetileBox
def in lean/SpectreKnot/Box.lean, line 59 · read it in its file
Doc comment
The tile seen as a patch: its pieces are its arcs, and it has no closed strand.
Statement
def tileBox : Box 14 := ⟨tilePiece, 0⟩
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
tileBox_proper
theorem in lean/SpectreKnot/Box.lean, line 62 · read it in its file
Doc comment
The tile's pairing is a proper box: every port is paired with another port, which is paired back.
Statement
theorem tileBox_proper : tileBox.Proper
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decidetilePiece
def in lean/SpectreKnot/Box.lean, line 52 · read it in its file
Doc comment
Def 3.1. The decoration of the tile, as a pairing of its 28 ports R(v_i), L(v_i) (vertices counted counter-clockwise from v_0): twelve hooks L(v_i) ↔ R(v_i) for 2 ≤ i ≤ 13, and the crossover R(v_0) ↔ R(v_1), L(v_0) ↔ L(v_1).
Statement
def tilePiece : RimPort 14 → RimPort 14
| (⟨0, _⟩, hand) => (1, hand)
| (⟨1, _⟩, hand) => (0, hand)
| (i, .L) => (i, .R)
| (i, .R) => (i, .L)
Names in its proof
none
Named in the proofs of
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
tile_signature
theorem in lean/SpectreKnot/Box.lean, line 65 · read it in its file
Doc comment
Lemma 4.4 (tile). A tile has the signature at (v_0, v_1).
Statement
theorem tile_signature : tileBox.Signature 0 1
Names in its proof
none
Named in the proofs of
none
Read from the Lean text, not from Lean: a project declaration counts when its name is written in the proof, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. A guide, not a certificate: a name used through notation, an instance or a tactic is missed.
The proof (1 lines)
by decideThe code
The paper, every program its proof uses with the logs of a full run, the Lean formalisation and the generator of this site are in one public repository.
The repository on GitHub → the programs and the Lean, as a zip (509 KB) the paper (PDF)
| folder | what is in it |
|---|---|
paper/ | the paper: its LaTeX in tex/, the figures drawn by figures/make_figs.py, and the built PDF |
paper/code/ | every program the proof uses, with the logs of a full run in logs/; its README says which program computes what |
lean/ | the Lean formalisation, 39 files: read it here; its README maps the paper to the Lean |
proofmap/ | the generator of this site (how it works) |
The zip holds the programs and their logs as code/ and the Lean as lean/. Licences: the code is under the MIT licence (LICENSE); the paper, the text and the pictures under CC BY 4.0 (LICENSE-CONTENT.md).
The Lean
Lean 4, leanprover/lean4:v4.34.1 (pinned in lean/lean-toolchain), with the core library only: no Mathlib. With elan installed:
cd lean ./build.sh # about 10 minutes from clean ./build.sh --slow # with the slower tests: about 5 minutes more
build.sh fails if the statement file or a file it imports has changed since its SHA-256 was recorded (lean/TRUSTED.sha256), if any source uses sorry, admit, native_decide or another way round the kernel, if a theorem or a have has no comment, if the build or a test fails, if a main theorem no longer proves exactly its claim, if a main theorem depends on an axiom other than Lean’s standard three (Axioms.lean), or if leanchecker, replaying every declaration through Lean’s kernel, finds a problem.
GitHub builds it in the public repository whenever lean/ changes: the Lean builds, with their logs; and checks that the Lean’s data files are exactly what paper/code/ generates whenever either changes (lean/tools/check_data.sh).
The computations
The programs are in JavaScript (node 18 or later) and Python 3 (with numpy, scipy, sympy, matplotlib and pillow). run_all.sh runs the computations the proof depends on, with quick corroboration (about 12 minutes on 4 cores); with --all it adds the corroboration up to level 9 (about 1 hour). Each step writes its log into logs/.
cd paper/code ./run_all.sh ./run_all.sh --all
Two steps, A17 and A18, compare the level-1 supertiles and the composition pattern with figures of the spectre paper, and run only when given its PDF, which is not included (see the README). A22 compares Table 1 and every supertile up to level 4 with Kaplan’s implementation of the substitution, the program of the spectre authors’ interactive application; it downloads that program when run_all.sh is given --kaplan, since the program is published without a licence and so is not included.
Which script checks which statement, from paper/code/README.md (the map the paper’s Appendix A points to), with each program and the logs of its steps:
| for | computation | programs | logs |
|---|---|---|---|
| Def. 3.1, Lemma 4.4 | the tile's 14 pieces = 12 hooks + crossover at v0 v1 (and the Mystic has the signature) | core/tile.js, exact/exact.py | A01, A13 |
| §3.2 (drawing) | every shared tile edge glues e_i to e_j with i+j odd, opposite directions, levels 1-4 | exact/exact.py | A13 |
| Thm 2.1(b), Prop. 2.4 | the six vertices of every kind (points where three supertiles meet): observed at levels 1-4, and at levels 5-6 to check the propagated ones | hierarchy/vertices.js, exact/exact.py | A02, A03, A13 |
| Prop. 2.4, Rem. 2.5 | the composition pattern C of m -> m+1, m = 1..7, all identical (exact for m <= 3); vertices propagated for m >= 5 and checked against observation at 5-6 | hierarchy/combin.js, exact/exact.py | A04, A13 |
| Prop. 2.4 (base of (*)) | the level-1 supertiles as hat/turtle clusters (odd edges lengthened to sqrt 3), fitted to a 300-dpi render of the spectre paper's Fig. 4.1: six dots found per cluster, proper similarity with residual < 1% of an edge (other matchings and other kinds >= 40 times worse), rim on the printed outline, first Mystic tile on the lighter shading, labels (read by hand, crosscheck/fig41_labels.json) = Table 4. Needs the spectre paper's PDF | crosscheck/fig41_compare.py | A17 |
| Prop. 2.4 (base of (*)) | the same clusters drawn for comparison by eye | crosscheck/fig41_render.py | A16 |
| Table 1, Prop. 2.4 (base of (*)) | Table 1 and every tile of every supertile, levels 0-4 (in order, with the kinds of the tiles), against Kaplan's implementation of the substitution (spectre.js from the spectre authors' page, SHA-256 checked, run in a context of its own with no access to node); from its tiles alone, the six vertices of every kind at level 1 (points where three level-1 supertiles meet), the side lengths l_1 and the Sigma offset d_1, against hierarchy/combin_8.json and letters.json; two altered copies (two children of Delta exchanged; one placement rule changed) rejected. Downloads spectre.js | crosscheck/kaplan_compare.py, crosscheck/kaplan_run.js | A22 |
| Prop. 2.4, Rem. 2.5 | C agrees with a hand encoding of the spectre paper's Fig. 5.1, all nine kinds, including the parent side labels (dictionary (*) in the proof of Prop. 2.4) | crosscheck/fig51_compare.py (encoding crosscheck/fig51_encoding.json) | A06, A06b |
| Rem. 2.5 | two deliberately corrupted encodings (crosscheck/neg_swap/, crosscheck/neg_label/) are rejected | crosscheck/fig51_compare.py | A06, A06b |
| Rem. 2.5 | the vertex dots and Gamma centres used by fig51_compare.py re-found on a 400-dpi render of Fig. 5.1 (within 2 px). Needs the spectre paper's PDF | crosscheck/fig51_raster.py | A18 |
| Rem. 2.5 | tiles of every supertile, levels 1-7, have disjoint interiors and fill the rim | crosscheck/overlap.js (levels 1-5; levels 6-7 take ~15 min) | B08, B13 |
| Prop. 6.1, 6.2, Cor. 6.3, Lemma 6.4 | side lengths by letter at levels 1-8, the recurrence, the Fibonacci closed forms, parities, the Sigma offset | hierarchy/recur.js, hierarchy/letters.py | A05, A07 |
| Comp. 7.3 | the 18 compositions C_T(l_1, d_1, ±1), built from Tables 1-4 and l_1, d_1 alone (no geometry, no skeleton): every port followed, the signature checked as worded; negative control (each child's corners two apart: all 18 fail) | hierarchy/compositions.py (also the Lean kernel: CompFull.lean) | A19 |
| Comp. 7.5 | signature of the level-1 supertiles, exact (also levels 2-3 and 4, corroboration); the same in floating point | exact/exact.py, hierarchy/checks.js | A08, A13, B02 |
| Comp. 9.2 | the junction map (Table 6) in C_Delta(l_1, d_1, ±1): every port of child 1 followed to its junction; negative control (junctions 12 and 16 exchanged: both signs fail) | hierarchy/compositions.py (also StepMap.lean) | A19 |
| Prop. 7.4, Lemma 9.3 | corroboration: the compositions and the junction map at (l_m, d_m, ±1) for m = 2..4; every single move from (l_1, d_1), with both signs, keeps the signature (1,792 moves) and, on Delta with any cut on child 1 two edges clear of the ends of its side, the junction map (190 moves) | hierarchy/compositions.py | A19 |
| Lemma 7.2 | corroboration: the moves that the proof of Lemma 7.2 chooses, followed from (l_2, d_2) and (l_3, d_3) back to (l_1, d_1) for every kind, each checked to be an allowed move between admissible pairs; from (l_2, d_2) every composition on the way checked to have the signature (both signs) and, for Delta, the junction map | crosscheck/chain_check.py | A20 |
| Table 6, App. A | corroboration: Table 6 on the actual blocks N_1 ⊂ N_2, N_2 ⊂ N_3, N_3 ⊂ N_4, built from the tiles in exact arithmetic by exact/exact.py; negative control (junctions 12 and 16 exchanged) | crosscheck/junction_actual.py | A21 |
| App. A (skeletons) | corroboration: the 18 skeleton walks S_T(l_1, d_1, ±1) (Remark 7.8 of the long version); the parity lemma for skeletons with other lengths | hierarchy/induction.js | A09, B15 |
| App. A (skeletons) | corroboration: the same 18 skeletons equal the skeletons of the actual supertiles at levels 2-9 (the encoding records slightly more than the long version's Def. 5.3, e.g. rim-run parities) | hierarchy/induction.js 9 | A09, B15 |
| App. A (skeletons) | the reduced walk (Prop. 5.4 of the long version) = exact composition at all 1,424 parent ports, levels 1-8 | hierarchy/checks.js | A08, B02 |
| App. A (labels) | corroboration: label states and their step (Remark 9.5 of the long version), implemented numerically in core/nest.js and symbolically in hierarchy/certnest.js (function runSym) | core/nest.js, hierarchy/certnest.js | A10, A14, B06 |
| App. A (labels) | corroboration: symbolic label computation, with certified linear inequalities: 1,068 obligations (even b) and 1,038 (odd b), 1,407 distinct; 1,001 + 979 certified directly | hierarchy/certnest.js | A10 |
| App. A (labels) | corroboration: the 67 + 59 remaining obligations (118 distinct), by the Fibonacci closed form / by Krylov-space certificates | hierarchy/certify_fib.py, hierarchy/certify.py | A11, A12 |
| Table 5, App. A (labels) | b = 1, 2, 3: every ribbon followed in exact arithmetic to level 7; label computation for b = 1, 2, 3 | exact/exact.py, core/nest.js | A13, A14, B06 |
| Table 5 | exact strand following through the nest, b = 1..6, to level 9 (b = 1..3 also in exact arithmetic) | core/hier2.js, exact/exact.py | A13, B05 |
| corroboration | signature, no loops and skeleton period 2 at levels 1-9; skeletons = F(C, parities, omega), built with stand-in lengths of the right parities (not literally S_T(l_1, d_1)) | core/reduce.js, hierarchy/synth.js, hierarchy/synthown.js | B01, B03, B04 |
| corroboration | label inputs rebuilt from (C, parities, omega) equal the exact ones, b = 1..6, to level 9 | hierarchy/synthnest.js | B07 |
| App. A (the drawing) | the drawn ribbons (hand design in drawing/engine.js) realise the port pairing, levels 1-3 | drawing/checkmodel.js | B09 |
| App. A (the drawing) | the drawn pieces: containment, the single (transversal) crossing, angles of 45 degrees at the edges | drawing/drawcheck.py | B14 |
| App. A (sizes) | tile counts, rim lengths and shortest sides at levels 1-9 from Table 1 and the Fibonacci forms | hierarchy/sizes.py | A15 |
| illustration | N_b shares no vertex with the rim of N_{b+2} (b <= 5); edges of N_b on later rims; strands through N_1's tiles | drawing/nestgap.js, nestrim.js, onetile.js | B10, B11, B12 |
Every step of the run
As run_all.sh runs them, from paper/code/: stage A always, stage B with --all; A17 and A18 only when SMKGS_PDF names the spectre paper’s PDF; A22 only with --kaplan. Each command can be run on its own.
| step | command | log |
|---|---|---|
| A00 · | environment | A00_environment.log |
| A01 · A | node core/tile.js | A01_tile.log |
| A02 · A | node --max-old-space-size=6500 hierarchy/vertices.js 4 3 | A02_vertices_4_3.log |
| A03 · A | node --max-old-space-size=6500 hierarchy/vertices.js 6 2 | A03_vertices_6_2.log |
| A04 · A | node --max-old-space-size=6500 hierarchy/combin.js 8 hierarchy/vertices_4_3.json hierarchy/vertices_6_2.json | A04_combin.log |
| A05 · A | node hierarchy/recur.js hierarchy/combin_8.json | A05_recur.log |
| A06 · A | python3 crosscheck/fig51_compare.py | A06_fig51.log |
| A06b · A | bash -c 'for d in crosscheck/neg_swap crosscheck/neg_label; do echo "== negative control $d"; python3 crosscheck/fig51_compare.py $d | sed -n "/PROBLEMS/,+2p"; python3 crosscheck/fig51_compare.py $d | grep -q "^PROBLEMS" || { echo "NOT REJECTED: $d"; exit 1; }; done; echo "BOTH CORRUPTED ENCODINGS REJECTED"' | A06b_fig51_negative.log |
| A07 · A | python3 hierarchy/letters.py | A07_letters.log |
| A13 · A | python3 exact/exact.py 4 --nest 1,2,3 --nestL 7 | A13_exact.log |
| A19 · A | python3 hierarchy/compositions.py 4 | A19_compositions.log |
| A15 · A | python3 hierarchy/sizes.py | A15_sizes.log |
| A16 · A | python3 crosscheck/fig41_render.py logs/A16_fig41_render.pdf | A16_fig41_render.log |
| A08 · A | env FAM=fan21 node --max-old-space-size=6500 hierarchy/checks.js 01222222222222 3 | A08_base_L3.log |
| A09 · A | node hierarchy/induction.js | A09_induction.log |
| A10 · A | node hierarchy/certnest.js 8 | A10_certnest.log |
| A11 · A | python3 hierarchy/certify.py | A11_certify.log |
| A12 · A | python3 hierarchy/certify_fib.py | A12_certify_fib.log |
| A14 · A | env FAM=fan21 node --max-old-space-size=6500 core/nest.js 01222222222222 7 1,2,3 | A14_nest_L7.log |
| A20 · A | python3 crosscheck/chain_check.py | A20_chain_check.log |
| A21 · A | python3 crosscheck/junction_actual.py | A21_junction_actual.log |
| A17 · A, given the spectre paper | python3 crosscheck/fig41_compare.py "$SMKGS_PDF" | A17_fig41_compare.log |
| A18 · A, given the spectre paper | python3 crosscheck/fig51_raster.py "$SMKGS_PDF" | A18_fig51_raster.log |
| A22 · A, with --kaplan | python3 crosscheck/kaplan_compare.py | A22_kaplan_compare.log |
| B01 · B | env FAM=fan21 node --max-old-space-size=6500 core/reduce.js 01222222222222 9 | B01_reduce_L9.log |
| B02 · B | env FAM=fan21 node --max-old-space-size=6500 hierarchy/checks.js 01222222222222 8 | B02_checks_L8.log |
| B03 · B | node --max-old-space-size=6500 hierarchy/synth.js hierarchy/combin_8.json 9 | B03_synth_L9.log |
| B04 · B | node --max-old-space-size=6500 hierarchy/synthown.js 9 | B04_synthown_L9.log |
| B05 · B | node --max-old-space-size=6500 core/hier2.js fan21 01222222222222 9 1,2,3,4,5,6 | B05_hier2_L9.log |
| B06 · B | env FAM=fan21 node --max-old-space-size=6500 core/nest.js 01222222222222 9 1,2,3,4,5,6 | B06_nest_L9.log |
| B07 · B | node --max-old-space-size=6500 hierarchy/synthnest.js 9 1,2,3,4,5,6 u8:4,u10:6,u20:8,u100:10,l1,l2,l3,l4,l1+2l2,3l1+2l3,l1+l2+l4,l2+l3+l5 | B07_synthnest_L9.log |
| B08 · B | node --max-old-space-size=6500 crosscheck/overlap.js 5 | B08_overlap_L5.log |
| B09 · B | bash -c "cd drawing && node --max-old-space-size=6500 checkmodel.js 3" | B09_checkmodel_L3.log |
| B10 · B | bash -c "cd drawing && node --max-old-space-size=6500 nestgap.js 7" | B10_nestgap_L7.log |
| B11 · B | bash -c "cd drawing && node --max-old-space-size=6500 nestrim.js fan21 01222222222222 7" | B11_nestrim_L7.log |
| B12 · B | bash -c "cd drawing && node --max-old-space-size=6500 onetile.js 5" | B12_onetile_L5.log |
| B13 · B | node --max-old-space-size=6500 crosscheck/overlap.js 7 all 6 | B13_overlap_L6_7.log |
| B14 · B | python3 drawing/drawcheck.py | B14_drawcheck.log |
| B15 · B | node --max-old-space-size=6500 hierarchy/induction.js 9 | B15_induction_L9.log |
The paper, and this site
The paper’s figures and PDF need TeX Live and Python 3 with matplotlib; this site, Python 3 with pymupdf, and poppler. It is written into out/site/.
cd paper && ./build.sh python3 proofmap/build.py
About this site
What has been checked, by what, and what has not: What has been checked. What changed each time this site was published: Changes.
To cite the paper: Justin Roughley, The Spectre Knot: one endless strand on an aperiodic monotile, draft (2026), https://cortado-j.github.io/SPECTRE_KNOT_PROOF/, with the date on the title page of the version you read.
This site is generated by proofmap/build.py from the sources, so it changes when they change:
- statements and proofs: the paper’s LaTeX,
paper/tex/spectre_knot.tex, converted for the web; the numbers are checked against the built PDF, and the build stops if they differ; - what a result cites: the references by number (
\cref) in its statement and proof, and in the sentence that leads into it where that sentence ends in a colon; a reference to a numbered equation counts as one to the result that states it; - the passages of the paper’s running text, between its numbered items, that proofs cite or whose terms statements use (its definitions in running text, the Reduction, and the paragraph after Proposition 8.4): the paper’s text, found by the start of each, which
proofmap/notes.jsongives with where each is shown; - the Lean declarations of a result: the paper-to-Lean table in
lean/README.md(32 rows); the Lean statements are quoted from the Lean files (867 declarations read, 619 of them theorems); - the computations: the table “Which script checks which statement” of
paper/code/README.md, each program linked to its file, with the logs of its steps aspaper/code/run_all.shnames them; - the Lean files in full (39 pages, one for each file of
lean/, in a reading order set inproofmap/build.py): the files as they are, with a name linked to its declaration by the same reading of the text as below, except where a declaration binds the name itself; - where each result, section and figure begins in the PDF: read from the built PDF (the results’ headings, and its outline);
- the figures: cut from the built PDF,
paper/spectre_knot.pdf, with their captions from the LaTeX; the drawing beside the overview’s title is drawn byproofmap/make_hero.pyfrom the paper’s own figure code (the same tiles and ribbons); - not made by the build, but generated by the AI system at Justin Roughley’s instruction: the page What has been checked (
proofmap/checked.html) and the line about AI on the overview (proofmap/status.html); - likewise, in
proofmap/notes.json: short labels for 4 untitled results, what part of 6 results the Lean covers (and, for 1 that it does not formalise, a related fact that it proves), and 29 reading aids; which results make up each step of the route (the ten steps of the public site’s Prove page), with a title and a one-sentence summary for each step. The reading aids and the summaries are AI-generated, and labelled where they appear. - the numbers on the overview, the depths and the chains of citations up to a main theorem: counted from the above when the site is built.
The layout follows the reader’s guide to the Lean proof of Fermat’s Last Theorem (tianyipeng.github.io/fermats-last-theorem): an overview with the statement and the top of the proof, the route step by step, the graph with a table, a page for every result, every declaration and every Lean file, and a search box.
Lean dependencies are read from the text, not from Lean itself: a declaration counts as named in a proof when its name is written there, in full, relative to the enclosing namespace or to an open, or as field notation x.foo when foo names exactly one declaration. Names used only through notation, instances or tactics are missed. No Lean was run to make this page.
Mathematics is typeset in the browser by MathJax.
Changes
What changed each time this site was published, newest first: in the paper, the Lean, the code and the pages themselves. Dates are UK dates. From 21 October 2026, each publication that changes the paper, its code or the Lean is tagged in the repository with its date, so that every published version of them can be found again.
22 October 2026
- Site: the picture of Figure 3, cut from the PDF, no longer includes Table 1, which sits just above it on the same page of the paper.
- Paper: Figure 2 marks the boxes of Theorems A and B and of the nest tiling as checked by Lean in part (shaded and dashed), as its caption now says, and the caption adds that Computation 7.5 is checked on the level-1 supertiles of
exact.py, taken as input; the box on boxes and the signature no longer names Lemma 4.4, which no proof uses. The sentence before Corollary 6.3 cites Proposition 6.2. Appendix A says that the script on the spectre paper's Figure 5.1 checks the encoding against Tables 1 to 3 and the labels on the panels' outlines against Table 4, and thathierarchy/letters.pyrepeats the inspection in the proof of Proposition 6.1. The paper is dated 22 October 2026 and still has 27 pages. - Lean: the README lists the Lean's check of the parent's rim under §7.1 (step (v) of the Reduction), since Proposition 2.4 itself is not formalised; it says that the statement file, with the three files it imports, holds every definition the main theorems use, and it counts arcs where Table 5 does. The guide to
Statement.leanuses the paper's E(P), and says that a strand of a block is what the paper calls an arc. The statement is unchanged. - Code: the README's table says that the compositions of Computation 7.3 are built from Tables 1 to 4.
- Site: the definitions that the paper makes in its running text, the Reduction of §7.1 and the paragraph after Proposition 8.4 are on this site: on the page of their step, in full on the pages of the results whose proofs cite them, in the contents and in the search; each result's page links the terms its statement uses. Step 2 also shows the other numbered items of §2.
- Site: Computation 7.5 is marked "Lean, in part" and Proposition 2.4 "not formalised", as the paper says; the overview and What has been checked say that the Lean re-runs Computation 7.5 on input data. The graph joins Proposition 6.1 to Proposition 6.2, and Proposition 6.2 to Corollary 6.3.
- Site: the reading aids of Theorem 9.1, Computations 7.3, 7.5 and 9.2, Proposition 2.4 and Lemmas 2.6 and 7.1, the wording of six more, and the summaries of steps 1, 2 and 6 now say what the paper says; the overview's drawing counts arcs, as the paper does; the Paper page shows the paper's Organisation again; the Code page gives the Lean's build times of its README; and each Lean declaration has a page of its own (17 pairs whose names differ only in a subscript shared one).
- Paper: 33 places where the paper compressed a step or left it to the reader are now spelled out; no result changes or moves. Among them: Theorem 2.1(b) says that the points where a level-1 supertile meets two others are those marked in the spectre paper's Figure 4.1, which Lemma 2.6 uses; the argument in §1 that no periodic tiling carries one strand; why the children of a supertile can be numbered by their places in the spectre paper's Figure 5.1; a direct argument for the vertex colouring that makes the crossing points of two tiles meet; why every edge of a patch is a rim edge or is shared, and how the pairing of a box arises (Lemma 4.1); the parities of the Fibonacci numbers, and the second distance in Lemma 6.4; what step (ii) of the Reduction is for, why a move is only a relabelling, and that each step back in Lemma 7.2 stays admissible; the tiling in which the Grandparent Lemma is proved, and the small steps of Proposition 8.4; and the "more precisely" sentence of Theorem B, now derived in its proof. Lemma 2.6 says that the motion takes a Mystic's first tile to the first tile, and Computation 9.2 the direction in which it follows a ribbon. Figure 2's Merging box gives both bounds of Theorem 9.1, and an aside after Computation 7.3, that its hooks can also be traced by hand, which the paper did not show, is gone. The paper now has 28 pages.
- Lean: the README says that the paper sketches, rather than takes as evident, the step from a move to an edge cut into three, which the Lean proves. The statement is unchanged.
- Site: on a phone, the pages of step 6, Proposition 6.1 and Lemma 6.4 no longer scroll sideways: a formula too wide for the screen gets a line of its own and scrolls sideways there, as displayed formulas already did. A long address among the cited works, or a long Lean name on a declaration's page, breaks to fit the screen; and the full stop or comma after a formula is no longer carried over to the start of the next line.
21 October 2026
- Paper: Appendix A gives the addresses of the public repository and of this site, in place of the ancillary files of a paper not on arXiv. Appendix B says that the AI system also searched the literature for related work, and that an AI system can reproduce published ideas without naming their source, so the paper may use an idea whose source it does not cite; its tool disclosure points to the run log for the versions of the software. Three references are made exact: the spectre paper's theorem, figure, section and page numbers refer to its published version; Tatham's paper is cited as arXiv version 2; the bohemian-miser project is cited at the commit read. The paper is dated 21 October 2026 and still has 22 pages.
- Code: every run of
run_all.shfirst records its date, system and tool versions, inlogs/A00_environment.log. The logs are those of a new full run (./run_all.sh --all), with the same results. - Lean: the README and the note on the
Statement.leanguide name Justin Roughley instead of "the owner". The statement is unchanged. - Site: the overview's title is "The Spectre Knot theorems and their proof". The page description says which tilings each theorem covers, and that the proof is a draft, not peer reviewed. About says how to cite the paper, and who wrote the parts of this site that are not generated; What has been checked no longer says that the paper gives the version of every tool. The repository has a
CITATION.cff, for GitHub's Cite this repository, and each publication from today is tagged with its date. - Site: a workflow in the repository,
.github/workflows/tag.yml, tags each publication; today's first is tagged2026-10-21. - Site: the README says that Justin Roughley is the author and is responsible for the work, and that the AI is not an author.
- Site: the overview's five cards are buttons: a click or tap anywhere on a card opens what its title names. The links inside a card still go to their own places; "contents" and "every file", which went where their cards go, are dropped.
- Site: only a publication that changes the paper, its code or the Lean is now tagged, so that each tag is a new version of them; the three tags given earlier today to publications that changed only the site are removed.
- Paper: the account of the use of AI, in the abstract, §1 and Appendix B, says that the author used an AI system at every stage, which did the detailed work while the author directed, guided and corrected it, in place of "the author and the AI system worked together"; the formalisation and the separate checks were written with the AI system, not by it. The paper is dated 21 October 2026 and still has 22 pages.
- Code: the README and the comments of two programs say "written with the AI system", not "by" it.
- Lean: the README says that Justin Roughley used an AI system to write the formalisation, and the note on the
Statement.leanguide that the guide was generated with an AI system. The statement is unchanged. - Site: What has been checked, the overview's line about AI, About and the README say that Justin Roughley used an AI system to write the proofs, the Lean and the programs, in place of "written by an AI system working with Justin Roughley"; the reading aids and the one-sentence summaries are labelled "AI-generated".
- Paper: the abstract says that, at the author's instruction, an AI system generated the proof, the programs, the formalisation and the text. Appendix B adds that the author chose where the crossing points sit on the edges, and says that the formalisation and the separate checks were generated by the AI system. The paper is dated 21 October 2026 and still has 22 pages.
- Code: the README and the comments of two programs say "generated by the AI system".
- Lean: the README says that an AI system generated the formalisation at Justin Roughley's instruction, and the note on the
Statement.leanguide says the same of the guide. The statement is unchanged. - Site: What has been checked, the overview's line about AI and About say that an AI system generated the proofs, the Lean and the programs at Justin Roughley's instruction.
- Paper: a revision for readability, from an AI-generated review applied at the author's instruction; no result changes and none is renumbered. Each section opens by saying what it does, §1 has an Organisation paragraph and §2 an index of notation, and terms are defined before they are used (arc and block in §1, own order, the corner B); the parts of the partition in §9 are called classes. §1 and Appendix A say exactly which computations are exact and which Lean repeats, and that the agreement with the spectre paper's figures is checked by scripts. The account of the use of AI in §1 and Appendix B says that, at the author's instruction, an AI system generated the programs, the proofs, the Lean formalisation, the figures and the text, and that the author asked the question, steered the work, made the choices and decisions, corrected what was generated and answers for the work.
- Paper: in the proof of the Zigzag Lemma the second connection is traced explicitly, as the symmetry it cited does not hold for odd n (the lemma is unchanged). The argument for Proposition 2.4 is headed Proof and shows why the rotations of the inner hexagons are unique; §7.1 states "a supertile is its composition" as the Reduction; §8 shows that the nest tiling's own hierarchy is its chain of blocks; §9 has a new subsection, Junctions (One strand is now §9.3), a check by hand of two rows of Table 6, and a proof of Theorem 9.1 that follows the sides.
- Paper: Figure 1 shows the pieces of one tile joining up in the blocks N_1, N_2 and N_3; Figures 3 to 5 have larger labels, and Figure 4 marks the junctions. Table captions are above the tables, "counter-clockwise" is "anticlockwise", the references print their DOIs, and Appendix A says that
exact.pyuses reflections as well as rotations. The paper is dated 21 October 2026 and has 27 pages. - Code: the README says that NumPy and SciPy are also used by the comparisons with the spectre paper's figures.
- Lean: the README follows the paper's new wording, and its table says that the Lean checks Computation 7.5 in part: the position of the crossover corner at level 1 is input, not checked. The statement is unchanged.
- Site: the proof map follows the paper: Computation 7.5 is marked as checked by Lean in part, and the reading aid for Computation 7.3 says Tables 1 to 4.
- Code:
hierarchy/compositions.pypoints to Section 9.2 for the junction map, now that §9 has its subsection Junctions. - Lean: the README points to §9.2, not §9.1, for the paper's route to the merging.
- Site: the graph of all the results fits the width of the page: its cards are arranged so that no arrows cross, set a little further apart and centred; in a narrow window it still scrolls sideways.
- Site: the overview's graph of the top of the proof draws Lemma 3.4 once (it was drawn twice, one card over the other, with its arrows doubled), and its cards are arranged so that no arrows cross.
20 October 2026
- Paper: shortened from 33 pages to 21, with the argument kept complete and every result on the path to Theorems A and B kept under the same number. Dropped: §5.2 (marks, skeletons, Proposition 5.4, Corollary 5.5), which only the second routes used; Remarks 3.5, 3.6, 7.7, 7.8, 9.5 and 10.1, cut to a sentence or two in §1, §10 or Appendix A; the outline, five illustrations, and the table of what was computed (Appendix A now points to
paper/code/README.md). New: a figure of the route of the proof (Fig. 2) and §3.3, Strands. - Paper: the paper and the Lean now take the same route, result by result. Lemma 7.2 ends as an induction principle; §7.1 states the finite check that Tables 2 and 3 agree; the Signature Theorem is stated from level 1; Theorem A's proof is in two steps, the second the one the Lean checks; Lemma 8.3 is proved from the tables; Lemma 9.4 says two edges; Theorem 9.1 includes its exactness (Table 5). Appendix B lists the differences that remain, all of them bookkeeping.
- Paper: the account of how the work was done with AI, and of what the Lean formalisation checks, moves from §1 to a new Appendix B, with a new Tool and computational resource disclosure listing the AI system, the proof assistant, the other software and the computing the checks need; §1 keeps a short note. The abstract and §1 say that the paper has not been peer reviewed, and §1 that the author is responsible for the paper, including its citations, and that the AI system is not an author. Appendix B says that no human has checked that the Lean's formal statements say what the paper's theorems say. Four references are corrected or completed.
- Lean: the statement changed, in its opening comment only: assumption (M1) also names step (ii) of §7.1 (children meet only in the sides they share), as the paper's Appendix B does. No definition or claim changes.
- Lean: the proofs follow the paper's. Lemma 7.1 crosses the new path of a cut by the Zigzag Lemma with n = 3, and shows directly that a cut creates no closed strand, so Proposition 5.4, dropped from the paper, is no longer needed here either: it is removed, with its reduced walk, and so are the skeleton walks, which only checked an earlier route again. Lemma 7.2 is one induction principle, used for both the signature and the junction map. Computation 7.3 and Proposition 7.4 are stated as the paper words them, and the induction step uses that form; a second kernel check of the 18 compositions is no longer needed. New statements in the paper's terms: Proposition 6.1 for the supertiles themselves, Lemma 4.4 for a tile, Lemma 4.1 for patches with the signature, and the corner A of a supertile as that of its Γ child. None of this touches
Statement.lean. - Site: every page says, under the menu, that this is a draft proof, not peer reviewed; so do the overview's opening paragraph and its line about AI.
- Site: the pages follow the shortened paper: the computations each result's page lists come from
paper/code/README.md, step 1 shows the new route figure, and step 10 shows §10 in full. - Site: a new page, What has been checked: what has been checked by Lean, by computer, by the AI and by a human, and what has not. The line under the menu on every page links to it, instead of to the public site's Made with AI page; so do the overview's line about AI, About and the search box. The public site now links here for everything about checking.
- Paper: the proof of the Signature Theorem (Theorem 7.6) cites Lemma 4.2 where it uses it, to read the box of a supertile off its composition; two phrases in the same proof are shorter, so the paper keeps its 21 pages.
- Site: the graph joins Lemmas 4.1 and 4.2 to the rest of the argument again, and fits the page without scrolling sideways.
- Paper: the contact address at the end of the paper is now cortado.just@gmail.com.
- Paper: the related work is wider, with eleven new references: Hooper on a family of Truchet tilings whose curves a renormalisation shows to be almost all closed; Gerdes on mirror curves; Gardner on the Conway–Penrose arcs; a second paper by Cline, and one by Gaenshirt, on girih interlace on Penrose tilings; Liu, Choi and Mahadevan on Hamiltonian cycles through every tile of finite patches; and Gross and Tucker on Celtic knotwork as alternating diagrams. §1 mentions knot mosaics (Lomonaco and Kauffman) and the Socolar–Taylor tile, and Appendix B cites
leancheckerandcomparator. The paper is dated 20 October 2026 and has 22 pages. - Paper: two statements about earlier work are corrected: on Penrose tiles, at most two Conway–Penrose curves of each colour fail to close (it said at most two in all); and the Hamiltonian cycles of Singh, Lloyd and Flicker go through every vertex of arbitrarily large regions of Ammann–Beenker tilings (it said every tile).
19 October 2026
- Lean: the statement changed: a new claim,
SignatureTheorem, states the paper's Signature Theorem (Thm 7.6) in the statement file. Every supertile of level 1 or more is a disc at its rim and has the signature at its crossover corners A and B = A + ω_m, with A placed as in Lemma 6.4. The definitions it uses (the rim ports, the signature itself, and what it means to be a disc at the rim) moved into the statement file unchanged. The ten earlier claims say what they said before. Assumption (M) is worded more exactly: (M1) covers levels 1 and above and says how the tiles are numbered, and (M2) gives the step from a tiling to a chain in which every edge is glued. - Lean: Lemma 9.4 is also proved as the paper states it, five edges from the ends of a side. Lemma 3.4 now says that the ports met going backwards along a strand are distinct. The induction behind Prop 7.4 makes the same moves as the paper's proof. The paper's two negative controls (corners two apart in Computation 7.3; junctions 12 and 16 exchanged in Computation 9.2) run as tests. Several comments are corrected. None of this changes what the claims say.
- Paper: the account of the formal verification (§1) lists the differences between the paper's proofs and the Lean's more fully. Small corrections in the proofs of Lemma 3.4, the Zigzag Lemma, Lemma 7.2 and Theorem A, in Definition 5.2, Proposition 5.4(c) and §7.1 (why §5 applies to the compositions), and in Appendix A.
- Site: the guide to the statement file explains the new claim and the definitions it uses. Proposition 5.4 and Remark 7.8 are marked as formalised in part. The table of how each Lean statement differs from the paper's is brought up to date.
15 October 2026
- Code: a new check runs Kaplan’s implementation of the spectre’s substitution, the program of the spectre authors’ interactive application, and finds the paper’s Table 1 and, tile for tile, the same supertiles up to level 4; and, from its tiles alone, the same vertices and side lengths of the level-1 supertiles. Two altered copies of that program are rejected. It downloads the program when run (
./run_all.sh --kaplan): the program is published without a licence, so it is not included. - Paper: §2 and the table What was computed mention this comparison.
- Lean: comparator, the Lean developers’ tool for judging whether proofs prove exactly the statements of a trusted file, confirms that the ten main theorems prove exactly the claims of the statement file, using only Lean’s standard axioms; the public repository’s checks now run it (
lean/tools/comparator.sh). A new theorem says that the construction of the supertiles never falls back on a default value, at any level. A new test shows that the same definitions do find closed strands when the decoration is changed: with the crossing moved to another corner, or with no crossing at all. The proofs no longer use lemma names that Lean has deprecated. What is proved is unchanged. - Lean: the statement changed: the link with actual tilings, assumption (M), is written out in its three parts, each with where the paper argues it; whole tilings have a type of their own, so that notions meant for finite patches cannot be applied to them; and a new claim, proved, says that the nest is a chain of supertiles in which every edge is eventually glued, so the final form of Theorem A applies to at least one tiling. The theorems say what they said before. The public repository’s checks now also run the slower tests.
- Paper: the account of the formal verification (§1) brought up to date: Lean also proves that the bound of Theorem 9.1 is exact, and Lemma 8.3(a) at the vertices of tiles; the assumption linking the formal statements to tilings has three parts.
- Site: each result’s Lean section, and the table on the Lean page, say how the Lean statement differs from the paper’s: the same, stronger, weaker, part of it, another form, or not in the paper. The pages of results that are not formalised say which part of assumption (M) they belong to.
- Site: a drawing beside the overview’s title: the block $N_2$ of the nest with its ribbons in fine lines, and the two strands through the first tile picked out.
- Lean: the build checks more. Each main theorem is pinned to its claim in the statement file; the statement file and the files it imports are recorded by their SHA-256, so a change to what is proved cannot pass unnoticed; names must be declared; more ways round Lean’s kernel are refused; and Lean’s
leancheckerreplays every declaration through the kernel. What is proved is unchanged. - Code: a new check, run whenever the paper’s programs or the Lean’s data change, confirms that the Lean’s data files are exactly what the programs generate.
- Lean: now also proves that the bound of Theorem 9.1 cannot be improved: the pieces of $N_b$ lie on exactly two strands of $N_{b+2}$, and, if $b$ is odd, of $N_{b+3}$ (the last two rows of Table 5). And Lemma 8.3(a), the Grandparent Lemma, at the vertices of tiles: every vertex of every tile of $N_b$ is surrounded by tiles of $N_{b+2}$.
- Site: five ways in on the overview; the paper’s contents, with the page of every section and result in the PDF; a page for every Lean file; a page for the code; a search box on every page.
- Site: this list of changes, linked at the foot of every page.
14 October 2026
- Site: a favicon: the tile, in the site’s green.
13 October 2026
- First publication: the paper, with every program its proof uses and their logs; the Lean formalisation of its combinatorial part; and this site.
- Site: an internal note removed from the source of the overview page.
From CHANGELOG.md in the repository, which has one commit for each publication: its history.
What has been checked
At Justin Roughley’s instruction, an AI system generated the proofs, the Lean and every program; the paper has not been peer reviewed. This page says what has been checked, by what, and what has not.
By Lean
The combinatorial heart of the proof is formalised in Lean 4, and Lean’s kernel checks every step. In a
combinatorial form, in which a patch of tiles is described by which edges are glued, the Lean proves that every
supertile has the signature (Theorem 7.6); that in the union of any chain of supertiles in which every
edge is eventually glued, every strand is two-way infinite (Theorem A), and that the nest is such a chain; that
the nest tiling, grown outwards from a single tile, each block sitting in the same place (child number 1) inside the
next, taken as the union of its blocks, is one two-way infinite strand (Theorem B), with the bounds of
Theorem 9.1, which are exact; and that every vertex of a tile of a block of the nest is surrounded by the
block two levels up (Lemma 8.3, at the vertices of tiles). Its kernel also re-runs the finite computations
these use (Computation 7.5 on the level-1 supertiles that exact.py computes, taken as input).
The build fails unless the main theorems rest only on Lean’s three standard axioms, each proves exactly its claim
in the statement file, that file and the files it imports are unchanged since their SHA-256 was recorded, and
leanchecker, replaying every declaration through the kernel, finds no problem. The public repository’s
checks also run comparator, the Lean developers’ tool for judging whether proofs prove exactly the statements of a
trusted file: what is proved.
The Lean does not cover the link to actual tilings of the plane: that the supertiles of a real spectre tiling are glued as the tables say, that a tiling whose supertiles fill the plane is the union of such a chain, and that the nest tiling fills the plane. The paper argues these in words; together they are the assumption (M) written at the top of the statement file: what the Lean checks, and what it does not.
Whether the right thing has been proved comes down to reading the statement file:
Statement.lean, line by line. Every Lean file in full: the
Lean.
By computer
Every computation the proof relies on is run by paper/code/run_all.sh, and has been re-run in full, with
its logs kept: every step of the run, with its log. Each result marked
computed names the program that checks it: which script
checks which statement.
The geometric computations were done twice, by two separate programs, one in floating point and one in exact arithmetic; like every program here, both were generated by the same AI system. A further check runs Kaplan’s implementation of the spectre’s substitution, the program of the spectre authors’ interactive application, and finds the paper’s Table 1 and, tile for tile, the same supertiles up to level 4. Beyond what the proof needs, every supertile of every kind was assembled by computer up to level 9, about 133 million tiles, and no strand closes.
Every tool used is listed in the paper’s Tool and computational resource disclosure, in Appendix B.
By the AI
At Justin Roughley’s instruction, the AI reviewed the written argument several times, and the errors it found were fixed.
By a human
Justin Roughley has read parts of the paper and spot-checked pictures and counts.
What has not been checked
The paper has not been peer reviewed. Most of the proof has not been reviewed by a human, and no professional mathematician has reviewed it. No human has checked that the Lean’s statements say what the theorems say.
Result by result
Every result’s page says what supports it: argued in words in the paper, computed by a program, or cited from the spectre paper, with Lean where the Lean also checks it (Lean, in part where it checks part). The paper’s contents list every result with its marks.
How the work was done with AI, and who did what: the public site’s Made with AI page.