Recurrences for a chain of two gadgets
ProvedRhoMin.chain2_boundsPositions 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.
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 have, on the positions , the values of the chain of two gadgets with interiors of sizes and , placed at offset . Suppose , , bound the paths, the corner paths and the corner pairs of both interior blocks in . Then, for the whole chain with corners and :
This is the form of the recurrences that the recursive construction uses: grows by an additive constant per level.
Formalization Note The constants appear unevaluated as , and . The three conclusions are stated together for either value of ; the second corner is the appended point when .
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 Definitions.Def_RhoMin_Every import Mathlib.Data.Nat.Log 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 import Mathlib.Data.Fintype.Inv open RhoMin
theorem RhoMin.chain2_bounds {f : ℕ → ℕ} {q a b : ℕ} {ga gb : ℕ → ℕ} {eps : Bool} {R L M n' cK : ℕ}
(hF : Fits f (cp2 q a ga b gb eps))
(Ha : Bnd f (Finset.Ico (q + 2) (q + 2 + a)) (q + 2) (q + 2 + a - 1) R L M)
(Hb : Bnd f (Finset.Ico (q + (a + 3) + 2) (q + (a + 3) + 2 + b)) (q + (a + 3) + 2)
(q + (a + 3) + 2 + b - 1) R L M)
(hn' : n' = q + (a + 3) + (b + 3) + (if eps then 1 else 0)) (hcK : cK = q + (a + 3) + (b + 3)) :
Bnd f (Finset.Ico q n') q cK (max (max R (M + 1)) (2 * 2 + 2 * L + 5)) (2 * 2 + L + 3)
(2 * 2 + 2 * L + 7) := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-2
Data. Let be an arbitrary function, let be natural numbers, let be arbitrary functions, let be a Boolean (true/false), and let be natural numbers. Throughout, write
The directed relation determined by . For , say there is an arc if
(precisely: or in the first case; or in the second). Only the parity of the source matters. is not assumed injective.
Terminology. A list is a finite sequence of natural numbers, possibly empty. It is repetition-free if its entries are pairwise distinct, and a walk if is an arc for every (empty and one-element lists are walks). A number is an end of if is non-empty and or . For a finite set and naturals , the statement is the conjunction of:
- (R) every repetition-free walk with all entries in has length ;
- (L) every repetition-free walk with all entries in that has as an end or as an end has length ;
- (M) for every two repetition-free walks with all entries in , sharing no entry, with an end of and an end of : .
The gadget value function. For a natural number , a function and define
Hypothesis 1 (" fits the two-piece configuration"). All of the following hold:
- is even.
- is odd and is odd.
- for all , and for all .
- is injective on and is injective on .
- and .
- and .
- For every : ; and for every : . Explicitly, on the first block:
and on the second block the same with replaced by . 8. If is true, then . (If is false, nothing is assumed about .)
(These come from a configuration with base point , exactly pieces, piece sizes and , piece functions and , and flag ; the piece offsets are , , .)
Hypothesis 2 (bounds for the interior of the first piece).
Here the set is the half-open interval and the second corner is written with truncated subtraction (no truncation occurs, since by Hypothesis 1).
Hypothesis 3 (bounds for the interior of the second piece).
with the same as in Hypothesis 2; the set is and the second corner is .
Hypothesis 4. , where if is true and if is false.
Hypothesis 5. .
Conclusion.
where the set is the half-open interval . Spelled out, with all walks taken with respect to the arcs defined by :
- every repetition-free walk inside has length ;
- every repetition-free walk inside having or as an end has length ;
- any two repetition-free walks inside that share no entry, the first having as an end and the second having as an end, have total length .
Edge cases.
- If is false, then , so the second corner is not an element of the set . In that case no walk inside the set has as an end: the (L) part of the conclusion effectively concerns only walks with an end at , and the (M) part of the conclusion is vacuously true.
- If , the two corners in Hypothesis 2 coincide (), and the (M) part of Hypothesis 2 is vacuously true (two walks sharing no entry cannot both contain ). Likewise for Hypothesis 3 when .
- is unconstrained outside the positions (and when is true); , are unconstrained outside , .
- and are free variables pinned down only by the equations in Hypotheses 4 and 5.