Ports: a chain of gadgets satisfies the abstract chain conditions
ProvedRhoMin.isChain_of_fitsPositions 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.
An abstract chain consists of a finite set of positions, a number of pieces, and for each two gates and an interior block with corners , together with joints . The -th piece is . For a digraph on , the chain conditions say that the pieces are pairwise disjoint, the joints are distinct and lie in no piece, every position of is a joint or lies in a piece, the gates are distinct and not in the block, and the only arcs of within that cross the boundary of a piece or of a block are the port arcs: into only and ; out of only and ; into only and ; out of only and .
Let be the value function of a chain of gadgets, with joints , gates , interior blocks and corners as in Lemma 4.5 of the paper. Then these data form an abstract chain for the digraph . In particular, for every :
- the only arcs into the piece from outside are and ;
- the only arcs out of are and ;
- the only arcs into the block from outside are and ;
- the only arcs out of are and .
All later results about paths in a chain are proved from these conditions alone.
Formalization Note The conclusion is IsChain (Arc f) P.toData, which also records the disjointness and covering facts listed above.
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.isChain_of_fits (hF : Fits f P) : IsChain (Arc f) P.toData := by sorry
Read-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 . 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.
Hypothesis ( fits ). All eight of the following hold:
- is even;
- for every : is odd (hence );
- for every and every : ;
- for every and all : implies ;
- 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 . When the hypothesis reduces to: is even, and if is true.
Data appearing in the conclusion. From form, for every :
So is the set of the consecutive integers (empty if ), and consists of , and .
Conclusion. These data form a chain for the relation with pieces; that is, all eleven of the following hold:
- (cover) for every : , or there exists such that or ;
- for all and with , no element of belongs to ;
- for all and all : ;
- for all and : implies ;
- for all : ;
- for all : ;
- for all : ;
- (entering ) for all and all with , and : either ( and ) or ( and );
- (leaving ) for all and all with , and : either ( and ) or ( and );
- (entering ) for all and all with , and : either ( and ) or ( and );
- (leaving ) for all and all with , and : either ( and ) or ( and ).
Conditions 8–11 only constrain pairs that both lie in ; they are implications listing the only possible forms of such an arc and do not assert that the listed pairs actually are arcs. When , conditions 2 and 5–11 are vacuous, condition 3 is vacuous, condition 4 is trivial, and condition 1 says that every (where is empty or ) equals .