InformationTheory

InformationTheory.Shannon.StrongTypicality

source

Strong typicality (Cover-Thomas) #

Three main theorems for the strongly typical set A^*_ε^n := { x : Fin n → α | ∀ a, |(typeCount x a : ℝ)/n - P(a)| ≤ ε }:

  1. stronglyTypicalSet_prob_tendsto_oneμ {ω | jointRV ∈ A^*} → 1 (WLLN on indicators).
  2. (size upper bound) — |A^*| ≤ exp(n(H + ε·L)) via the strong-to-weak inclusion.
  3. stronglyTypicalSet_card_ge_eventually∃ N, ∀ n ≥ N, (1-η)·exp(n(H - ε·L - δ)) ≤ |A^*|.

Here L := logSumAbs μ Xs = ∑ a, |log P(a)|, N(a|x^n) := typeCount x a, P(a) := (μ.map (Xs 0)).real {a}, H := entropy μ (Xs 0).

Main definitions #

  • stronglyTypicalSet — the strongly typical set A^*_ε^n.
  • logSumAbs — the Lipschitz constant ∑ a, |log P(a)| of the strong-to-weak bridge.

Main statements #

Implementation notes #

The WLLN is applied per letter via strong_law_ae_real on the indicators Y_a i ω := 𝟙(Xs i ω = a), then a union bound over the finite alphabet α gives simultaneous concentration. Full support hpos : ∀ a, 0 < P(a) is required for the size bounds (via typicalSet_prob_le) but not for the probability convergence.

References #

  • T. M. Cover and J. A. Thomas, Elements of Information Theory (2nd ed.), Wiley, 2006.

Definitions #

noncomputable def

InformationTheory.Shannon.stronglyTypicalSet

