l3lab/ntp-mathlib huggingface dataset:
instance haveLebesgueDecomposition_smul (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) : (r • μ).HaveLebesgueDecomposition ν where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    refine' ⟨⟨r • μ.singularPart ν, r • μ.rnDeriv ν⟩, _, hsing.smul _, _⟩
    · change Measurable ((r : ℝ≥0∞) • μ.rnDeriv ν) -- cannot remove this line
      exact hmeas.const_smul _
    · 

Proof state:
case intro.intro.refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ r • μ = (r • singularPart μ ν, r • rnDeriv μ ν).1 + withDensity ν (r • singularPart μ ν, r • rnDeriv μ ν).2

Next tactic:
change _ = (r : ℝ≥0∞) • _ + ν.withDensity ((r : ℝ≥0∞) • _)
instance haveLebesgueDecomposition_smul (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) : (r • μ).HaveLebesgueDecomposition ν where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    refine' ⟨⟨r • μ.singularPart ν, r • μ.rnDeriv ν⟩, _, hsing.smul _, _⟩
    · change Measurable ((r : ℝ≥0∞) • μ.rnDeriv ν) -- cannot remove this line
      exact hmeas.const_smul _
    · change _ = (r : ℝ≥0∞) • _ + ν.withDensity ((r : ℝ≥0∞) • _)
      

Proof state:
case intro.intro.refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ r • μ = ↑r • singularPart μ ν + withDensity ν (↑r • fun i => rnDeriv μ ν i)

Next tactic:
rw [withDensity_smul _ hmeas, ← smul_add, ← hadd]
instance haveLebesgueDecomposition_smul (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) : (r • μ).HaveLebesgueDecomposition ν where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    refine' ⟨⟨r • μ.singularPart ν, r • μ.rnDeriv ν⟩, _, hsing.smul _, _⟩
    · change Measurable ((r : ℝ≥0∞) • μ.rnDeriv ν) -- cannot remove this line
      exact hmeas.const_smul _
    · change _ = (r : ℝ≥0∞) • _ + ν.withDensity ((r : ℝ≥0∞) • _)
      rw [withDensity_smul _ hmeas, ← smul_add, ← hadd]
      

Proof state:
case intro.intro.refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ r • μ = ↑r • μ

Next tactic:
rfl
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
⊢ ∃ p, Measurable p.2 ∧ p.1 ⟂ₘ r • ν ∧ μ = p.1 + withDensity (r • ν) p.2

Next tactic:
obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ ∃ p, Measurable p.2 ∧ p.1 ⟂ₘ r • ν ∧ μ = p.1 + withDensity (r • ν) p.2

Next tactic:
by_cases hr : r = 0
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · 

Proof state:
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : r = 0
⊢ ∃ p, Measurable p.2 ∧ p.1 ⟂ₘ r • ν ∧ μ = p.1 + withDensity (r • ν) p.2

Next tactic:
exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : r = 0
⊢ (μ, 0).1 ⟂ₘ r • ν

Next tactic:
simp [hr]
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : r = 0
⊢ μ = (μ, 0).1 + withDensity (r • ν) (μ, 0).2

Next tactic:
simp
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
⊢ ∃ p, Measurable p.2 ∧ p.1 ⟂ₘ r • ν ∧ μ = p.1 + withDensity (r • ν) p.2

Next tactic:
refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · 

Proof state:
case neg.refine_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
⊢ Measurable (singularPart μ ν, r⁻¹ • rnDeriv μ ν).2

Next tactic:
change Measurable (r⁻¹ • μ.rnDeriv ν)
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      

Proof state:
case neg.refine_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
⊢ Measurable (r⁻¹ • rnDeriv μ ν)

Next tactic:
exact hmeas.const_smul _
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · 

Proof state:
case neg.refine_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
⊢ (singularPart μ ν, r⁻¹ • rnDeriv μ ν).1 ⟂ₘ r • ν

Next tactic:
exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
    · 

Proof state:
case neg.refine_3
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
⊢ μ = (singularPart μ ν, r⁻¹ • rnDeriv μ ν).1 + withDensity (r • ν) (singularPart μ ν, r⁻¹ • rnDeriv μ ν).2

Next tactic:
have : r⁻¹ • rnDeriv μ ν = ((r⁻¹ : ℝ≥0) : ℝ≥0∞) • rnDeriv μ ν := by simp [ENNReal.smul_def]
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
    · have : r⁻¹ • rnDeriv μ ν = ((r⁻¹ : ℝ≥0) : ℝ≥0∞) • rnDeriv μ ν := by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
⊢ r⁻¹ • rnDeriv μ ν = ↑r⁻¹ • rnDeriv μ ν

Next tactic:
simp [ENNReal.smul_def]
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
    · have : r⁻¹ • rnDeriv μ ν = ((r⁻¹ : ℝ≥0) : ℝ≥0∞) • rnDeriv μ ν := by simp [ENNReal.smul_def]
      

