Skip to content

feat(Probability): add PMF lemmas for maps, products, and failure bounds - #1063

Closed
SamuelSchlesinger wants to merge 3 commits into
samschles/crypto-pr-01-pmf-real-sumsfrom
samschles/crypto-pr-02-pmf-maps-products
Closed

SamuelSchlesinger wants to merge 3 commits into
samschles/crypto-pr-01-pmf-real-sumsfrom
samschles/crypto-pr-02-pmf-maps-products

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Deferred from the CSLib crypto stack. These general PMF lemmas belong in Mathlib, and the remaining proposed stack does not require them.

The implementation is preserved on this branch for later upstreaming. It includes map and support-congruence lemmas, dependent pairing, uniform products, and failure-probability bounds.

Originally composed with Claude Code.

Adds further general lemmas to `Cslib.Probability.PMF`: point masses under injective maps and equivalences, lower bounds by a single preimage or execution path, congruence of `bind` and `map` on the support, dependent pairing and the marginals of a pairing bind, point masses of images of a uniform input, and `uniformOfFintype_prod`, which identifies a uniform pair with two independent uniform samples.

`toOuterMeasure_bind_failure_le` bounds the failure probability of a randomized continuation: if every possible input satisfying a precondition leads to failure with probability at most `error`, the composite fails with probability at most `P(precondition fails) + error`. It needs no independence or finiteness assumption. `toOuterMeasure_rate_ge` derives the averaging consequence: if a test beats a threshold on average, the excess mass consists of inputs whose conditional acceptance probability reaches the threshold.
@SamuelSchlesinger
SamuelSchlesinger force-pushed the samschles/crypto-pr-02-pmf-maps-products branch from d833306 to 4b3ff93 Compare October 4, 2026 23:33
@SamuelSchlesinger
SamuelSchlesinger removed this pull request from stack #1064 October 5, 2026 20:06
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.

1 participant