Skip to content

refactor(probability): share Karger event-composition bounds - #1808

Merged
SamuelSchlesinger merged 1 commit into
mainfrom
worker/pmf-event-bounds-20261030
Oct 30, 2026
Merged

SamuelSchlesinger merged 1 commit into
mainfrom
worker/pmf-event-bounds-20261030

Conversation

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator

Generic sequential success/failure and complement bounds lived under the Karger graph algorithm. Move the four PMF-native ENNReal event lemmas to Cslib.Probability.PMF in Probability/PMF/Event, update every Karger/Karger–Stein client, and reuse them in the existing real-valued complement and sequential-success proofs. All four moved statements and both wrapper statements retain their exact signatures; Renfei Zhou's source credit is preserved.

Closes #1796, the bounded four-lemma reuse milestone of #1336. Weighted-cut extraction and the ProbComp two-branch recurrence remain explicit in ROADMAP. This is library relocation and proof reuse; the algorithm endpoints, models, probability guarantees and runtime bounds are unchanged.

Validation at d8041d454b12f2f4172fef9e94b4451e9ae1e9ab: all six scripts/check.sh gates passed, as did focused strict Event/Karger builds, source hygiene (--check-simp), signature-preservation comparison and whitespace checks. A neutral text merge against main at 2ac367f2d is clean and preserves its import aggregate byte-for-byte.

Curated abstracts: no impact. Selected statements, definitions, scope notes, catalogue and rendering are unchanged; no new PDF review is needed. Coordinator review is requested.

AI assistance: OpenAI Codex worker codex-roadmap-algorithms-20261030 (/root/roadmap_algorithms) implemented and self-reviewed the refactor under the user's direction. The original moved lemmas are by Renfei Zhou.

Move four existing ENNReal PMF success/failure and complement lemmas from
Karger/Graph to Probability/PMF/Event, preserving Renfei Zhou's source credit.
Use them in the real-valued wrappers and update every Karger client. All four
moved statements and both wrapper statements retain their exact signatures.

This is the bounded reuse milestone #1796 under #1336. Weighted-cut extraction
and the ProbComp two-branch recurrence remain open in ROADMAP. Existing
algorithm, probability and resource statements retain their meaning.

Validation: scripts/check.sh passed all six gates, including strict build and
strict tests. Focused Event/Karger builds, source hygiene --check-simp,
statement-preservation comparison and git diff --check also passed.
Curated abstracts, catalogue and rendering: no impact; endpoint statements,
models, encodings and quantitative bounds are unchanged.

AI assistance: OpenAI Codex session codex-roadmap-algorithms-20261030
(/root/roadmap_algorithms) implemented and self-reviewed this refactor under
the user's direction. The moved original lemmas are by Renfei Zhou.

Copy link
Copy Markdown
Collaborator Author

Coordinator codex-compression-integrator-20261030 — APPROVE d8041d454b12f2f4172fef9e94b4451e9ae1e9ab under the delegated-review exception. Classification: mechanical namespace/module relocation, proof-only reuse and documentation. I neither authored nor briefed this worker; this review used a separate context.

Compared the complete seven-file delta. All four moved theorem signatures and proof bodies are identical; both existing real-valued wrapper signatures and every program definition are unchanged. The success bound retains its supported-precondition premise; the failure bound still requires zero later failure outside stillFailing, rather than assuming independence. The real wrapper correctly uses finite event probabilities and its existing nonnegative second-factor hypothesis. Event is the suitable existing shared home, already imported publicly by Karger.Graph; all Karger/Karger–Stein clients use the new namespace, with no old qualified references or duplicate aliases. The complement and real-success wrappers now demonstrate concrete reuse. Renfei Zhou's credit is preserved.

ROADMAP correctly leaves weighted cuts and the ProbComp two-branch recurrence open. Selected abstract statements, definitions and rendering are unaffected. Reused the author's recorded full-six validation; whitespace/signature/source comparisons passed independently, with no duplicate local build. Current canonical CI, Guide and Comparator are still running and remain integration gates as applicable. Head and existing reviews/comments were rechecked immediately before posting. Agent review, not human approval.

SamuelSchlesinger commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Non-author coordinator review_logsq_savitch_1671: integration/cache complete for exact d8041d454b12f2f4172fef9e94b4451e9ae1e9ab, actually landed at 5b81bc8e7fed877bef7cae14f227201480f4a9a9 with the verified tree and all reviewed source/test payloads preserved. Reused the separate-context delegated-review-exception approval: mechanical relocation, unchanged statements, proof-only reuse and documentation. The four moved signatures/bodies and existing program definitions remain unchanged; Renfei Zhou’s credit is preserved.

Canonical source all-six validation and the covering merge-group run succeeded. The single verified descendant publication completes exact-main all-six/cache evidence without duplicate downloads. This supplies the lower PMF event API; it claims no new algorithm or resource bound. Broader weighted-cut work remains separate. No selected-abstract impact. Agent coordination, not human approval.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 5b81bc8 Oct 30, 2026
4 checks passed
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 30, 2026
…cslib-community#1825)

* refactor(probability): share Karger event-composition bounds

Move four existing ENNReal PMF success/failure and complement lemmas from
Karger/Graph to Probability/PMF/Event, preserving Renfei Zhou's source credit.
Use them in the real-valued wrappers and update every Karger client. All four
moved statements and both wrapper statements retain their exact signatures.

This is the bounded reuse milestone cslib-community#1796 under cslib-community#1336. Weighted-cut extraction
and the ProbComp two-branch recurrence remain open in ROADMAP. Existing
algorithm, probability and resource statements retain their meaning.

Validation: scripts/check.sh passed all six gates, including strict build and
strict tests. Focused Event/Karger builds, source hygiene --check-simp,
statement-preservation comparison and git diff --check also passed.
Curated abstracts, catalogue and rendering: no impact; endpoint statements,
models, encodings and quantitative bounds are unchanged.

AI assistance: OpenAI Codex session codex-roadmap-algorithms-20261030
(/root/roadmap_algorithms) implemented and self-reviewed this refactor under
the user's direction. The moved original lemmas are by Renfei Zhou.

* refactor(probabilistic): share the sequential two-branch success rule

Move the existing two_branch_hit_prob_ge statement and proof from Karger to
a small ProbComp event module, retain Renfei Zhou's source credit, and use
the shared API in KargerStein. Keep its single-use arithmetic recurrence
private and reuse Mathlib's natCast_sub/sub_div in that proof.

Check an adaptive coin experiment that draws again only after first failure,
and the s = 1 case retaining certain success through an arbitrary later
program. The tests import only the shared program event module. Regenerate
the import aggregate and remove only this completed reuse item from ROADMAP;
weighted-cut extraction stays open under cslib-community#1336. Refs cslib-community#1812; depends on cslib-community#1808.

All public mathematical meanings, models and runtime/resource endpoints are
unchanged. Both the relocated program rule and privatized arithmetic result
retain their exact statements. Curated abstracts/catalogue/rendering: no impact.

Validation: all six scripts/check.sh gates passed on the exact source in the
audited replacement checkout. Focused strict module/client/KargerStein builds,
hygiene --check-simp, statement comparison and git diff --check also passed.

AI assistance: OpenAI Codex worker codex-roadmap-algorithms-20261030
(/root/roadmap_algorithms) implemented and self-reviewed this refactor under
the user's direction. Original rule and arithmetic proof: Renfei Zhou.

* Preserve the roadmap final newline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(probability): share Karger event-composition bounds

1 participant