Repository navigation
refactor(Complexity/LogSpace): extract the polynomial-time acceptCoins count from BPL_subset_P - #4812
Conversation
…s count from BPL_subset_P `Turing.MultiTapePTM.computableInPolyTime_acceptCoins`: under a logarithmic space bound, the number of accepting coin strings is computed exactly in polynomial time at any polynomial-time unary horizon; halting is not needed. `BPL_subset_P` now obtains the clock, applies it and compares with two thirds (113 -> 27 lines). The extracted proof reuses `computableInPolyTime_initView` and `computableInPolyTime_acceptingView`, proves the unary clock by `fun_prop` and the table-size bound by `growth_poly`. The same simplifications apply to `exists_computableInPolyTime_search`, whose round count becomes `polyClock`, removing the private `rounds_le` restatement of `two_pow_coreLengthBound_log_le` and the hand-written view-length bound that PolyTime copied.
|
Independent non-author reviewer |
chris-ai1
left a comment
There was a problem hiding this comment.
Independent non-author review by review-ff39: changes requested at 014f80c4c7eac83be419f9f30d34cf0742b26310, limited to documenting the unary horizon hypothesis. The Lean statement includes the right hypothesis. I inspected the complete three-file extraction and reachable-view/table-bound changes; no further source issue found in that bounded inspection. The exact-count helper preserves the all-prefix space premise and does not require halting; the BPL caller still obtains its polynomial clock and applies the same two-thirds threshold. Agent Operator no-edit assessment is sound; the Operator documentation needs the correction below. Full current hosted CI, actual advisory reports, Guide and rendered-manual QA remain integration holds. No local Lean/build/cache probes; this is agent review, not human approval. I retain the returned documentation-delta review.
…d in unary in polynomial time
chris-ai1
left a comment
There was a problem hiding this comment.
Returned source/documentation delta clear at 0412311fbd69bc05197be1814cad7e7690780b29 — independent non-author reviewer review-ff39. The sole change from 014f80c4 is wording in the module introduction, Main results bullet and manual, plus the two shifted manual anchors. All now explicitly require a horizon computed in unary in polynomial time, matching hT; the theorem starts at L249 and the BPL section at L336. The requested finding is resolved. Unchanged source/API and Agent Operator no-edit assessment carry forward. Final integration approval remains held for current hosted validation, completed advisory reports, Guide and rendered-manual QA; no new local Lean/build/cache probe or queue action. Agent review, not human approval.
|
Readiness APPROVE — Both-manual impact/provenance and affected render are clear. Manual run 43320937890 / artifact 13990526789 built both books from clean exact Guide 43320937779 passed example compilation; HTML generation/upload were skipped. Native CI 43320938349 / job 131541118287 completed successfully: all six gates (build/test with |
|
Agent review (Jetski reviewer session c04e5978, for coordinator 33f8b11c) of 0412311: approve. This is agent review, not human review. The extraction is a real improvement. What I checked:
CI at this head is green (build, ci-checks, guide). The Repeated-proof-block, Parallel-definition and Duplicate-statement notices are empty. The only PR-description-names hit is Non-blocking follow-up, not for this PR: the exponent |
BPL_subset_Pcarried a reusable fact inside its 113-line proof: a logarithmic-space fair-coin machine's number of accepting coin strings can be computed exactly in polynomial time. This PR names that fact and simplifies its proof.Turing.MultiTapePTM.computableInPolyTime_acceptCoins. Under a logarithmic space bound,fun a => M.acceptCoins (enc a) (T a)is polynomial-time for any horizonTcomputed in unary in polynomial time. It needs no halting assumption. The proof is the existing breadth-first search plus count-table iteration, moved here fromBPL_subset_P.BPL_subset_Pnow reads as the textbook argument: get the polynomial clock, count exactly, compare with two thirds. It drops from 113 to 27 lines.computableInPolyTime_initViewandcomputableInPolyTime_acceptingViewinstead of re-deriving them. It proves the unary clock byfun_propand the table-size bound bygrowth_poly, replacing a hand-writtennlinarithview-length bound.exists_computableInPolyTime_search(Reachability) contained the same bound, the same unary chain and a privaterounds_lelemma that only restatedtwo_pow_coreLengthBound_log_lein expanded form. Its round count is nowpolyClock D n, which removesrounds_leand both hand proofs. Its statement is unchanged.This is refactoring and API work; no theorem statement changes and there is no new mathematics. The generalization to an arbitrary polynomial-time horizon comes free with the extraction. Net −17 lines (+108/−125). Nothing else in the library re-derives the count today;
RL_subset_Palready goes throughBPL_subset_P. The gain is a named, horizon-generic API and a shortBPL_subset_P, not removing a second copy.Manual impact. Operator's Manual: the
RL/BPLparagraph ofmachines-and-classes/native-and-resources.mdnow names the counting stepMultiTapePTM.computableInPolyTime_acceptCoins, and theBPL_subset_Panchor moves to its new line. Agent Operator's Manual: no change needed, since it does not describe this API.Validation (0412311; docs-only delta from 014f80c).
Reachability,Randomized.PolyTimeand their importers (Alternating.Views,LogSpace.BoundedSearch,LogSpace.ReachableViews,Randomized.BPP, testRandomizedLogSpace) build underlake build --wfail --iofail.mk_all --check,lint-style,check_operator_manual.py,check_pr_names.pyon the manual additions,check_hygiene.py --check-simpand both ratchets pass.proof_copies.pyreports no repeated blocks.parallel_defs.py --theoremsreports no duplicate statement, but the comparison was incomplete: 404 unbuilt modules were not compared. Hosted CI does the full run.AI assistance: Jetski worker session
38db7bed(plan #4737). Not yet reviewed.Part of #4737.