Shannon capacity-achieving prior uniqueness, formalized in Lean 4.
A Lean 4 library proving that capacity-achieving input priors for Markov kernels are unique
under the right non-degeneracy hypothesis. Lean v4.29.1, Mathlib only,
warning-free build, zero sorry / admit / axiom.
For the mathematical exposition — why the theorems are shaped the way they are and where the
analytic content lives — see docs/overview.md
in the repository, or the writing entry on this site.
The library gives three uniqueness theorems that bracket the classical question of when the supremum defining channel capacity is attained at a unique input:
ProbabilityMeasure.
The only external hypothesis is that the kernel's row matrix has trivial real kernel
(Kernel.RowMatrixFullRank).
The finite theorem is the most immediate Mathlib upstream candidate; the discharged theorem is the strongest concrete measure-theoretic result in the repository; the general theorem is the abstract packaging both specialize.
The library includes a Fin 6 → Fin 3 permutation-channel counterexample showing
that pairwise distinctness of rows (RowSeparating) is strictly weaker than the
injectivity of the prior pushforward map that the uniqueness theorems actually need. Two
distinct input priors can push forward to the same output marginal; the non-degeneracy
hypothesis cannot be relaxed to mere row separation.
The motivating application is a Shannon-correspondence for governance channels in the legitimacy framework; that development consumes this library as a dependency and is documented in its own paper. The present library stands on its own information-theoretic terms.