The arcs of a chain of gadgets
ProvedRhoMin.arc_casesPositions are natural numbers and a permutation is given by its value function . The digraph on has an arc when and is even (a P-edge leaving its even end), or when and is odd (a V-edge leaving its odd end). A path is a sequence of distinct positions in which each step is an arc.
Let be the value function of a chain of gadgets starting at an even position : the -th gadget starts at (with and ), wraps an interior of odd size that fixes its two corners, and has joint , gates and , interior block and corners , ; optionally one fixed point is appended.
Let be an arc of between two positions of the chain. Then for some either and both lie in the block , or the arc is one of
This list is the only information about a chain that the later path analysis uses.
Formalization Note The chain is a structure Pieces (offset, , sizes, interiors, the flag for the appended point) and the hypothesis Fits f P says that has the values of that chain on its positions.
import Definitions.Def_RhoMin_Defs
import Definitions.Def_RhoMin_Dir
import Definitions.Def_RhoMin_Piece
import Definitions.Def_RhoMin_Orient
import Definitions.Def_RhoMin_Gadget
import Mathlib.Order.Interval.Finset.Nat
import Mathlib.Data.Fintype.Perm
import Mathlib.Data.Fintype.Card
import Mathlib.Data.List.Nodup
import Mathlib.Data.Nat.Find
import Mathlib.Data.List.FinRange
import Mathlib.Data.Finset.Lattice.Fold
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.Count
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Algebra.Order.BigOperators.Group.Finset
open RhoMin
variable {f : ℕ → ℕ} {P : Pieces}theorem RhoMin.arc_cases (hF : Fits f P) {u v : ℕ} (hu : u ∈ P.toData.X) (hv : v ∈ P.toData.X)
(h : Arc f u v) :
∃ j < P.K,
(P.offs j + 2 ≤ u ∧ u ≤ P.offs j + P.r j + 1 ∧ P.offs j + 2 ≤ v ∧ v ≤ P.offs j + P.r j + 1) ∨
(u = P.offs j ∧ v = P.offs j + 1) ∨ (u = P.offs j + 2 ∧ v = P.offs j + 1) ∨
(u = P.offs j + P.r j + 1 ∧ v = P.offs j + P.r j + 2) ∨
(u = P.offs j + 1 ∧ v = P.offs j + P.r j + 1) ∨ (u = P.offs j + P.r j + 2 ∧ v = P.offs j) ∨
(u = P.offs j + P.r j + 2 ∧ v = P.offs j + 2) ∨
(u = P.offs (j + 1) ∧ v = P.offs j + P.r j + 2) ∨ (u = P.offs j + 1 ∧ v = P.offs (j + 1)) := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-2
Setting. Let be an arbitrary function on the natural numbers, and let be an arbitrary "pieces" record, consisting of: a natural number ; a natural number ; a function (written ); a function (written ); and a Boolean flag . Define the offsets
so and . Define the finite set of natural numbers
For natural numbers and a function define the "gadget value"
Define the relation on natural numbers by: holds if and only if
The parity condition is on the first argument only, so the relation is not symmetric in general; never holds.
Hypothesis 1 ( fits ). All eight of the following hold:
- is even;
- for every : is odd (hence );
- for every and every : ;
- for every and all : implies (so restricted to is a bijection of that set to itself, given 3);
- for every : ;
- for every : (the subtraction is not truncated, since );
- for every and every :
that is, , , for , and ; 8. if is true, then .
No condition is placed on outside (together with the point when is true), nor on , for , nor on for .
Hypotheses 2–4. and are natural numbers with , , and .
Conclusion. There exists a natural number with such that at least one of the following nine alternatives holds (the alternatives are joined by inclusive "or"):
- and ;
- and ;
- and ;
- and ;
- and ;
- and ;
- and ;
- and ;
- and .
Here ; in alternatives 8 and 9 the index may equal .
Degenerate cases. When there is no admissible , so the conclusion is false; in that case is empty (if is false) or (if is true), so the hypotheses and cannot hold simultaneously and the statement is vacuous. The statement does not assert which alternative holds, nor that is unique.