mathlib4 review helperopen PRs by @wwylele on leanprover-community/mathlib4

← queue

#44928 feat(MeasureTheory/Integral): prove Prékopa–Leindler inequality

blocked-by-other-PR draft CI success

+444 −4 · 7 files · 5 commits · head f437dc9 · updated 22 days ago · Files changed on GitHub

In plain words

Proves the Prékopa–Leindler inequality for a Haar measure on a finite-dimensional real vector space: if and for all , then ; and derives the Brunn–Minkowski theorem in its multiplicative form and its classical form (). The proof goes through the one-dimensional case using 1-d Brunn–Minkowski (#44802) and the -valued layer-cake formula (#44813), then induction on dimension via Fubini, then a linear change of variables. New files Integral/Lebesgue/PrekopaLeindler.lean and Measure/Haar/BrunnMinkowski.lean.

The transcriptions were written for revision f201e52; the PR is now at f437dc9. Check them against the code.

Transcriptions are drafted with an LLM from the diff and are a reading aid, not a verified statement: the Lean code is the reference.

PR description

Co-authored-by: Jonathan Ho [hojonathanho@gmail.com](mailto:hojonathanho@gmail.com)


Conversation on GitHub 3
github-actions[bot] · comment · 2026-10-16
PR summary f437dc9f6b
Import changes for modified files

No significant changes to the import graph

<details><summary>Import changes for all files</summary>

|Files|Import difference| |-|-| |<details><summary>31 files</summary> Mathlib.Analysis.Normed.Group.Defs Mathlib.Geometry.Group.WordMetric Mathlib.MeasureTheory.OuterMeasure.Defs Mathlib.Topology.Category.Sequential Mathlib.Topology.ContinuousMap.Interval Mathlib.Topology.ContinuousMap.Ordered Mathlib.Topology.FiberBundle.Trivialization Mathlib.Topology.Instances.Discrete Mathlib.Topology.Instances.Sign Mathlib.Topology.OmegaCompletePartialOrder Mathlib.Topology.Order.Basic Mathlib.Topology.Order.Category.AlexDisc Mathlib.Topology.Order.Completion Mathlib.Topology.Order.CountableSeparating Mathlib.Topology.Order.Filter Mathlib.Topology.Order.HullKernel Mathlib.Topology.Order.LawsonTopology Mathlib.Topology.Order.LowerUpperTopology Mathlib.Topology.Order.MonotoneConvergence Mathlib.Topology.Order.NhdsSet Mathlib.Topology.Order.ProjIcc Mathlib.Topology.Order.Real Mathlib.Topology.Order.ScottTopology Mathlib.Topology.Order.Separable Mathlib.Topology.Order.SuccPred Mathlib.Topology.Order.T5 Mathlib.Topology.Order.UpperLowerSetTopology Mathlib.Topology.Order.WithTop Mathlib.Topology.Separation.LinearUpperLowerSetTopology Mathlib.Topology.Sheaves.Alexandrov Mathlib.Topology.Specialization</details>|1| | Mathlib.MeasureTheory.Integral.Lebesgue.PrekopaLeindler (new file)|2651| | Mathlib.MeasureTheory.Measure.Haar.BrunnMinkowski (new file)|2652|

</details>


<details><summary>

Declarations diff (regex)

</summary>

+ _root_.PartialOrder.measure_add_measure_le_measure_mul_add_iSup + instIsCountablyGenerated_atTop_subtype + lintegral_eq_lintegral_Ioc_measure_ofReal_le + lintegral_eq_lintegral_Ioo_measure_ofReal_le + lintegral_rpow_mul_lintegral_rpow_le + lintegral_rpow_mul_lintegral_rpow_le_pi + lintegral_rpow_mul_lintegral_rpow_le_real + measure_eq_iSup_inter_Ici + measure_eq_iSup_inter_Iic + measure_rpow_add_measure_rpow_le + measure_rpow_add_measure_rpow_le₀ + measure_rpow_mul_measure_rpow_le + measure_rpow_mul_measure_rpow_le₀ + prekopa_leindler_real_of_iSup_eq_one + prekopa_leindler_real_of_iSup_ne_top + volume_add_volume_le <details> <summary>You can run this locally as follows</summary>

## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

</details>

The doc-module for scripts/pr_summary/declarations_diff.sh in the undefined repository contains some details about this script.

</details>

<details><summary>

Declarations diff (Lean)

</summary>

✅ Lean-aware diff — post-build, computed from the Lean environment (commit f437dc9).

  • +14 new declarations
  • −0 removed declarations
+MeasureTheory.lintegral_eq_lintegral_Ioc_measure_ofReal_le
+MeasureTheory.lintegral_eq_lintegral_Ioo_measure_ofReal_le
+MeasureTheory.lintegral_rpow_mul_lintegral_rpow_le
+MeasureTheory.measure_eq_iSup_inter_Ici
+MeasureTheory.measure_eq_iSup_inter_Iic
+MeasureTheory.measure_rpow_add_measure_rpow_le
+MeasureTheory.measure_rpow_add_measure_rpow_le₀
+MeasureTheory.measure_rpow_mul_measure_rpow_le
+MeasureTheory.measure_rpow_mul_measure_rpow_le₀
+PartialOrder.measure_add_measure_le_measure_add_add_iSup
+PartialOrder.measure_add_measure_le_measure_mul_add_iSup
+Real.volume_add_volume_le
+instIsCountablyGenerated_atBot_subtype
+instIsCountablyGenerated_atTop_subtype

</details>


No changes to strong technical debt. No changes to weak technical debt.

Current commit f437dc9f6b Reference commit 2657306608

This script lives in the undefined repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
mathlib-dependent-issues[bot] · comment · 2026-10-16

This PR/issue depends on:

  • ~~leanprover-community/mathlib4#44849~~
  • ~~leanprover-community/mathlib4#44813~~
  • leanprover-community/mathlib4#44802

By Dependent Issues (🤖). Happy coding!

mathlib-merge-conflicts[bot] · comment · 2026-11-05

This pull request has conflicts, please merge master and resolve them.

Mathlib.lean +2 −0

public import Mathlib.MeasureTheory.Integral.Lebesgue.DominatedConvergence
5775public import Mathlib.MeasureTheory.Integral.Lebesgue.Map
5776public import Mathlib.MeasureTheory.Integral.Lebesgue.Markov
5777public import Mathlib.MeasureTheory.Integral.Lebesgue.Norm
5778public import Mathlib.MeasureTheory.Integral.Lebesgue.PrekopaLeindler
5779public import Mathlib.MeasureTheory.Integral.Lebesgue.Sub
5780public import Mathlib.MeasureTheory.Integral.LebesgueNormedSpace
5781public import Mathlib.MeasureTheory.Integral.Marginal
public import Mathlib.MeasureTheory.Measure.FiniteMeasurePi
5842public import Mathlib.MeasureTheory.Measure.FiniteMeasureProd
5843public import Mathlib.MeasureTheory.Measure.GiryMonad
5844public import Mathlib.MeasureTheory.Measure.Haar.Basic
5845public import Mathlib.MeasureTheory.Measure.Haar.BrunnMinkowski
5846public import Mathlib.MeasureTheory.Measure.Haar.Disintegration
5847public import Mathlib.MeasureTheory.Measure.Haar.DistribChar
5848public import Mathlib.MeasureTheory.Measure.Haar.Extension

Mathlib/MeasureTheory/Integral/Layercake.lean +24 −0

theorem lintegral_eq_lintegral_measure_ofReal_le (μ : Measure α) {f : α →
472 · gcongr
473 simp +contextual
theorem lintegral_eq_lintegral_Ioc_measure_ofReal_le newL475–492
475theorem lintegral_eq_lintegral_Ioc_measure_ofReal_le (μ : Measure α) {f : α → ℝ≥0∞}
476 (hf : AEMeasurable f μ) {a : ℝ} (ha : f ≤ᵐ[μ] fun _ ↦ .ofReal a) :
477 ∫⁻ x, f x ∂μ = ∫⁻ t in Ioc 0 a, μ {x | .ofReal t ≤ f x} := by
478 by_cases! ha0 : a < 0
479 · have : f =ᵐ[μ] 0 := by
480 filter_upwards [ha] with x hx
481 simpa [ENNReal.ofReal_eq_zero.mpr ha0.le] using hx
482 simp [Ioc_eq_empty_of_le ha0.le, lintegral_congr_ae this]
483 rw [lintegral_eq_lintegral_measure_ofReal_le μ hf]
484 suffices Function.support (fun t ↦ μ {x | .ofReal t ≤ f x}) ⊆ Iic a by
485 rw [← setLIntegral_eq_of_support_subset this, restrict_restrict (by simp), Iic_inter_Ioi]
486 intro t
487 contrapose
488 suffices a < t → μ {x | .ofReal t ≤ f x} = 0 by simp +contextual [this]
489 intro ht
490 rw [measure_eq_zero_iff_ae_notMem]
491 filter_upwards [ha] with x hx
492 simpa using hx.trans_lt <| (ENNReal.ofReal_lt_ofReal_iff_of_nonneg ha0).mpr ht
theorem lintegral_eq_lintegral_Ioo_measure_ofReal_le newL494–497
494theorem lintegral_eq_lintegral_Ioo_measure_ofReal_le (μ : Measure α) {f : α → ℝ≥0∞}
495 (hf : AEMeasurable f μ) {a : ℝ} (ha : f ≤ᵐ[μ] fun _ ↦ .ofReal a) :
496 ∫⁻ x, f x ∂μ = ∫⁻ t in Ioo 0 a, μ {x | .ofReal t ≤ f x} := by
497 rw [lintegral_eq_lintegral_Ioc_measure_ofReal_le μ hf ha, setLIntegral_congr Ioo_ae_eq_Ioc.symm]
499end Layercake
501section LayercakeLT

Mathlib/MeasureTheory/Integral/Lebesgue/PrekopaLeindler.lean +214 −0 new file

1/-
2Copyright (c) 2026 Weiyi Wang. All rights reserved.
3Released under Apache 2.0 license as described in the file LICENSE.
4Authors: Weiyi Wang
5-/
6module
7
8public import Mathlib.MeasureTheory.Measure.Haar.OfBasis
9
10import Mathlib.MeasureTheory.Integral.Layercake
11import Mathlib.MeasureTheory.Measure.Haar.Disintegration
12import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
14/-!
15# Prékopa–Leindler inequality
17This file proves the Prékopa–Leindler inequality for a finite-dimensional real vector space `E`:
18Let $0 ≤ a ≤ 1$ and let `f g j : E → ℝ≥0∞`, suppose that these functions satisfy
19$$
20f(x)^{1-a} g(y)^a \le j((1-a)x+ay)
21$$
22for all $x$ and $y$ in `E`, then
23$$
24\left(\int f(x) dx\right)^{1-a} \left(\int g(x) dx\right)^a \le \int j(x) dx
25$$
26where integrals are with respect to a Haar measure.
27-/
29-- This file is in private by default
31open scoped ENNReal
33namespace MeasureTheory
34variable {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) {f g j : ℝ → ℝ≥0∞} (hf : Measurable f)
35 (hg : Measurable g) (hj : Measurable j)
37-- Start in one dimension with two functions of the same supremum of 1.
38include ha0 ha1 hf hg hj in
theorem prekopa_leindler_real_of_iSup_eq_one newL39–84
39theorem prekopa_leindler_real_of_iSup_eq_one (hf1 : ⨆ x, f x = 1) (hg1 : ⨆ x, g x = 1)
40 (h : ∀ x y, f x ^ (1 - a) * g y ^ a ≤ j ((1 - a) * x + a * y)) :
41 (∫⁻ x, f x) ^ (1 - a) * (∫⁻ x, g x) ^ a ≤ ∫⁻ x, j x := by
42 open scoped Pointwise in
43 have hnonempty {t : ℝ} (ht : t ∈ Set.Ioo 0 1) {e : ℝ → ℝ≥0∞} (he : ⨆ x, e x = 1) :
44 {x | .ofReal t ≤ e x}.Nonempty := by
45 have h := not_imp_not.mpr <| le_iSup_iff.mp he.symm.le (.ofReal t)
46 push Not at h
47 obtain ⟨x, hx⟩ := h <| by simpa using ht.2
48 exact ⟨x, hx.le⟩
49 calc
50 _ ≤ .ofReal (1 - a) * (∫⁻ x, f x) + .ofReal a * (∫⁻ x, g x) := by
51 convert ENNReal.geom_mean_le_arith_mean2_weighted (1 - a).toNNReal a.toNNReal _ _ ?_
52 · simp [ha1]
53 · simp [ha0]
54 · rw [ENNReal.ofNNReal_toNNReal]
55 · rw [ENNReal.ofNNReal_toNNReal]
56 · rw [← Real.toNNReal_add (by simp [ha1]) (by simp [ha0]), sub_add_cancel,
57 Real.toNNReal_one]
58 -- Transform all integrals using layer cake formula restricted to (0, 1)
59 _ = (∫⁻ t in Set.Ioo 0 1, volume ((1 - a) • {x | .ofReal t ≤ f x})) +
60 ∫⁻ t in Set.Ioo 0 1, volume (a • {x | .ofReal t ≤ g x}) := by
61 simp_rw [volume.addHaar_smul_of_nonneg ha0,
62 volume.addHaar_smul_of_nonneg (sub_nonneg.mpr ha1), Module.finrank_self, pow_one]
63 rw [lintegral_const_mul' _ _ (by simp), lintegral_const_mul' _ _ (by simp)]
64 congrm _ * ?_ + _ * ?_
65 · refine lintegral_eq_lintegral_Ioo_measure_ofReal_le _ hf.aemeasurable (.of_forall ?_)
66 simpa [hf1] using le_iSup f
67 · refine lintegral_eq_lintegral_Ioo_measure_ofReal_le _ hg.aemeasurable (.of_forall ?_)
68 simpa [hg1] using le_iSup g
69 -- For each layer, apply one-dimensional Brunn–Minkowski.
70 -- The supremum condition provides the nonemptiness of each layer.
71 _ ≤ ∫⁻ t in Set.Ioo 0 1, volume {x | .ofReal t ≤ j x} := by
72 grw [le_lintegral_add]
73 refine setLIntegral_mono' (by simp) fun t ht ↦ ?_
74 grw [Real.volume_add_volume_le (hnonempty ht hf1).smul_set (hnonempty ht hg1).smul_set]
75 refine measure_mono fun x hx ↦ ?_
76 simp_rw [Set.mem_add, Set.mem_smul_set, Set.mem_ofPred_eq] at hx
77 obtain ⟨_, ⟨y, hy, rfl⟩, _, ⟨z, hz, rfl⟩, rfl⟩ := hx
78 specialize h y z
79 grw [← hy, ← hz, ← ENNReal.rpow_add_of_nonneg _ _ (by simpa using ha1) ha0, sub_add_cancel,
80 ENNReal.rpow_one] at h
81 simpa using h
82 _ ≤ _ := by
83 rw [lintegral_eq_lintegral_measure_ofReal_le _ hj.aemeasurable]
84 exact lintegral_mono_set Set.Ioo_subset_Ioi_self
86-- Next, generalize it to finitely bounded function by normalizing the bound to 1.
87include ha0 ha1 hf hg hj in
theorem prekopa_leindler_real_of_iSup_ne_top newL88–115
88theorem prekopa_leindler_real_of_iSup_ne_top (hftop : ⨆ x, f x ≠ ∞) (hgtop : ⨆ x, g x ≠ ∞)
89 (h : ∀ x y, f x ^ (1 - a) * g y ^ a ≤ j ((1 - a) * x + a * y)) :
90 (∫⁻ x, f x) ^ (1 - a) * (∫⁻ x, g x) ^ a ≤ ∫⁻ x, j x := by
91 by_cases hf0 : ⨆ x, f x = 0
92 · rcases lt_or_eq_of_le ha1 with ha1 | rfl
93 · simp [ENNReal.iSup_eq_zero.mp hf0, ha1]
94 · have : ∀ x, g x ≤ j x := by simpa using h
95 simpa using lintegral_mono this
96 by_cases hg0 : ⨆ x, g x = 0
97 · rcases lt_or_eq_of_le ha0 with ha0 | rfl
98 · simp [ENNReal.iSup_eq_zero.mp hg0, ha0]
99 · have : ∀ x, f x ≤ j x := by simpa using h
100 simpa using lintegral_mono this
101 have hj' : Measurable (j · * ((⨆ x, f x)⁻¹ ^ (1 - a) * (⨆ x, g x)⁻¹ ^ a)) := by fun_prop
102 have hf1 : ⨆ x, f x * (⨆ x, f x)⁻¹ = 1 := by
103 rw [← ENNReal.iSup_mul, ENNReal.mul_inv_cancel hf0 hftop]
104 have hg1 : ⨆ x, g x * (⨆ x, g x)⁻¹ = 1 := by
105 rw [← ENNReal.iSup_mul, ENNReal.mul_inv_cancel hg0 hgtop]
106 have h' x y : (f x * (⨆ x, f x)⁻¹) ^ (1 - a) * (g y * (⨆ x, g x)⁻¹) ^ a ≤
107 j ((1 - a) * x + a * y) * ((⨆ x, f x)⁻¹ ^ (1 - a) * (⨆ x, g x)⁻¹ ^ a) := by
108 grw [← h x y, ENNReal.mul_rpow_of_nonneg _ _ (by positivity),
109 ENNReal.mul_rpow_of_nonneg _ _ (by positivity)]
110 exact le_of_eq (by ring)
111 have h := prekopa_leindler_real_of_iSup_eq_one ha0 ha1 (by fun_prop) (by fun_prop) hj' hf1 hg1 h'
112 rw [lintegral_mul_const _ hf, lintegral_mul_const _ hg, lintegral_mul_const _ hj,
113 ENNReal.mul_rpow_of_nonneg _ _ (by positivity),
114 ENNReal.mul_rpow_of_nonneg _ _ (by positivity)] at h
115 exact (ENNReal.mul_le_mul_iff_left (by aesop) (by finiteness)).mp <| h.trans_eq' (by ring)
117-- Then generalize it to potentially unbounded function.
118include ha0 ha1 hf hg hj in
theorem lintegral_rpow_mul_lintegral_rpow_le_real newL119–139
119theorem lintegral_rpow_mul_lintegral_rpow_le_real
120 (h : ∀ x y, f x ^ (1 - a) * g y ^ a ≤ j ((1 - a) * x + a * y)) :
121 (∫⁻ x, f x) ^ (1 - a) * (∫⁻ x, g x) ^ a ≤ ∫⁻ x, j x :=
122 calc
123 -- Approximate the functions using sequences of bounded functions
124 _ = (∫⁻ x, ⨆ t : ℕ, min (f x) t) ^ (1 - a) * (∫⁻ x, ⨆ t : ℕ, min (g x) t) ^ a := by
125 simp_rw [← inf_iSup_eq, ENNReal.iSup_natCast, inf_top_eq]
126 _ = (⨆ t : ℕ, (∫⁻ x, min (f x) t) ^ (1 - a)) * ⨆ t : ℕ, (∫⁻ x, min (g x) t) ^ a := by
127 congr
128 <;> rw [lintegral_iSup (by fun_prop) fun t u h x ↦ by simp [h],
129 ENNReal.iSup_rpow_of_nonneg (by grind)]
130 _ = ⨆ (s : ℕ) (t : ℕ), (∫⁻ x, min (f x) t) ^ (1 - a) * (∫⁻ x, min (g x) s) ^ a := by
131 simp_rw [ENNReal.mul_iSup, ENNReal.iSup_mul]
132 _ ≤ _ := by
133 refine iSup₂_le fun s t ↦ ?_
134 apply prekopa_leindler_real_of_iSup_ne_top ha0 ha1 (by fun_prop) (by fun_prop) hj
135 · exact lt_top_iff_ne_top.mp <| iSup_lt_iff.mpr ⟨t + 1, by simp⟩
136 · exact lt_top_iff_ne_top.mp <| iSup_lt_iff.mpr ⟨s + 1, by simp⟩
137 · intro x y
138 grw [← h x y]
139 gcongr <;> simp
141-- And generalize it to higher dimension by induction.
142include ha0 ha1 in
theorem lintegral_rpow_mul_lintegral_rpow_le_pi newL143–167
143theorem lintegral_rpow_mul_lintegral_rpow_le_pi {n : ℕ} {f g j : (Fin n → ℝ) → ℝ≥0∞}
144 (hf : Measurable f) (hg : Measurable g) (hj : Measurable j)
145 (h : ∀ x y, f x ^ (1 - a) * g y ^ a ≤ j ((1 - a) • x + a • y)) :
146 (∫⁻ x, f x) ^ (1 - a) * (∫⁻ x, g x) ^ a ≤ ∫⁻ x, j x := by
147 induction n with
148 | zero => simpa [lintegral_unique, volume_pi, Unique.eq_default] using h default default
149 | succ n ih =>
150 calc
151 -- Break integrals into 1-d and `n`-d parts.
152 _ = (∫⁻ (x) (y), f (Fin.cons x y)) ^ (1 - a) * (∫⁻ (x) (y), g (Fin.cons x y)) ^ a := by
153 simp_rw [volume_pi, (measurePreserving_piFinSuccAbove _ 0).symm.lintegral_map_equiv]
154 simp (disch := fun_prop) [lintegral_prod]
155 _ ≤ ∫⁻ (x) (y), j (Fin.cons x y) := by
156 -- Apply one-dimensional Prékopa–Leindler on the outer integral.
157 refine lintegral_rpow_mul_lintegral_rpow_le_real ha0 ha1 (by fun_prop) (by fun_prop)
158 (by fun_prop) fun x y ↦ ?_
159 -- Then use the `n`-dimensional Prékopa–Leindler (the induction hypothesis)
160 -- on the inner integral to fulfill the condition.
161 refine ih (by fun_prop) (by fun_prop) (by fun_prop) fun u v ↦ ?_
162 convert h (Fin.cons x u) (Fin.cons y v)
163 ext i
164 cases i using Fin.cases <;> simp
165 _ = ∫⁻ x, j x := by
166 simp_rw [volume_pi, (measurePreserving_piFinSuccAbove _ 0).symm.lintegral_map_equiv]
167 simp (disch := fun_prop) [lintegral_prod]
169-- Finally, transfer the result to general vector spaces, and relax measurability
theorem lintegral_rpow_mul_lintegral_rpow_le newL170–212
170/-- **Prékopa–Leindler inequality** for real vector space.
172TODO: it is possible to drop `AEMeasurable j μ`. Given measurable `f` and `g` (the measurability of
173these can be dropped at the end), The function
174`j'(z) = ⨆ (x) (y) ((1 - a) • x + a • y = z), f x ^ (1 - a) * g y ^ a` has analytic superlevel
175sets, and thus `AEMeasurable j' μ`. This requires the lemma `AnalyticSet → NullMeasurableSet`.
176-/
177public theorem lintegral_rpow_mul_lintegral_rpow_le {E : Type*} [NormedAddCommGroup E]
178 [NormedSpace ℝ E] [MeasurableSpace E] [BorelSpace E] [FiniteDimensional ℝ E] (μ : Measure E)
179 [μ.IsAddHaarMeasure] {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) {f g j : E → ℝ≥0∞}
180 (hj : AEMeasurable j μ) (h : ∀ x y, f x ^ (1 - a) * g y ^ a ≤ j ((1 - a) • x + a • y)) :
181 (∫⁻ x, f x ∂μ) ^ (1 - a) * (∫⁻ x, g x ∂μ) ^ a ≤ ∫⁻ x, j x ∂μ := by
182 classical
183 obtain ⟨f', hf, hff, hfeq⟩ := exists_measurable_le_lintegral_eq μ f
184 obtain ⟨g', hg, hgg, hgeq⟩ := exists_measurable_le_lintegral_eq μ g
185 obtain ⟨s, hs, hsm, hseq⟩ := exists_measurable_superset μ {x | hj.mk _ x ≠ j x}
186 let j' := fun x ↦ if x ∈ s then ⊤ else hj.mk _ x
187 have : Measurable j' := .ite hsm (by fun_prop) (by fun_prop)
188 have hjeq : ∫⁻ x, j x ∂μ = ∫⁻ x, j' x ∂μ := by
189 refine lintegral_congr_ae <| hj.ae_eq_mk.trans (ite_ae_eq_of_measure_zero _ _ _ ?_).symm
190 simpa [hseq, ← aeEq_iff] using hj.ae_eq_mk.symm
191 have hjj (x : E) : j x ≤ j' x := by
192 by_cases hx : x ∈ s
193 · simp [j', hx]
194 · have hx' : x ∉ {x | hj.mk _ x ≠ j x} := fun h ↦ hx (hs h)
195 aesop
196 rw [hfeq, hgeq, hjeq]
197 let e : (Fin (Module.finrank ℝ E) → ℝ) ≃L[ℝ] E := .ofFinrankEq (by simp)
198 obtain ⟨c, _, hc⟩ :=
199 e.symm.toLinearMap.exists_map_addHaar_eq_smul_addHaar μ volume (e.symm.surjective)
200 suffices (c * ∫⁻ x, f' (e x)) ^ (1 - a) * (c * ∫⁻ x, g' (e x)) ^ a ≤ c * ∫⁻ x, j' (e x) by
201 simp_rw [← smul_eq_mul c, ← lintegral_smul_measure, ← hc] at this
202 simpa (disch := fun_prop) [lintegral_map] using this
203 calc
204 _ = c * ((∫⁻ x, f' (e x)) ^ (1 - a) * (∫⁻ x, g' (e x)) ^ a) := by
205 rw [ENNReal.mul_rpow_of_nonneg _ _ (by simp [ha1]), ENNReal.mul_rpow_of_nonneg _ _ ha0,
206 mul_mul_mul_comm, ← ENNReal.rpow_add_of_nonneg _ _ (by simp [ha1]) ha0, sub_add_cancel,
207 ENNReal.rpow_one]
208 _ ≤ _ := by
209 refine mul_le_mul_right (lintegral_rpow_mul_lintegral_rpow_le_pi ha0 ha1 (by fun_prop)
210 (by fun_prop) (by fun_prop) fun x y ↦ ?_) _
211 grw [hff (e x), hgg (e y), h (e x) (e y), hjj]
212 simp
214end MeasureTheory

Mathlib/MeasureTheory/Measure/Haar/BrunnMinkowski.lean +128 −0 new file

1/-
2Copyright (c) 2026 Weiyi Wang. All rights reserved.
3Released under Apache 2.0 license as described in the file LICENSE.
4Authors: Weiyi Wang
5-/
6module
7
8public import Mathlib.Analysis.Normed.Module.Basic
9public import Mathlib.Analysis.SpecialFunctions.Pow.NNReal
10public import Mathlib.LinearAlgebra.FiniteDimensional.Defs
11public import Mathlib.MeasureTheory.Measure.Haar.Basic
13import Mathlib.MeasureTheory.Integral.Lebesgue.PrekopaLeindler
14import Mathlib.MeasureTheory.Measure.Lebesgue.EqHaar
16/-!
17# Brunn–Minkowski theorem
19This file proves the Brunn–Minkowski theorem for a finite-dimensional real vector space $E$:
20for nonempty measurable sets $A$ and $B$, we have
21 - $μ(A)^{1/n} + μ(B)^{1/n} ≤ μ(A + B)^{1/n}$
22 - $μ(A)^{1-a} μ(B)^a ≤ μ ((1 - a) • A + a • B)$ for $0 ≤ a ≤ 1$ (multiplicative version)
23where $n$ is the dimension of $E$, and $μ$ is a Haar measure.
24-/
26public section
28namespace MeasureTheory
29variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [MeasurableSpace E] [BorelSpace E]
30 [FiniteDimensional ℝ E] (μ : Measure E) [μ.IsAddHaarMeasure]
32open scoped ENNReal
33open Module
35open Pointwise in
theorem measure_rpow_mul_measure_rpow_le₀ newL36–58
36/-- **Brunn–Minkowski theorem** for real vector space for `NullMeasurableSet`, multiplicative
37version. -/
38theorem measure_rpow_mul_measure_rpow_le₀ {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) {A B : Set E}
39 (hAn : A.Nonempty) (hBn : B.Nonempty) (hA : NullMeasurableSet A μ)
40 (hB : NullMeasurableSet B μ) :
41 μ A ^ (1 - a) * μ B ^ a ≤ μ ((1 - a) • A + a • B) := by
42 obtain ⟨C, hABC, hC, hμC⟩ := exists_measurable_superset μ ((1 - a) • A + a • B)
43 rw [← hμC, ← lintegral_indicator_fun_one₀ hA, ← lintegral_indicator_fun_one₀ hB,
44 ← lintegral_indicator_fun_one hC]
45 apply lintegral_rpow_mul_lintegral_rpow_le μ ha0 ha1 (by fun_prop)
46 intro x y
47 by_cases hx : x ∈ A
48 · by_cases hy : y ∈ B
49 · apply ge_of_eq
50 aesop (add safe [Set.add_mem_add, Set.smul_mem_smul_set])
51 · rcases lt_or_eq_of_le ha0 with ha0 | rfl
52 · simp [hy, ha0]
53 · have : A ⊆ C := by simpa [hBn] using hABC
54 simpa using Set.indicator_le_indicator_of_subset this zero_le x
55 · rcases lt_or_eq_of_le ha1 with ha1 | rfl
56 · simp [hx, ha1]
57 · have : B ⊆ C := by simpa [hAn] using hABC
58 simpa using Set.indicator_le_indicator_of_subset this zero_le y
60open Pointwise in
theorem measure_rpow_mul_measure_rpow_le newL61–65
61/-- **Brunn–Minkowski theorem** for real vector space, multiplicative version. -/
62theorem measure_rpow_mul_measure_rpow_le {a : ℝ} (ha0 : 0 ≤ a) (ha1 : a ≤ 1) {A B : Set E}
63 (hAn : A.Nonempty) (hBn : B.Nonempty) (hA : MeasurableSet A) (hB : MeasurableSet B) :
64 μ A ^ (1 - a) * μ B ^ a ≤ μ ((1 - a) • A + a • B) :=
65 measure_rpow_mul_measure_rpow_le₀ μ ha0 ha1 hAn hBn hA.nullMeasurableSet hB.nullMeasurableSet
67open Pointwise in
theorem measure_rpow_add_measure_rpow_le₀ newL68–119
68/-- **Brunn–Minkowski theorem** for real vector space for `NullMeasurableSet`. -/
69theorem measure_rpow_add_measure_rpow_le₀ [Nontrivial E] {A B : Set E} (hAn : A.Nonempty)
70 (hBn : B.Nonempty) (hA : NullMeasurableSet A μ) (hB : NullMeasurableSet B μ) :
71 μ A ^ (finrank ℝ E : ℝ)⁻¹ + μ B ^ (finrank ℝ E : ℝ)⁻¹ ≤ μ (A + B) ^ (finrank ℝ E : ℝ)⁻¹ := by
72 have hE : 0 < (finrank ℝ E : ℝ)⁻¹ := by simpa using finrank_pos
73 by_cases! h₁ : μ A = 0 ∨ μ B = ∞
74 · grw [← Set.singleton_subset_iff.mpr hAn.some_mem]
75 rcases h₁ with h | h <;> simp [h, hE]
76 by_cases! h₂ : μ A = ∞ ∨ μ B = 0
77 · grw [← Set.singleton_subset_iff.mpr hBn.some_mem]
78 rcases h₂ with h | h <;> simp [h, hE]
79 set a := μ A ^ (finrank ℝ E : ℝ)⁻¹
80 set b := μ B ^ (finrank ℝ E : ℝ)⁻¹
81 have ⟨ha0, hatop, hb0, hbtop⟩ : a ≠ 0 ∧ a ≠ ∞ ∧ b ≠ 0 ∧ b ≠ ∞ := by simp [a, b, h₁, h₂]
82 have hab : a + b ≠ 0 := by simp [ha0]
83 let c := (b / (a + b)).toReal
84 have hc0 : 0 < c := by
85 simp [c, ENNReal.toReal_pos_iff, pos_iff_ne_zero, lt_top_iff_ne_top, ha0, hb0, hatop, hbtop]
86 have hc1 : c < 1 := by
87 rw [← ENNReal.toReal_one, ENNReal.toReal_lt_toReal (by finiteness) (by simp),
88 ENNReal.div_lt_iff (by simp [hb0]) (by simp [hbtop]), add_comm]
89 simpa using ENNReal.lt_add_right hbtop ha0
90 have hc1' : 0 < 1 - c := by simpa using hc1
91 calc
92 _ = ((a / (a + b))⁻¹ * a) ^ (1 - c) * ((b / (a + b))⁻¹ * b) ^ c := by
93 rw [ENNReal.inv_div (by simp [hatop]) (by simp [ha0]),
94 ENNReal.inv_div (by simp [hbtop]) (by simp [hb0]),
95 ENNReal.div_mul_cancel ha0 hatop, ENNReal.div_mul_cancel hb0 hbtop,
96 ← ENNReal.rpow_add_of_nonneg _ _ hc1'.le hc0.le, tsub_add_cancel_of_le hc1.le,
97 ENNReal.rpow_one]
98 _ = ((1 - b / (a + b))⁻¹ * a) ^ (1 - c) * ((b / (a + b))⁻¹ * b) ^ c := by
99 congr
100 apply ENNReal.eq_sub_of_add_eq' (by simp)
101 rw [← ENNReal.add_div]
102 exact ENNReal.div_self hab <| by simp [hatop, hbtop]
103 _ = (μ ((1 - c)⁻¹ • A) ^ (1 - c) * μ (c⁻¹ • B) ^ c) ^ (finrank ℝ E : ℝ)⁻¹ := by
104 rw [ENNReal.mul_rpow_of_nonneg _ _ hE.le, ← ENNReal.rpow_mul, ← ENNReal.rpow_mul,
105 mul_comm (1 - c), mul_comm c, ENNReal.rpow_mul, ENNReal.rpow_mul]
106 congr
107 <;> rw [Measure.addHaar_smul, abs_pow, ENNReal.ofReal_pow (by simp),
108 ENNReal.mul_rpow_of_nonneg _ _ hE.le, ← ENNReal.rpow_natCast, ← ENNReal.rpow_mul,
109 mul_inv_cancel₀ <| by simpa using finrank_pos.ne', ENNReal.rpow_one, abs_inv]
110 · rw [abs_of_nonneg hc1'.le, ENNReal.ofReal_inv_of_pos hc1', ENNReal.ofReal_sub _ hc0.le,
111 ENNReal.ofReal_one, ENNReal.ofReal_toReal <| ENNReal.div_ne_top hbtop hab]
112 · rw [abs_of_nonneg hc0.le, ENNReal.ofReal_inv_of_pos hc0,
113 ENNReal.ofReal_toReal <| ENNReal.div_ne_top hbtop hab]
114 _ ≤ _ := by
115 gcongr
116 convert measure_rpow_mul_measure_rpow_le₀ μ hc0.le hc1.le hAn.smul_set hBn.smul_set
117 (Measure.NullMeasurableSet.const_smul hA _) (Measure.NullMeasurableSet.const_smul hB _)
118 · rw [smul_smul, mul_inv_cancel₀ hc1'.ne', one_smul]
119 · rw [smul_smul, mul_inv_cancel₀ hc0.ne', one_smul]
121open Pointwise in
theorem measure_rpow_add_measure_rpow_le newL122–126
122/-- **Brunn–Minkowski theorem** for real vector space. -/
123theorem measure_rpow_add_measure_rpow_le [Nontrivial E] {A B : Set E} (hAn : A.Nonempty)
124 (hBn : B.Nonempty) (hA : MeasurableSet A) (hB : MeasurableSet B) :
125 μ A ^ (finrank ℝ E : ℝ)⁻¹ + μ B ^ (finrank ℝ E : ℝ)⁻¹ ≤ μ (A + B) ^ (finrank ℝ E : ℝ)⁻¹ :=
126 measure_rpow_add_measure_rpow_le₀ μ hAn hBn hA.nullMeasurableSet hB.nullMeasurableSet
128end MeasureTheory

Mathlib/MeasureTheory/Measure/Interval.lean +57 −0

theorem tendsto_measure_Ici_atBot [(atBot : Filter α).IsCountablyGenerated]
63 (μ : Measure α) : Tendsto (fun x => μ (Ici x)) atBot (𝓝 (μ univ)) :=
64 tendsto_measure_Iic_atTop (α := αᵒᵈ) μ
theorem measure_eq_iSup_inter_Iic newL66–76
66theorem measure_eq_iSup_inter_Iic (μ : Measure α) (S : Set α) [IsDirectedOrder S]
67 [(atTop : Filter S).IsCountablyGenerated] :
68 μ S = ⨆ x ∈ S, μ (S ∩ Iic x) := by
69 refine le_antisymm ?_ <| iSup₂_le fun _ _ ↦ measure_mono inter_subset_left
70 rcases isEmpty_or_nonempty S with h | h
71 · simp [isEmpty_coe_sort.mp h]
72 have : Tendsto (fun x : S ↦ μ (S ∩ Iic x)) atTop (𝓝 (μ (⋃ x : S, S ∩ Iic x))) :=
73 tendsto_measure_iUnion_atTop fun _ _ h ↦ inter_subset_inter_right _ <| Iic_subset_Iic.mpr h
74 rw [le_antisymm (iUnion_subset fun _ ↦ inter_subset_left)
75 fun x hx ↦ mem_iUnion.mpr ⟨⟨x, hx⟩, hx, le_rfl⟩] at this
76 exact le_of_tendsto' this (le_biSup (μ <| S ∩ Iic ·) ·.property)
78-- TODO: generate this using `@[to_dual]` once Monotone <-> Antitone is tagged with `@[to_dual]`
theorem measure_eq_iSup_inter_Ici newL79–90
79@[to_dual existing measure_eq_iSup_inter_Iic]
80theorem measure_eq_iSup_inter_Ici (μ : Measure α) (S : Set α) [IsCodirectedOrder S]
81 [(atBot : Filter S).IsCountablyGenerated] :
82 μ S = ⨆ x ∈ S, μ (S ∩ Ici x) := by
83 refine le_antisymm ?_ <| iSup₂_le fun _ _ ↦ measure_mono inter_subset_left
84 rcases isEmpty_or_nonempty S with h | h
85 · simp [isEmpty_coe_sort.mp h]
86 have : Tendsto (fun x : S ↦ μ (S ∩ Ici x)) atBot (𝓝 (μ (⋃ x : S, S ∩ Ici x))) :=
87 tendsto_measure_iUnion_atBot fun _ _ h ↦ inter_subset_inter_right _ <| Ici_subset_Ici.mpr h
88 rw [le_antisymm (iUnion_subset fun _ ↦ inter_subset_left)
89 fun x hx ↦ mem_iUnion.mpr ⟨⟨x, hx⟩, hx, le_rfl⟩] at this
90 exact le_of_tendsto' this (le_biSup (μ <| S ∩ Ici ·) ·.property)
92end Preorder
94section PartialOrder
theorem Ico_ae_eq_Icc' (hb : μ {b} = 0) : Ico a b =ᵐ[μ] Icc a b :=
119theorem Ico_ae_eq_Ioc' (ha : μ {a} = 0) (hb : μ {b} = 0) : Ico a b =ᵐ[μ] Ioc a b :=
120 (Ioo_ae_eq_Ico' ha).symm.trans (Ioo_ae_eq_Ioc' hb)
122open scoped Pointwise in
123/-- `μ A + μ B ≤ μ (A * B) + μ singleton` for ordered magma. -/
124@[to_additive /-- `μ A + μ B ≤ μ (A + B) + μ singleton` for ordered add magma.
125This is used to prove `Real.volume_add_volume_le` -/]
theorem _root_.PartialOrder.measure_add_measure_le_measure_mul_add_iSup newL126–151
126theorem _root_.PartialOrder.measure_add_measure_le_measure_mul_add_iSup [Mul α] [MulLeftMono α]
127 [MulRightMono α] (hIic : ∀ x : α, MeasurableSet (Iic x))
128 (hl : ∀ a s, μ s ≤ μ ((a * ·) '' s)) (hr : ∀ b s, μ s ≤ μ ((· * b) '' s))
129 {A B : Set α} [IsDirectedOrder A] [(atTop : Filter A).IsCountablyGenerated]
130 [IsCodirectedOrder B] [(atBot : Filter B).IsCountablyGenerated] (hA : A.Nonempty)
131 (hB : B.Nonempty) :
132 μ A + μ B ≤ μ (A * B) + ⨆ x ∈ A * B, μ {x} := by
133 rw [measure_eq_iSup_inter_Iic μ A, measure_eq_iSup_inter_Ici μ B]
134 refine ENNReal.biSup_add_biSup_le hA hB fun a ha b hb ↦ ?_
135 calc
136 _ ≤ μ ((· * b) '' (A ∩ Iic a)) + μ ((a * ·) '' (B ∩ Ici b)) := by
137 gcongr 1
138 · apply hr b
139 · apply hl a
140 _ ≤ μ (A * B ∩ Iic (a * b)) + μ ((A * B) \ Iio (a * b)) := by
141 gcongr
142 · rintro _ ⟨x, ⟨hx, hxa⟩, rfl⟩
143 exact ⟨mul_mem_mul hx hb, mul_le_mul_left hxa b⟩
144 · rintro _ ⟨y, ⟨hy, hyb⟩, rfl⟩
145 refine ⟨mul_mem_mul ha hy, (mul_le_mul_right hyb a).not_gt⟩
146 _ ≤ μ (A * B ∩ Iic (a * b)) + μ ((A * B) \ Iic (a * b)) + μ {a * b} := by
147 grw [add_assoc, ← measure_union_le _ {a * b}, ← Set.sdiff_sdiff_eq_sdiff_union ?_,
148 Set.Iic_sdiff_right]
149 simpa using Set.mul_mem_mul ha hb
150 _ ≤ _ := by
151 grw [measure_inter_add_sdiff _ (hIic _), le_biSup (μ {·}) (Set.mul_mem_mul ha hb)]
153end PartialOrder
155end MeasureTheory

Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean +7 −0

theorem map_linearMap_volume_pi_eq_smul_volume_pi {f : (ι → ℝ) →ₗ[ℝ]
439 apply map_matrix_volume_pi_eq_smul_volume_pi
440 rwa [A] at hf
442open scoped Pointwise in
theorem volume_add_volume_le newL443–447
443/-- One-dimensional **Brunn–Minkowski theorem**. -/
444theorem volume_add_volume_le {A B : Set ℝ} (hA : A.Nonempty) (hB : B.Nonempty) :
445 volume A + volume B ≤ volume (A + B) := by
446 grw [PartialOrder.measure_add_measure_le_measure_add_add_iSup (by simp) (by simp) (by simp) hA hB]
447 simp
449end Real
451section regionBetween

Mathlib/Topology/Order/Basic.lean +12 −4

public import Mathlib.Order.Interval.Set.Pi
10public import Mathlib.Order.OrdContinuous
11public import Mathlib.Topology.Order.OrderClosed
13import Mathlib.Order.Filter.AtTopBot.Map
15/-!
16# Theory of topology on ordered spaces
theorem countable_image_gt_image_Ioi [LinearOrder β] (f : β → α)
700 countable_image_lt_image_Ioi (α := αᵒᵈ) f
instance instIsCountablyGenerated_atTop changedL702–702
702@[to_dual]
−instance instIsCountablyGenerated_atTop [SeparableSpace α] :
− IsCountablyGenerated (atTop : Filter α) := by
− obtain (h | ⟨x, hx⟩) := Set.eq_empty_or_nonempty {x : α | IsTop x}
− · obtain ⟨s, s_count, hs⟩ := exists_countable_dense α
instance instIsCountablyGenerated_atTop_subtype changedL703–709
703instance instIsCountablyGenerated_atTop_subtype {P : α → Prop} [SeparableSpace (Subtype P)] :
704 IsCountablyGenerated (atTop : Filter (Subtype P)) := by
705 obtain (h | ⟨x, hx⟩) := Set.eq_empty_or_nonempty {x : (Subtype P) | IsTop x}
706 · obtain ⟨s, s_count, hs⟩ := exists_countable_dense (Subtype P)
707 have : atTop = generate (Ici '' s) := by
708 refine atTop_eq_generate_of_not_bddAbove fun ⟨x, hx⟩ ↦ ?_
709 simp only [eq_empty_iff_forall_notMem, IsTop, mem_ofPred_eq, not_forall, not_le] at h
instance instIsCountablyGenerated_atTop [SeparableSpace α] :
714 · rw [atTop_eq_pure_of_isTop hx]
715 exact isCountablyGenerated_pure x
instance instIsCountablyGenerated_atTop newL717–721
717@[to_dual]
718instance instIsCountablyGenerated_atTop [SeparableSpace α] :
719 IsCountablyGenerated (atTop : Filter α) := by
720 rw [← OrderIso.Set.univ.map_atTop]
721 apply Filter.map.isCountablyGenerated
723end OrderTopology
725section Pi
0/18 declarations checked

Your review, as Markdown

Paste it as a comment or a review on the PR. Line links to the head commit unfold into code snippets on GitHub.