Proof state:
case neg.refine_3
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
this : r⁻¹ • rnDeriv μ ν = ↑r⁻¹ • rnDeriv μ ν
⊢ μ = (singularPart μ ν, r⁻¹ • rnDeriv μ ν).1 + withDensity (r • ν) (singularPart μ ν, r⁻¹ • rnDeriv μ ν).2

Next tactic:
rw [this, withDensity_smul _ hmeas, ENNReal.smul_def r, withDensity_smul_measure,
        ← smul_assoc, smul_eq_mul, ENNReal.coe_inv hr, ENNReal.inv_mul_cancel, one_smul]
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
    · have : r⁻¹ • rnDeriv μ ν = ((r⁻¹ : ℝ≥0) : ℝ≥0∞) • rnDeriv μ ν := by simp [ENNReal.smul_def]
      rw [this, withDensity_smul _ hmeas, ENNReal.smul_def r, withDensity_smul_measure,
        ← smul_assoc, smul_eq_mul, ENNReal.coe_inv hr, ENNReal.inv_mul_cancel, one_smul]
      · 

Proof state:
case neg.refine_3
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
this : r⁻¹ • rnDeriv μ ν = ↑r⁻¹ • rnDeriv μ ν
⊢ μ = (singularPart μ ν, (↑r)⁻¹ • rnDeriv μ ν).1 + withDensity ν (rnDeriv μ ν)

Next tactic:
exact hadd
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
    · have : r⁻¹ • rnDeriv μ ν = ((r⁻¹ : ℝ≥0) : ℝ≥0∞) • rnDeriv μ ν := by simp [ENNReal.smul_def]
      rw [this, withDensity_smul _ hmeas, ENNReal.smul_def r, withDensity_smul_measure,
        ← smul_assoc, smul_eq_mul, ENNReal.coe_inv hr, ENNReal.inv_mul_cancel, one_smul]
      · exact hadd
      · 

Proof state:
case neg.refine_3.h0
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
this : r⁻¹ • rnDeriv μ ν = ↑r⁻¹ • rnDeriv μ ν
⊢ ↑r ≠ 0

Next tactic:
simp [hr]
instance haveLebesgueDecomposition_smul_right (μ ν : Measure α) [HaveLebesgueDecomposition μ ν]
    (r : ℝ≥0) :
    μ.HaveLebesgueDecomposition (r • ν) where
  lebesgue_decomposition := by
    obtain ⟨hmeas, hsing, hadd⟩ := haveLebesgueDecomposition_spec μ ν
    by_cases hr : r = 0
    · exact ⟨⟨μ, 0⟩, measurable_const, by simp [hr], by simp⟩
    refine ⟨⟨μ.singularPart ν, r⁻¹ • μ.rnDeriv ν⟩, ?_, ?_, ?_⟩
    · change Measurable (r⁻¹ • μ.rnDeriv ν)
      exact hmeas.const_smul _
    · exact hsing.mono_ac AbsolutelyContinuous.rfl smul_absolutelyContinuous
    · have : r⁻¹ • rnDeriv μ ν = ((r⁻¹ : ℝ≥0) : ℝ≥0∞) • rnDeriv μ ν := by simp [ENNReal.smul_def]
      rw [this, withDensity_smul _ hmeas, ENNReal.smul_def r, withDensity_smul_measure,
        ← smul_assoc, smul_eq_mul, ENNReal.coe_inv hr, ENNReal.inv_mul_cancel, one_smul]
      · exact hadd
      · simp [hr]
      · 

Proof state:
case neg.refine_3.ht
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
inst✝ : HaveLebesgueDecomposition μ ν
r : ℝ≥0
hmeas : Measurable (rnDeriv μ ν)
hsing : singularPart μ ν ⟂ₘ ν
hadd : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
hr : ¬r = 0
this : r⁻¹ • rnDeriv μ ν = ↑r⁻¹ • rnDeriv μ ν
⊢ ↑r ≠ ⊤

Next tactic:
exact ENNReal.coe_ne_top
@[measurability]
theorem measurable_rnDeriv (μ ν : Measure α) : Measurable <| μ.rnDeriv ν := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
⊢ Measurable (rnDeriv μ ν)

Next tactic:
by_cases h : HaveLebesgueDecomposition μ ν
@[measurability]
theorem measurable_rnDeriv (μ ν : Measure α) : Measurable <| μ.rnDeriv ν := by
  by_cases h : HaveLebesgueDecomposition μ ν
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
h : HaveLebesgueDecomposition μ ν
⊢ Measurable (rnDeriv μ ν)

Next tactic:
exact (haveLebesgueDecomposition_spec μ ν).1
@[measurability]
theorem measurable_rnDeriv (μ ν : Measure α) : Measurable <| μ.rnDeriv ν := by
  by_cases h : HaveLebesgueDecomposition μ ν
  · exact (haveLebesgueDecomposition_spec μ ν).1
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
h : ¬HaveLebesgueDecomposition μ ν
⊢ Measurable (rnDeriv μ ν)

Next tactic:
rw [rnDeriv, dif_neg h]
@[measurability]
theorem measurable_rnDeriv (μ ν : Measure α) : Measurable <| μ.rnDeriv ν := by
  by_cases h : HaveLebesgueDecomposition μ ν
  · exact (haveLebesgueDecomposition_spec μ ν).1
  · rw [rnDeriv, dif_neg h]
    

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
h : ¬HaveLebesgueDecomposition μ ν
⊢ Measurable 0

