An aligned work edge is crossed on at most 2w+2 input advances
ProvedPvsNP.aligned_advance_crossing_cardcombinatoricscomplexity-theory
On input-advancing steps, suppose the old work coordinate lies within w cells of the raw coordinate and no raw coordinate is advanced twice. A unit-motion work head crosses a fixed edge on at most 2w+2 input-advancing steps.
Preamble
import Mathlib.Data.Finset.Card import Mathlib.Data.Int.Interval import Lean.Elab.Tactic.Omega set_option autoImplicit false
Formal statement
theorem PvsNP.aligned_advance_crossing_card {Tick : Type} [DecidableEq Tick]
(advances : Finset Tick) (raw before after : Tick → ℤ)
(edge : ℤ) (width : ℕ)
(unique : Set.InjOn raw ↑advances)
(unit : ∀ t ∈ advances, before t - 1 ≤ after t ∧ after t ≤ before t + 1)
(aligned : ∀ t ∈ advances, before t - (width : ℤ) ≤ raw t ∧
raw t ≤ before t + (width : ℤ)) :
(advances.filter (fun t => (before t ≤ edge ∧ edge < after t) ∨
(after t ≤ edge ∧ edge < before t))).card ≤ 2 * width + 2 := by sorrySource
Crossing accounting for a spatially aligned one-way scan with a late INDEX challenge.