InformationTheory

InformationTheory.Shannon.AEP.Rate

source

AEP — rate-uniform form (via Chebyshev) #

typicalSet_prob_tendsto_one gives only the Tendsto … (𝓝 1) form and carries no closed-form bound. This module establishes an explicit N(ε, η) with

n ≥ N → μ {ω | jointRV Xs n ω ∈ typicalSet μ Xs n ε} ≥ 1 - η

via the Chebyshev inequality (ProbabilityTheory.meas_ge_le_variance_div_sq) and the pairwise variance sum (ProbabilityTheory.IndepFun.variance_sum).

Since pmfLog μ Xs : α → ℝ is a finite function on the alphabet, each logLikelihood μ Xs i is a.s. bounded by the range of pmfLog (a finite set), hence MemLp _ 2 μ, which supplies the integrability ingredients.

noncomputable def

InformationTheory.Shannon.pmfLogBound

source
{Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) :

The supremum of |pmfLog μ Xs| over the alphabet.

Equations
Instances For
    Used by
      theorem

      InformationTheory.Shannon.abs_pmfLog_le_bound

      source
      {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) (a : α) :
      |pmfLog μ Xs a| pmfLogBound μ Xs
      Used by
        theorem

        InformationTheory.Shannon.abs_logLikelihood_le_bound

        source
        {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) (i : ) (ω : Ω) :
        Used by
          theorem

          InformationTheory.Shannon.memLp_logLikelihood

          source
          {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (i : ) :
          Used by
            noncomputable def

            InformationTheory.Shannon.pmfLogVariance

            source
            {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) :

            The single-symbol variance Var[logLikelihood μ Xs 0; μ]. The 0-th index suffices because all Xs i are identically distributed.

            Equations
            Instances For
              Used by
                theorem

                InformationTheory.Shannon.pmfLogVariance_nonneg

                source
                {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) :
                Used by
                  theorem

                  InformationTheory.Shannon.pmfLogVariance_le_sq_of_bounded

                  source
                  {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) {B : } (hB : ∀ (a : α), |pmfLog μ Xs a| B) :
                  pmfLogVariance μ Xs B ^ 2

                  A pointwise bound |pmfLog Xs a| ≤ B gives pmfLogVariance ≤ B².

                  Used by
                    theorem

                    InformationTheory.Shannon.variance_logLikelihood_eq

                    source
                    {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hident : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) (i : ) :
                    Used by
                      theorem

                      InformationTheory.Shannon.aep_chebyshev_bound

                      source
                      {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (hindep : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hident : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) {ε : } ( : 0 < ε) {n : } (hn : 0 < n) :
                      μ {ω : Ω | ε |(∑ iFinset.range n, logLikelihood μ Xs i ω) / n - entropy μ (Xs 0)|} ENNReal.ofReal (pmfLogVariance μ Xs / (n * ε ^ 2))

                      Explicit-rate version of aep_inProbability: for n ≥ 1 and ε > 0, μ {ω | ε ≤ |(∑ i ∈ range n, logLikelihood μ Xs i ω) / n - H|} ≤ ENNReal.ofReal (pmfLogVariance μ Xs / (n * ε^2)).

                      Used by
                        theorem

                        InformationTheory.Shannon.typicalSet_prob_ge_of_rate

                        source
                        {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (hindep : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hident : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) {ε : } ( : 0 < ε) {η : } ( : 0 < η) :
                        ∃ (N : ), nN, 1 - η (μ {ω : Ω | jointRV Xs n ω typicalSet μ Xs n ε}).toReal

                        Asymptotic equipartition property (explicit rate): for any ε, η > 0, there is N(ε, η) such that for all n ≥ N, the typical set has μ-measure ≥ 1 - η. The explicit bound is N := ⌈pmfLogVariance / (η · ε²)⌉ + 1, so n ≥ N ⇒ pmfLogVariance / (n · ε²) ≤ η.

                        Used by
                          theorem

                          InformationTheory.Shannon.exp_neg_mul_lt_of_rate

                          source
                          {g ε' : } (hg : 0 < g) (hε' : 0 < ε') :
                          ∃ (N : ), nN, Real.exp (-n * g) < ε'

                          Closed-form N(g, ε') for exponential decay: for any g, ε' > 0, there is N such that exp(- n · g) < ε' for all n ≥ N. Concretely N := ⌈max 0 (-log ε' / g)⌉ + 1.

                          Used by
                            theorem

                            InformationTheory.Shannon.channelCoding_E2_lt_of_rate

                            source
                            {I R ε ε' : } (hgap : 0 < I - R - 3 * ε) (hε' : 0 < ε') :
                            ∃ (N : ), nN, (Real.exp (n * R)⌉₊ - 1) * Real.exp (n * (-I + 3 * ε)) < ε'

                            Closed-form N(I, R, ε, ε') for the channel-coding E2 term. Given the AEP gap g := I - R - 3ε > 0 and any tolerance ε' > 0, there is N such that (⌈exp(n·R)⌉ - 1) · exp(n · (-I + 3ε)) < ε' for all n ≥ N.

                            Used by
                              theorem

                              InformationTheory.Shannon.jointlyTypicalSet_prob_ge_of_rate

                              source
                              {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] {β : Type u_3} [Fintype β] [Nonempty β] [MeasurableSpace β] [MeasurableSingletonClass β] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (Ys : Ωβ) (hXs : ∀ (i : ), Measurable (Xs i)) (hYs : ∀ (i : ), Measurable (Ys i)) (hindepX : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hidentX : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) (hindepY : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Ys i) (Ys j) μ) (hidentY : ∀ (i : ), ProbabilityTheory.IdentDistrib (Ys i) (Ys 0) μ μ) (hindepZ : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (ChannelCoding.jointSequence Xs Ys i) (ChannelCoding.jointSequence Xs Ys j) μ) (hidentZ : ∀ (i : ), ProbabilityTheory.IdentDistrib (ChannelCoding.jointSequence Xs Ys i) (ChannelCoding.jointSequence Xs Ys 0) μ μ) {ε : } ( : 0 < ε) {η : } ( : 0 < η) :
                              ∃ (N : ), nN, 1 - η (μ {ω : Ω | (jointRV Xs n ω, jointRV Ys n ω) ChannelCoding.jointlyTypicalSet μ Xs Ys n ε}).toReal

                              Joint asymptotic equipartition property (closed-form rate): for any ε, η > 0, there exists N such that for all n ≥ N, the jointly typical set has μ-measure ≥ 1 - η.

                              Used by

                                Closed-form N(ε, η) variants #

                                The _of_rate form (∃ N, ∀ n ≥ N, P) suffices for many callers. When the outer construction needs to substitute a sequence δ_n → 0 and conclude N(δ_n) ≤ n, N must instead be exposed as a closed-form function of the inputs.

                                The closed-form N is the same one extracted in the _of_rate proof bodies, hoisted out as a def. The _at_N theorems differ from _of_rate only in that the existential is collapsed to the explicit def.

                                noncomputable def

                                InformationTheory.Shannon.typicalSetMinN

                                source
                                (V η ε : ) :

                                Closed-form N(V, η, ε) for typicalSet_prob_ge — extracted from the proof of typicalSet_prob_ge_of_rate.

                                Equations
                                Instances For
                                  Used by
                                    theorem

                                    InformationTheory.Shannon.typicalSetMinN_mono_V

                                    source
                                    {V V' η ε : } (hηε : 0 < η * ε ^ 2) (hVV' : V V') :
                                    Used by
                                      theorem

                                      InformationTheory.Shannon.typicalSet_prob_ge_at_N

                                      source
                                      {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (hindep : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hident : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) {ε η : } ( : 0 < ε) ( : 0 < η) (n : ) :
                                      typicalSetMinN (pmfLogVariance μ Xs) η ε n1 - η (μ {ω : Ω | jointRV Xs n ω typicalSet μ Xs n ε}).toReal

                                      Closed-form N version of typicalSet_prob_ge_of_rate.

                                      Used by
                                        theorem

                                        InformationTheory.Shannon.typicalSet_prob_ge_at_N_le

                                        source
                                        {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (hindep : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hident : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) (V_upper : ) (hV_upper : pmfLogVariance μ Xs V_upper) {ε η : } ( : 0 < ε) ( : 0 < η) (n : ) :
                                        typicalSetMinN V_upper η ε n1 - η (μ {ω : Ω | jointRV Xs n ω typicalSet μ Xs n ε}).toReal

                                        Variance-upper-bound version of typicalSet_prob_ge_at_N. The caller provides an upper bound V_upper ≥ pmfLogVariance μ Xs, and the closed-form N is typicalSetMinN V_upper η ε (independent of the true variance).

                                        Used by
                                          noncomputable def

                                          InformationTheory.Shannon.expNegMulMinN

                                          source
                                          (g ε' : ) :

                                          Closed-form N(g, ε') for exponential decay exp(-n g) < ε'.

                                          Equations
                                          Instances For
                                            Used by
                                              theorem

                                              InformationTheory.Shannon.exp_neg_mul_lt_at_N

                                              source
                                              {g ε' : } (hg : 0 < g) (hε' : 0 < ε') (n : ) :
                                              expNegMulMinN g ε' nReal.exp (-n * g) < ε'

                                              Closed-form N version of exp_neg_mul_lt_of_rate.

                                              Used by
                                                theorem

                                                InformationTheory.Shannon.channelCoding_E2_lt_at_N

                                                source
                                                {I R ε ε' : } (hgap : 0 < I - R - 3 * ε) (hε' : 0 < ε') (n : ) :
                                                expNegMulMinN (I - R - 3 * ε) ε' n → (Real.exp (n * R)⌉₊ - 1) * Real.exp (n * (-I + 3 * ε)) < ε'

                                                Closed-form N version of channelCoding_E2_lt_of_rate. The N is expNegMulMinN (I - R - 3ε) ε'.

                                                Used by
                                                  noncomputable def

                                                  InformationTheory.Shannon.jointlyTypicalSetMinN

                                                  source
                                                  (V_X V_Y V_Z η ε : ) :

                                                  Closed-form N(V_X, V_Y, V_Z, η, ε) for the joint AEP rate bound. Splits η/3 across three axes.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Used by
                                                      theorem

                                                      InformationTheory.Shannon.jointlyTypicalSet_prob_ge_at_N_le

                                                      source
                                                      {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] {β : Type u_3} [Fintype β] [Nonempty β] [MeasurableSpace β] [MeasurableSingletonClass β] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (Ys : Ωβ) (hXs : ∀ (i : ), Measurable (Xs i)) (hYs : ∀ (i : ), Measurable (Ys i)) (hindepX : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hidentX : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) (hindepY : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Ys i) (Ys j) μ) (hidentY : ∀ (i : ), ProbabilityTheory.IdentDistrib (Ys i) (Ys 0) μ μ) (hindepZ : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (ChannelCoding.jointSequence Xs Ys i) (ChannelCoding.jointSequence Xs Ys j) μ) (hidentZ : ∀ (i : ), ProbabilityTheory.IdentDistrib (ChannelCoding.jointSequence Xs Ys i) (ChannelCoding.jointSequence Xs Ys 0) μ μ) (V_X V_Y V_Z : ) (hV_X : pmfLogVariance μ Xs V_X) (hV_Y : pmfLogVariance μ Ys V_Y) (hV_Z : pmfLogVariance μ (ChannelCoding.jointSequence Xs Ys) V_Z) {ε η : } ( : 0 < ε) ( : 0 < η) (n : ) :
                                                      jointlyTypicalSetMinN V_X V_Y V_Z η ε n1 - η (μ {ω : Ω | (jointRV Xs n ω, jointRV Ys n ω) ChannelCoding.jointlyTypicalSet μ Xs Ys n ε}).toReal

                                                      Variance-upper-bound version of joint AEP. The caller provides axis-wise variance upper bounds V_X, V_Y, V_Z, and the closed-form N is jointlyTypicalSetMinN V_X V_Y V_Z η ε.

                                                      Used by