InformationTheory

InformationTheory.Shannon.SMB.AlgoetCover.TwoSidedRatio

source

D.5 — liminf direction (2-sided infinite-past detour) #

The liminf direction liminf blockLogAvg ≥ entropyRate cannot be obtained from the one-sided k-Markov approximation alone: the ratio P_n/q_k has unbounded chi-squared expectation. The fix (Algoet–Cover 1988) is to use the infinite past conditional q_∞(X_0^{n-1}|past_∞) = ∏ μZ(X_i|X_{-∞}^{i-1}), defined on the 2-sided extension (ℤ → α, μZ, shiftZ) (see TwoSidedExtension.lean).

By the tower property, E_μZ[P_n/q_∞] = 1, so Markov + Borel–Cantelli give P_n/q_∞ ≤ n² eventually μZ-a.s. Logarithmically, this is blockLogAvgZ ≥ (1/n) Σ pmfLogCondInfty - 2 log n / n. Birkhoff applied to pmfLogCondInfty on the 2-sided ergodic system gives (1/n) Σ pmfLogCondInfty(shiftZ^[i] x) → ∫ pmfLogCondInfty dμZ = entropyRate, so liminf blockLogAvgZ ≥ entropyRate μZ-a.s. We transfer to the Ω-side via forwardEmbed and the measure-preservation μ.map forwardEmbed = μZ.map natProj.

noncomputable def

InformationTheory.Shannon.firstBlockZ

source
{α : Type u_2} (n : ) :
(α)Fin nα

First-n block projection on the 2-sided side: pulls out x_0, …, x_{n-1}.

