Termination from bounds on least-color occurrences #
A uniform capacity for each interval's least color turns the finite-color interval lemma into a uniform bound on operation-sequence length. The bound depends only on the number of colors and the capacity function.
Every interval before N has at most capacity a occurrences of any
color which is a lower bound for all colors on that interval.
Equations
- EGZ.HasIntervalCapacity χ capacity N = ∀ (a b l : ℕ), a ≤ b → b < N → (∀ i ∈ Finset.Icc a b, l ≤ χ i) → {i ∈ Finset.Icc a b | χ i = l}.card ≤ capacity a
Instances For
The first length at which the interval lemma forces a capacity violation.
The requested occurrence threshold is exactly capacity + 1.
Equations
- EGZ.intervalCapacityBound k capacity = Nat.find ⋯
Instances For
theorem
EGZ.intervalCapacityBound_spec
(k : ℕ)
(capacity χ : ℕ → ℕ)
:
(∀ i < intervalCapacityBound k capacity, χ i < k) →
∃ (a : ℕ) (b : ℕ) (l : ℕ),
b < intervalCapacityBound k capacity ∧ l < k ∧ HasColorInterval χ (fun (a : ℕ) => capacity a + 1) a b l
theorem
EGZ.length_lt_intervalCapacityBound
(k : ℕ)
(capacity : ℕ → ℕ)
(N : ℕ)
(χ : ℕ → ℕ)
(hχ : ∀ i < N, χ i < k)
(hcapacity : HasIntervalCapacity χ capacity N)
:
The bound is uniform over operation sequences; no monotonicity of the colors or of the capacity function is required.