Recurrence (R1): every path of a chain has at most vertices
ProvedRhoMin.chainRAn 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 .
For a set of positions with corners : bounds the paths of if every path inside has at most vertices; bounds the corner paths if every path inside with an end at or at has at most vertices; bounds the corner pairs if any two vertex-disjoint paths inside , the first with an end at and the second with an end at , have at most vertices in total.
Suppose that for every the numbers , , bound the paths, the corner paths and the corner pairs of the block with corners . Then every path of inside has at most
vertices.
Formalization Note The conclusion is BoundR A C.X (max (max R (Mm + 1)) (2 * C.K + 2 * L + 5)) for an arbitrary digraph satisfying the chain conditions.
import Definitions.Def_RhoMin_Dir
import Definitions.Def_RhoMin_Piece
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.Count
open RhoMin
variable {A : ℕ → ℕ → Prop} {C : ChainData}theorem RhoMin.chainR (hC : IsChain A C) {R L Mm : ℕ} (hR : ∀ j < C.K, BoundR A (C.I j) R)
(hL : ∀ j < C.K, BoundL A (C.I j) (C.c j) (C.w j) L)
(hM : ∀ j < C.K, BoundM A (C.I j) (C.c j) (C.w j) Mm) :
BoundR A C.X (max (max R (Mm + 1)) (2 * C.K + 2 * L + 5)) := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-2
Data. Let be an arbitrary binary relation on (no symmetry, irreflexivity or decidability is assumed); read as "there is an arc from to ". Let be a "chain datum", i.e. a tuple consisting of a natural number , five functions (written ), a function assigning to each a finite set , and a finite set . For each put
Let , , be natural numbers.
Terminology used below. A list is a finite sequence of natural numbers, possibly empty (). It is repetition-free if its entries are pairwise distinct. It is an -walk if holds for every (the empty list and every one-element list are -walks, with no condition). A number is an end of if is non-empty and or (the empty list has no ends). For a finite set and naturals :
- means: every repetition-free -walk all of whose entries lie in has length (number of entries) .
- means: every repetition-free -walk all of whose entries lie in and which has as an end or as an end has length .
- means: for every pair of lists , each repetition-free, each an -walk, each with all entries in , such that no entry of is an entry of , is an end of and is an end of , one has .
Hypothesis 1 (the chain conditions on and ). All of the following hold:
- For every : either , or there is with or .
- For all with , the sets and are disjoint.
- For all and : .
- For all : implies (so are pairwise distinct).
- For all : , , and .
- For all and all with , and : either ( and ) or ( and ).
- For all and all with , and : either ( and ) or ( and ).
- For all and all with , and : either ( and ) or ( and ).
- For all and all with , and : either ( and ) or ( and ).
Hypothesis 2. For every : .
Hypothesis 3. For every : .
Hypothesis 4. For every : .
Conclusion.
that is, every repetition-free -walk all of whose entries lie in has length at most .
Edge cases and things the statement does not assume.
- Conditions 6–9 only restrict which arcs between elements of can cross the boundary of or ; nothing asserts that any arc exists. Arcs with an endpoint outside are unconstrained (and irrelevant to the conclusion).
- Nothing requires , , , , , , or . Hypotheses 2–4 concern walks in , which may contain points outside . If or or , Hypothesis 4 for that holds automatically (no admissible pair exists); if neither nor lies in , Hypothesis 3 for that holds automatically.
- The values of at indices beyond those quantified (, resp. for ) are unconstrained.
- If : Hypotheses 2, 3, 4 and conditions 2, 3, 5–9 are vacuous, condition 1 says , the numbers are arbitrary, and the conclusion is that every repetition-free -walk in has length .
- The same , , serve as bounds for all simultaneously.