Equations
Instances For
    Used by
      theorem

      InformationTheory.Shannon.measurable_firstBlockZ

      source
      {α : Type u_2} [MeasurableSpace α] (n : ) :
      Used by
        theorem

        InformationTheory.Shannon.map_firstBlockZ_eq_map_blockRV

        source

        The first-n block on the 2-sided side has the same law as blockRV n on Ω.

        Used by
          noncomputable def

          InformationTheory.Shannon.blockLogAvgZ

          source
          {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) :
          (α)

          Z-side blockLogAvg: the per-symbol negative log-likelihood on the 2-sided side.

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

              InformationTheory.Shannon.blockLogAvgZ_natExt_eq

              source
              {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) (ω : Ω) :
              (blockLogAvgZ μ p n fun (i : ) => p.obs i.toNat ω) = blockLogAvg μ p n ω

              Bridge: blockLogAvgZ n (natural extension of ω) = blockLogAvg n ω. The "natural extension" fun i : ℤ => p.obs i.toNat ω ignores negative coords (maps them to p.obs 0 ω = X ω), but blockLogAvgZ n only looks at coords {0, …, n-1}, where it agrees with forwardEmbed.

              Used by
                noncomputable def

                InformationTheory.Shannon.negLogQInftyZ

                source
                {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) :
                (α)

                Z-side negLogQ∞: Birkhoff sum of pmfLogCondInfty along the orbit.

                Equations
                Instances For
                  Used by
                    noncomputable def

                    InformationTheory.Shannon.MRatioLowerZ

                    source
                    {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) :
                    (α)ENNReal

                    The Z-side lower-bound likelihood ratio: exp(negLogQ∞ - n · blockLogAvgZ), which represents P_n/q_∞ lifted to ℝ≥0∞.

                    Equations
                    Instances For
                      Used by

                        Inductive-step infrastructure for integral_MRatioLowerZ_le_one #

                        noncomputable def

                        InformationTheory.Shannon.blockCondRatio

                        source
                        {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) (s : Fin nα) (a : α) :

                        Probability ratio at the (n+1)-block over the n-block: when P_n(s) > 0, this is P_{n+1}(snoc(s, a)) / P_n(s); defaulted to 0 when P_n(s) = 0.

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

                            InformationTheory.Shannon.measurable_blockCondRatio_apply

                            source
                            {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] [MeasurableSingletonClass α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) (a : α) :
                            Measurable fun (s : Fin nα) => blockCondRatio μ p n s a

                            blockCondRatio is measurable (as a discrete map Fin n → α → α → ℝ).

                            Used by
                              theorem

                              InformationTheory.Shannon.firstBlockZ_singleton_pos_ae

                              source

                              A.s. positivity of P_n^Z: the singleton mass at the realized firstBlockZ n x is a.s. positive under μZ.

                              Transferred from the Ω-side block_singleton_pos_ae_at via map_firstBlockZ_eq_map_blockRV.

                              Used by
                                theorem

                                InformationTheory.Shannon.MRatioLowerZ_succ_eq_mul

                                source

                                Pointwise factorization of MRatioLowerZ (n+1) on the a.s. positive set.

                                On the set where both P_n(firstBlockZ n x) > 0 and P_{n+1}(firstBlockZ (n+1) x) > 0, we have the decomposition MRatioLowerZ (n+1) x = MRatioLowerZ n x · ofReal(blockCondRatio · exp(pmfLogCondInfty(shift^n x))), where blockCondRatio is the chain-rule ratio.

                                Used by
                                  theorem

                                  InformationTheory.Shannon.lintegral_mul_eq_lintegral_mul_condLExp

                                  source
                                  {Ω : Type u_3} {m₀ m : MeasurableSpace Ω} (hm : m m₀) (μ : MeasureTheory.Measure Ω) [MeasureTheory.SigmaFinite (μ.trim hm)] {g : ΩENNReal} (hg : Measurable g) {f : ΩENNReal} (hf : Measurable f) :
                                  ∫⁻ (x : Ω), g x * f x μ = ∫⁻ (x : Ω), g x * μ⁻[f | m] x μ

                                  ENNReal pull-out (general): for g : Ω → ℝ≥0∞ m-measurable and f : Ω → ℝ≥0∞ measurable, ∫⁻ x, g · f dμ = ∫⁻ x, g · μ⁻[f|m] dμ.

                                  Used by
                                    def

                                    InformationTheory.Shannon.shiftedPastSigma

                                    source
                                    @[reducible]
                                    {α : Type u_2} [MeasurableSpace α] (n : ) :

                                    σ-algebra of the shifted past: events depending only on {x_i : i ≤ n - 1}.

                                    Equations
                                    Instances For
                                      Used by
                                        theorem

                                        InformationTheory.Shannon.shiftedPastSigma_le

                                        source
                                        Used by
                                          theorem

                                          InformationTheory.Shannon.measurable_condProbInfty_comp_shift_shiftedPastSigma

                                          source
                                          {Ω : Type u_1} [MeasurableSpace Ω] {α : Type u_2} [Fintype α] [MeasurableSpace α] (μ : MeasureTheory.Measure Ω) [MeasureTheory.IsProbabilityMeasure μ] (p : StationaryProcess μ α) (n : ) (a : α) :

                                          The map condProbInfty(a) ∘ shift^[n] is measurable w.r.t. shiftedPastSigma n.

                                          Used by
                                            theorem

                                            InformationTheory.Shannon.measurable_shiftedPastSigma_of_eq_comp

                                            source
                                            {α : Type u_2} [MeasurableSpace α] {β : Type u_3} [MeasurableSpace β] (n : ) (f : (α)β) {g : (α)β} (hg : Measurable g) (hf : f = g TwoSided.shiftZ^[n]) :

                                            Generic comap-through-shift lemma: if f : (∀_:ℤ,α) → β satisfies f = g ∘ shiftZ^[n] for some negPastSigma-measurable g, then f is shiftedPastSigma n-measurable.

                                            Used by
                                              theorem

                                              InformationTheory.Shannon.measurable_coord_negPastSigma

                                              source
                                              {α : Type u_2} [MeasurableSpace α] {k : } (hk : k -1) :
                                              Measurable fun (y : α) => y k

                                              Coordinate projection (· k) is negPastSigma-measurable when k ≤ -1.

                                              Used by
                                                theorem

                                                InformationTheory.Shannon.measurable_MRatioLowerZ_shiftedPastSigma

                                                source

                                                MRatioLowerZ μ p n is shiftedPastSigma n-measurable. Depends only on x_0, …, x_{n-1}, which after shift^n lives at indices -n, …, -1.

                                                Used by
                                                  theorem

                                                  InformationTheory.Shannon.condLExp_indicator_coord_n_eq_ofReal_condProbInfty_shift

                                                  source

                                                  Substep A — Tower identification: the conditional Lebesgue expectation of the ENNReal indicator 1_{x_n = a} w.r.t. shiftedPastSigma n equals ofReal(condProbInfty(a)(shift^n x)) a.s.

                                                  Proof: by uniqueness of conditional Lebesgue expectation (ae_eq_condLExp). The candidate is shiftedPastSigma n-measurable, and its integral on each s = (shift^n)⁻¹' t matches the indicator's integral. The latter reduces (via MeasurePreserving.setLIntegral_comp_preimage) to a real-valued condExp identity setIntegral_condExp for condProbInfty(a), converted to ENNReal via integral_eq_lintegral_of_nonneg_ae + finiteness.

                                                  Used by
                                                    theorem

                                                    InformationTheory.Shannon.indicator_mul_ofReal_exp_pmf_eq

                                                    source

                                                    Indicator-support collapse: on the set {x_n = a}, the factor exp(pmfLogCondInfty(shift^n x)) equals 1/condProbInfty(a)(shift^n x) (in ℝ; with 1/0 = 0). Formulated as an indicator-times-factor pointwise identity.

                                                    Used by
                                                      theorem

                                                      InformationTheory.Shannon.ofReal_exp_neg_log_mul_ofReal_le_one

                                                      source

                                                      Reciprocal product bound: ofReal(exp(-log c)) · ofReal(c) ≤ 1 for any real c.

                                                      • When c > 0: exp(-log c) · c = 1, so product = 1.
                                                      • When c ≤ 0: ofReal(c) = 0, so product = 0.
                                                      Used by
                                                        theorem

                                                        InformationTheory.Shannon.measurable_pmfLogCondInfty

                                                        source
                                                        Used by
                                                          theorem

                                                          InformationTheory.Shannon.measurable_MRatioLowerZ

                                                          source
                                                          Used by
                                                            theorem

                                                            InformationTheory.Shannon.eq_sum_indicator_preimage_mul

                                                            source
                                                            {α : Type u_2} [Fintype α] {β : Type u_3} (φ : βα) (x : β) (f : αENNReal) :
                                                            f (φ x) = a : α, (φ ⁻¹' {a}).indicator (fun (x : β) => 1) x * f a
                                                            Used by
                                                              theorem

                                                              InformationTheory.Shannon.mRatioLowerZ_succ_ae_eq_sum

                                                              source
                                                              Used by
                                                                theorem

                                                                InformationTheory.Shannon.measurable_perA_integrand_shiftedPastSigma

                                                                source
                                                                Used by
                                                                  theorem

                                                                  InformationTheory.Shannon.mRatioLowerZ_mul_blockCondRatio_mul_exp_neg_log_mul_condProbInfty_le

                                                                  source
                                                                  Used by
                                                                    theorem

                                                                    InformationTheory.Shannon.integral_MRatioLowerZ_le_one

                                                                    source

                                                                    CORE LEMMA (tower property): MRatioLowerZ n dμZ ≤ 1.

                                                                    Used by