Chronological live-edge charge for changing colors
ProvedPvsNP.different_endpoint_count_le_live_cut_sumcomplexity-theoryformal-verification
Take a finite family of wires with start and finish times between zero and a fixed horizon. Color every time. The number of wires with differently colored endpoints is bounded by the sum, over times whose color differs from the next time, of the number of wires alive across that cut.
Preamble
import Mathlib set_option autoImplicit false
Formal statement
theorem PvsNP.different_endpoint_count_le_live_cut_sum {Edge Color : Type}
[DecidableEq Edge] [DecidableEq Color]
(edges : Finset Edge) (start finish : Edge → ℕ) (color : ℕ → Color) (horizon : ℕ)
(ordered : ∀ e ∈ edges, start e ≤ finish e)
(bounded : ∀ e ∈ edges, finish e ≤ horizon) :
(edges.filter (fun e => color (start e) ≠ color (finish e))).card ≤
∑ k ∈ (Finset.range horizon).filter (fun k => color k ≠ color (k + 1)),
(edges.filter (fun e => start e ≤ k ∧ k < finish e)).card := by sorry