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: resolve guard step tactic and pair map rewrites
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
| @@ -245,7 +245,7 @@ private def oneStep {a b : (guarded tm sep reject k).Cfg} | ||
| 245 | 245 | (EvalsToInTime.of_step step).toEvalsTo |
| 246 | 246 | |
| 247 | 247 | macro "certificate_step" : tactic => do |
| 248 | - let machine := mkIdent `tm | |
| 248 | + let machine := Lean.mkIdent `tm | |
| 249 | 249 | `(tactic| |
| 250 | 250 | (simp [FinTM2.step, TM2.step, TM2.stepAux, guarded, guard, jump, mark, remember, |
| 251 | 251 | checkpoint, liftCfg, liftStacks, List.replicate_succ, *] |
| @@ -430,8 +430,7 @@ def checked {α Γ : Type} [Fintype Γ] {ea : FinEncoding α} | ||
| 430 | 430 | have inputEq : |
| 431 | 431 | List.map h.inputAlphabet.invFun ((pair_encoding ea (fin_encoding_string Γ)).encode p) = |
| 432 | 432 | xs ++ sep :: ys := by |
| 433 | - simp only [pair_encoding.encode_eq, fin_encoding_string_encode, List.map_append, | |
| 434 | - List.map_cons, List.map_map] | |
| 433 | + rw [pair_encoding.encode_eq, List.map_append, List.map_cons, List.map_map, List.map_map] | |
| 435 | 434 | rfl |
| 436 | 435 | have noSep : ∀ x ∈ xs, x ≠ sep := by |
| 437 | 436 | intro x hx eq |