/- 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.TwoSided.Splitting public import ErgodicTheory.Ergodic.Birkhoff public import ErgodicTheory.Cocycle.Norm /-! # Sub-exponential angles in the two-sided Oseledets splitting For two subspaces `U, W ≤ ℝᵈ` the **sine of the minimal angle** between them is `sinMinAngle U W = inf {dist(u, W) | u ∈ U, ‖u‖ = 1}`; it is positive iff `U ∩ W = 0` (for `U ≠ 0`). For the Oseledets splitting `ℝᵈ = E₀(x) ⊕ ⋯ ⊕ E_{k-1}(x)` and any set `I` of indices, the angle between `⊕_{i ∈ I} Eᵢ(Tⁿx)` and `⊕_{j ∉ I} Eⱼ(Tⁿx)` may tend to zero along the orbit, but only **sub-exponentially**: `(1/n) log sinMinAngle(⊕_{i∈I} Eᵢ(Tⁿx), ⊕_{j∉I} Eⱼ(Tⁿx)) → 0` for `μ`-a.e. `x`. The proof has three ingredients. * **A tempering lemma** (`tendsto_inv_mul_comp_iterate_of_abs_sub_le`): if `φ` is measurable and `|φ ∘ T − φ| ≤ g ∈ L¹` for an ergodic `T`, then `(1/n) φ(Tⁿx) → 0` a.e. Birkhoff's theorem applied to the coboundary `φ ∘ T − φ` gives a limit `c`; if `c ≠ 0` then `|φ(Tⁿx)| → ∞` a.e., contradicting the `T`-invariance of the distribution of `φ`. * **A one-step distortion bound** (`abs_log_sinMinAngle_map_sub_le`): an invertible `L` changes the angle by at most the factor `‖L‖‖L⁻¹‖`, so `|log s(Tx) − log s(x)| ≤ log⁺‖A x‖ + log⁺‖(A x)⁻¹‖`. * **Measurability** (`measurable_log_sinMinAngle`): `log sinMinAngle U W` is a continuous function of the two orthogonal projection matrices (an infimum over the compact unit sphere), and sums of measurable subspace families are measurable (`MeasurableSubspace.biSup`, via orthogonal complements and `MeasurableSubspace.inf`). ## Main definitions * `ErgodicTheory.sinMinAngle`: the sine of the minimal angle between two subspaces. ## Main results * `ErgodicTheory.tendsto_inv_mul_comp_iterate_of_abs_sub_le`: the tempering lemma. * `ErgodicTheory.tendsto_log_sinMinAngle_of_splitting`: sub-exponential angles for any measurable equivariant splitting of an `L¹`-cocycle. * `ErgodicTheory.oseledets_splitting_angle`: the two-sided Oseledets splitting together with positivity and sub-exponential decay of the angles between complementary partial sums. ## References * V. I. Oseledets, *A multiplicative ergodic theorem. Lyapunov characteristic numbers for dynamical systems*, Trans. Moscow Math. Soc. 19 (1968). * L. Barreira, Ya. Pesin, *Nonuniform Hyperbolicity*, Cambridge University Press (2007). -/ @[expose] public section open MeasureTheory Filter Topology open scoped Matrix.Norms.L2Operator namespace ErgodicTheory variable {d : ℕ} /-! ### The sine of the minimal angle -/ /-- The **sine of the minimal angle** between subspaces `U` and `W` of `ℝᵈ`: `inf {dist(u, W) | u ∈ U, ‖u‖ = 1}`. It is `0` when `U = ⊥` (empty infimum) and `1` when `W = ⊥`, `U ≠ ⊥`. -/ noncomputable def sinMinAngle (U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : ℝ := sInf ((fun u => Metric.infDist u (W : Set (EuclideanSpace ℝ (Fin d)))) '' {u | u ∈ U ∧ ‖u‖ = 1}) section Angle variable {U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))} private theorem bddBelow_infDist_image (U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : BddBelow ((fun u => Metric.infDist u (W : Set (EuclideanSpace ℝ (Fin d)))) '' {u | u ∈ U ∧ ‖u‖ = 1}) := ⟨0, by rintro _ ⟨u, -, rfl⟩; exact Metric.infDist_nonneg⟩ theorem sinMinAngle_nonneg (U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : 0 ≤ sinMinAngle U W := Real.sInf_nonneg (by rintro _ ⟨u, -, rfl⟩; exact Metric.infDist_nonneg) @[simp] theorem sinMinAngle_bot_left (W : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : sinMinAngle ⊥ W = 0 := by have h : {u : EuclideanSpace ℝ (Fin d) | u ∈ (⊥ : Submodule ℝ _) ∧ ‖u‖ = 1} = ∅ := by ext u simp only [Submodule.mem_bot, Set.mem_ofPred_eq, Set.mem_empty_iff_false, iff_false, not_and] rintro rfl simp rw [sinMinAngle, h, Set.image_empty, Real.sInf_empty] /-- A nonzero subspace contains a unit vector. -/ private theorem exists_unit_mem (hU : U ≠ ⊥) : ∃ u ∈ U, ‖u‖ = 1 := by obtain ⟨v, hv, hv0⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hU exact ⟨‖v‖⁻¹ • v, U.smul_mem _ hv, norm_smul_inv_norm hv0⟩ theorem sinMinAngle_le_infDist {u : EuclideanSpace ℝ (Fin d)} (hu : u ∈ U) (h1 : ‖u‖ = 1) : sinMinAngle U W ≤ Metric.infDist u (W : Set (EuclideanSpace ℝ (Fin d))) := csInf_le (bddBelow_infDist_image U W) ⟨u, ⟨hu, h1⟩, rfl⟩ theorem sinMinAngle_le_one (hU : U ≠ ⊥) : sinMinAngle U W ≤ 1 := by obtain ⟨u, hu, h1⟩ := exists_unit_mem hU calc sinMinAngle U W ≤ Metric.infDist u (W : Set (EuclideanSpace ℝ (Fin d))) := sinMinAngle_le_infDist hu h1 _ ≤ dist u 0 := Metric.infDist_le_dist_of_mem W.zero_mem _ = 1 := by rw [dist_zero_right, h1] /-- The defining inequality: `sinMinAngle U W · ‖u‖ ≤ ‖u − w‖` for `u ∈ U`, `w ∈ W`. -/ theorem sinMinAngle_mul_norm_le {u w : EuclideanSpace ℝ (Fin d)} (hu : u ∈ U) (hw : w ∈ W) : sinMinAngle U W * ‖u‖ ≤ ‖u - w‖ := by rcases eq_or_ne u 0 with rfl | hu0 · simp have hn : 0 < ‖u‖ := norm_pos_iff.2 hu0 have h := sinMinAngle_le_infDist (W := W) (U.smul_mem ‖u‖⁻¹ hu) (norm_smul_inv_norm hu0) have h2 : Metric.infDist (‖u‖⁻¹ • u) (W : Set (EuclideanSpace ℝ (Fin d))) ≤ dist (‖u‖⁻¹ • u) (‖u‖⁻¹ • w) := Metric.infDist_le_dist_of_mem (W.smul_mem _ hw) have h3 : dist (‖u‖⁻¹ • u) (‖u‖⁻¹ • w) = ‖u‖⁻¹ * ‖u - w‖ := by rw [dist_eq_norm, ← smul_sub, norm_smul, norm_inv, norm_norm] have h4 : sinMinAngle U W ≤ ‖u‖⁻¹ * ‖u - w‖ := h.trans (h2.trans h3.le) calc sinMinAngle U W * ‖u‖ ≤ (‖u‖⁻¹ * ‖u - w‖) * ‖u‖ := by gcongr _ = ‖u - w‖ := by field_simp /-- The characterisation from below: any `c` with `c‖u‖ ≤ ‖u − w‖` on `U × W` is at most `sinMinAngle U W`. -/ theorem le_sinMinAngle {c : ℝ} (hU : U ≠ ⊥) (h : ∀ u ∈ U, ∀ w ∈ W, c * ‖u‖ ≤ ‖u - w‖) : c ≤ sinMinAngle U W := by obtain ⟨u, hu, h1⟩ := exists_unit_mem hU refine le_csInf ⟨_, u, ⟨hu, h1⟩, rfl⟩ ?_ rintro _ ⟨v, ⟨hv, hv1⟩, rfl⟩ rw [Metric.le_infDist ⟨0, W.zero_mem⟩] intro w hw have := h v hv w hw rwa [hv1, mul_one, ← dist_eq_norm] at this /-- **Positivity.** If `U ≠ ⊥` and `U ⊓ W = ⊥`, then `sinMinAngle U W > 0`: the infimum of the continuous positive function `dist(·, W)` over the compact unit sphere of `U` is attained. -/ theorem sinMinAngle_pos (hU : U ≠ ⊥) (hUW : Disjoint U W) : 0 < sinMinAngle U W := by set K : Set (EuclideanSpace ℝ (Fin d)) := {u | u ∈ U ∧ ‖u‖ = 1} with hKdef have hKc : IsCompact K := by have hK : K = (U : Set (EuclideanSpace ℝ (Fin d))) ∩ Metric.sphere 0 1 := by ext u; simp [K] rw [hK] exact (isCompact_sphere 0 1).inter_left U.isClosed_of_finiteDimensional have hcont : Continuous fun u => Metric.infDist u (W : Set (EuclideanSpace ℝ (Fin d))) := Metric.continuous_infDist_pt _ obtain ⟨u, hu, h1⟩ := exists_unit_mem hU obtain ⟨v, ⟨hv, hv1⟩, hveq⟩ := (hKc.image hcont).sInf_mem ⟨_, u, ⟨hu, h1⟩, rfl⟩ change 0 < sInf _ rw [← hveq] have hvW : v ∉ (W : Set (EuclideanSpace ℝ (Fin d))) := by intro hvW have hvUW : v ∈ U ⊓ W := ⟨hv, hvW⟩ rw [hUW.eq_bot, Submodule.mem_bot] at hvUW simp [hvUW] at hv1 exact (W.isClosed_of_finiteDimensional.notMem_iff_infDist_pos ⟨0, W.zero_mem⟩).1 hvW end Angle /-! ### Distortion of the angle under an invertible map -/ section Distortion variable {U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))} (L L' : EuclideanSpace ℝ (Fin d) →L[ℝ] EuclideanSpace ℝ (Fin d)) private theorem one_le_opNorm_mul (hLL : ∀ v, L' (L v) = v) {u : EuclideanSpace ℝ (Fin d)} (hu : u ≠ 0) : 1 ≤ ‖L‖ * ‖L'‖ := by have hn : 0 < ‖u‖ := norm_pos_iff.2 hu have h : ‖u‖ ≤ ‖L‖ * ‖L'‖ * ‖u‖ := calc ‖u‖ = ‖L' (L u)‖ := by rw [hLL] _ ≤ ‖L'‖ * ‖L u‖ := L'.le_opNorm _ _ ≤ ‖L'‖ * (‖L‖ * ‖u‖) := by gcongr; exact L.le_opNorm u _ = ‖L‖ * ‖L'‖ * ‖u‖ := by ring by_contra hlt have hlt' := not_le.mp hlt nlinarith private theorem map_ne_bot (hLL : ∀ v, L' (L v) = v) (hU : U ≠ ⊥) : U.map L.toLinearMap ≠ ⊥ := by obtain ⟨u, hu, hu0⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hU intro hbot have hmem : L u ∈ U.map L.toLinearMap := Submodule.mem_map_of_mem hu rw [hbot, Submodule.mem_bot] at hmem apply hu0 rw [← hLL u, hmem, map_zero] /-- **One-sided distortion bound.** If `L' ∘ L = id`, then `sinMinAngle U W / (‖L‖‖L'‖) ≤ sinMinAngle (L U) (L W)`. -/ theorem div_le_sinMinAngle_map (hLL : ∀ v, L' (L v) = v) (hU : U ≠ ⊥) : sinMinAngle U W / (‖L‖ * ‖L'‖) ≤ sinMinAngle (U.map L.toLinearMap) (W.map L.toLinearMap) := by obtain ⟨u0, -, hu0⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hU have hK : 1 ≤ ‖L‖ * ‖L'‖ := one_le_opNorm_mul L L' hLL hu0 apply le_sinMinAngle (map_ne_bot L L' hLL hU) intro u' hu' w' hw' obtain ⟨u, hu, rfl⟩ := Submodule.mem_map.1 hu' obtain ⟨w, hw, rfl⟩ := Submodule.mem_map.1 hw' simp only [ContinuousLinearMap.coe_coe] have h2 : ‖u - w‖ ≤ ‖L'‖ * ‖L u - L w‖ := calc ‖u - w‖ = ‖L' (L u - L w)‖ := by rw [← map_sub, hLL] _ ≤ _ := L'.le_opNorm _ have h3 := sinMinAngle_mul_norm_le (W := W) hu hw have hs := sinMinAngle_nonneg U W rw [div_mul_eq_mul_div, div_le_iff₀ (by linarith)] calc sinMinAngle U W * ‖L u‖ ≤ sinMinAngle U W * (‖L‖ * ‖u‖) := by gcongr; exact L.le_opNorm u _ = ‖L‖ * (sinMinAngle U W * ‖u‖) := by ring _ ≤ ‖L‖ * (‖L'‖ * ‖L u - L w‖) := mul_le_mul_of_nonneg_left (h3.trans h2) (norm_nonneg _) _ = ‖L u - L w‖ * (‖L‖ * ‖L'‖) := by ring private theorem map_map_of_leftInverse (hLL : ∀ v, L' (L v) = v) (V : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : (V.map L.toLinearMap).map L'.toLinearMap = V := by rw [← Submodule.map_comp] have hid : L'.toLinearMap.comp L.toLinearMap = LinearMap.id := by ext v; simp [hLL] rw [hid, Submodule.map_id] /-- **Two-sided distortion bound for the logarithm.** If `L` is invertible with inverse `L'` and `U ⊓ W = ⊥`, then `|log s(L U, L W) − log s(U, W)| ≤ log⁺‖L‖ + log⁺‖L'‖`. -/ theorem abs_log_sinMinAngle_map_sub_le (hLL : ∀ v, L' (L v) = v) (hLL' : ∀ v, L (L' v) = v) (hUW : Disjoint U W) : |Real.log (sinMinAngle (U.map L.toLinearMap) (W.map L.toLinearMap)) - Real.log (sinMinAngle U W)| ≤ Real.posLog ‖L‖ + Real.posLog ‖L'‖ := by rcases eq_or_ne U ⊥ with rfl | hU · simp only [Submodule.map_bot, sinMinAngle_bot_left, Real.log_zero, sub_self, abs_zero] exact add_nonneg Real.posLog_nonneg Real.posLog_nonneg obtain ⟨u0, -, hu0⟩ := Submodule.exists_mem_ne_zero_of_ne_bot hU have hK : 1 ≤ ‖L‖ * ‖L'‖ := one_le_opNorm_mul L L' hLL hu0 have hKpos : 0 < ‖L‖ * ‖L'‖ := by linarith have hL0 : ‖L‖ ≠ 0 := fun h => by rw [h, zero_mul] at hK; linarith have hL'0 : ‖L'‖ ≠ 0 := fun h => by rw [h, mul_zero] at hK; linarith have hs : 0 < sinMinAngle U W := sinMinAngle_pos hU hUW have hfw := div_le_sinMinAngle_map (W := W) L L' hLL hU have hbw := div_le_sinMinAngle_map (W := W.map L.toLinearMap) L' L hLL' (map_ne_bot L L' hLL hU) rw [map_map_of_leftInverse L L' hLL, map_map_of_leftInverse L L' hLL, mul_comm] at hbw have hs' : 0 < sinMinAngle (U.map L.toLinearMap) (W.map L.toLinearMap) := lt_of_lt_of_le (div_pos hs hKpos) hfw have hlogK : Real.log (‖L‖ * ‖L'‖) ≤ Real.posLog ‖L‖ + Real.posLog ‖L'‖ := by rw [Real.log_mul hL0 hL'0] exact add_le_add (le_max_right _ _) (le_max_right _ _) have e1 := Real.log_le_log (div_pos hs hKpos) hfw have e2 := Real.log_le_log (div_pos hs' hKpos) hbw rw [Real.log_div hs.ne' hKpos.ne'] at e1 rw [Real.log_div hs'.ne' hKpos.ne'] at e2 rw [abs_le] constructor <;> linarith end Distortion /-! ### Measurability -/ section Measurability /-- The integrand of the projection-matrix formula for the angle: `‖P v − R (P v)‖ + ‖v − P v‖`, with `P`, `R` acting through `Matrix.toEuclideanCLM`. -/ private noncomputable def angleIntegrand (P R : Matrix (Fin d) (Fin d) ℝ) (v : EuclideanSpace ℝ (Fin d)) : ℝ := ‖Matrix.toEuclideanCLM (𝕜 := ℝ) P v - Matrix.toEuclideanCLM (𝕜 := ℝ) R (Matrix.toEuclideanCLM (𝕜 := ℝ) P v)‖ + ‖v - Matrix.toEuclideanCLM (𝕜 := ℝ) P v‖ /-- The infimum of `angleIntegrand P R` over the unit sphere. -/ private noncomputable def angleAux (P R : Matrix (Fin d) (Fin d) ℝ) : ℝ := sInf (angleIntegrand P R '' Metric.sphere (0 : EuclideanSpace ℝ (Fin d)) 1) private theorem continuous_toEuclideanCLM : Continuous fun M : Matrix (Fin d) (Fin d) ℝ => Matrix.toEuclideanCLM (𝕜 := ℝ) M := Isometry.continuous fun _ => congrFun rfl private theorem continuous_angleAux : Continuous fun p : Matrix (Fin d) (Fin d) ℝ × Matrix (Fin d) (Fin d) ℝ => angleAux p.1 p.2 := by have hP : Continuous fun q : (Matrix (Fin d) (Fin d) ℝ × Matrix (Fin d) (Fin d) ℝ) × EuclideanSpace ℝ (Fin d) => Matrix.toEuclideanCLM (𝕜 := ℝ) q.1.1 q.2 := (continuous_toEuclideanCLM.comp (continuous_fst.comp continuous_fst)).clm_apply continuous_snd have hR : Continuous fun q : (Matrix (Fin d) (Fin d) ℝ × Matrix (Fin d) (Fin d) ℝ) × EuclideanSpace ℝ (Fin d) => Matrix.toEuclideanCLM (𝕜 := ℝ) q.1.2 (Matrix.toEuclideanCLM (𝕜 := ℝ) q.1.1 q.2) := (continuous_toEuclideanCLM.comp (continuous_snd.comp continuous_fst)).clm_apply hP have hf : Continuous fun q : (Matrix (Fin d) (Fin d) ℝ × Matrix (Fin d) (Fin d) ℝ) × EuclideanSpace ℝ (Fin d) => angleIntegrand q.1.1 q.1.2 q.2 := (hP.sub hR).norm.add (continuous_snd.sub hP).norm have h2 := (isCompact_sphere (0 : EuclideanSpace ℝ (Fin d)) 1).continuous_sInf (f := fun (p : Matrix (Fin d) (Fin d) ℝ × Matrix (Fin d) (Fin d) ℝ) (v : EuclideanSpace ℝ (Fin d)) => angleIntegrand p.1 p.2 v) hf exact h2 private theorem toEuclideanCLM_orthProjMatrix (K : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : Matrix.toEuclideanCLM (𝕜 := ℝ) (orthProjMatrix K) = K.starProjection := StarAlgEquiv.apply_symm_apply _ _ private theorem angleIntegrand_nonneg (P R : Matrix (Fin d) (Fin d) ℝ) (v : EuclideanSpace ℝ (Fin d)) : 0 ≤ angleIntegrand P R v := add_nonneg (norm_nonneg _) (norm_nonneg _) /-- For `U ≠ ⊥`, the sine of the minimal angle is the infimum over the unit sphere of `‖P_U v − P_W (P_U v)‖ + ‖v − P_U v‖`. -/ private theorem sinMinAngle_eq_angleAux {U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))} (hU : U ≠ ⊥) : sinMinAngle U W = angleAux (orthProjMatrix U) (orthProjMatrix W) := by obtain ⟨u, hu, h1⟩ := exists_unit_mem hU have hsph : ∀ v : EuclideanSpace ℝ (Fin d), v ∈ Metric.sphere 0 1 ↔ ‖v‖ = 1 := fun v => mem_sphere_zero_iff_norm have hint : ∀ v, angleIntegrand (orthProjMatrix U) (orthProjMatrix W) v = ‖U.starProjection v - W.starProjection (U.starProjection v)‖ + ‖v - U.starProjection v‖ := by intro v; simp only [angleIntegrand, toEuclideanCLM_orthProjMatrix] have hbdd : BddBelow (angleIntegrand (orthProjMatrix U) (orthProjMatrix W) '' Metric.sphere 0 1) := ⟨0, by rintro _ ⟨v, -, rfl⟩; exact angleIntegrand_nonneg _ _ v⟩ apply le_antisymm · -- `s ≤ G v` for every unit `v`. refine le_csInf ⟨_, u, (hsph u).2 h1, rfl⟩ ?_ rintro _ ⟨v, hv, rfl⟩ rw [hint] set a := U.starProjection v have ha : a ∈ U := U.starProjection_apply_mem v have h3 := sinMinAngle_mul_norm_le (W := W) ha (W.starProjection_apply_mem a) have hs0 := sinMinAngle_nonneg U W have hs1 := sinMinAngle_le_one (W := W) hU have htri : ‖v‖ ≤ ‖a‖ + ‖v - a‖ := norm_le_norm_add_norm_sub' v a rw [(hsph v).1 hv] at htri have hb := norm_nonneg (v - a) nlinarith · -- `G u ≤ dist(u, W)` for every unit `u ∈ U`. refine le_csInf ⟨_, u, ⟨hu, h1⟩, rfl⟩ ?_ rintro _ ⟨v, ⟨hv, hv1⟩, rfl⟩ refine (csInf_le hbdd ⟨v, (hsph v).2 hv1, rfl⟩).trans ?_ rw [hint, Submodule.starProjection_eq_self_iff.mpr hv, sub_self, norm_zero, add_zero, ← dist_eq_norm, Submodule.dist_starProjection_eq_infDist] /-- `log sinMinAngle U W` is a function of the two orthogonal projection matrices. -/ private theorem log_sinMinAngle_eq (U W : Submodule ℝ (EuclideanSpace ℝ (Fin d))) : Real.log (sinMinAngle U W) = Real.log (angleAux (orthProjMatrix U) (orthProjMatrix W)) := by rcases eq_or_ne U ⊥ with rfl | hU · rw [sinMinAngle_bot_left, Real.log_zero] rcases (Metric.sphere (0 : EuclideanSpace ℝ (Fin d)) 1).eq_empty_or_nonempty with h | h · rw [angleAux, h, Set.image_empty, Real.sInf_empty, Real.log_zero] · have hconst : Set.EqOn (angleIntegrand (orthProjMatrix ⊥) (orthProjMatrix W)) (fun _ => (1 : ℝ)) (Metric.sphere 0 1) := by intro v hv simp only [angleIntegrand, toEuclideanCLM_orthProjMatrix, Submodule.starProjection_bot, zero_apply, map_zero, sub_zero, norm_zero, zero_add] exact mem_sphere_zero_iff_norm.1 hv rw [angleAux, hconst.image_eq, h.image_const, csInf_singleton, Real.log_one] · rw [sinMinAngle_eq_angleAux hU] variable {X : Type*} [MeasurableSpace X] /-- The orthogonal complement of a measurable subspace family is measurable: `orthProjMatrix Kᗮ = 1 − orthProjMatrix K`. -/ theorem MeasurableSubspace.orthogonal {K : X → Submodule ℝ (EuclideanSpace ℝ (Fin d))} (hK : MeasurableSubspace K) : MeasurableSubspace fun x => (K x)ᗮ := by have h : ∀ x, orthProjMatrix (K x)ᗮ = 1 - orthProjMatrix (K x) := by intro x simp [orthProjMatrix, Submodule.starProjection_orthogonal', map_sub, map_one] unfold MeasurableSubspace simp only [h] refine measurable_pi_iff.2 fun i => measurable_pi_iff.2 fun j => ?_ simp only [Matrix.sub_apply] exact measurable_const.sub ((measurable_matrix_entry i j).comp hK) /-- The sum of two measurable subspace families is measurable: `K ⊔ L = (Kᗮ ⊓ Lᗮ)ᗮ`. -/ theorem MeasurableSubspace.sup {K L : X → Submodule ℝ (EuclideanSpace ℝ (Fin d))} (hK : MeasurableSubspace K) (hL : MeasurableSubspace L) : MeasurableSubspace fun x => K x ⊔ L x := by have h : (fun x => K x ⊔ L x) = fun x => ((K x)ᗮ ⊓ (L x)ᗮ)ᗮ := by funext x rw [Submodule.inf_orthogonal, Submodule.orthogonal_orthogonal] rw [h] exact (hK.orthogonal.inf hL.orthogonal).orthogonal /-- A finite sum `x ↦ ⨆ i ∈ J, E i x` of measurable subspace families is measurable. -/ theorem MeasurableSubspace.biSup {ι : Type*} {E : ι → X → Submodule ℝ (EuclideanSpace ℝ (Fin d))} (hE : ∀ i, MeasurableSubspace (E i)) (J : Finset ι) : MeasurableSubspace fun x => ⨆ i ∈ J, E i x := by classical induction J using Finset.induction_on with | empty => simp only [Finset.notMem_empty, iSup_false, iSup_bot] exact measurable_const | insert a s _ ih => simp only [Finset.iSup_insert] exact (hE a).sup ih /-- **Measurability of the log-angle.** For measurable subspace families `U`, `W`, the map `x ↦ log sinMinAngle (U x) (W x)` is measurable. -/ theorem measurable_log_sinMinAngle {U W : X → Submodule ℝ (EuclideanSpace ℝ (Fin d))} (hU : MeasurableSubspace U) (hW : MeasurableSubspace W) : Measurable fun x => Real.log (sinMinAngle (U x) (W x)) := by simp only [log_sinMinAngle_eq] exact Real.measurable_log.comp (continuous_angleAux.measurable2 hU hW) end Measurability /-! ### The tempering lemma -/ section Tempering variable {X : Type*} [MeasurableSpace X] {μ : Measure X} {T : X → X} omit [MeasurableSpace X] in /-- Birkhoff averages of a coboundary telescope: `(1/n) ∑_{k φ (T y) - φ y) n x = (n : ℝ)⁻¹ * (φ (T^[n] x) - φ x) := by rw [birkhoffAverage, birkhoffSum, smul_eq_mul] congr 1 have h := Finset.sum_range_sub (fun k => φ (T^[k] x)) n simp only [Function.iterate_succ_apply', Function.iterate_zero_apply] at h exact h /-- Under a measure-preserving map, `(1/n) φ(Tⁿx)` cannot converge a.e. to a nonzero constant: otherwise `|φ(Tⁿx)| → ∞` a.e., while `μ {|φ ∘ Tⁿ| ≤ M} = μ {|φ| ≤ M}` stays positive. -/ private theorem false_of_tendsto_ne_zero [IsProbabilityMeasure μ] (hmp : MeasurePreserving T μ μ) {φ : X → ℝ} (hφ : Measurable φ) {c : ℝ} (hc : c ≠ 0) (h : ∀ᵐ x ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * φ (T^[n] x)) atTop (𝓝 c)) : False := by -- A sublevel set of positive measure. obtain ⟨M, hM⟩ : ∃ M : ℕ, 0 < μ {x | |φ x| ≤ M} := by by_contra hcon simp only [not_exists, not_lt, nonpos_iff_eq_zero] at hcon have hnull : μ (⋃ M : ℕ, {x | |φ x| ≤ M}) = 0 := measure_iUnion_null hcon have hcover : (⋃ M : ℕ, {x | |φ x| ≤ (M : ℝ)}) = Set.univ := Set.eq_univ_of_forall fun x => Set.mem_iUnion.2 (exists_nat_ge |φ x|) rw [hcover, measure_univ] at hnull exact one_ne_zero hnull -- Along a.e. orbit, `|φ(Tⁿx)|` eventually exceeds `M`. have hdiv : ∀ᵐ x ∂μ, ∃ N : ℕ, ∀ n ≥ N, (M : ℝ) < |φ (T^[n] x)| := by filter_upwards [h] with x hx have hprod : Tendsto (fun n : ℕ => (n : ℝ) * |(n : ℝ)⁻¹ * φ (T^[n] x)|) atTop atTop := tendsto_natCast_atTop_atTop.atTop_mul_pos (abs_pos.2 hc) hx.abs obtain ⟨N, hN⟩ := eventually_atTop.1 ((hprod.eventually_gt_atTop (M : ℝ)).and (eventually_ne_atTop 0)) refine ⟨N, fun n hn => ?_⟩ obtain ⟨h1, h2⟩ := hN n hn have hn0 : (n : ℝ) ≠ 0 := Nat.cast_ne_zero.2 h2 rwa [abs_mul, abs_inv, Nat.abs_cast, ← mul_assoc, mul_inv_cancel₀ hn0, one_mul] at h1 -- The sets where the escape has happened from time `N` on. let B : ℕ → Set X := fun N => ⋂ n, ⋂ (_ : N ≤ n), {x | (M : ℝ) < |φ (T^[n] x)|} have hBmeas : ∀ N, MeasurableSet (B N) := fun N => MeasurableSet.iInter fun n => MeasurableSet.iInter fun _ => measurableSet_lt measurable_const (continuous_abs.measurable.comp (hφ.comp (hmp.measurable.iterate n))) have hanti : Antitone fun N => (B N)ᶜ := by intro N N' hNN' refine Set.compl_subset_compl.2 fun x hx => ?_ simp only [B, Set.mem_iInter] at hx ⊢ exact fun n hn => hx n (hNN'.trans hn) have hInter : μ (⋂ N, (B N)ᶜ) = 0 := by refine measure_mono_null (fun x hx => ?_) (ae_iff.1 hdiv) simp only [Set.mem_iInter, Set.mem_compl_iff] at hx rintro ⟨N, hN⟩ exact hx N (by simp only [B, Set.mem_iInter]; exact fun n hn => hN n hn) have hlim := tendsto_measure_iInter_atTop (μ := μ) (fun N => (hBmeas N).compl.nullMeasurableSet) hanti ⟨0, measure_ne_top _ _⟩ rw [hInter] at hlim obtain ⟨N, hN⟩ := ((tendsto_order.1 hlim).2 _ hM).exists -- The `N`-th preimage of the sublevel set lies in the complement of `B N`. have hS : MeasurableSet {x | |φ x| ≤ (M : ℝ)} := measurableSet_le (continuous_abs.measurable.comp hφ) measurable_const have hpre : T^[N] ⁻¹' {x | |φ x| ≤ (M : ℝ)} ⊆ (B N)ᶜ := by intro x hx hxB simp only [B, Set.mem_iInter] at hxB have hx' : |φ (T^[N] x)| ≤ (M : ℝ) := hx exact not_le.2 (hxB N le_rfl) hx' have hle := measure_mono (μ := μ) hpre rw [(hmp.iterate N).measure_preimage hS.nullMeasurableSet] at hle exact lt_irrefl _ (hle.trans_lt hN) /-- **Tempering lemma.** Let `T` be ergodic for a probability measure `μ`, `φ` measurable, and `|φ ∘ T − φ| ≤ g` a.e. for an integrable `g`. Then `(1/n) φ(Tⁿ x) → 0` for `μ`-a.e. `x`. -/ theorem tendsto_inv_mul_comp_iterate_of_abs_sub_le [IsProbabilityMeasure μ] (hT : Ergodic T μ) {φ g : X → ℝ} (hφ : Measurable φ) (hg : Integrable g μ) (hbound : ∀ᵐ x ∂μ, |φ (T x) - φ x| ≤ g x) : ∀ᵐ x ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * φ (T^[n] x)) atTop (𝓝 0) := by have hmp : MeasurePreserving T μ μ := hT.toMeasurePreserving have hψ : Integrable (fun y => φ (T y) - φ y) μ := hg.mono' ((hφ.comp hmp.measurable).sub hφ).aestronglyMeasurable (by filter_upwards [hbound] with x hx; rwa [Real.norm_eq_abs]) have hc : ∀ᵐ x ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * φ (T^[n] x)) atTop (𝓝 (∫ y, (φ (T y) - φ y) ∂μ)) := by filter_upwards [tendsto_birkhoffAverage_ae_integral hT hψ] with x hx have hx0 : Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * φ x) atTop (𝓝 0) := by simpa using (tendsto_inv_atTop_zero.comp tendsto_natCast_atTop_atTop).mul_const (φ x) have hsum := hx.add hx0 rw [add_zero] at hsum refine hsum.congr fun n => ?_ rw [birkhoffAverage_coboundary] ring by_cases h0 : ∫ y, (φ (T y) - φ y) ∂μ = 0 · rwa [h0] at hc · exact (false_of_tendsto_ne_zero hmp hφ h0 hc).elim end Tempering /-! ### Sub-exponential angles along a measurable equivariant splitting -/ section Splitting variable {X : Type*} [MeasurableSpace X] /-- In an internal direct sum, the partial sums over `I` and over `Iᶜ` are disjoint. -/ theorem disjoint_biSup_biSup_compl {k : ℕ} {E : Fin k → Submodule ℝ (EuclideanSpace ℝ (Fin d))} (h : DirectSum.IsInternal E) (I : Finset (Fin k)) : Disjoint (⨆ i ∈ I, E i) (⨆ j ∈ Iᶜ, E j) := by have := h.submodule_iSupIndep.disjoint_biSup_biSup (s := (I : Set (Fin k))) (t := ((Iᶜ : Finset (Fin k)) : Set (Fin k))) (by rw [Finset.coe_compl]; exact disjoint_compl_right) simpa only [Finset.mem_coe] using this private theorem toEuclideanCLM_inv_apply_apply {M : Matrix (Fin d) (Fin d) ℝ} (hM : M.det ≠ 0) (v : EuclideanSpace ℝ (Fin d)) : Matrix.toEuclideanCLM (𝕜 := ℝ) M⁻¹ (Matrix.toEuclideanCLM (𝕜 := ℝ) M v) = v := by rw [← mul_apply_eq_comp, ← map_mul, Matrix.nonsing_inv_mul _ (Ne.isUnit hM), map_one, one_apply_eq_self] private theorem toEuclideanCLM_apply_inv_apply {M : Matrix (Fin d) (Fin d) ℝ} (hM : M.det ≠ 0) (v : EuclideanSpace ℝ (Fin d)) : Matrix.toEuclideanCLM (𝕜 := ℝ) M (Matrix.toEuclideanCLM (𝕜 := ℝ) M⁻¹ v) = v := by rw [← mul_apply_eq_comp, ← map_mul, Matrix.mul_nonsing_inv _ (Ne.isUnit hM), map_one, one_apply_eq_self] /-- **Sub-exponential angles for a measurable equivariant splitting.** Let `T` be ergodic for a probability measure `μ`, `A` an everywhere-invertible cocycle generator with `log⁺‖A‖, log⁺‖A⁻¹‖ ∈ L¹(μ)`, and `E₀, …, E_{k-1}` measurable subspace families forming, a.e., an `A`-equivariant internal direct sum. Then for every `I`, a.e., `(1/n) log sinMinAngle(⊕_{i∈I} Eᵢ(Tⁿx), ⊕_{j∉I} Eⱼ(Tⁿx)) → 0`. -/ theorem tendsto_log_sinMinAngle_of_splitting {μ : Measure X} [IsProbabilityMeasure μ] {T : X → X} (hT : Ergodic T μ) (A : X → Matrix (Fin d) (Fin d) ℝ) (hA : ∀ x, (A x).det ≠ 0) (hint : IntegrableLogNorm A μ) (hint' : IntegrableLogNorm (fun x => (A x)⁻¹) μ) {k : ℕ} (E : Fin k → X → Submodule ℝ (EuclideanSpace ℝ (Fin d))) (hmeas : ∀ i, MeasurableSubspace (E i)) (hsplit : ∀ᵐ x ∂μ, DirectSum.IsInternal (fun i => E i x) ∧ ∀ i, Submodule.map (Matrix.toEuclideanCLM (𝕜 := ℝ) (A x)).toLinearMap (E i x) = E i (T x)) (I : Finset (Fin k)) : ∀ᵐ x ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * Real.log (sinMinAngle (⨆ i ∈ I, E i (T^[n] x)) (⨆ j ∈ Iᶜ, E j (T^[n] x)))) atTop (𝓝 0) := by refine tendsto_inv_mul_comp_iterate_of_abs_sub_le hT (φ := fun x => Real.log (sinMinAngle (⨆ i ∈ I, E i x) (⨆ j ∈ Iᶜ, E j x))) (g := fun x => Real.posLog ‖A x‖ + Real.posLog ‖(A x)⁻¹‖) (measurable_log_sinMinAngle (MeasurableSubspace.biSup hmeas I) (MeasurableSubspace.biSup hmeas Iᶜ)) (hint.add hint') ?_ filter_upwards [hsplit] with x ⟨hintx, hmap⟩ have hU : (⨆ i ∈ I, E i x).map (Matrix.toEuclideanCLM (𝕜 := ℝ) (A x)).toLinearMap = ⨆ i ∈ I, E i (T x) := by simp only [Submodule.map_iSup, hmap] have hW : (⨆ j ∈ Iᶜ, E j x).map (Matrix.toEuclideanCLM (𝕜 := ℝ) (A x)).toLinearMap = ⨆ j ∈ Iᶜ, E j (T x) := by simp only [Submodule.map_iSup, hmap] have hd := abs_log_sinMinAngle_map_sub_le (Matrix.toEuclideanCLM (𝕜 := ℝ) (A x)) (Matrix.toEuclideanCLM (𝕜 := ℝ) (A x)⁻¹) (toEuclideanCLM_inv_apply_apply (hA x)) (toEuclideanCLM_apply_inv_apply (hA x)) (disjoint_biSup_biSup_compl hintx I) rw [hU, hW, Matrix.l2_opNorm_toEuclideanCLM, Matrix.l2_opNorm_toEuclideanCLM] at hd exact hd end Splitting /-! ### The two-sided Oseledets splitting with sub-exponential angles -/ variable {X : Type*} [MeasurableSpace X] /-- **The two-sided Oseledets theorem with sub-exponential angles.** For an invertible ergodic measure-preserving system `T : X ≃ᵐ X` and a measurable everywhere-invertible cocycle generator `A` with `log⁺‖A‖, log⁺‖A⁻¹‖ ∈ L¹(μ)`, the Oseledets splitting `ℝᵈ = E₀(x) ⊕ ⋯ ⊕ E_{k-1}(x)` of `oseledets_splitting` satisfies, in addition, for every set `I` of indices and `μ`-a.e. `x`: the angle between `⊕_{i∈I} Eᵢ(x)` and `⊕_{j∉I} Eⱼ(x)` is positive (when `I ≠ ∅`), and it decays at most sub-exponentially along the orbit: `(1/n) log sinMinAngle(⊕_{i∈I} Eᵢ(Tⁿx), ⊕_{j∉I} Eⱼ(Tⁿx)) → 0`. -/ theorem oseledets_splitting_angle {μ : Measure X} [IsProbabilityMeasure μ] {T : X ≃ᵐ X} (hT : Ergodic T μ) (A : X → Matrix (Fin d) (Fin d) ℝ) (hA : ∀ x, (A x).det ≠ 0) (hAmeas : Measurable A) (hint : IntegrableLogNorm A μ) (hint' : IntegrableLogNorm (fun x => (A x)⁻¹) μ) : ∃ (k : ℕ) (lam : Fin k → ℝ) (E : Fin k → X → Submodule ℝ (EuclideanSpace ℝ (Fin d))), StrictAnti lam ∧ (∀ i, MeasurableSubspace fun x => E i x) ∧ (∀ᵐ x ∂μ, DirectSum.IsInternal (fun i => E i x) ∧ (∀ i, E i x ≠ ⊥) ∧ (∀ i, Submodule.map (Matrix.toEuclideanCLM (𝕜 := ℝ) (A x)).toLinearMap (E i x) = E i (T x)) ∧ (∀ i, ∀ v ∈ E i x, v ≠ 0 → Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * Real.log ‖Matrix.toEuclideanCLM (𝕜 := ℝ) (cocycle A T n x) v‖) atTop (𝓝 (lam i)) ∧ Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * Real.log ‖Matrix.toEuclideanCLM (𝕜 := ℝ) (cocycle A T n ((⇑T.symm)^[n] x))⁻¹ v‖) atTop (𝓝 (-lam i)))) ∧ ∀ I : Finset (Fin k), ∀ᵐ x ∂μ, (I.Nonempty → 0 < sinMinAngle (⨆ i ∈ I, E i x) (⨆ j ∈ Iᶜ, E j x)) ∧ Tendsto (fun n : ℕ => (n : ℝ)⁻¹ * Real.log (sinMinAngle (⨆ i ∈ I, E i ((⇑T)^[n] x)) (⨆ j ∈ Iᶜ, E j ((⇑T)^[n] x)))) atTop (𝓝 0) := by obtain ⟨k, lam, E, hlam, hmeas, hae⟩ := oseledets_splitting hT A hA hAmeas hint hint' refine ⟨k, lam, E, hlam, hmeas, hae, fun I => ?_⟩ have hlim := tendsto_log_sinMinAngle_of_splitting hT A hA hint hint' E hmeas (hae.mono fun x hx => ⟨hx.1, hx.2.2.1⟩) I filter_upwards [hae, hlim] with x hx hlimx refine ⟨fun hI => ?_, hlimx⟩ obtain ⟨i, hi⟩ := hI have hle : E i x ≤ ⨆ i ∈ I, E i x := le_iSup₂ (f := fun i (_ : i ∈ I) => E i x) i hi have hne : (⨆ i ∈ I, E i x) ≠ ⊥ := fun hbot => hx.2.1 i (eq_bot_iff.2 (hbot ▸ hle)) exact sinMinAngle_pos hne (disjoint_biSup_biSup_compl hx.1 I) end ErgodicTheory