InformationTheory.Shannon.ChannelCoding.Achievability.RandomCodebook
Channel coding achievability — random codebook average bound #
Part of the longFile split of Achievability.lean. This part holds the
Fubini-style swap helpers (private lemmas block_law_X_eq_pi_p,
block_law_Y_eq_pi, block_joint_law_eq_pi, codebook_marginal_one,
codebook_marginal_two, random_codebook_E1_swap, random_codebook_E2_swap)
and their sole consumer random_codebook_average_le. The private lemmas and
their consumer are deliberately kept in the same file (file-scoped private).
InformationTheory.Shannon.ChannelCoding.measureReal_pi_singleton_eq_prod
sourceUsed by
InformationTheory.Shannon.ChannelCoding.jointDistribution_real_singleton
sourceUsed by
InformationTheory.Shannon.ChannelCoding.outputDistribution_real_singleton_eq_sum
sourceUsed by
Fubini helpers for the random codebook average. #
The two helper lemmas below carry the Fubini-style swap between
"codebook expectation" and the (X^n, Y^n) joint law under μ.
They are the only ingredients that use the marginal-matching hypotheses
h_match_X / h_match_Z.
InformationTheory.Shannon.ChannelCoding.block_law_X_eq_pi_p
sourceBlock X-law identification. Under iIndepFun (Xs ·) μ and
h_match_X : μ.map (Xs 0) = p, the block law μ.map (jointRV Xs n) equals
Measure.pi (fun _ : Fin n ↦ p). This is the bridge to the
codebookMeasure p M n structure.
Promoted to non-private so the two-codebook MAC achievability averaging in
InformationTheory.Shannon.MultipleAccess.Achievability can reuse it for the
user-1 alias axis and the (X₂, Y) joint-sequence axis (signature unchanged; no
cross-file consumer existed before).
Used by
Codebook-row marginalization. #
The codebookMeasure p M n is a product over Fin M of Measure.pi p-rows.
When the integrand depends only on the m-th row (resp. m-th and m'-th rows
for m ≠ m'), we can factorize and sum out the other rows.
InformationTheory.Shannon.ChannelCoding.prod_erase_eq_prod_subtype_ne
sourceUsed by
InformationTheory.Shannon.ChannelCoding.sum_prod_measureReal_singleton_eq_one
sourceUsed by
InformationTheory.Shannon.ChannelCoding.codebook_marginal_one
sourceSingle-row marginalization. Sum out all rows other than m.
Promoted to non-private for reuse by the two-codebook MAC achievability averaging
(both Codebook/MACCodebook reduce to Fin M → Fin n → α).
Used by
InformationTheory.Shannon.ChannelCoding.codebook_marginal_two
sourceTwo-row marginalization. Sum out all rows other than m and m' (with
m ≠ m').
Promoted to non-private for reuse by the two-codebook MAC achievability averaging
(the user-1 true/alias two-row marginalization).
Used by
InformationTheory.Shannon.ChannelCoding.sum_weighted_diag_offdiag_decomp
sourceUsed by
InformationTheory.Shannon.ChannelCoding.diag_add_offdiag_sum_le
sourceUsed by
InformationTheory.Shannon.ChannelCoding.sum_average_le_of_forall_le
sourceUsed by
InformationTheory.Shannon.ChannelCoding.random_codebook_average_le
sourceRandom codebook average (probabilistic-method form). With each codeword
drawn i.i.d. from p^n (so the codebook law is codebookMeasure p M n), the
codebook-average of the (uniform-over-message) error probability decomposes via
Fubini into the "joint typical event probability" (E1) plus (M - 1) · the
independent-pair bound (E2).
The structural backbone (per-codebook bound via errorProbAt_le_E1_plus_E2,
sum / swap arithmetic) is assembled here from the two Fubini swap ingredients
random_codebook_E1_swap and random_codebook_E2_swap (private lemmas above).