Next tactic:
exact measurable_zero
theorem mutuallySingular_singularPart (μ ν : Measure α) : μ.singularPart ν ⟂ₘ ν := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
⊢ singularPart μ ν ⟂ₘ ν

Next tactic:
by_cases h : HaveLebesgueDecomposition μ ν
theorem mutuallySingular_singularPart (μ ν : Measure α) : μ.singularPart ν ⟂ₘ ν := by
  by_cases h : HaveLebesgueDecomposition μ ν
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
h : HaveLebesgueDecomposition μ ν
⊢ singularPart μ ν ⟂ₘ ν

Next tactic:
exact (haveLebesgueDecomposition_spec μ ν).2.1
theorem mutuallySingular_singularPart (μ ν : Measure α) : μ.singularPart ν ⟂ₘ ν := by
  by_cases h : HaveLebesgueDecomposition μ ν
  · exact (haveLebesgueDecomposition_spec μ ν).2.1
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
h : ¬HaveLebesgueDecomposition μ ν
⊢ singularPart μ ν ⟂ₘ ν

Next tactic:
rw [singularPart, dif_neg h]
theorem mutuallySingular_singularPart (μ ν : Measure α) : μ.singularPart ν ⟂ₘ ν := by
  by_cases h : HaveLebesgueDecomposition μ ν
  · exact (haveLebesgueDecomposition_spec μ ν).2.1
  · rw [singularPart, dif_neg h]
    

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
h : ¬HaveLebesgueDecomposition μ ν
⊢ 0 ⟂ₘ ν

Next tactic:
exact MutuallySingular.zero_left
instance instHaveLebesgueDecomposition_singularPart :
    HaveLebesgueDecomposition (μ.singularPart ν) ν :=
  ⟨⟨μ.singularPart ν, 0⟩, measurable_zero, mutuallySingular_singularPart μ ν, by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
⊢ singularPart μ ν = (singularPart μ ν, 0).1 + withDensity ν (singularPart μ ν, 0).2

Next tactic:
simp
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
⊢ singularPart μ ν ≤ μ

Next tactic:
by_cases hl : HaveLebesgueDecomposition μ ν
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
⊢ singularPart μ ν ≤ μ

Next tactic:
cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ singularPart μ ν ≤ μ

Next tactic:
conv_rhs => rw [h]
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    conv_rhs => 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
| μ

Next tactic:
rw [h]
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    conv_rhs => rw [h]
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ singularPart μ ν ≤ singularPart μ ν + withDensity ν (rnDeriv μ ν)

Next tactic:
exact Measure.le_add_right le_rfl
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    conv_rhs => rw [h]
    exact Measure.le_add_right le_rfl
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : ¬HaveLebesgueDecomposition μ ν
⊢ singularPart μ ν ≤ μ

Next tactic:
rw [singularPart, dif_neg hl]
theorem singularPart_le (μ ν : Measure α) : μ.singularPart ν ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    conv_rhs => rw [h]
    exact Measure.le_add_right le_rfl
  · rw [singularPart, dif_neg hl]
    

Proof state:
case neg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : ¬HaveLebesgueDecomposition μ ν
⊢ 0 ≤ μ

Next tactic:
exact Measure.zero_le μ
theorem withDensity_rnDeriv_le (μ ν : Measure α) : ν.withDensity (μ.rnDeriv ν) ≤ μ := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
⊢ withDensity ν (rnDeriv μ ν) ≤ μ

Next tactic:
by_cases hl : HaveLebesgueDecomposition μ ν
theorem withDensity_rnDeriv_le (μ ν : Measure α) : ν.withDensity (μ.rnDeriv ν) ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
⊢ withDensity ν (rnDeriv μ ν) ≤ μ

Next tactic:
cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
theorem withDensity_rnDeriv_le (μ ν : Measure α) : ν.withDensity (μ.rnDeriv ν) ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ withDensity ν (rnDeriv μ ν) ≤ μ

Next tactic:
conv_rhs => rw [h]
theorem withDensity_rnDeriv_le (μ ν : Measure α) : ν.withDensity (μ.rnDeriv ν) ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    conv_rhs => 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
| μ

Next tactic:
rw [h]
theorem withDensity_rnDeriv_le (μ ν : Measure α) : ν.withDensity (μ.rnDeriv ν) ≤ μ := by
  by_cases hl : HaveLebesgueDecomposition μ ν
  · cases' (haveLebesgueDecomposition_spec μ ν).2 with _ h
    conv_rhs => rw [h]
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν✝ μ ν : Measure α
hl : HaveLebesgueDecomposition μ ν
left✝ : singularPart μ ν ⟂ₘ ν
h : μ = singularPart μ ν + withDensity ν (rnDeriv μ ν)
⊢ withDensity ν (rnDeriv μ ν) ≤ singularPart μ ν + withDensity ν (rnDeriv μ ν)

Next tactic:
exact Measure.le_add_left le_rfl