Skip to content

Commit

Permalink
chore: Add pp_dot to measure definitions trim, withDensity, `rest…
Browse files Browse the repository at this point in the history
…rict`, `rnDeriv` and `singularPart` (#11871)

We use dot notation for them everywhere in the code. Let's use it in the infoview as well.
  • Loading branch information
RemyDegenne committed Apr 3, 2024
1 parent fcf9a43 commit 1c006b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Mathlib/MeasureTheory/Decomposition/Lebesgue.lean
Expand Up @@ -71,13 +71,15 @@ class HaveLebesgueDecomposition (μ ν : Measure α) : Prop where
/-- If a pair of measures `HaveLebesgueDecomposition`, then `singularPart` chooses the
measure from `HaveLebesgueDecomposition`, otherwise it returns the zero measure. For sigma-finite
measures, `μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)`. -/
@[pp_dot]
irreducible_def singularPart (μ ν : Measure α) : Measure α :=
if h : HaveLebesgueDecomposition μ ν then (Classical.choose h.lebesgue_decomposition).1 else 0
#align measure_theory.measure.singular_part MeasureTheory.Measure.singularPart

/-- If a pair of measures `HaveLebesgueDecomposition`, then `rnDeriv` chooses the
measurable function from `HaveLebesgueDecomposition`, otherwise it returns the zero function.
For sigma-finite measures, `μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)`.-/
@[pp_dot]
irreducible_def rnDeriv (μ ν : Measure α) : α → ℝ≥0∞ :=
if h : HaveLebesgueDecomposition μ ν then (Classical.choose h.lebesgue_decomposition).2 else 0
#align measure_theory.measure.rn_deriv MeasureTheory.Measure.rnDeriv
Expand Down
1 change: 1 addition & 0 deletions Mathlib/MeasureTheory/Measure/Restrict.lean
Expand Up @@ -41,6 +41,7 @@ noncomputable def restrictₗ {m0 : MeasurableSpace α} (s : Set α) : Measure
#align measure_theory.measure.restrictₗ MeasureTheory.Measure.restrictₗ

/-- Restrict a measure `μ` to a set `s`. -/
@[pp_dot]
noncomputable def restrict {_m0 : MeasurableSpace α} (μ : Measure α) (s : Set α) : Measure α :=
restrictₗ s μ
#align measure_theory.measure.restrict MeasureTheory.Measure.restrict
Expand Down
1 change: 1 addition & 0 deletions Mathlib/MeasureTheory/Measure/Trim.lean
Expand Up @@ -28,6 +28,7 @@ cannot be a measure on `m`, hence the definition of `μ.trim hm`.
This notion is related to `OuterMeasure.trim`, see the lemma
`toOuterMeasure_trim_eq_trim_toOuterMeasure`. -/
@[pp_dot]
noncomputable
def Measure.trim {m m0 : MeasurableSpace α} (μ : @Measure α m0) (hm : m ≤ m0) : @Measure α m :=
@OuterMeasure.toMeasure α m μ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory μ))
Expand Down
1 change: 1 addition & 0 deletions Mathlib/MeasureTheory/Measure/WithDensity.lean
Expand Up @@ -29,6 +29,7 @@ variable {α : Type*} {m0 : MeasurableSpace α} {μ : Measure α}

/-- Given a measure `μ : Measure α` and a function `f : α → ℝ≥0∞`, `μ.withDensity f` is the
measure such that for a measurable set `s` we have `μ.withDensity f s = ∫⁻ a in s, f a ∂μ`. -/
@[pp_dot]
noncomputable
def Measure.withDensity {m : MeasurableSpace α} (μ : Measure α) (f : α → ℝ≥0∞) : Measure α :=
Measure.ofMeasurable (fun s _ => ∫⁻ a in s, f a ∂μ) (by simp) fun s hs hd =>
Expand Down

0 comments on commit 1c006b3

Please sign in to comment.