Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
df68816
update
CoolRmal May 8, 2026
b3d214d
update
CoolRmal May 8, 2026
82d428f
Update FinMeasAdditive.lean
CoolRmal May 8, 2026
c73ee93
update
CoolRmal May 9, 2026
fa70a41
Update Basic.lean
CoolRmal May 9, 2026
caa8ff8
Update Integral.lean
CoolRmal May 9, 2026
8a9255b
Update Basic.lean
CoolRmal May 9, 2026
876d734
finishes proof
CoolRmal May 9, 2026
030f3e4
Merge branch 'master' into VectorMeasureIntegral
CoolRmal May 9, 2026
4d4f109
Merge branch 'master' into VectorMeasureIntegral
CoolRmal May 12, 2026
fa73d41
Merge branch 'leanprover-community:master' into VectorMeasureIntegral
CoolRmal May 17, 2026
345914e
Update FinMeasAdditive.lean
CoolRmal May 17, 2026
e586acd
Merge branch 'VectorMeasureIntegral' of https://github.com/CoolRmal/m…
CoolRmal May 17, 2026
9ea9916
Merge branch 'leanprover-community:master' into VectorMeasureIntegral
CoolRmal May 24, 2026
a8fe7e5
Apply suggestion from @EtienneC30
CoolRmal May 24, 2026
36297d3
Apply suggestion from @EtienneC30
CoolRmal May 24, 2026
da471ec
nontriviality
CoolRmal May 24, 2026
fd50c1d
Apply suggestion from @EtienneC30
CoolRmal May 24, 2026
d161eaf
Finset.Nonempty.cons_induction
CoolRmal May 24, 2026
5497fdf
Merge branch 'VectorMeasureIntegral' of https://github.com/CoolRmal/m…
CoolRmal May 24, 2026
893ac2b
address comment
CoolRmal May 24, 2026
dc41fb6
Update Mathlib/MeasureTheory/Integral/FinMeasAdditive.lean
CoolRmal May 26, 2026
ab8b3de
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
4d206f0
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
6bd29bf
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
0c19b00
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
69b3ac3
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
de37743
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
b7058ab
Update Mathlib/MeasureTheory/VectorMeasure/Integral.lean
CoolRmal May 26, 2026
0606ced
fix
CoolRmal May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 80 additions & 7 deletions Mathlib/MeasureTheory/Integral/FinMeasAdditive.lean
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,13 @@ def FinMeasAdditive {β} [AddMonoid β] {_ : MeasurableSpace α} (μ : Measure

namespace FinMeasAdditive

variable {β : Type*} [AddCommMonoid β] {T T' : Set α → β}
variable {β : Type*} {T T' : Set α → β}

theorem zero : FinMeasAdditive μ (0 : Set α → β) := fun _ _ _ _ _ _ _ => by simp
section AddMonoid

theorem add (hT : FinMeasAdditive μ T) (hT' : FinMeasAdditive μ T') :
FinMeasAdditive μ (T + T') := by
intro s t hs ht hμs hμt hst
simp only [hT s t hs ht hμs hμt hst, hT' s t hs ht hμs hμt hst, Pi.add_apply]
abel
variable [AddMonoid β]

theorem zero : FinMeasAdditive μ (0 : Set α → β) := fun _ _ _ _ _ _ _ => by simp

theorem smul [DistribSMul 𝕜 β] (hT : FinMeasAdditive μ T) (c : 𝕜) :
FinMeasAdditive μ fun s => c • T s := fun s t hs ht hμs hμt hst => by
Expand All @@ -76,6 +74,16 @@ theorem of_eq_top_imp_eq_top {μ' : Measure α} (h : ∀ s, MeasurableSet s →
(hT : FinMeasAdditive μ T) : FinMeasAdditive μ' T := fun s t hs ht hμ's hμ't hst =>
hT s t hs ht (mt (h s hs) hμ's) (mt (h t ht) hμ't) hst

theorem add_right_measure {ν : Measure α} (hT : FinMeasAdditive μ T) :
FinMeasAdditive (μ + ν) T :=
hT.of_eq_top_imp_eq_top fun s _ hμs =>
top_unique <| hμs.symm.trans_le (Measure.le_add_right le_rfl s)

theorem add_left_measure {ν : Measure α} (hT : FinMeasAdditive μ T) :
FinMeasAdditive (ν + μ) T :=
hT.of_eq_top_imp_eq_top fun s _ hμs =>
top_unique <| hμs.symm.trans_le (Measure.le_add_left le_rfl s)

theorem of_smul_measure {c : ℝ≥0∞} (hc_ne_top : c ≠ ∞) (hT : FinMeasAdditive (c • μ) T) :
FinMeasAdditive μ T := by
refine of_eq_top_imp_eq_top (fun s _ hμs => ?_) hT
Expand All @@ -102,6 +110,22 @@ theorem map_empty_eq_zero {β} [AddCancelMonoid β] {T : Set α → β} (hT : Fi
nth_rw 1 [← add_zero (T ∅)] at hT
exact (add_left_cancel hT).symm

end AddMonoid

section AddCommMonoid

variable [AddCommMonoid β]

theorem add (hT : FinMeasAdditive μ T) (hT' : FinMeasAdditive μ T') :
FinMeasAdditive μ (T + T') := by
intro s t hs ht hμs hμt hst
simp only [hT s t hs ht hμs hμt hst, hT' s t hs ht hμs hμt hst, Pi.add_apply]
abel

theorem add_measure {ν : Measure α} (hT : FinMeasAdditive μ T) (hT' : FinMeasAdditive ν T') :
Comment thread
CoolRmal marked this conversation as resolved.
FinMeasAdditive (μ + ν) (T + T') :=
hT.add_right_measure.add (hT'.add_left_measure)

theorem map_iUnion_fin_meas_set_eq_sum (T : Set α → β) (T_empty : T ∅ = 0)
(h_add : FinMeasAdditive μ T) {ι} (S : ι → Set α) (sι : Finset ι)
(hS_meas : ∀ i, MeasurableSet (S i)) (hSp : ∀ i ∈ sι, μ (S i) ≠ ∞)
Expand Down Expand Up @@ -130,6 +154,19 @@ theorem map_iUnion_fin_meas_set_eq_sum (T : Set α → β) (T_empty : T ∅ = 0)
rw [← hai] at hi
exact has hi

end AddCommMonoid

theorem neg [AddGroup β] (hT : FinMeasAdditive μ T) :
FinMeasAdditive μ (-T) := by
intro s t hs ht hμs hμt hst
have h_comm : T s + T t = T t + T s := by
rw [← hT s t hs ht hμs hμt hst, ← hT t s ht hs hμt hμs hst.symm, union_comm]
simp_all [hT s t hs ht hμs hμt hst, neg_add_rev]

theorem sub [AddCommGroup β] (hT : FinMeasAdditive μ T) (hT' : FinMeasAdditive μ T') :
FinMeasAdditive μ (T - T') :=
sub_eq_add_neg T T' ▸ hT.add hT'.neg

end FinMeasAdditive

/-- A `FinMeasAdditive` set function whose norm on every set is less than the measure of the
Expand Down Expand Up @@ -160,12 +197,20 @@ theorem eq_zero {β : Type*} [NormedAddCommGroup β] {T : Set α → β} {C :
T s = 0 :=
eq_zero_of_measure_zero hT hs (by simp only [Measure.coe_zero, Pi.zero_apply])

theorem of_le (hT : DominatedFinMeasAdditive μ T C) (hC : C ≤ C') :
DominatedFinMeasAdditive μ T C' :=
⟨hT.1, fun s hs hμs => (hT.2 s hs hμs).trans <| mul_le_mul_of_nonneg_right hC measureReal_nonneg⟩

theorem add (hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive μ T' C') :
DominatedFinMeasAdditive μ (T + T') (C + C') := by
refine ⟨hT.1.add hT'.1, fun s hs hμs => ?_⟩
rw [Pi.add_apply, add_mul]
exact (norm_add_le _ _).trans (add_le_add (hT.2 s hs hμs) (hT'.2 s hs hμs))

theorem neg (hT : DominatedFinMeasAdditive μ T C) :
DominatedFinMeasAdditive μ (-T) C :=
⟨hT.1.neg, fun s hs hμs => by simpa using hT.2 s hs hμs⟩

theorem smul [SeminormedAddGroup 𝕜] [DistribSMul 𝕜 β] [IsBoundedSMul 𝕜 β]
(hT : DominatedFinMeasAdditive μ T C) (c : 𝕜) :
DominatedFinMeasAdditive μ (fun s => c • T s) (‖c‖ * C) := by
Expand All @@ -185,6 +230,26 @@ theorem of_measure_le {μ' : Measure α} (h : μ ≤ μ') (hT : DominatedFinMeas
gcongr
exact hμ's.ne

theorem add_measure {C' : ℝ} (μ ν : Measure α)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we have a symmetry here because the constant is max(C, C'). We do have DominatedFinMeasAdditive.add_measure_right and DominatedFinMeasAdditive.add_measure_left, and I can probably use them to prove that DominatedFinMeasAdditive (μ + ν) (T + T') (C + C'), but I would need the extra assumptions 0 ≤ C and 0 ≤ C'.

@yoh-tanimoto yoh-tanimoto May 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yes, I meant lemmas like DominatedFinMeasAdditive.add_measure_right. then I think this is fine.

(adding 0 ≤ C is mathematically not a restriction, because if there is just one measurable set s such that μ s < ∞, then 0 ≤ C follows from DominatedFinMeasAdditive μ T C. This is essentially your max_zero.

but you wrote add_measure without this assumption, so it is better)

@yoh-tanimoto yoh-tanimoto May 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I wonder whether it is better to remove hC from add_measure_right and replace C in the conclusion by max C 0.

(hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive ν T' C') :
DominatedFinMeasAdditive (μ + ν) (T + T') (max C C') := by
refine ⟨hT.1.add_measure hT'.1, fun s hs hsf ↦ ?_⟩
have hμs : μ s < ∞ := (Measure.le_add_right le_rfl s).trans_lt hsf
have hνs : ν s < ∞ := (Measure.le_add_left le_rfl s).trans_lt hsf
rw [Pi.add_apply, measureReal_add_apply hμs.ne hνs.ne, mul_add]
calc
‖T s + T' s‖ ≤ ‖T s‖ + ‖T' s‖ := norm_add_le _ _
_ ≤ C * μ.real s + C' * ν.real s := add_le_add (hT.2 s hs hμs) (hT'.2 s hs hνs)
_ ≤ max C C' * μ.real s + max C C' * ν.real s := by
gcongr
· exact le_max_left C C'
· exact le_max_right C C'

theorem sub_measure {C' : ℝ} (μ ν : Measure α)
(hT : DominatedFinMeasAdditive μ T C) (hT' : DominatedFinMeasAdditive ν T' C') :
DominatedFinMeasAdditive (μ + ν) (T - T') (max C C') :=
sub_eq_add_neg T T' ▸ hT.add_measure μ ν hT'.neg

theorem add_measure_right {_ : MeasurableSpace α} (μ ν : Measure α)
(hT : DominatedFinMeasAdditive μ T C) (hC : 0 ≤ C) : DominatedFinMeasAdditive (μ + ν) T C :=
of_measure_le (Measure.le_add_right le_rfl) hT hC
Expand All @@ -193,6 +258,14 @@ theorem add_measure_left {_ : MeasurableSpace α} (μ ν : Measure α)
(hT : DominatedFinMeasAdditive ν T C) (hC : 0 ≤ C) : DominatedFinMeasAdditive (μ + ν) T C :=
of_measure_le (Measure.le_add_left le_rfl) hT hC

theorem finsetSum_measure {ι} {s : Finset ι} (hs : s.Nonempty) (μ : ι → Measure α)
(T : ι → Set α → β) (C : ι → ℝ) (hT : ∀ i, DominatedFinMeasAdditive (μ i) (T i) (C i)) :
DominatedFinMeasAdditive (∑ i ∈ s, μ i) (∑ i ∈ s, T i) (s.sup' hs C) := by
Comment on lines +261 to +263

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming s.Nonempty is a bit sad here. I think the way to go may be to make the constant an NNReal in DominatedFinMeasAdditive, but it's not really important since all of this is just implementation details, so no need to change this now.

induction hs using Finset.Nonempty.cons_induction with
| singleton i => simp_all
| @cons i s his hs' ih =>
simpa [his, Finset.sup'_cons hs' C] using (hT i).add_measure (μ i) (∑ j ∈ s, μ j) ih

theorem of_smul_measure {c : ℝ≥0∞} (hc_ne_top : c ≠ ∞) (hT : DominatedFinMeasAdditive (c • μ) T C) :
DominatedFinMeasAdditive μ T (c.toReal * C) := by
have h : ∀ s, MeasurableSet s → c • μ s = ∞ → μ s = ∞ := by
Expand Down
41 changes: 41 additions & 0 deletions Mathlib/MeasureTheory/Integral/SetToL1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ theorem setToFun_neg (hT : DominatedFinMeasAdditive μ T C) (f : α → E) :
· rw [setToFun_undef hT hf, setToFun_undef hT, neg_zero]
rwa [← integrable_neg_iff] at hf

theorem setToFun_neg' (hT : DominatedFinMeasAdditive μ T C) (f : α → E) :
setToFun μ (-T) hT.neg f = -setToFun μ T hT f := by
simpa using setToFun_smul_left' hT hT.neg (-1) (by simp) f

theorem setToFun_sub (hT : DominatedFinMeasAdditive μ T C) (hf : Integrable f μ)
(hg : Integrable g μ) : setToFun μ T hT (f - g) = setToFun μ T hT f - setToFun μ T hT g := by
rw [sub_eq_add_neg, sub_eq_add_neg, setToFun_add hT hf hg.neg, setToFun_neg hT g]
Expand Down Expand Up @@ -1090,6 +1094,43 @@ theorem setToFun_congr_measure_of_add_left {μ' : Measure α}
rw [one_smul]
exact Measure.le_add_left le_rfl

theorem setToFun_add_measure {ν : Measure α} (hTμ : DominatedFinMeasAdditive μ T C)
Comment thread
EtienneC30 marked this conversation as resolved.
(hTν : DominatedFinMeasAdditive ν T' C') (hμ : Integrable f μ) (hν : Integrable f ν) :
setToFun (μ + ν) (T + T') (hTμ.add_measure μ ν hTν) f =
setToFun μ T hTμ f + setToFun ν T' hTν f :=
have hTμ_add : DominatedFinMeasAdditive (μ + ν) T (max C 0) :=
(hTμ.of_le (le_max_left C 0)).add_measure_right μ ν (le_max_right C 0)
have hTν_add : DominatedFinMeasAdditive (μ + ν) T' (max C' 0) :=
(hTν.of_le (le_max_left C' 0)).add_measure_left μ ν (le_max_right C' 0)
calc
setToFun (μ + ν) (T + T') (hTμ.add_measure μ ν hTν) f =
setToFun (μ + ν) T hTμ_add f + setToFun (μ + ν) T' hTν_add f :=
setToFun_add_left hTμ_add hTν_add f
_ = setToFun μ T hTμ f + setToFun ν T' hTν f := by
rw [setToFun_congr_measure_of_add_right hTμ_add hTμ f (hμ.add_measure hν),
setToFun_congr_measure_of_add_left hTν_add hTν f (hμ.add_measure hν)]

theorem setToFun_sub_measure {ν : Measure α} (hTμ : DominatedFinMeasAdditive μ T C)
(hTν : DominatedFinMeasAdditive ν T' C') (hμ : Integrable f μ) (hν : Integrable f ν) :
setToFun (μ + ν) (T - T') (hTμ.sub_measure μ ν hTν) f =
setToFun μ T hTμ f - setToFun ν T' hTν f := by
simp [sub_eq_add_neg, setToFun_add_measure hTμ hTν.neg hμ hν, setToFun_neg' hTν]

theorem setToFun_finsetSum_measure {ι} {s : Finset ι} (hs : s.Nonempty)
{μ : ι → Measure α} {T : ι → Set α → E →L[ℝ] F} {C : ι → ℝ}
(hTs : ∀ i, DominatedFinMeasAdditive (μ i) (T i) (C i))
(hf : ∀ i ∈ s, Integrable f (μ i)) :
setToFun (∑ i ∈ s, μ i) (∑ i ∈ s, T i)
(DominatedFinMeasAdditive.finsetSum_measure hs μ T C hTs) f =
∑ i ∈ s, setToFun (μ i) (T i) (hTs i) f := by
induction hs using Finset.Nonempty.cons_induction with
| singleton i => simp
| @cons i s his hs' ih =>
simpa [his, ih fun j hj => hf j (Finset.mem_cons_of_mem hj)] using
setToFun_add_measure (hTs i) (DominatedFinMeasAdditive.finsetSum_measure hs' μ T C hTs)
(hf i (Finset.mem_cons_self i s))
(integrable_finsetSum_measure.2 fun j hj => hf j (Finset.mem_cons_of_mem hj))

theorem setToFun_top_smul_measure (hT : DominatedFinMeasAdditive (∞ • μ) T C) (f : α → E) :
setToFun (∞ • μ) T hT f = 0 := by
refine setToFun_measure_zero' hT fun s _ hμs => ?_
Expand Down
1 change: 1 addition & 0 deletions Mathlib/MeasureTheory/Measure/MeasureSpace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ lemma apply_eq_zero_of_isEmpty [IsEmpty α] {_ : MeasurableSpace α} (μ : Measu
instance instSubsingleton [IsEmpty α] {m : MeasurableSpace α} : Subsingleton (Measure α) :=
⟨fun μ ν => by ext1 s _; rw [apply_eq_zero_of_isEmpty, apply_eq_zero_of_isEmpty]⟩

@[nontriviality]
theorem eq_zero_of_isEmpty [IsEmpty α] {_m : MeasurableSpace α} (μ : Measure α) : μ = 0 :=
Subsingleton.elim μ 0

Expand Down
16 changes: 16 additions & 0 deletions Mathlib/MeasureTheory/VectorMeasure/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,18 @@ instance instZero : Zero (VectorMeasure α M) :=
instance instInhabited : Inhabited (VectorMeasure α M) :=
⟨0⟩

@[nontriviality]
lemma apply_eq_zero_of_isEmpty [IsEmpty α] (μ : VectorMeasure α M) (s : Set α) :
μ s = 0 := by
simp [eq_empty_of_isEmpty s]

instance [IsEmpty α] : Subsingleton (VectorMeasure α M) :=
⟨fun μ ν => by ext; rw [apply_eq_zero_of_isEmpty, apply_eq_zero_of_isEmpty]⟩

@[nontriviality]
theorem eq_zero_of_isEmpty [IsEmpty α] (μ : VectorMeasure α M) : μ = 0 :=
Comment thread
CoolRmal marked this conversation as resolved.
Subsingleton.elim μ 0

@[simp]
theorem coe_zero : ⇑(0 : VectorMeasure α M) = 0 := rfl

Expand Down Expand Up @@ -314,6 +326,10 @@ def coeFnAddMonoidHom : VectorMeasure α M →+ Set α → M where
map_zero' := coe_zero
map_add' := coe_add

@[simp]
theorem coe_finsetSum {ι} (I : Finset ι) (v : ι → VectorMeasure α M) :
⇑(∑ i ∈ I, v i) = ∑ i ∈ I, ⇑(v i) := map_sum coeFnAddMonoidHom v I

end AddCommMonoid

section AddCommGroup
Expand Down
Loading
Loading