Finite Shannon entropy #
Entropy is measured in bits. Conditional entropy is the joint entropy minus the entropy of the observed first component. For a joint distribution presented as a marginal and a conditional kernel, this is exactly the average entropy of the kernel. Both descriptions use ordinary PMFs.
The deterministic chain rule accounts for all the entropy of a source after exposing a function and then a predicate. This is the entropy accounting used in the OWF-to-PRG construction; an entropy identity alone makes no claim about computational indistinguishability.
Main definitions #
Cslib.Probability.PMF.surprisal: information content of a supported outcome in bits.Cslib.Probability.PMF.entropy: finite Shannon entropy.Cslib.Probability.PMF.conditionalEntropy: remaining entropy after an observation.
Main results #
Cslib.Probability.PMF.entropy_bind_pair,.entropy_bind_sigma: joint entropy decompositions.Cslib.Probability.PMF.conditionalEntropy_eq_sum: average of conditional entropies.Cslib.Probability.PMF.conditionalEntropy_map_fst_ge: forgetting observations increases entropy.Cslib.Probability.PMF.entropy_chain_rule_deterministic: deterministic chain rule.
References #
- T. Holenstein, Pseudorandom Generators from One-Way Functions: A Simple Construction for
Any Hardness, Sections 3.3 and 5.
Section 5 uses
H(g(W)) + H(P(W) | g(W)) + H(W | g(W), P(W)) = H(W)to count output bits.
Adapted from Probability/Entropy.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, using the shared PMF and conditioning APIs.
Information content of an outcome, in bits. For finite entropy sums we assign zero at null outcomes, which are never sampled. Identities requiring positive mass explicitly require support membership.
Instances For
A distribution supported on at most one value carries no entropy.
A uniform sample has the logarithm of its cardinality as entropy.
Uniform sampling maximizes entropy on a fixed finite type.
When a branch index is public, its remaining conditional entropy is the average over branches. The observed alphabet may depend on the index, as with variable-length hashes.
For any joint law, conditional entropy averages the normalized conditional distributions.
Observing a function of the input leaves at least the average entropy of the output kernel. The observation may merge inputs, including inputs whose conditional laws differ.
Replacing the observation by a function of it can only increase conditional entropy.
Conditional entropy is the expected information content of the hidden value after its observation. Null observations are automatically weighted by zero.
If an observation determines a value except on bad observations, its remaining entropy is at most the bad probability times the logarithm of the value's alphabet size.