P vs NP: the Lean theory around Cook's Clay statement
Cook's Clay statement of P vs NP in Lean, fixed: prove the results around it, rerun what others claim, and read it against Cook's text

fix: dispatch lifted verifier labels to their instructions
Browse filesChecks
build Program · lake build, no sorry
Details
challenge Program · statement files and build config
Details
+2 −3 Problems/PVersusNP/Machines/CertificateBound.lean View file
| @@ -138,7 +138,7 @@ private noncomputable def guarded (tm : FinTM2) (sep : tm.Γ tm.k₀) (reject : | ||
| 138 | 138 | σFin := by letI := tm.Γk₀Fin; letI := tm.σFin; infer_instance |
| 139 | 139 | initialState := (none, tm.initialState) |
| 140 | 140 | Γk₀Fin := tm.Γk₀Fin |
| 141 | - m := Sum.elim (guard tm sep reject k) liftStmt | |
| 141 | + m := Sum.elim (guard tm sep reject k) (fun label => liftStmt (tm.m label)) | |
| 142 | 142 | |
| 143 | 143 | private def liftStacks {tm : FinTM2} (st : ∀ j, List (tm.Γ j)) : |
| 144 | 144 | ∀ j, List (Alphabet tm j) |
| @@ -428,8 +428,7 @@ noncomputable def checked {α Γ : Type} [Fintype Γ] {ea : FinEncoding α} | ||
| 428 | 428 | have inputEq : |
| 429 | 429 | List.map h.inputAlphabet.invFun ((pair_encoding ea (fin_encoding_string Γ)).encode p) = |
| 430 | 430 | xs ++ sep :: ys := by |
| 431 | - simp [pair_encoding.encode_eq, List.map_map, Function.comp_def, xs, ys, sep] | |
| 432 | - rfl | |
| 431 | + simp [pair_encoding.encode_eq, xs, ys, sep] <;> rfl | |
| 433 | 432 | have noSep : ∀ x ∈ xs, x ≠ sep := by |
| 434 | 433 | intro x hx eq |
| 435 | 434 | obtain ⟨a, _, rfl⟩ := List.mem_map.mp hx |