Recorded quasi-clock self-tests and the cofinal agreement condition
DefinitionPvsNP_RecordedQuasiClockRaycomplexity-theoryp-vs-np
Definitions for coded self-tests on padded native multitape descriptions. The package specifies a recording extension, a quasi-clock, three semantic ways to establish nonacceptance, and a uniform cofinal agreement condition for one NP language.
Definition code
import Definitions.Def_PvsNP
import Definitions.Def_Complexitylib_0ebd467_Computability_Machines_Turing_MultiTape_Universal_Complexity
import Mathlib
set_option autoImplicit false
namespace PvsNP.RecordedQuasiClockRay
open Turing.MultiTapeTM.Universal
/-- Prepend an input recorder. Its current cell remains blank. -/
def record (d : Desc) : Desc :=
⟨d.tapes+1,d.q₀,d.table.map (fun row =>
({row.1 with work := none :: row.1.work},
{row.2 with workTapes :=
(match (match row.2.inputTape with | .pos => row.1.input | _ => none) with
| none => (none,.zero)
| some b => (some (some b),.pos)) :: row.2.workTapes}))⟩
def word (d : Desc) (r : ℕ) : Str := List.replicate r false ++ true :: eDesc (record d)
def clock (w : Str) : ℕ := (w.length+2)^(w.length+2).log2
/-- The first matching action for each work-read vector is independent of the input bit. -/
def BitSymmetric (d : Desc) : Prop :=
∀ (q : ℕ) (reads : List (Option ℕ)),
(d.table.find? (fun row => decide (row.1 = ⟨q,some 0,reads⟩))).map Prod.snd =
(d.table.find? (fun row => decide (row.1 = ⟨q,some 1,reads⟩))).map Prod.snd
def configAt (d : Desc) (x : List ℕ) (t : ℕ) : SCfg :=
((fun c : SCfg => (step d x c).1)^[t]) (init d)
/-- Three ways to witness nonacceptance. Length and uniformity requirements enter the NP goal. -/
def ReplayRejection (d : Desc) (w : Str) : Prop :=
let D := record d
let x := w.map Bool.toNat
(∃ s : ℕ, ¬ ((simulate D x s).1 <+: [1]) ∨
((simulate D x s).2 = true ∧ simulate D x s ≠ ([1],true))) ∨
(∃ u v : ℕ, u < v ∧ (simulate D x v).2 = false ∧ configAt D x u = configAt D x v) ∨
(∃ v : Str, (v = w ∨ (v.length = w.length ∧ BitSymmetric d)) ∧
simulate D (v.map Bool.toNat) (clock w) ≠ ([1],true))
/-- The platform's native representation of a polynomial-time Boolean decider. -/
def BoundedBooleanRealizer (d : Desc) (k : ℕ) (χ : Str → Bool) : Prop :=
∀ (w : Str) (t : ℕ), (w.length+2)^k ≤ t →
simulate d (w.map Bool.toNat) t = ([(χ w).toNat],true)
/-- One NP language agrees with rejection at arbitrarily late paddings of each polynomial Boolean realizer. -/
def CofinalAgreement : Prop :=
∃ A ∈ PvsNP.NP, ∀ (d : Desc) (k : ℕ) (χ : Str → Bool), BoundedBooleanRealizer d k χ →
∀ K : ℕ, ∃ r ≥ K, (word d r ∈ A ↔ ReplayRejection d (word d r))
end PvsNP.RecordedQuasiClockRay
Source
Recorded native quasi-clock self-simulation reduction for the P vs NP mission, https://prove2.me/theorems/e5057ff7-f9b2-4abc-a48d-e64d71a0bfc7. Recorder semantics: https://prove2.me/theorems/a2ceeefa-bd73-5b15-92b0-7122db60d4b0