Repository navigation
refactor: reuse existing PMF and polynomial-sum lemmas in two private proofs - #4816
Conversation
…private proofs Shorten pmf_map_true_le_one_sub_of_imp_false (Kolmogorov/AverageCase) to map_true_mono + map_not_true, and replace the private eval_le_sum induction in RecursivelyPresentable/Classes with Mathlib's Polynomial.eval_listSum and List.le_sum_of_mem. Part of #4737. Jetski worker session 54b77ba8.
|
Independent non-author review claimed by coordinator |
|
APPROVE I read both complete proof replacements, their sole callers and the actual existing PMF/Mathlib lemmas at the pinned revisions. The PMF argument is event inclusion For the polynomial bound, evaluation commutes with the list sum and Both-manual no-edit assessment is sound: I checked the Liu–Pass probability/clock conventions and recursive-presentation paragraph against these unchanged public statements. Only the two source files differ, so manual/Guide inputs, workflow selectors, results/retired abstracts and ROADMAP are unchanged; no affected rendered page or new PDF is needed. Current Guide examples and pins pass, with HTML correctly skipped. Current native CI passed all six gates, stock lints/axiom tests, hygiene, tidy/encoding/projection ratchets, compiled registry references and live manual checks. The actual checkout is This is proof/API reuse review, not a renewed source-equivalence or security review of the unchanged Liu–Pass endpoints. No source edits, local Lean/Lake/cache/compiled probes, new checkout or dependency changes. Fresh head, comments and reviews show no human/dependency or remaining review hold. The trusted exact-head helper newly queued this revision at position 11; this is not a landing claim. Root retains actual landing watch and broader #4737 remains open. |
|
Agent review (Jetski reviewer session 5a624682-f5b1-4c56-b493-458fde4377cf) of 654e806: approve. This is agent review, not human review. The PR changes no public declarations. Both edits reuse existing API in place of private plumbing, and both stay readable:
Checks:
|
Part of #4737.
This PR removes two private proofs that re-derive facts the library or Mathlib already provides. No public statement changes, and no declarations are added.
Kolmogorov/AverageCase.lean: the body of the privatepmf_map_true_le_one_sub_of_imp_falsewas an 11-linetsumcomparison plus atoRealsum. It is now 4 lines over the existingCslib.Probability.PMF.map_true_monoandCslib.Probability.PMF.map_not_true, finished withENNReal.toReal_sub_of_leandENNReal.toReal_mono. No complement lemma was missing, soPMF/Bool.leanis unchanged. I kept the private lemma because its one caller,generator_threshold_accept_le, would otherwise have to spell out its long predicates.RecursivelyPresentable/Classes.lean: deletes the privateeval_le_sum, a 9-line induction provingp ∈ ps → p.eval n ≤ ps.sum.eval n. Its one use inexists_clock_genow uses Mathlib'sPolynomial.eval_listSumandList.le_sum_of_memdirectly.Not changed: the brief also named the private
computableInPolyTime_trimUniformBlocksinRecursivelyPresentable/Classes.lean, as a possible copy of thecomputableInPolyTime_takeBlocksinduction inPH/Projection.lean. #4794 already derives it, andalternation_trimUniformBlocks, from the publictakeBlockslemmas, andtrimUniformBlocksis a one-linetakeBlockswrapper, so no induction is left to remove.Manuals: neither the Operator's Manual nor the Agent Operator's Manual mentions any declaration touched here, and the change does not affect any workflow or API they describe, so neither needs an edit.
Validation, at this head:
lake build --wfail --iofailof both changed modules, their importers (OneWay.LiuPass,OneWay.LiuPassConverse,CslibFrontierResults.Entries) and the affected tests (CslibFrontierTests.LiuPass,AutomationLiuPass,UniformDiagonalization).-DwarningAsError=true.proof_copies.py,check_projection_chains.py,check_encoding_readability.py,check_hygiene.py --check-simpandcheck_operator_manual.pypass.parallel_defsrun in CI.Implemented by Jetski worker session 54b77ba8 (AI agent) for @SamuelSchlesinger; it needs independent review.