/- Copyright (c) 2026 Marcel Morgenstern. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Marcel Morgenstern -/ module public import ErgodicTheory.Entropy.FactorEntropy public import ErgodicTheory.Entropy.Relative.System public import ErgodicTheory.Entropy.GeneratorTheorem public import ErgodicTheory.Entropy.KolmogorovSinai.Pow public import ErgodicTheory.Entropy.Product.Identity public import ErgodicTheory.Entropy.FactorGeneratorSaturate /-! # The Abramov–Rokhlin addition formula For a factor map `π : (α, T, μ) → (β, S, ν)` of measure-preserving systems, the Abramov–Rokhlin addition formula decomposes the Kolmogorov–Sinai entropy of the total system as the entropy of the factor plus the *relative* (fibrewise) entropy conditioned on the factor σ-algebra: `h(T) = h(S) + h(T | π⁻¹ 𝓑_β)`, an identity in `EReal` between nonnegative quantities (so the sum is well defined and either side may be `⊤`). No generator hypotheses are needed: the source is a standard Borel probability space and the factor is countably generated. ## Proof 1. **Join identity.** For finite partitions `Q`, `P` of `α`, the chain rule `H(Qₙ ∨ Pₙ) = H(Qₙ) + H(Pₙ | σ(Qₙ))` for the `n`-fold joins, divided by `n`, together with the moving-σ-algebra conditional limit `tendsto_condEntropy_genJoin_div`, gives `h(Q ∨ P, T) = h(Q, T) + h(P, T | 𝒢_Q)` (`ksEntropyPartition_joinPartition_eq`), where `𝒢_Q = ⨆ₙ σ(⋁ₖ₌₀ⁿ⁻¹ T⁻ᵏ Q)` is the forward saturation of `Q` (`fwdSat`). 2. **Lower bound.** For `Q = π⁻¹R` we have `h(Q, T) = h(R, S)` (`factor_relative_eq`) and `𝒢_Q ≤ π⁻¹ 𝓑_β`, so `h(R, S) + h(P, T | π⁻¹ 𝓑_β) ≤ h(Q ∨ P, T) ≤ h(T)`; taking suprema gives `h(S) + h(T | π⁻¹ 𝓑_β) ≤ h(T)`. 3. **Upper bound.** Let `Rₖ` be the finite partitions of `β` generated by the first `k` sets of a countable generating family. Then `h(P, T) ≤ h(π⁻¹Rₖ ∨ P, T) = h(Rₖ, S) + h(P, T | 𝒢ₖ)`, and `h(P, T | 𝒢ₖ) ≤ H(Pₙ | π⁻¹σ(Rₖ)) / n`; as `k → ∞` the right side tends to `H(Pₙ | π⁻¹ 𝓑_β) / n` by Lévy's upward theorem (`condEntropy_tendsto_iSup`), which in turn is close to `h(P, T | π⁻¹ 𝓑_β)` for large `n`. Hence `h(P, T) ≤ h(S) + h(T | π⁻¹ 𝓑_β)`. ## Main results * `ErgodicTheory.Entropy.ksEntropyPartition_joinPartition_eq`: the partition-level identity `h(Q ∨ P, T) = h(Q, T) + h(P, T | 𝒢_Q)`. * `ErgodicTheory.Entropy.abramov_rokhlin`: the Abramov–Rokhlin formula `h(T) = h(S) + h(T | π⁻¹ 𝓑_β)`. * `ErgodicTheory.Entropy.ksEntropy_le_of_isFactorMap`: entropy does not increase under factors. ## References * L. M. Abramov, V. A. Rokhlin, *The entropy of a skew product of measure-preserving transformations*, Vestnik Leningrad Univ. **17** (1962). * M. Einsiedler, E. Lindenstrauss, T. Ward, *Entropy in Ergodic Theory and Topological Dynamics*, Ch. 2. * Peter Walters, *An Introduction to Ergodic Theory*, GTM **79**, Springer (1982), Ch. 4. -/ @[expose] public section open MeasureTheory Function Filter Topology MeasurableSpace namespace ErgodicTheory.Entropy section JoinIdentity -- The conditioning σ-algebras are declared before the ambient `mα`, so that instance resolution -- picks `mα` for `Measure α`, `MeasurePartition μ ι` and `StandardBorelSpace α`. variable {α : Type*} {ι κ : Type*} {𝒜 ℬ : MeasurableSpace α} [mα : MeasurableSpace α] [StandardBorelSpace α] {μ : Measure α} [IsProbabilityMeasure μ] {T : α → α} [Fintype ι] [Fintype κ] /-- The forward saturation `⨆ₙ σ(⋁ₖ₌₀ⁿ⁻¹ T⁻ᵏ Q)` of a finite partition `Q`: the smallest σ-algebra containing all the iterated joins of `Q`. It is forward-`T`-invariant (`comap_fwdSat_le`) and, by construction, saturated by the `Q`-joins. -/ @[reducible] noncomputable def fwdSat (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) : MeasurableSpace α := ⨆ n, generatedSigmaAlgebra μ (ksJoin hT Q n) omit [StandardBorelSpace α] [IsProbabilityMeasure μ] in lemma fwdSat_le (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) : fwdSat hT Q ≤ mα := iSup_le fun _ => generatedSigmaAlgebra_le _ omit [StandardBorelSpace α] [IsProbabilityMeasure μ] in lemma comap_fwdSat_le (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) : MeasurableSpace.comap T (fwdSat hT Q) ≤ fwdSat hT Q := comap_iSup_generatedSigmaAlgebra_ksJoin_le hT Q omit [StandardBorelSpace α] [IsProbabilityMeasure μ] in lemma generatedSigmaAlgebra_le_fwdSat (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) : generatedSigmaAlgebra μ Q ≤ fwdSat hT Q := by rw [← generatedSigmaAlgebra_ksJoin_one hT Q] exact le_iSup (fun n => generatedSigmaAlgebra μ (ksJoin hT Q n)) 1 /-- **Chain rule for the iterated joins.** The `n`-fold join of `Q ∨ P` has entropy `H(Qₙ) + H(Pₙ | σ(Qₙ))`: its cells are the intersections of the cells of the two `n`-fold joins (`ksJoinCells_joinCells`), reindexed along `(Fin n → κ × ι) ≃ (Fin n → κ) × (Fin n → ι)`, and the absolute chain rule `entropy_join_eq_add_condEntropyGivenPartition` applies. -/ theorem ksEntropySeq_joinPartition_eq (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) (P : MeasurePartition μ ι) (n : ℕ) : ksEntropySeq hT (joinPartition Q P) n = ksEntropySeq hT Q n + condEntropy μ (generatedSigmaAlgebra μ (ksJoin hT Q n)) (ksJoin hT P n).cells := by set e := Equiv.arrowProdEquivProdArrow (Fin n) (fun _ => κ) (fun _ => ι) have hcells : (ksJoin hT (joinPartition Q P) n).cells = fun f => joinCells (ksJoin hT Q n).cells (ksJoin hT P n).cells (e f) := by funext f rw [ksJoin_cells, joinPartition_cells, ksJoinCells_joinCells] rfl rw [ksEntropySeq, hcells, entropy_reindex μ e, entropy_join_eq_add_condEntropyGivenPartition, condEntropyGivenPartition_eq_condEntropy_generated _ _ (ksJoin hT P n).measurable, ksEntropySeq] /-- **The partition-level Abramov–Rokhlin identity.** For finite partitions `Q` and `P`, `h(Q ∨ P, T) = h(Q, T) + h(P, T | 𝒢_Q)`, where `𝒢_Q = fwdSat hT Q` is the forward saturation of `Q`. Divide the chain rule `ksEntropySeq_joinPartition_eq` by `n`: the left side tends to `h(Q ∨ P, T)`, the first term on the right to `h(Q, T)`, and the second — conditional entropy against the *moving* σ-algebra `σ(Qₙ)` — to `h(P, T | 𝒢_Q)` (`tendsto_condEntropy_genJoin_div`, with the saturation `⨆ₙ σ(Qₙ) = 𝒢_Q` holding by definition). -/ theorem ksEntropyPartition_joinPartition_eq (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) (P : MeasurePartition μ ι) : ksEntropyPartition hT (joinPartition Q P) = ksEntropyPartition hT Q + condKsEntropyPartition (fwdSat_le hT Q) hT (comap_fwdSat_le hT Q) P := by have : Nonempty ι := P.index_nonempty have h1 := tendsto_ksEntropySeq hT (joinPartition Q P) have h2 := (tendsto_ksEntropySeq hT Q).add (tendsto_condEntropy_genJoin_div (fwdSat_le hT Q) hT (comap_fwdSat_le hT Q) Q P rfl) refine tendsto_nhds_unique h1 (h2.congr fun n => ?_) rw [ksEntropySeq_joinPartition_eq, add_div] omit [StandardBorelSpace α] in /-- Refining a partition does not lower its Kolmogorov–Sinai entropy: `h(P, T) ≤ h(Q ∨ P, T)`. -/ lemma ksEntropyPartition_le_joinPartition_right (hT : MeasurePreserving T μ μ) (Q : MeasurePartition μ κ) (P : MeasurePartition μ ι) : ksEntropyPartition hT P ≤ ksEntropyPartition hT (joinPartition Q P) := by refine le_of_tendsto_of_tendsto' (tendsto_ksEntropySeq hT P) (tendsto_ksEntropySeq hT (joinPartition Q P)) fun n => ?_ refine div_le_div_of_nonneg_right ?_ n.cast_nonneg exact entropy_le_of_refines (ksJoin hT P n) (ksJoin hT (joinPartition Q P) n) (fun f k => (f k).2) fun f => LE.le.eventuallySubset (ksJoin_joinPartition_subset hT Q P n f) /-- The relative Kolmogorov–Sinai entropy is antitone in the conditioning σ-algebra: for forward-invariant `𝒜 ≤ ℬ ≤ mα`, `h(P, T | ℬ) ≤ h(P, T | 𝒜)`. Termwise from `condEntropy_mono_of_le`, passed to the Fekete limits. -/ lemma condKsEntropyPartition_anti (h𝒜ℬ : 𝒜 ≤ ℬ) (h𝒜 : 𝒜 ≤ mα) (hℬ : ℬ ≤ mα) (hT : MeasurePreserving T μ μ) (hinv𝒜 : MeasurableSpace.comap T 𝒜 ≤ 𝒜) (hinvℬ : MeasurableSpace.comap T ℬ ≤ ℬ) (P : MeasurePartition μ ι) : condKsEntropyPartition hℬ hT hinvℬ P ≤ condKsEntropyPartition h𝒜 hT hinv𝒜 P := le_of_tendsto_of_tendsto' (tendsto_condKsEntropySeq hℬ hT hinvℬ P) (tendsto_condKsEntropySeq h𝒜 hT hinv𝒜 P) fun n => div_le_div_of_nonneg_right (condEntropy_mono_of_le h𝒜ℬ hℬ (ksJoin hT P n)) n.cast_nonneg /-- **Fekete bound** for the relative entropy: `h(P, T | 𝒜) ≤ H(⋁ₖ₌₀ⁿ⁻¹ T⁻ᵏ P | 𝒜) / n` for every `n ≠ 0` (the Fekete limit of a subadditive sequence is its infimum). -/ lemma condKsEntropyPartition_le_div (hm : 𝒜 ≤ mα) (hT : MeasurePreserving T μ μ) (hinv : MeasurableSpace.comap T 𝒜 ≤ 𝒜) (P : MeasurePartition μ ι) {n : ℕ} (hn : n ≠ 0) : condKsEntropyPartition hm hT hinv P ≤ condEntropy μ 𝒜 (ksJoin hT P n).cells / n := (condKsSubadditive hm hT hinv P).lim_le_div ⟨0, by rintro _ ⟨k, rfl⟩; exact div_nonneg (condKsEntropySeq_nonneg 𝒜 hT P k) k.cast_nonneg⟩ hn end JoinIdentity section Factor variable {α β : Type*} {ι κ : Type*} [mα : MeasurableSpace α] [StandardBorelSpace α] [mβ : MeasurableSpace β] {μ : Measure α} {ν : Measure β} [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] {T : α → α} {S : β → β} {π : α → β} [Fintype ι] [Fintype κ] omit [StandardBorelSpace α] [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] in /-- The forward saturation of a pulled-back partition lies in the factor σ-algebra: every cell of the `n`-fold join of `π⁻¹R` is the `π`-preimage of a cell of the `n`-fold join of `R` (`ksJoinCells_pulledBack`). -/ lemma fwdSat_pulledBack_le (hfac : IsFactorMap π T S μ ν) (hT : MeasurePreserving T μ μ) (hS : MeasurePreserving S ν ν) (R : MeasurePartition ν κ) : fwdSat hT (R.pulledBack hfac.1) ≤ MeasurableSpace.comap π mβ := by refine iSup_le fun n => generateFrom_le ?_ rintro s ⟨f, rfl⟩ refine ⟨ksJoinCells R.cells S n f, (ksJoin hS R n).measurable f, ?_⟩ rw [ksJoin_cells, MeasurePartition.pulledBack_cells] exact (ksJoinCells_pulledBack hfac.2.2 R.cells n f).symm /-- **Lower half of the Abramov–Rokhlin formula, partition level.** For finite partitions `R` of `β` and `P` of `α`, `h(R, S) + h(P, T | π⁻¹ 𝓑_β) ≤ h(π⁻¹R ∨ P, T)`. -/ lemma ksEntropyPartition_add_condKsEntropyPartition_le (hfac : IsFactorMap π T S μ ν) (hT : MeasurePreserving T μ μ) (hS : MeasurePreserving S ν ν) (R : MeasurePartition ν κ) (P : MeasurePartition μ ι) : ksEntropyPartition hS R + condKsEntropyPartition hfac.measurable_comap_le hT hfac.invariant_comap P ≤ ksEntropyPartition hT (joinPartition (R.pulledBack hfac.1) P) := by set Q := R.pulledBack hfac.1 rw [ksEntropyPartition_joinPartition_eq hT Q P, factor_relative_eq hT hS hfac.1 hfac.2.2 R] gcongr exact condKsEntropyPartition_anti (fwdSat_pulledBack_le hfac hT hS R) (fwdSat_le hT Q) hfac.measurable_comap_le hT (comap_fwdSat_le hT Q) hfac.invariant_comap P variable [MeasurableSpace.CountablyGenerated β] /-- **Upper half of the Abramov–Rokhlin formula, partition level.** For a finite partition `P` of `α` and `ε > 0` there is a level `k` of the countably generated atom partitions `Rₖ = cgFin β ν k` of the factor with `h(P, T) ≤ h(Rₖ, S) + h(P, T | π⁻¹ 𝓑_β) + ε`. Choose `n ≠ 0` with `H(Pₙ | π⁻¹ 𝓑_β) / n < h(P, T | π⁻¹ 𝓑_β) + ε/2` (Fekete), then `k` with `H(Pₙ | π⁻¹σ(Rₖ)) < H(Pₙ | π⁻¹ 𝓑_β) + nε/2` (Lévy's upward theorem along the increasing σ-algebras `π⁻¹σ(Rₖ)`, whose supremum is `π⁻¹ 𝓑_β`). Since `π⁻¹σ(Rₖ) ≤ 𝒢ₖ` (the forward saturation of `π⁻¹Rₖ`), `h(P, T | 𝒢ₖ) ≤ H(Pₙ | 𝒢ₖ)/n ≤ H(Pₙ | π⁻¹σ(Rₖ))/n`, and the partition-level identity `h(P, T) ≤ h(π⁻¹Rₖ ∨ P, T) = h(Rₖ, S) + h(P, T | 𝒢ₖ)` concludes. -/ lemma ksEntropyPartition_le_add_condKsEntropyPartition (hfac : IsFactorMap π T S μ ν) (hT : MeasurePreserving T μ μ) (hS : MeasurePreserving S ν ν) (P : MeasurePartition μ ι) {ε : ℝ} (hε : 0 < ε) : ∃ k, ksEntropyPartition hT P ≤ ksEntropyPartition hS (cgFin β ν k) + condKsEntropyPartition hfac.measurable_comap_le hT hfac.invariant_comap P + ε := by have : Nonempty ι := P.index_nonempty have hm := hfac.measurable_comap_le have hinv := hfac.invariant_comap set c := condKsEntropyPartition hm hT hinv P with hc -- Step 1: a Fekete level `n`. obtain ⟨n, hn0, hn⟩ : ∃ n : ℕ, n ≠ 0 ∧ condEntropy μ (MeasurableSpace.comap π mβ) (ksJoin hT P n).cells / n < c + ε / 2 := by have hev := (tendsto_condKsEntropySeq hm hT hinv P).eventually_lt_const (show c < c + ε / 2 by linarith) exact ((eventually_ne_atTop 0).and hev).exists have hnpos : (0 : ℝ) < n := Nat.cast_pos.mpr (Nat.pos_of_ne_zero hn0) -- Step 2: a level `k` of the generating partitions, by Lévy's upward theorem. set 𝒞 : ℕ → MeasurableSpace α := fun k => MeasurableSpace.comap π (MeasurableSpace.generateFrom (MeasurableSpace.countablePartition β k)) with h𝒞 have hmono : Monotone 𝒞 := fun a b hab => MeasurableSpace.comap_mono (generateFrom_countablePartition_monotone β hab) have hle : ∀ k, 𝒞 k ≤ mα := fun k => (MeasurableSpace.comap_mono (MeasurableSpace.generateFrom_countablePartition_le β k)).trans hm have hsup : (⨆ k, 𝒞 k) = MeasurableSpace.comap π mβ := by rw [h𝒞, ← MeasurableSpace.comap_iSup, iSup_generateFrom_countablePartition] have hlevy := condEntropy_tendsto_iSup 𝒞 hmono hle (ksJoin hT P n) rw [hsup] at hlevy obtain ⟨k, hk⟩ := (hlevy.eventually_lt_const (show condEntropy μ (MeasurableSpace.comap π mβ) (ksJoin hT P n).cells < condEntropy μ (MeasurableSpace.comap π mβ) (ksJoin hT P n).cells + n * (ε / 2) by have : 0 < (n : ℝ) * (ε / 2) := by positivity linarith)).exists -- Step 3: compare with the forward saturation of `π⁻¹Rₖ`. set Q := (cgFin β ν k).pulledBack hfac.1 have h𝒞Q : 𝒞 k ≤ fwdSat hT Q := by have : 𝒞 k = generatedSigmaAlgebra μ Q := by rw [comap_generatedSigmaAlgebra_pulledBack, generatedSigmaAlgebra_cgFin] rw [this] exact generatedSigmaAlgebra_le_fwdSat hT Q have hrel : condKsEntropyPartition (fwdSat_le hT Q) hT (comap_fwdSat_le hT Q) P < c + ε := by calc condKsEntropyPartition (fwdSat_le hT Q) hT (comap_fwdSat_le hT Q) P ≤ condEntropy μ (fwdSat hT Q) (ksJoin hT P n).cells / n := condKsEntropyPartition_le_div _ hT _ P hn0 _ ≤ condEntropy μ (𝒞 k) (ksJoin hT P n).cells / n := div_le_div_of_nonneg_right (condEntropy_mono_of_le h𝒞Q (fwdSat_le hT Q) (ksJoin hT P n)) hnpos.le _ < (condEntropy μ (MeasurableSpace.comap π mβ) (ksJoin hT P n).cells + n * (ε / 2)) / n := div_lt_div_of_pos_right hk hnpos _ = condEntropy μ (MeasurableSpace.comap π mβ) (ksJoin hT P n).cells / n + ε / 2 := by field_simp _ < c + ε / 2 + ε / 2 := by linarith _ = c + ε := by ring refine ⟨k, ?_⟩ calc ksEntropyPartition hT P ≤ ksEntropyPartition hT (joinPartition Q P) := ksEntropyPartition_le_joinPartition_right hT Q P _ = ksEntropyPartition hS (cgFin β ν k) + condKsEntropyPartition (fwdSat_le hT Q) hT (comap_fwdSat_le hT Q) P := by rw [ksEntropyPartition_joinPartition_eq hT Q P, factor_relative_eq hT hS hfac.1 hfac.2.2 (cgFin β ν k)] _ ≤ ksEntropyPartition hS (cgFin β ν k) + c + ε := by linarith /-- **The Abramov–Rokhlin addition formula.** Let `π : (α, T, μ) → (β, S, ν)` be a factor map of measure-preserving systems (`IsFactorMap π T S μ ν`: `π` is measure preserving, `S` is measurable and `π ∘ T = S ∘ π`), where `α` is a standard Borel probability space and `β` is countably generated (e.g. standard Borel). Then `h(T) = h(S) + h(T | π⁻¹ 𝓑_β)`, where `h(T | π⁻¹ 𝓑_β) = condKsEntropy` is the relative entropy of `T` over the factor σ-algebra `comap π mβ` (whose inclusion and forward invariance are derived from the factor map). All three quantities are nonnegative elements of `EReal` (`ksEntropy_nonneg`, `condKsEntropy_nonneg`), so the sum is the usual extended sum in `[0, ∞]`; in particular `h(T) = ⊤` iff one of the summands is `⊤`. The hypothesis `hS` names the measure-preserving system `(β, S, ν)`; it always holds (`IsFactorMap.measurePreserving`). No generator is assumed. The inequality `≥` takes suprema of the partition-level lower bound `ksEntropyPartition_add_condKsEntropyPartition_le`; the inequality `≤` follows from the upper bound `ksEntropyPartition_le_add_condKsEntropyPartition` along a generating sequence of finite partitions of the factor. -/ theorem abramov_rokhlin (hfac : IsFactorMap π T S μ ν) (hT : MeasurePreserving T μ μ) (hS : MeasurePreserving S ν ν) : ksEntropy hT = ksEntropy hS + condKsEntropy hfac.measurable_comap_le hT hfac.invariant_comap := by have hm := hfac.measurable_comap_le have hinv := hfac.invariant_comap have hrel0 := condKsEntropy_nonneg hm hT hinv have hS0 := ksEntropy_nonneg hS apply le_antisymm · refine iSup_le fun n => iSup_le fun P => ?_ rcases eq_or_ne (ksEntropy hS) ⊤ with htop | htop · rw [htop, EReal.top_add_of_ne_bot (lt_of_lt_of_le EReal.bot_lt_zero hrel0).ne'] exact le_top set s := (ksEntropy hS).toReal with hs_def have hs : ksEntropy hS = (s : EReal) := (EReal.coe_toReal htop (lt_of_lt_of_le EReal.bot_lt_zero hS0).ne').symm have hreal : ksEntropyPartition hT P ≤ s + condKsEntropyPartition hm hT hinv P := by refine le_of_forall_pos_le_add fun ε hε => ?_ obtain ⟨k, hk⟩ := ksEntropyPartition_le_add_condKsEntropyPartition hfac hT hS P hε have hRk : ksEntropyPartition hS (cgFin β ν k) ≤ s := by have := le_ksEntropy hS (cgFin β ν k) rwa [hs, EReal.coe_le_coe_iff] at this linarith calc ((ksEntropyPartition hT P : ℝ) : EReal) ≤ ((s + condKsEntropyPartition hm hT hinv P : ℝ) : EReal) := EReal.coe_le_coe_iff.mpr hreal _ = (s : EReal) + ((condKsEntropyPartition hm hT hinv P : ℝ) : EReal) := EReal.coe_add _ _ _ ≤ ksEntropy hS + condKsEntropy hm hT hinv := by rw [hs]; exact add_le_add le_rfl (le_condKsEntropy hm hT hinv P) · refine EReal.add_le_of_forall_lt fun a ha b hb => ?_ rw [ksEntropy, lt_iSup_iff] at ha obtain ⟨m, ha⟩ := ha rw [lt_iSup_iff] at ha obtain ⟨R, hR⟩ := ha rw [condKsEntropy, lt_iSup_iff] at hb obtain ⟨n, hb⟩ := hb rw [lt_iSup_iff] at hb obtain ⟨P, hP⟩ := hb calc a + b ≤ ((ksEntropyPartition hS R : ℝ) : EReal) + ((condKsEntropyPartition hm hT hinv P : ℝ) : EReal) := add_le_add hR.le hP.le _ = ((ksEntropyPartition hS R + condKsEntropyPartition hm hT hinv P : ℝ) : EReal) := (EReal.coe_add _ _).symm _ ≤ ((ksEntropyPartition hT (joinPartition (R.pulledBack hfac.1) P) : ℝ) : EReal) := EReal.coe_le_coe_iff.mpr (ksEntropyPartition_add_condKsEntropyPartition_le hfac hT hS R P) _ ≤ ksEntropy hT := ksEntropyPartition_coe_le_ksEntropy hT _ /-- **Entropy does not increase under factors**: `h(S) ≤ h(T)` for a factor map `π : (α, T, μ) → (β, S, ν)`. Immediate from the Abramov–Rokhlin formula and the nonnegativity of the relative entropy. -/ theorem ksEntropy_le_of_isFactorMap (hfac : IsFactorMap π T S μ ν) (hT : MeasurePreserving T μ μ) (hS : MeasurePreserving S ν ν) : ksEntropy hS ≤ ksEntropy hT := by rw [abramov_rokhlin hfac hT hS] exact le_add_of_nonneg_right (condKsEntropy_nonneg _ hT _) /-- **The relative entropy is at most the total entropy**: `h(T | π⁻¹ 𝓑_β) ≤ h(T)` for a factor map `π`. Immediate from the Abramov–Rokhlin formula and `0 ≤ h(S)`. -/ theorem condKsEntropy_le_ksEntropy_of_isFactorMap (hfac : IsFactorMap π T S μ ν) (hT : MeasurePreserving T μ μ) (hS : MeasurePreserving S ν ν) : condKsEntropy hfac.measurable_comap_le hT hfac.invariant_comap ≤ ksEntropy hT := by rw [abramov_rokhlin hfac hT hS] exact le_add_of_nonneg_left (ksEntropy_nonneg hS) end Factor section Examples variable {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y] [StandardBorelSpace X] [StandardBorelSpace Y] {μ : Measure X} {ν : Measure Y} [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] {T : X → X} omit [StandardBorelSpace X] [StandardBorelSpace Y] [IsProbabilityMeasure μ] in /-- The first projection is a factor map from `(X × Y, T × id, μ ⊗ ν)` to `(X, T, μ)`. -/ lemma isFactorMap_fst (hT : Measurable T) : IsFactorMap Prod.fst (Prod.map T id) T (μ.prod ν) μ := ⟨measurePreserving_fst, hT, rfl⟩ /-- The Abramov–Rokhlin formula for the factor map `Prod.fst : (X × Y, T × id) → (X, T)`, for every measure-preserving `T` of a standard Borel probability space: both sides equal `h(T)`, since `h(T × id) = h(T)` (`ksEntropy_prod_id_eq`). -/ example (hT : MeasurePreserving T μ μ) : letI hfac := isFactorMap_fst (μ := μ) (ν := ν) hT.measurable ksEntropy (hT.prod (MeasurePreserving.id ν)) = ksEntropy hT + condKsEntropy hfac.measurable_comap_le (hT.prod (MeasurePreserving.id ν)) hfac.invariant_comap := abramov_rokhlin (isFactorMap_fst (μ := μ) (ν := ν) hT.measurable) (hT.prod (MeasurePreserving.id ν)) hT end Examples end ErgodicTheory.Entropy