Skip to content

Commit c9a191b

Browse files
committed
feat(MeasureTheory/Integral): the Riesz-Markov-Kakutani theorem for NNReal-linear functionals (#24265)
prove the Riesz-Markov-Kakutani theorem for `NNReal`-linear functional, by reducing the statement to the `Real`-version, but for `lintegral` instead of `integral`. The bulk of the PR is the definitions and lemmas to go back and forth between `Real` and `NNReal` linear functionals. Motivation: this is the version first aimed at, perhaps for applications in probability. Co-authored-by: Yoh Tanimoto <hoyt@jcom.home.ne.jp>
1 parent eb04d3d commit c9a191b

File tree

4 files changed

+201
-16
lines changed

4 files changed

+201
-16
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,6 +4326,7 @@ import Mathlib.MeasureTheory.Integral.Periodic
43264326
import Mathlib.MeasureTheory.Integral.Pi
43274327
import Mathlib.MeasureTheory.Integral.Prod
43284328
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Basic
4329+
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.NNReal
43294330
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real
43304331
import Mathlib.MeasureTheory.Integral.SetIntegral
43314332
import Mathlib.MeasureTheory.Integral.SetToL1

Mathlib/MeasureTheory/Integral/RieszMarkovKakutani/Basic.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import Mathlib.Topology.PartitionOfUnity
1010
/-!
1111
# Riesz–Markov–Kakutani representation theorem
1212
13-
This file will prove the Riesz-Markov-Kakutani representation theorem on a locally compact
14-
T2 space `X`. As a special case, the statements about linear functionals on bounded continuous
15-
functions follows.
13+
This file prepares technical definitions and results for the Riesz-Markov-Kakutani representation
14+
theorem on a locally compact T2 space `X`. As a special case, the statements about linear
15+
functionals on bounded continuous functions follows. Actual theorems, depending on the
16+
linearity (`ℝ`, `ℝ≥0` or `ℂ`), are proven in separate files (`Real.lean`, `NNReal.lean`...)
1617
1718
To make use of the existing API, the measure is constructed from a content `λ` on the
1819
compact subsets of a locally compact space X, rather than the usual construction of open sets in the
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/-
2+
Copyright (c) 2025 Yoh Tanimioto. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Yoh Tanimoto
5+
-/
6+
7+
import Mathlib.MeasureTheory.Integral.RieszMarkovKakutani.Real
8+
9+
/-!
10+
# Riesz–Markov–Kakutani representation theorem for `ℝ≥0`
11+
12+
This file proves the Riesz-Markov-Kakutani representation theorem on a locally compact
13+
T2 space `X` for `ℝ≥0`-linear functionals `Λ`.
14+
15+
## Implementation notes
16+
17+
The proof depends on the version of the theorem for `ℝ`-linear functional Λ because in a standard
18+
proof one has to prove the inequalities by `le_antisymm`, yet for `C_c(X, ℝ≥0)` there is no `Neg`.
19+
Here we prove the result by writing `ℝ≥0`-linear `Λ` in terms of `ℝ`-linear `toRealLinear Λ` and by
20+
reducing the statement to the `ℝ`-version of the theorem.
21+
22+
## References
23+
24+
* [Walter Rudin, Real and Complex Analysis.][Rud87]
25+
26+
-/
27+
28+
open scoped NNReal
29+
30+
open CompactlySupported CompactlySupportedContinuousMap MeasureTheory
31+
32+
variable {X : Type*} [TopologicalSpace X] [T2Space X] [LocallyCompactSpace X] [MeasurableSpace X]
33+
[BorelSpace X]
34+
variable (Λ : C_c(X, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0)
35+
36+
namespace NNRealRMK
37+
38+
/-- The **Riesz-Markov-Kakutani representation theorem**: given a positive linear functional `Λ`,
39+
the (Bochner) integral of `f` (as a `ℝ`-valued function) with respect to the `rieszMeasure`
40+
associated to `Λ` is equal to `Λ f`. -/
41+
theorem integral_rieszMeasure (f : C_c(X, ℝ≥0)) : ∫ (x : X), (f x : ℝ) ∂(rieszMeasure Λ) = Λ f := by
42+
rw [← eq_toRealLinear_toReal Λ f,
43+
← RealRMK.integral_rieszMeasure (toRealLinear_nonneg Λ) f.toReal]
44+
simp only [toReal_apply]
45+
congr
46+
exact Eq.symm (eq_toNNRealLinear_toRealLinear Λ)
47+
48+
/-- The **Riesz-Markov-Kakutani representation theorem**: given a positive linear functional `Λ`,
49+
the (lower) Lebesgue integral of `f` with respect to the `rieszMeasure` associated to `Λ` is equal
50+
to `Λ f`. -/
51+
theorem lintegral_rieszMeasure (f : C_c(X, ℝ≥0)) : ∫⁻ (x : X), f x ∂(rieszMeasure Λ) = Λ f := by
52+
rw [lintegral_coe_eq_integral, ← ENNReal.ofNNReal_toNNReal]
53+
· rw [ENNReal.coe_inj, Real.toNNReal_of_nonneg (MeasureTheory.integral_nonneg (by intro a; simp)),
54+
NNReal.eq_iff, NNReal.coe_mk]
55+
exact integral_rieszMeasure Λ f
56+
rw [rieszMeasure]
57+
exact Continuous.integrable_of_hasCompactSupport (by fun_prop)
58+
(HasCompactSupport.comp_left f.hasCompactSupport rfl)
59+
60+
end NNRealRMK

Mathlib/Topology/ContinuousMap/CompactlySupported.lean

Lines changed: 136 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -647,38 +647,107 @@ continuous `ℝ≥0`-valued function. -/
647647
noncomputable def nnrealPart (f : C_c(α, ℝ)) : C_c(α, ℝ≥0) where
648648
toFun := Real.toNNReal.comp f.toFun
649649
continuous_toFun := Continuous.comp continuous_real_toNNReal f.continuous
650-
hasCompactSupport' := by
651-
apply HasCompactSupport.comp_left f.hasCompactSupport' Real.toNNReal_zero
650+
hasCompactSupport' := HasCompactSupport.comp_left f.hasCompactSupport' Real.toNNReal_zero
652651

653652
@[simp]
654653
lemma nnrealPart_apply (f : C_c(α, ℝ)) (x : α) :
655654
f.nnrealPart x = Real.toNNReal (f x) := rfl
656655

656+
lemma nnrealPart_neg_eq_zero_of_nonneg {f : C_c(α, ℝ)} (hf : 0 ≤ f) : (-f).nnrealPart = 0 := by
657+
ext x
658+
simpa using hf x
659+
660+
lemma nnrealPart_smul_pos (f : C_c(α, ℝ)) {a : ℝ} (ha : 0 ≤ a) :
661+
(a • f).nnrealPart = a.toNNReal • f.nnrealPart := by
662+
ext x
663+
simp only [nnrealPart_apply, coe_smul, Pi.smul_apply, Real.coe_toNNReal', smul_eq_mul,
664+
NNReal.coe_mul, ha, sup_of_le_left]
665+
rcases le_total 0 (f x) with hfx | hfx
666+
· simp [ha, hfx, mul_nonneg]
667+
· simp [mul_nonpos_iff, ha, hfx]
668+
669+
lemma nnrealPart_smul_neg (f : C_c(α, ℝ)) {a : ℝ} (ha : a ≤ 0) :
670+
(a • f).nnrealPart = (-a).toNNReal • (-f).nnrealPart := by
671+
ext x
672+
simp only [nnrealPart_apply, coe_smul, Pi.smul_apply, smul_eq_mul, Real.coe_toNNReal', coe_neg,
673+
Pi.neg_apply, NNReal.coe_mul]
674+
rcases le_total 0 (f x) with hfx | hfx
675+
· simp [mul_nonpos_iff, ha, hfx]
676+
· simp [ha, hfx, mul_nonneg_of_nonpos_of_nonpos]
677+
678+
lemma nnrealPart_add_le_add_nnrealPart (f g : C_c(α, ℝ)) :
679+
(f + g).nnrealPart ≤ f.nnrealPart + g.nnrealPart := by
680+
intro x
681+
simpa using Real.toNNReal_add_le
682+
683+
lemma exists_add_nnrealPart_add_eq (f g : C_c(α, ℝ)) : ∃ (h : C_c(α, ℝ≥0)),
684+
(f + g).nnrealPart + h = f.nnrealPart + g.nnrealPart ∧
685+
(-f + -g).nnrealPart + h = (-f).nnrealPart + (-g).nnrealPart := by
686+
obtain ⟨h, hh⟩ := CompactlySupportedContinuousMap.exists_add_of_le
687+
(nnrealPart_add_le_add_nnrealPart f g)
688+
use h
689+
refine ⟨hh, ?_⟩
690+
ext x
691+
simp only [coe_add, Pi.add_apply, nnrealPart_apply, coe_neg, Pi.neg_apply, NNReal.coe_add,
692+
Real.coe_toNNReal', ← neg_add]
693+
have hhx : (f x + g x) ⊔ 0 + ↑(h x) = f x ⊔ 0 + g x ⊔ 0 := by
694+
rw [← Real.coe_toNNReal', ← Real.coe_toNNReal', ← Real.coe_toNNReal', ← NNReal.coe_add,
695+
← NNReal.coe_add]
696+
have hhx' : ((f + g).nnrealPart + h) x = (f.nnrealPart + g.nnrealPart) x := by congr
697+
simp only [coe_add, Pi.add_apply, nnrealPart_apply, Real.coe_toNNReal'] at hhx'
698+
exact congrArg toReal hhx'
699+
rcases le_total 0 (f x) with hfx | hfx
700+
· rcases le_total 0 (g x) with hgx | hgx
701+
· simp only [hfx, hgx, add_nonneg, sup_of_le_left, add_eq_left, coe_eq_zero] at hhx
702+
simp [hhx, hfx, hgx, add_nonpos]
703+
· rcases le_total 0 (f x + g x) with hfgx | hfgx
704+
· simp only [hfgx, sup_of_le_left, add_assoc, hfx, hgx, sup_of_le_right, add_zero,
705+
add_eq_left] at hhx
706+
rw [sup_of_le_right (neg_nonpos.mpr hfx), sup_of_le_left (neg_nonneg.mpr hgx),
707+
sup_of_le_right (neg_nonpos.mpr hfgx)]
708+
linarith
709+
· simp only [hfgx, sup_of_le_right, zero_add, hfx, sup_of_le_left, hgx, add_zero] at hhx
710+
rw [sup_of_le_right (neg_nonpos.mpr hfx), sup_of_le_left (neg_nonneg.mpr hgx),
711+
sup_of_le_left (neg_nonneg.mpr hfgx), hhx]
712+
ring
713+
· rcases le_total 0 (g x) with hgx | hgx
714+
· rcases le_total 0 (f x + g x) with hfgx | hfgx
715+
· simp only [hfgx, sup_of_le_left, add_comm, hfx, sup_of_le_right, hgx, zero_add] at hhx
716+
rw [sup_of_le_left (neg_nonneg.mpr hfx), sup_of_le_right (neg_nonpos.mpr hgx),
717+
sup_of_le_right (neg_nonpos.mpr hfgx), zero_add, add_zero]
718+
linarith
719+
· simp only [hfgx, sup_of_le_right, zero_add, hfx, hgx, sup_of_le_left] at hhx
720+
rw [sup_of_le_left (neg_nonneg.mpr hfx), sup_of_le_right (neg_nonpos.mpr hgx),
721+
sup_of_le_left (neg_nonneg.mpr hfgx), hhx]
722+
ring
723+
· simp only [(add_nonpos hfx hgx), sup_of_le_right, zero_add, hfx, hgx, add_zero,
724+
coe_eq_zero] at hhx
725+
rw [sup_of_le_left (neg_nonneg.mpr hfx),
726+
sup_of_le_left (neg_nonneg.mpr hgx),
727+
sup_of_le_left (neg_nonneg.mpr (add_nonpos hfx hgx)), hhx, neg_add_rev, NNReal.coe_zero,
728+
add_zero]
729+
ring
730+
657731
/-- The compactly supported continuous `ℝ≥0`-valued function as a compactly supported `ℝ`-valued
658732
function. -/
659733
noncomputable def toReal (f : C_c(α, ℝ≥0)) : C_c(α, ℝ) :=
660734
f.compLeft ContinuousMap.coeNNRealReal
661735

662-
@[simp]
663-
lemma toReal_apply (f : C_c(α, ℝ≥0)) (x : α) : f.toReal x = f x := compLeft_apply rfl _ _
664-
736+
@[simp] lemma toReal_apply (f : C_c(α, ℝ≥0)) (x : α) : f.toReal x = f x := compLeft_apply rfl _ _
665737
@[simp] lemma toReal_nonneg {f : C_c(α, ℝ≥0)} : 0 ≤ f.toReal := fun _ ↦ by simp
666-
667738
@[simp] lemma toReal_add (f g : C_c(α, ℝ≥0)) : (f + g).toReal = f.toReal + g.toReal := by ext; simp
668739
@[simp] lemma toReal_smul (r : ℝ≥0) (f : C_c(α, ℝ≥0)) : (r • f).toReal = r • f.toReal := by
669740
ext; simp [NNReal.smul_def]
670741

742+
@[simp]
671743
lemma nnrealPart_sub_nnrealPart_neg (f : C_c(α, ℝ)) :
672-
(nnrealPart f).toReal - (nnrealPart (-f)).toReal = f := by
673-
ext x
674-
simp
744+
(nnrealPart f).toReal - (nnrealPart (-f)).toReal = f := by ext x; simp
675745

676-
/-- The compactly supported continuous `ℝ≥0`-valued function as a compactly supported `ℝ`-valued
677-
function. -/
746+
/-- The map `toReal` defined as a `ℝ≥0`-linear map. -/
678747
noncomputable def toRealLinearMap : C_c(α, ℝ≥0) →ₗ[ℝ≥0] C_c(α, ℝ) where
679748
toFun := toReal
680749
map_add' f g := by ext x; simp
681-
map_smul' a f := by ext x; simp [NNReal.smul_def]
750+
map_smul' a f := by ext x; simp
682751

683752
@[simp, norm_cast]
684753
lemma coe_toRealLinearMap : (toRealLinearMap : C_c(α, ℝ≥0) → C_c(α, ℝ)) = toReal := rfl
@@ -688,6 +757,14 @@ lemma toRealLinearMap_apply (f : C_c(α, ℝ≥0)) : toRealLinearMap f = f.toRea
688757
lemma toRealLinearMap_apply_apply (f : C_c(α, ℝ≥0)) (x : α) :
689758
toRealLinearMap f x = (f x).toReal := by simp
690759

760+
@[simp]
761+
lemma nnrealPart_toReal_eq (f : C_c(α, ℝ≥0)) : nnrealPart (toReal f) = f := by ext x; simp
762+
763+
@[simp]
764+
lemma nnrealPart_neg_toReal_eq (f : C_c(α, ℝ≥0)) : nnrealPart (- toReal f) = 0 := by ext x; simp
765+
766+
section toNNRealLinear
767+
691768
/-- For a positive linear functional `Λ : C_c(α, ℝ) → ℝ`, define a `ℝ≥0`-linear map. -/
692769
noncomputable def toNNRealLinear (Λ : C_c(α, ℝ) →ₗ[ℝ] ℝ) (hΛ : ∀ f, 0 ≤ f → 0 ≤ Λ f) :
693770
C_c(α, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0 where
@@ -699,13 +776,59 @@ noncomputable def toNNRealLinear (Λ : C_c(α, ℝ) →ₗ[ℝ] ℝ) (hΛ : ∀
699776
lemma toNNRealLinear_apply (Λ : C_c(α, ℝ) →ₗ[ℝ] ℝ) (hΛ) (f : C_c(α, ℝ≥0)) :
700777
toNNRealLinear Λ hΛ f = Λ (toReal f) := rfl
701778

702-
@[simp] lemma toNNRealLinear_inj (Λ₁ Λ₂ : C_c(α, ℝ) →ₗ[ℝ] ℝ) (hΛ₁ hΛ₂) :
779+
@[simp]
780+
lemma toNNRealLinear_inj (Λ₁ Λ₂ : C_c(α, ℝ) →ₗ[ℝ] ℝ) (hΛ₁ hΛ₂) :
703781
toNNRealLinear Λ₁ hΛ₁ = toNNRealLinear Λ₂ hΛ₂ ↔ Λ₁ = Λ₂ := by
704782
simp only [LinearMap.ext_iff, NNReal.eq_iff, toNNRealLinear_apply]
705783
refine ⟨fun h f ↦ ?_, fun h f ↦ by rw [LinearMap.ext h]⟩
706784
rw [← nnrealPart_sub_nnrealPart_neg f]
707785
simp_rw [map_sub, h]
708786

787+
end toNNRealLinear
788+
789+
section toRealLinear
790+
791+
/-- For a positive linear functional `Λ : C_c(α, ℝ≥0) → ℝ≥0`, define a `ℝ`-linear map. -/
792+
noncomputable def toRealLinear (Λ : C_c(α, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0) : C_c(α, ℝ) →ₗ[ℝ] ℝ where
793+
toFun := fun f => Λ (nnrealPart f) - Λ (nnrealPart (- f))
794+
map_add' f g := by
795+
simp only [neg_add_rev]
796+
obtain ⟨h, hh⟩ := exists_add_nnrealPart_add_eq f g
797+
rw [← add_zero ((Λ (f + g).nnrealPart).toReal - (Λ (-g + -f).nnrealPart).toReal),
798+
← sub_self (Λ h).toReal, sub_add_sub_comm, ← NNReal.coe_add, ← NNReal.coe_add,
799+
← LinearMap.map_add, ← LinearMap.map_add, hh.1, add_comm (-g) (-f), hh.2]
800+
simp only [map_add, NNReal.coe_add]
801+
ring
802+
map_smul' a f := by
803+
rcases le_total 0 a with ha | ha
804+
· rw [RingHom.id_apply, smul_eq_mul, ← (smul_neg a f), nnrealPart_smul_pos f ha,
805+
nnrealPart_smul_pos (-f) ha]
806+
simp [sup_of_le_left ha, mul_sub]
807+
· simp only [RingHom.id_apply, smul_eq_mul, ← (smul_neg a f),
808+
nnrealPart_smul_neg f ha, nnrealPart_smul_neg (-f) ha, map_smul,
809+
NNReal.coe_mul, Real.coe_toNNReal', neg_neg, sup_of_le_left (neg_nonneg.mpr ha)]
810+
ring
811+
812+
lemma toRealLinear_apply {Λ : C_c(α, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0} (f : C_c(α, ℝ)) :
813+
toRealLinear Λ f = Λ (nnrealPart f) - Λ (nnrealPart (-f)) := rfl
814+
815+
lemma toRealLinear_nonneg (Λ : C_c(α, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0) (g : C_c(α, ℝ)) (hg : 0 ≤ g) :
816+
0 ≤ toRealLinear Λ g := by
817+
simp [toRealLinear_apply, nnrealPart_neg_eq_zero_of_nonneg hg]
818+
819+
@[simp]
820+
lemma eq_toRealLinear_toReal (Λ : C_c(α, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0) (f : C_c(α, ℝ≥0)) :
821+
toRealLinear Λ (toReal f) = Λ f:= by
822+
simp [toRealLinear_apply]
823+
824+
@[simp]
825+
lemma eq_toNNRealLinear_toRealLinear (Λ : C_c(α, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0) :
826+
toNNRealLinear (toRealLinear Λ) (toRealLinear_nonneg Λ) = Λ := by
827+
ext f
828+
simp
829+
830+
end toRealLinear
831+
709832
end CompactlySupportedContinuousMap
710833

711834
end NonnegativePart

0 commit comments

Comments
 (0)