Terminal tape agreement at the last touch of each cell
ProvedPvsNP.terminal_agrees_of_last_touchcombinatoricscomplexity-theoryformal-verification
Consider two finite work-tape histories with a common scope of cells allowed to change at each step. For a set of observed cells, suppose their initial values agree and the two histories agree immediately after the last step allowed to change each observed cell. Then both histories agree on all observed cells at the terminal time.
Preamble
import Lean.Elab.Tactic.Omega set_option autoImplicit false universe u v
Formal statement
theorem PvsNP.terminal_agrees_of_last_touch {Cell : Type u} {Symbol : Type v}
(scope : Nat → Cell → Bool) (observe : Cell → Prop)
(source replacement : Nat → Cell → Symbol) (horizon : Nat)
(initial : ∀ p, observe p → source 0 p = replacement 0 p)
(outside : ∀ i < horizon, ∀ p, observe p → scope i p = false →
source (i + 1) p = source i p ∧ replacement (i + 1) p = replacement i p)
(last : ∀ i < horizon, ∀ p, observe p → scope i p = true →
(∀ j, i < j → j < horizon → scope j p = false) →
source (i + 1) p = replacement (i + 1) p) :
∀ p, observe p → source horizon p = replacement horizon p := by sorrySource
Original terminal-tape agreement lemma for replay with late randomness.