Overview › Lean › The nest and Theorem B (§§8–9)
lean/ SpectreKnot/NewWalk.lean
362 lines · 20 declarations, each with its own page · on GitHub · hide comments
Walks 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). When an edge shared by two children is cut into three, each child gets two new vertices on it. The ribbon from a port at a new vertex follows one of the two connections of the zigzag lemma along the new path, for one or two crossings, to a port at an old vertex next to the cut, and runs on from there (step0_2F, …). So a cut creates no closed strand (noLoops). And the strand through a new vertex's hook is the strand that, before the cut, ran through the hook at the old vertex next to it, the port of the same hand: e₀ + 2 follows the old e₀, and e₀ + 1 the old e₀ + 1 (and the same on the other side; nw0_2F, …). That carries the junction map (StepMap.lean) through moves.
← SpectreKnot/ParentSig.lean SpectreKnot/StepMap.lean →
All 39 files, and the declarations of this one Start here Statement.lean 476 Axioms.lean 128 The main theorems ProofA.lean 248 ProofB.lean 550 ProofStrand.lean 749 ProofChain.lean 717 ProofExact.lean 420 ProofGrand.lean 475 Strands, boxes and gluing (§§3–5) Basic.lean 52 Strands.lean 189 Box.lean 67 Gluing.lean 162 Zigzag.lean 126 Side lengths (§6) Lengths.lean 286 Compositions and lengthening (§7) Compose.lean 184 CompFull.lean 99 Subdivide.lean 893 Lens.lean 183 Move.lean 710 Signature.lean 298 CompSig.lean 612 Parity.lean 632 Supertiles and Theorem A (§7) PatchSig.lean 197 ComposeTiles.lean 277 ParentRim.lean 516 Reverse.lean 178 Bridge.lean 438 ParentSig.lean 399 The nest and Theorem B (§§8–9) NewWalk.lean 362 fullReach_step fullReach_first Cut.OK.port_reach Cut.OK.step0_2F Cut.OK.step0_2T Cut.OK.step0_1T Cut.OK.step0_1F Cut.OK.step1_2F Cut.OK.step1_2T Cut.OK.step1_1T Cut.OK.step1_1F Cut.OK.nw0_2F Cut.OK.nw0_2T Cut.OK.nw0_1T Cut.OK.nw0_1F Cut.OK.nw1_2F Cut.OK.nw1_2T Cut.OK.nw1_1T Cut.OK.nw1_1F Cut.OK.noLoops StepMap.lean 615 Linked.lean 218 NestStep.lean 273 Turn.lean 513 Tests Tests.lean 261 TestsSlow.lean 19 Generated data, and the root file Data/Pattern.lean 76 Data/Clusters.lean 59 Data/Level2.lean 33 SpectreKnot.lean 33
2 Walks through the two new vertices of a cut edge (paper Lemma 7.1: a cut creates no closed strand; Lemma 9.3: the new
3 vertices). When an edge shared by two children is cut into three, each child gets two new vertices on it. The ribbon
4 from a port at a new vertex follows one of the two connections of the zigzag lemma along the new path, for one or two
5 crossings, to a port at an old vertex next to the cut, and runs on from there (`step0_2F`, …). So a cut creates no
6 closed strand (`noLoops`). And the strand through a new vertex's hook is the strand that, before the cut, ran through
7 the hook at the old vertex next to it, the port of the same hand: `e₀ + 2` follows the old `e₀`, and `e₀ + 1` the old
8 `e₀ + 1` (and the same on the other side; `nw0_2F`, …). That carries the junction map (`StepMap.lean`) through moves.
12 namespace SpectreKnot.Gluing
14 /-- The first step of a walk, then the rest: if from `x` the piece and then the crossing lead to `y`, and the walk
15 from `y` ends at `r`, then the walk from `x` ends at `r`. -/
17 (rest : G.FullReach y r) : G.FullReach x r := by
18 obtain ⟨k, rest_walk⟩ := rest
19 exact ⟨k + 1 , .step first_step rest_walk⟩
21 /-- 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
24 (walk : G.FullReach x r) : G.FullReach y r := by
25 obtain ⟨k, walk_k⟩ := walk
28 -- the walk cannot stop at once: its first crossing exists
29 rw [first_step] at at_rim; contradiction
30 | step step_to rest_walk =>
31 -- the walk's first step is the same step, to `y`
32 rw [first_step] at step_to
33 simp only [Option.some.injEq] at step_to
39 set_option linter.unusedSectionVars false
41 -- `ok`: the cut `κ` can be made in `G`
46 /-- A walk of `G` from an actual port, carried into the cut gluing: it starts and ends at the same ports, with
47 positions after the cut moved on by 2. -/
50 obtain ⟨k, walk_k⟩ := walk
54 -- `shared`: the cut edge is shared by two children, `c₀` and `c₁`
55 variable (shared : κ.two = true )
58 /-! ### From a new port to an old one -/
60 /-- New vertex `e₀ + 2` of `c₀`, port `L`: through the new hook and across new edge `e₀ + 2`, the ribbon reaches
61 `R_{c₁}` at the old vertex `e₁`, and runs on from there. -/
64 -- the cut edge is not the last edge of `c₀`
65 have e₀_succ_lt := ok.e₀
66 simp only [Cut.port , ok.sh_c₁_le shared (Nat.le_refl _)] at walk
68 rw [ok.tau_new₀ (by omega ) (by omega ), Bool.not_false, sigmaR , ok.mate_new₀ (by omega ), ite_eq_left shared]
71 /-- New vertex `e₀ + 2` of `c₀`, port `R`: across new edges `e₀ + 1` and `e₁ + 2`, through the new hook of `c₁` at
72 `e₁ + 2`, the ribbon reaches `R_{c₀}` at the old vertex `e₀`, and runs on from there. -/
75 -- the cut edge is not the last edge of `c₀`
76 have e₀_succ_lt := ok.e₀
77 -- nor is its mate the last edge of `c₁`
78 have e₁_succ_lt := ok.e₁ shared
79 simp only [Cut.port , ok.sh_c₀_le (Nat.le_refl _)] at walk
81 · rw [ok.tau_new₀ (by omega ) (by omega ), Bool.not_true, sigmaL , ok.E_c₀, show κ.e₀ + 2 = (κ.e₀ + 1 ) + 1 from rfl ,
82 prv_succ' , ok.mate_new₀ (by omega ), ite_eq_left shared]
83 simp only [Option.map_some, show κ.e₁ + 2 - 1 = κ.e₁ + 1 by omega , ok.E_c₁ shared, nxt_of_lt' (show κ.e₁ + 1 + 1 <
84 (G.E κ.c₁ + 2 ) by omega )]
85 · rw [ok.tau_new₁ shared (by omega ) (by omega ), Bool.not_false, sigmaR , ok.mate_new₁ shared (by omega )]
88 /-- New vertex `e₀ + 1` of `c₀`, port `R`: through the new hook and across new edge `e₀`, the ribbon reaches `L_{c₁}`
89 at the old vertex `e₁ + 1`, and runs on from there. -/
92 -- the cut edge is not the last edge of `c₀`
93 have e₀_succ_lt := ok.e₀
94 -- nor is its mate the last edge of `c₁`
95 have e₁_succ_lt := ok.e₁ shared
96 simp only [Cut.port , ok.sh_c₁_gt shared (show κ.e₁ < κ.e₁ + 1 by omega )] at walk
98 rw [ok.tau_new₀ (by omega ) (by omega ), Bool.not_true, sigmaL , prv_succ' , ok.mate_cut₀, ite_eq_left shared]
99 simp only [Option.map_some, ok.E_c₁ shared, nxt_of_lt' (show κ.e₁ + 2 + 1 < G.E κ.c₁ + 2 by omega )]
101 /-- New vertex `e₀ + 1` of `c₀`, port `L`: across new edges `e₀ + 1` and `e₁`, through the new hook of `c₁` at
102 `e₁ + 1`, the ribbon reaches `L_{c₀}` at the old vertex `e₀ + 1`, and runs on from there. -/
105 -- the cut edge is not the last edge of `c₀`
106 have e₀_succ_lt := ok.e₀
107 -- nor is its mate the last edge of `c₁`
108 have e₁_succ_lt := ok.e₁ shared
109 simp only [Cut.port , ok.sh_c₀_gt (show κ.e₀ < κ.e₀ + 1 by omega )] at walk
111 · rw [ok.tau_new₀ (by omega ) (by omega ), Bool.not_false, sigmaR , ok.mate_new₀ (by omega ), ite_eq_left shared]
112 simp only [Option.map_some, show κ.e₁ + 2 - 1 = κ.e₁ + 1 by omega ]
113 · rw [ok.tau_new₁ shared (by omega ) (by omega ), Bool.not_true, sigmaL , prv_succ' , ok.mate_cut₁ shared]
114 simp only [Option.map_some, ok.E_c₀, nxt_of_lt' (show κ.e₀ + 2 + 1 < G.E κ.c₀ + 2 by omega )]
116 /-- New vertex `e₁ + 2` of `c₁`, port `L`: through the new hook and across new edge `e₁ + 2`, the ribbon reaches
117 `R_{c₀}` at the old vertex `e₀`, and runs on from there. -/
120 -- the cut edge is not the last edge of `c₀`
121 have e₀_succ_lt := ok.e₀
122 simp only [Cut.port , ok.sh_c₀_le (Nat.le_refl _)] at walk
124 rw [ok.tau_new₁ shared (by omega ) (by omega ), Bool.not_false, sigmaR , ok.mate_new₁ shared (by omega )]
127 /-- New vertex `e₁ + 2` of `c₁`, port `R`: across new edges `e₁ + 1` and `e₀ + 2`, through the new hook of `c₀` at
128 `e₀ + 2`, the ribbon reaches `R_{c₁}` at the old vertex `e₁`, and runs on from there. -/
131 -- the cut edge is not the last edge of `c₀`
132 have e₀_succ_lt := ok.e₀
133 -- nor is its mate the last edge of `c₁`
134 have e₁_succ_lt := ok.e₁ shared
135 simp only [Cut.port , ok.sh_c₁_le shared (Nat.le_refl _)] at walk
137 · rw [ok.tau_new₁ shared (by omega ) (by omega ), Bool.not_true, sigmaL , ok.E_c₁ shared,
138 show κ.e₁ + 2 = (κ.e₁ + 1 ) + 1 from rfl , prv_succ' , ok.mate_new₁ shared (by omega )]
139 simp only [Option.map_some, show κ.e₀ + 2 - 1 = κ.e₀ + 1 by omega , ok.E_c₀,
141 · rw [ok.tau_new₀ (by omega ) (by omega ), Bool.not_false, sigmaR , ok.mate_new₀ (by omega ), ite_eq_left shared]
144 /-- New vertex `e₁ + 1` of `c₁`, port `R`: through the new hook and across new edge `e₁`, the ribbon reaches `L_{c₀}`
145 at the old vertex `e₀ + 1`, and runs on from there. -/
148 -- the cut edge is not the last edge of `c₀`
149 have e₀_succ_lt := ok.e₀
150 -- nor is its mate the last edge of `c₁`
151 have e₁_succ_lt := ok.e₁ shared
152 simp only [Cut.port , ok.sh_c₀_gt (show κ.e₀ < κ.e₀ + 1 by omega )] at walk
154 rw [ok.tau_new₁ shared (by omega ) (by omega ), Bool.not_true, sigmaL , prv_succ' , ok.mate_cut₁ shared]
155 simp only [Option.map_some, ok.E_c₀, nxt_of_lt' (show κ.e₀ + 2 + 1 < G.E κ.c₀ + 2 by omega )]
157 /-- New vertex `e₁ + 1` of `c₁`, port `L`: across new edges `e₁ + 1` and `e₀`, through the new hook of `c₀` at
158 `e₀ + 1`, the ribbon reaches `L_{c₁}` at the old vertex `e₁ + 1`, and runs on from there. -/
161 -- the cut edge is not the last edge of `c₀`
162 have e₀_succ_lt := ok.e₀
163 -- nor is its mate the last edge of `c₁`
164 have e₁_succ_lt := ok.e₁ shared
165 simp only [Cut.port , ok.sh_c₁_gt shared (show κ.e₁ < κ.e₁ + 1 by omega )] at walk
167 · rw [ok.tau_new₁ shared (by omega ) (by omega ), Bool.not_false, sigmaR , ok.mate_new₁ shared (by omega )]
168 simp only [Option.map_some, show κ.e₀ + 2 - 1 = κ.e₀ + 1 by omega ]
169 · rw [ok.tau_new₀ (by omega ) (by omega ), Bool.not_true, sigmaL , prv_succ' , ok.mate_cut₀, ite_eq_left shared]
170 simp only [Option.map_some, ok.E_c₁ shared, nxt_of_lt' (show κ.e₁ + 2 + 1 < G.E κ.c₁ + 2 by omega )]
172 /-! ### The same strand as before the cut (Lemma 9.3) -/
174 /-- New vertex `e₀ + 2` of `c₀`, port `L`: the walk from `L(e₀ + 2)` in the cut gluing ends where the walk from the
175 old `L(e₀)` ended in `G` (when `e₀` is not a corner of `c₀`). -/
176 theorem nw0_2F (not_corner : G.corner κ.c₀ κ.e₀ = false ) {r : GPort } (old_walk : G.FullReach (κ.c₀, κ.e₀, false ) r) :
178 -- the mate of the cut edge is an actual edge of an actual child
179 obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared
180 -- in `G`: through the hook at `e₀` to `R_{c₀}(e₀)`, then across the cut edge to `R_{c₁}(e₁)`
181 have first_step : G.sigma (G.tau (κ.c₀, κ.e₀, false )) = some (κ.c₁, κ.e₁, true ) := by
183 -- the cut edge is edge `e₁` of `c₁`
184 have cut_mate := ok.mate
185 rw [ite_eq_left shared] at cut_mate
187 -- in the cut gluing, one step from `L(e₀ + 2)` reaches `R_{c₁}(e₁)` too; from there, the rest of the old walk
188 exact ok.step0_2F shared (ok.port_reach ⟨c₁_lt, e₁_lt⟩ (fullReach_first first_step old_walk))
190 /-- New vertex `e₀ + 2` of `c₀`, port `R`: the walk from `R(e₀ + 2)` in the cut gluing ends where the walk from the
191 old `R(e₀)` ended in `G`. -/
192 theorem nw0_2T {r : GPort } (old_walk : G.FullReach (κ.c₀, κ.e₀, true ) r) :
194 -- the cut edge is not the last edge of `c₀`
195 have e₀_succ_lt := ok.e₀
196 -- two steps from `R(e₀ + 2)` reach `R_{c₀}(e₀)`; from there, the old walk
197 exact ok.step0_2T shared (ok.port_reach ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega ⟩ old_walk)
199 /-- New vertex `e₀ + 1` of `c₀`, port `R`: the walk from `R(e₀ + 1)` in the cut gluing ends where the walk from the
200 old `R(e₀ + 1)` ended in `G` (when the old `e₀ + 1` is not a corner of `c₀`). -/
201 theorem nw0_1T (not_corner : G.corner κ.c₀ (κ.e₀ + 1 ) = false ) {r : GPort }
202 (old_walk : G.FullReach (κ.c₀, κ.e₀ + 1 , true ) r) :
204 -- the mate of the cut edge is an actual edge of an actual child
205 obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared
206 -- and not its last edge
207 have e₁_succ_lt := ok.e₁ shared
208 -- in `G`: through the hook at the old `e₀ + 1` to `L`, then across the cut edge to `L_{c₁}(e₁ + 1)`
209 have first_step : G.sigma (G.tau (κ.c₀, κ.e₀ + 1 , true )) = some (κ.c₁, κ.e₁ + 1 , false ) := by
211 -- the cut edge is edge `e₁` of `c₁`
212 have cut_mate := ok.mate
213 rw [ite_eq_left shared] at cut_mate
216 -- 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
218 exact ok.step0_1T shared
219 (ok.port_reach ⟨c₁_lt, show κ.e₁ + 1 < G.E κ.c₁ by omega ⟩ (fullReach_first first_step old_walk))
221 /-- New vertex `e₀ + 1` of `c₀`, port `L`: the walk from `L(e₀ + 1)` in the cut gluing ends where the walk from the
222 old `L(e₀ + 1)` ended in `G`. -/
223 theorem nw0_1F {r : GPort } (old_walk : G.FullReach (κ.c₀, κ.e₀ + 1 , false ) r) :
225 -- the cut edge is not the last edge of `c₀`
226 have e₀_succ_lt := ok.e₀
227 -- two steps from `L(e₀ + 1)` reach `L_{c₀}` at the old `e₀ + 1`; from there, the old walk
228 exact ok.step0_1F shared (ok.port_reach ⟨ok.c₀, show κ.e₀ + 1 < G.E κ.c₀ by omega ⟩ old_walk)
230 /-- New vertex `e₁ + 2` of `c₁`, port `L`: the walk from `L(e₁ + 2)` in the cut gluing ends where the walk from the
231 old `L(e₁)` ended in `G` (when `e₁` is not a corner of `c₁`). -/
232 theorem nw1_2F (not_corner : G.corner κ.c₁ κ.e₁ = false ) {r : GPort } (old_walk : G.FullReach (κ.c₁, κ.e₁, false ) r) :
234 -- the cut edge is not the last edge of `c₀`
235 have e₀_succ_lt := ok.e₀
236 -- the cut edge's mate is glued back to it
237 obtain ⟨_, _, mate_back⟩ := ok.two_mate shared
238 -- in `G`: through the hook at `e₁` to `R_{c₁}(e₁)`, then across the cut edge to `R_{c₀}(e₀)`
239 have first_step : G.sigma (G.tau (κ.c₁, κ.e₁, false )) = some (κ.c₀, κ.e₀, true ) := by
241 -- in the cut gluing, one step from `L(e₁ + 2)` reaches `R_{c₀}(e₀)` too; from there, the rest of the old walk
242 exact ok.step1_2F shared
243 (ok.port_reach ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega ⟩ (fullReach_first first_step old_walk))
245 /-- New vertex `e₁ + 2` of `c₁`, port `R`: the walk from `R(e₁ + 2)` in the cut gluing ends where the walk from the
246 old `R(e₁)` ended in `G`. -/
247 theorem nw1_2T {r : GPort } (old_walk : G.FullReach (κ.c₁, κ.e₁, true ) r) :
249 -- the mate of the cut edge is an actual edge of an actual child
250 obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared
251 -- two steps from `R(e₁ + 2)` reach `R_{c₁}(e₁)`; from there, the old walk
252 exact ok.step1_2T shared (ok.port_reach ⟨c₁_lt, e₁_lt⟩ old_walk)
254 /-- New vertex `e₁ + 1` of `c₁`, port `R`: the walk from `R(e₁ + 1)` in the cut gluing ends where the walk from the
255 old `R(e₁ + 1)` ended in `G` (when the old `e₁ + 1` is not a corner of `c₁`). -/
256 theorem nw1_1T (not_corner : G.corner κ.c₁ (κ.e₁ + 1 ) = false ) {r : GPort }
257 (old_walk : G.FullReach (κ.c₁, κ.e₁ + 1 , true ) r) :
259 -- the cut edge is not the last edge of `c₀`
260 have e₀_succ_lt := ok.e₀
261 -- the cut edge's mate is glued back to it
262 obtain ⟨_, _, mate_back⟩ := ok.two_mate shared
263 -- in `G`: through the hook at the old `e₁ + 1` to `L`, then across the cut edge to `L_{c₀}(e₀ + 1)`
264 have first_step : G.sigma (G.tau (κ.c₁, κ.e₁ + 1 , true )) = some (κ.c₀, κ.e₀ + 1 , false ) := by
267 -- 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
269 exact ok.step1_1T shared
270 (ok.port_reach ⟨ok.c₀, show κ.e₀ + 1 < G.E κ.c₀ by omega ⟩ (fullReach_first first_step old_walk))
272 /-- New vertex `e₁ + 1` of `c₁`, port `L`: the walk from `L(e₁ + 1)` in the cut gluing ends where the walk from the
273 old `L(e₁ + 1)` ended in `G`. -/
274 theorem nw1_1F {r : GPort } (old_walk : G.FullReach (κ.c₁, κ.e₁ + 1 , false ) r) :
276 -- the mate of the cut edge is an actual edge of an actual child
277 obtain ⟨c₁_lt, _, _⟩ := ok.two_mate shared
278 -- and not its last edge
279 have e₁_succ_lt := ok.e₁ shared
280 -- two steps from `L(e₁ + 1)` reach `L_{c₁}` at the old `e₁ + 1`; from there, the old walk
281 exact ok.step1_1F shared (ok.port_reach ⟨c₁_lt, show κ.e₁ + 1 < G.E κ.c₁ by omega ⟩ old_walk)
285 /-! ### A cut creates no closed strand (Lemma 7.1) -/
287 /-- **A cut creates no closed strand** (the end of the proof of Lemma 7.1). If the walk of `G` from every port reaches
288 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
289 `G` (`Sim.reach`). From a port at a new vertex it follows one of the two connections along the new path, for one or
290 two crossings, to a port at an old vertex (`step0_2F`, …); or, if the cut edge lies on the rim, it leaves at once,
291 through the new hook. -/
292 theorem noLoops (no_loops : ∀ x, G.Valid x → ∃ r, G.FullReach x r) :
294 -- the cut edge is not the last edge of `c₀`
296 -- from the image of a port of `G`: the image of its walk
297 have old : ∀ y, G.Valid y → ∃ r, (subdiv G κ).FullReach (κ.port y) r := fun y y_valid => by
298 obtain ⟨r, walk⟩ := no_loops y y_valid
299 exact ⟨κ.port r, ok.port_reach y_valid walk⟩
300 rintro ⟨c, v, s⟩ ⟨c_lt, v_lt⟩
301 by_cases new₀ : c = κ.c₀ ∧ κ.e₀ < v ∧ v ≤ κ.e₀ + 2
302 · obtain ⟨rfl , v_gt, v_le⟩ := new₀
303 obtain ⟨i, i_ge, i_le, rfl ⟩ : ∃ i, 1 ≤ i ∧ i ≤ 2 ∧ v = κ.e₀ + i := ⟨v - κ.e₀, by omega , by omega , by omega ⟩
304 by_cases shared : κ.two = true
305 · -- the mate of the cut edge is an actual edge of an actual child
306 obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared
307 -- and not its last edge
308 have e₁_succ_lt := ok.e₁ shared
309 obtain rfl | rfl : i = 1 ∨ i = 2 := by omega
311 · -- `L(e₀ + 1)`: to `L_{c₀}` at the old `e₀ + 1`
312 obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀ + 1 , false ) ⟨ok.c₀, e₀_lt⟩
313 exact ⟨r, ok.step0_1F shared walk⟩
314 · -- `R(e₀ + 1)`: to `L_{c₁}` at the old `e₁ + 1`
315 obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁ + 1 , false ) ⟨c₁_lt, e₁_succ_lt⟩
316 exact ⟨r, ok.step0_1T shared walk⟩
318 · -- `L(e₀ + 2)`: to `R_{c₁}(e₁)`
319 obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁, true ) ⟨c₁_lt, e₁_lt⟩
320 exact ⟨r, ok.step0_2F shared walk⟩
321 · -- `R(e₀ + 2)`: to `R_{c₀}(e₀)`
322 obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀, true ) ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega ⟩
323 exact ⟨r, ok.step0_2T shared walk⟩
324 · -- the cut edge lies on the rim: through the new hook, onto a new rim edge
325 refine ⟨(subdiv G κ).tau (κ.c₀, κ.e₀ + i, s), 0 , .stop ?_⟩
326 rw [ok.tau_new₀ i_ge i_le]
328 · -- from `L` to `R`, on the new edge `e₀ + i`
329 rw [Bool.not_false, sigmaR , ok.mate_new₀ i_le, ite_eq_right shared]; rfl
330 · -- from `R` to `L`, on the new edge `e₀ + i - 1`
332 ok.mate_new₀ (by omega ), ite_eq_right shared]; rfl
333 · by_cases new₁ : κ.two = true ∧ c = κ.c₁ ∧ κ.e₁ < v ∧ v ≤ κ.e₁ + 2
334 · obtain ⟨shared, rfl , v_gt, v_le⟩ := new₁
335 -- the mate of the cut edge is an actual edge of an actual child
336 obtain ⟨c₁_lt, e₁_lt, _⟩ := ok.two_mate shared
337 -- and not its last edge
338 have e₁_succ_lt := ok.e₁ shared
339 obtain rfl | rfl : v = κ.e₁ + 1 ∨ v = κ.e₁ + 2 := by omega
341 · -- `L(e₁ + 1)`: to `L_{c₁}` at the old `e₁ + 1`
342 obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁ + 1 , false ) ⟨c₁_lt, e₁_succ_lt⟩
343 exact ⟨r, ok.step1_1F shared walk⟩
344 · -- `R(e₁ + 1)`: to `L_{c₀}` at the old `e₀ + 1`
345 obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀ + 1 , false ) ⟨ok.c₀, e₀_lt⟩
346 exact ⟨r, ok.step1_1T shared walk⟩
348 · -- `L(e₁ + 2)`: to `R_{c₀}(e₀)`
349 obtain ⟨r, walk⟩ := old (κ.c₀, κ.e₀, true ) ⟨ok.c₀, show κ.e₀ < G.E κ.c₀ by omega ⟩
350 exact ⟨r, ok.step1_2F shared walk⟩
351 · -- `R(e₁ + 2)`: to `R_{c₁}(e₁)`
352 obtain ⟨r, walk⟩ := old (κ.c₁, κ.e₁, true ) ⟨c₁_lt, e₁_lt⟩
353 exact ⟨r, ok.step1_2T shared walk⟩
354 · -- an old vertex: the image of a port of `G`
355 obtain ⟨u, u_lt, shifted⟩ := ok.preimage v_lt new₀ new₁
356 obtain ⟨r, walk⟩ := old (c, u, s) ⟨c_lt, u_lt⟩
362 end SpectreKnot.Gluing
← SpectreKnot/ParentSig.lean SpectreKnot/StepMap.lean →