awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
⊢ ν.withDensity f = ν.withDensity (μ.rnDeriv ν)
have h : ∀ (A : Set α) (hA : MeasurableSet A),
  Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
Tactic: ext1 A hA
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
have rw : LE.le (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
Tactic: rw [← nonpos_iff_eq_zero]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (hypothesis)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
Tactic: have hνrn : ν.withDensity (μ.rnDeriv ν) (A ∩ (S ∩ T)ᶜ) = 0 := by
    rw [← nonpos_iff_eq_zero]
    exact
      withDensity_absolutelyContinuous ν (μ.rnDeriv ν) hνinter ▸
        measure_mono inter_subset_right
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h : Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
  ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
h :
  Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h₁ : Eq (α := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
  ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
h :
  Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₁ :
  Eq (α := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h₂ : HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    (0 : ℝ≥0∞) =
  (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
h :
  Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₁ :
  Eq (α := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₂ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      (0 : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h₃ : HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
  (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
h :
  Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₁ :
  Eq (α := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₂ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      (0 : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
h₃ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h₄ : HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)) : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
  (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
h :
  Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₁ :
  Eq (α := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₂ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      (0 : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
h₃ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
h₄ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)) : ℝ≥0∞)
      ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h₅ : HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)) : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A \ (S ∩ T)) : ℝ≥0∞) =
  (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hadd : μ.singularPart ν + ν.withDensity (μ.rnDeriv ν) = s + ν.withDensity f
this : μ.HaveLebesgueDecomposition ν
hmeas : Measurable (μ.rnDeriv ν)
hadd' : μ = μ.singularPart ν + ν.withDensity (μ.rnDeriv ν)
S : Set α
hS₁ : MeasurableSet S
hS₂ : Eq (α := ℝ≥0∞) ((s : (a : Set α) → ℝ≥0∞) S : ℝ≥0∞) (0 : ℝ≥0∞)
hS₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Sᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
T : Set α
hT₁ : MeasurableSet T
hT₂ : Eq (α := ℝ≥0∞) ((μ.singularPart ν : (a : Set α) → ℝ≥0∞) T : ℝ≥0∞) (0 : ℝ≥0∞)
hT₃ : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) Tᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
hνinter : Eq (α := ℝ≥0∞) ((ν : (a : Set α) → ℝ≥0∞) (S ∩ T)ᶜ : ℝ≥0∞) (0 : ℝ≥0∞)
heq : (ν.withDensity f).restrict (S ∩ T) = (ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T)
heq' :
  ∀ (A : Set α),
    MeasurableSet A →
      Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
        (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
A : Set α
hA : MeasurableSet A
hνrn : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) (0 : ℝ≥0∞)
h :
  Eq (α := ℝ≥0∞) (((ν.withDensity f).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₁ :
  Eq (α := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
h₂ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      (0 : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
h₃ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) (((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
      ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
h₄ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)) : ℝ≥0∞)
      ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)ᶜ) : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
h₅ :
  HAdd.hAdd (α := ℝ≥0∞) (β := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A ∩ (S ∩ T)) : ℝ≥0∞)
      ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) (A \ (S ∩ T)) : ℝ≥0∞) =
    (ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A
⊢ Eq (α := ℝ≥0∞) ((ν.withDensity f : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
    ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
have h₆ : Eq (α := ℝ≥0∞) ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
  ((ν.withDensity (μ.rnDeriv ν) : (a : Set α) → ℝ≥0∞) A : ℝ≥0∞)
Tactic: rw [heq' A hA, heq, ← add_zero ((ν.withDensity (μ.rnDeriv ν)).restrict (S ∩ T) A), ← hνrn,
    restrict_apply hA, ← diff_eq, measure_inter_add_diff _ (hS₁.inter hT₁)]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν s : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f ν
hs : s ⟂ₘ ν
hadd : μ = s + ν.withDensity f
⊢ ν.withDensity f = ν.withDensity (μ.rnDeriv ν)
have rw : ∀ (hadd : μ = s + ν.withDensity (AEMeasurable.mk f hf)),
  ν.withDensity (AEMeasurable.mk f hf) = ν.withDensity (μ.rnDeriv ν)
Tactic: rw [withDensity_congr_ae hf.ae_eq_mk] at hadd ⊢
Cleared hypotheses: hadd
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
ν : Measure α
inst : SigmaFinite ν
f : α → ℝ≥0∞
hf : AEMeasurable f ν
⊢ ν.withDensity f = 0 + ν.withDensity f
have rw : ν.withDensity f = ν.withDensity f
Tactic: rw [zero_add]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν : Measure α
inst : μ.HaveLebesgueDecomposition ν
inst_1 : SigmaFinite ν
s : Set α
hs : MeasurableSet s
⊢ (μ.restrict s).rnDeriv ν =ᶠ[ae ν] s.indicator (μ.rnDeriv ν)
have refine : μ.restrict s = (μ.restrict s).singularPart ν + ν.withDensity (s.indicator (μ.rnDeriv ν))
Tactic: refine (eq_rnDeriv (s := (μ.restrict s).singularPart ν)
    ((measurable_rnDeriv _ _).indicator hs) (mutuallySingular_singularPart _ _) ?_).symm
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν : Measure α
inst : μ.HaveLebesgueDecomposition ν
inst_1 : SigmaFinite ν
s : Set α
hs : MeasurableSet s
⊢ μ.restrict s = (μ.restrict s).singularPart ν + ν.withDensity (s.indicator (μ.rnDeriv ν))
have rw : μ.restrict s = (μ.singularPart ν).restrict s + ν.withDensity (s.indicator (μ.rnDeriv ν))
Tactic: rw [singularPart_restrict _ _ hs, withDensity_indicator hs, ← restrict_withDensity hs,
    ← Measure.restrict_add, ← μ.haveLebesgueDecomposition_add ν]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν : Measure α
inst : μ.HaveLebesgueDecomposition ν
inst_1 : SigmaFinite ν
s : Set α
hs : MeasurableSet s
rw : μ.restrict s = (μ.singularPart ν).restrict s + ν.withDensity (s.indicator (μ.rnDeriv ν))
⊢ μ.restrict s = (μ.restrict s).singularPart ν + ν.withDensity (s.indicator (μ.rnDeriv ν))
have rw₁ : μ.restrict s = (μ.singularPart ν).restrict s + (ν.restrict s).withDensity (μ.rnDeriv ν)
Tactic: rw [singularPart_restrict _ _ hs, withDensity_indicator hs, ← restrict_withDensity hs,
    ← Measure.restrict_add, ← μ.haveLebesgueDecomposition_add ν]
-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Decomposition.Lebesgue (goal)
Goal:
α : Type u_1
m : MeasurableSpace α
μ ν : Measure α
inst : μ.HaveLebesgueDecomposition ν
inst_1 : SigmaFinite ν
s : Set α
hs : MeasurableSet s
rw : μ.restrict s = (μ.singularPart ν).restrict s + ν.withDensity (s.indicator (μ.rnDeriv ν))
rw₁ : μ.restrict s = (μ.singularPart ν).restrict s + (ν.restrict s).withDensity (μ.rnDeriv ν)
⊢ μ.restrict s = (μ.restrict s).singularPart ν + ν.withDensity (s.indicator (μ.rnDeriv ν))
have rw₂ : μ.restrict s = (μ.singularPart ν).restrict s + (ν.withDensity (μ.rnDeriv ν)).restrict s
Tactic: rw [singularPart_restrict _ _ hs, withDensity_indicator hs, ← restrict_withDensity hs,
    ← Measure.restrict_add, ← μ.haveLebesgueDecomposition_add ν]