source
{Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [DecidableEq α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) (n : ) (ε : ) :
Set (Fin nα)

The strongly typical set A^*_ε^n := { x : Fin n → α | ∀ a, |(typeCount x a : ℝ)/n - P(a)| ≤ ε }.

Equations
Instances For
    Used by
      theorem

      InformationTheory.Shannon.mem_stronglyTypicalSet_iff

      source
      {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) (n : ) (ε : ) (x : Fin nα) :
      x stronglyTypicalSet μ Xs n ε ∀ (a : α), |(typeCount x a) / n - (MeasureTheory.Measure.map (Xs 0) μ).real {a}| ε
      Used by
        theorem

        InformationTheory.Shannon.measurableSet_stronglyTypicalSet

        source
        {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) (n : ) (ε : ) :
        Used by

          Probability convergence #

          noncomputable def

          InformationTheory.Shannon.letterIndicator

          source
          {Ω : Type u_1} {α : Type u_2} [DecidableEq α] (Xs : Ωα) (a : α) (i : ) :
          Ω
          Equations
          Instances For
            Used by
              theorem

              InformationTheory.Shannon.measurable_letterIndicator

              source
              {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (a : α) (i : ) :
              Used by
                theorem

                InformationTheory.Shannon.indepFun_letterIndicator

                source
                {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) (Xs : Ωα) (_hXs : ∀ (i : ), Measurable (Xs i)) (hindep : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (a : α) :
                Used by
                  theorem

                  InformationTheory.Shannon.identDistrib_letterIndicator

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

                    InformationTheory.Shannon.integral_letterIndicator

                    source
                    {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (a : α) :
                    (ω : Ω), letterIndicator Xs a 0 ω μ = (MeasureTheory.Measure.map (Xs 0) μ).real {a}
                    Used by
                      theorem

                      InformationTheory.Shannon.integrable_letterIndicator

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

                        InformationTheory.Shannon.typeCount_eq_sum_indicator

                        source
                        {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] {n : } (x : Fin nα) (a : α) :
                        (typeCount x a) = i : Fin n, if x i = a then 1 else 0
                        Used by
                          theorem

                          InformationTheory.Shannon.letterIndicator_inProbability

                          source
                          {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [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) μ μ) (a : α) {ε : } ( : 0 < ε) :
                          Filter.Tendsto (fun (n : ) => μ {ω : Ω | ε |(∑ iFinset.range n, letterIndicator Xs a i ω) / n - (MeasureTheory.Measure.map (Xs 0) μ).real {a}|}) Filter.atTop (nhds 0)
                          Used by
                            theorem

                            InformationTheory.Shannon.stronglyTypicalSet_prob_tendsto_one

                            source
                            {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [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 < ε) :
                            Filter.Tendsto (fun (n : ) => μ {ω : Ω | jointRV Xs n ω stronglyTypicalSet μ Xs n ε}) Filter.atTop (nhds 1)

                            For Xs i.i.d. with a finite alphabet, the probability of the strongly typical set tends to one, μ {ω | jointRV Xs n ω ∈ A^*_ε^n} → 1.

                            Used by

                              Strong-to-weak typicality bridge #

                              noncomputable def

                              InformationTheory.Shannon.logSumAbs

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

                              Lipschitz constant ∑ a, |log P(a)| of the strong-to-weak typicality bridge.

                              Equations
                              Instances For
                                Used by
                                  theorem

                                  InformationTheory.Shannon.logSumAbs_nonneg

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

                                    InformationTheory.Shannon.weak_displacement_eq_strong_sum

                                    source
                                    {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (_hXs : ∀ (i : ), Measurable (Xs i)) {n : } (hn : 0 < n) (x : Fin nα) :
                                    (∑ i : Fin n, pmfLog μ Xs (x i)) / n - entropy μ (Xs 0) = a : α, ((MeasureTheory.Measure.map (Xs 0) μ).real {a} - (typeCount x a) / n) * Real.log ((MeasureTheory.Measure.map (Xs 0) μ).real {a})
                                    Used by
                                      theorem

                                      InformationTheory.Shannon.stronglyTypical_implies_weakly_typical_bound

                                      source
                                      {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) {n : } (hn : 0 < n) {ε : } (x : Fin nα) (hx : x stronglyTypicalSet μ Xs n ε) :
                                      |(∑ i : Fin n, pmfLog μ Xs (x i)) / n - entropy μ (Xs 0)| ε * logSumAbs μ Xs
                                      Used by
                                        theorem

                                        InformationTheory.Shannon.stronglyTypicalSet_subset_typicalSet

                                        source
                                        {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) {n : } (hn : 0 < n) {ε ε' : } (h_bound : ε * logSumAbs μ Xs < ε') :
                                        stronglyTypicalSet μ Xs n ε typicalSet μ Xs n ε'
                                        Used by

                                          Size bounds #

                                          theorem

                                          InformationTheory.Shannon.stronglyTypicalSet_card_ge_eventually

                                          source
                                          {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (Xs : Ωα) (hXs : ∀ (i : ), Measurable (Xs i)) (hindep_full : ProbabilityTheory.iIndepFun (fun (i : ) => Xs i) μ) (hindep_pair : Pairwise fun (i j : ) => ProbabilityTheory.IndepFun (Xs i) (Xs j) μ) (hident : ∀ (i : ), ProbabilityTheory.IdentDistrib (Xs i) (Xs 0) μ μ) (hpos : ∀ (a : α), 0 < (MeasureTheory.Measure.map (Xs 0) μ).real {a}) {ε δ η : } ( : 0 < ε) ( : 0 < δ) ( : 0 < η) :
                                          ∃ (N : ), ∀ (n : ), N n → (1 - η) * Real.exp (n * (entropy μ (Xs 0) - ε * logSumAbs μ Xs - δ)) .toFinset.card

                                          A lower bound on the typical-set size (eventually-N form): for any η > 0, eventually |A^*_ε^n| ≥ (1-η) · exp(n · (H - ε·L - δ)).

                                          Used by