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: compare guarded transition stack contents pointwise
Browse filesChecks
build Program · lake build, no sorry
Details
challenge Program · statement files and build config
Details
+7 −8 Problems/PVersusNP/Machines/CertificateBound.lean View file
| @@ -248,14 +248,13 @@ macro "certificate_step" : tactic => do | ||
| 248 | 248 | let machine := Lean.mkIdent `tm |
| 249 | 249 | `(tactic| |
| 250 | 250 | (simp [FinTM2.step, TM2.step, TM2.stepAux, guarded, guard, jump, mark, remember, |
| 251 | - checkpoint, liftCfg, liftStacks, List.replicate_succ, *] | |
| 252 | - try (congr <;> first | |
| 253 | - | rfl | |
| 254 | - | (funext s; cases s with | |
| 255 | - | inl j => by_cases hj : j = ($machine).k₀ <;> by_cases ho : j = ($machine).k₁ <;> | |
| 256 | - simp_all [initList, haltList, Function.update_of_ne] | |
| 257 | - | inr j => cases j <;> simp_all [Function.update_of_ne]) | |
| 258 | - | (simp_all; done)))) | |
| 251 | + checkpoint, liftCfg, liftStacks, List.replicate_succ, *] <;> | |
| 252 | + (try apply congrArg some) <;> congr 1 <;> | |
| 253 | + (funext s | |
| 254 | + cases s with | |
| 255 | + | inl j => by_cases hj : j = ($machine).k₀ <;> by_cases ho : j = ($machine).k₁ <;> | |
| 256 | + simp_all [initList, haltList, Function.update_of_ne] | |
| 257 | + | inr j => cases j <;> simp_all [Function.update_of_ne]))) | |
| 259 | 258 | |
| 260 | 259 | private def scanRight (ys saved : List (tm.Γ tm.k₀)) (base cert : ℕ) : |
| 261 | 260 | Run tm sep reject k |