/-- **The Lebesgue Decomposition theorem between a signed measure and a measure**:
Given a signed measure `s` and a σ-finite measure `μ`, there exist a signed measure `t` and a
measurable and integrable function `f`, such that `t` is mutually singular with respect to `μ`
and `s = t + μ.withDensityᵥ f`. In this case `t = s.singularPart μ` and
`f = s.rnDeriv μ`. -/
theorem singularPart_add_withDensity_rnDeriv_eq [s.HaveLebesgueDecomposition μ] :
    s.singularPart μ + μ.withDensityᵥ (s.rnDeriv μ) = s := by
  conv_rhs =>
    rw [← toSignedMeasure_toJordanDecomposition s, JordanDecomposition.toSignedMeasure]
  rw [singularPart, rnDeriv,
    withDensityᵥ_sub' (integrable_toReal_of_lintegral_ne_top _ _)
      (integrable_toReal_of_lintegral_ne_top _ _),
    withDensityᵥ_toReal, withDensityᵥ_toReal, sub_eq_add_neg, sub_eq_add_neg,
    add_comm (s.toJordanDecomposition.posPart.singularPart μ).toSignedMeasure, ← add_assoc,
    add_assoc (-(s.toJordanDecomposition.negPart.singularPart μ).toSignedMeasure),
    ← toSignedMeasure_add, add_comm, ← add_assoc, ← neg_add, ← toSignedMeasure_add, add_comm,
    ← sub_eq_add_neg]
  convert rfl
  -- `convert rfl` much faster than `congr`
  · exact s.toJordanDecomposition.posPart.haveLebesgueDecomposition_add μ
  · rw [add_comm]
    exact s.toJordanDecomposition.negPart.haveLebesgueDecomposition_add μ
  

Proof state:
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hfm
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ AEMeasurable fun x => Measure.rnDeriv (toJordanDecomposition s).negPart μ x
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
case hfm
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ AEMeasurable fun x => Measure.rnDeriv (toJordanDecomposition s).posPart μ x
case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ AEMeasurable fun x => Measure.rnDeriv (toJordanDecomposition s).posPart μ x
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).posPart μ x ∂μ ≠ ⊤
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ AEMeasurable fun x => Measure.rnDeriv (toJordanDecomposition s).negPart μ x
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
s t : SignedMeasure α
inst✝ : HaveLebesgueDecomposition s μ
⊢ ∫⁻ (x : α), Measure.rnDeriv (toJordanDecomposition s).negPart μ x ∂μ ≠ ⊤

Next tactic:
all_goals
    first
    | exact (lintegral_rnDeriv_lt_top _ _).ne
    | measurability