One end inside: at most vertices in the block and in the piece
ProvedRhoMin.endpAn 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.
Let and suppose bounds the corner paths of the block with corners . Let be a path of inside whose two ends do not both lie in . Then
Formalization Note is a list of natural numbers without repetition. The quantity of the paper appears as any number satisfying the predicate BoundL.
import Definitions.Def_RhoMin_Dir
import Definitions.Def_RhoMin_Piece
import Mathlib.Data.Finset.Card
import Mathlib.Data.List.Count
open RhoMin
variable {A : ℕ → ℕ → Prop}
variable {C : ChainData}theorem RhoMin.endp (hC : IsChain A C) {j : ℕ} (hj : j < C.K) {L : ℕ}
(hL : BoundL A (C.I j) (C.c j) (C.w j) L) {Q : List ℕ} (hnd : Q.Nodup) (hw : Walk A Q)
(hX : ∀ x ∈ Q, x ∈ C.X)
(hnot : ¬ ((∃ x ∈ Q.head?, x ∈ C.I j) ∧ (∃ y ∈ Q.getLast?, y ∈ C.I j))) :
cnt (C.I j) Q ≤ L + 1 ∧ cnt (C.M j) Q ≤ L + 3 := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-2
Setting. Let be an arbitrary binary relation on the natural numbers (read as "there is an arc from to "; no symmetry, irreflexivity or decidability is assumed, and is a relation on all of , not just on a finite set). Let be a "chain datum", which is nothing more than the following raw data, with no conditions built in:
- a natural number ;
- five sequences of natural numbers , written and defined for every index (including indices );
- a sequence , written ;
- a finite set .
For each index define the finite set
Auxiliary notions (for finite lists of natural numbers).
- A list is an -walk if holds for every . The empty list and every one-element list are -walks.
- A natural number is an end of a list if is non-empty and is its first entry or its last entry. The empty list has no ends.
- For a finite set and a list , is the number of positions of whose entry lies in (counted with multiplicity; for a list without repetitions this is the number of distinct entries of lying in ).
Hypotheses. Suppose all of the following.
-
( is a chain for .) All eleven of the following conditions hold:
- (cover) every satisfies , or there is with or ;
- (disjointness of the 's) for all and with , no element of lies in ;
- for all and : ;
- for all and : implies ;
- for all : ;
- for all : ;
- for all : ;
- (arcs entering ) for all and all with , and : either or ;
- (arcs leaving ) for all and all with , and : either or ;
- (arcs entering ) for all and all with , and : either or ;
- (arcs leaving ) for all and all with , and : either or .
-
is a natural number with .
-
is a natural number such that the following bound holds: for every list of natural numbers that has no repeated entries, is an -walk, has all its entries in , and has as an end or as an end (i.e. its first or last entry is , or its first or last entry is ), the length of is at most .
-
is a list of natural numbers with no repeated entries.
-
is an -walk.
-
Every entry of lies in .
-
It is not the case that both (the first entry of exists and lies in ) and (the last entry of exists and lies in ).
Conclusion. Then both
that is, has at most entries in and at most entries in .
Edge cases and things the statement silently includes.
- If there is no admissible , and the statement is vacuous. The chain conditions for reduce to: every element of equals .
- Hypothesis 7 holds automatically when is empty (then both counts are and the conclusion is trivial). When has exactly one entry , hypothesis 7 says exactly . For longer it says that at least one of the first and last entries of is outside .
- Nothing requires , , , or , nor . The four "arc" conditions constrain only on pairs with both endpoints in ; the relation is otherwise unconstrained, while the bound in hypothesis 3 ranges over walks in regardless of whether those entries lie in .
- The sets for different , and the values at indices beyond those mentioned in the chain conditions (beyond for , at or beyond for the others), are unconstrained except through the listed conditions.
- is any natural number for which the bound of hypothesis 3 holds; it is not required to be the least such. If neither nor lies in , no non-empty list inside has or as an end, so hypothesis 3 holds for every , including ; the conclusion then asserts and . If or , the one-element list consisting of that element forces .
- If is empty, hypothesis 3 holds for every and hypothesis 7 holds for every .
- The bound of hypothesis 3 is one-sided about ends: it applies to a list as soon as one of its two extremities is or , in either position (first or last).