Repository navigation
Probability: kernels, pushforward and sequential composition of laws - #21
Merged
Merged
Conversation
This was referenced Oct 6, 2026
MarcIlunga
force-pushed
the
cr18-games
branch
2 times, most recently
from
October 12, 2026 14:58
c3d9a0a to
cd48dfe
Compare
`Distribution.bindK μ f`, the mixture of the kernel `f` over the law `μ` (the composition of conditional distributions, CR18 §3.6.1), with the lemmas the probabilistic automata of the next layer use: linearity, composition of mixtures, the point kernel, pushforwards as point kernels and through mixtures, restriction through mixtures, weight and nonnegativity, and independent products as mixtures (`prod_eq_bindK`, `pi_eq_bindK_update`). Probability laws get `ProbDist.map` with `map_map`, and `ProbDist.bind`, defined from `bindK` (the one bind). Part of #14. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…or steps
CR18 §3.6.1 defines a conditional distribution p_{Y|X}; it does not define its
mixture over a law, so the module doc and THEORY.md now say only that. The root
doc of Probability is wrapped to 100 characters, and the steps of Kernel.lean
are lemmas (#18).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
MarcIlunga
force-pushed
the
memoryless-probability
branch
from
October 13, 2026 09:20
9036503 to
8846092
Compare
The restriction and pushforward facts that do not involve kernels (`support_restrict_subset`, `restrict_restrict`, `restrict_congr`, `restrict_false`, `single_restrict`, `fTransform_single`, `restrict_fTransform`) move to Distribution.lean, next to `restrict` and `fTransform`. Kernel.lean no longer opens `Classical`: `bindK_ite` states its condition under `open scoped Classical in`, and the four proofs that decide equalities or events start with `classical`. Two `show` steps become direct terms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E7GPy1oUx164NSZsxJT3N9
Each induction on a law says what both sides are at a sum of two laws and at a point mass; the product lemmas comment each step (the factor split off, the terms that survive the sum, the support cases). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E7GPy1oUx164NSZsxJT3N9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Distribution.bindK, the mixture of a kernel over a law (CR18 §3.6.1), with the lemmas #22 uses, and the probability lawsProbDist.mapandProbDist.bindbuilt on it. Seven restriction and pushforward lemmas that the kernel lemmas need are added toDistribution.lean.Part of #14.