Theorem: ProbabilityTheory.kernel.withDensity_rnDeriv_of_subset_compl_mutuallySingularSetSlice
File: Mathlib/Probability/Kernel/RadonNikodym.lean

tactic: have h_coe : ∀ b, (Real.toNNReal b : ℝ≥0∞) = ENNReal.ofReal b := fun _ ↦ rfl
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
⊢ ((withDensity η (rnDeriv κ η)) a) s = (κ a) s
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ ((withDensity η (rnDeriv κ η)) a) s = (κ a) s

tactic: have : withDensity η (rnDeriv κ η)
    = withDensity (withDensity (κ + η)
      (fun a x ↦ Real.toNNReal (1 - rnDerivAux κ (κ + η) a x))) (rnDeriv κ η) := by
  rw [rnDeriv_def']
  congr
  exact (withDensity_one_sub_rnDerivAux κ η).symm
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ ((withDensity η (rnDeriv κ η)) a) s = (κ a) s
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ((withDensity η (rnDeriv κ η)) a) s = (κ a) s

tactic: rw [this, ← withDensity_mul, kernel.withDensity_apply']
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ((withDensity η (rnDeriv κ η)) a) s = (κ a) s
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∫⁻ (b : γ) in s, ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal * rnDeriv κ η a b ∂(κ + η) a = (κ a) s

case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal * rnDeriv κ η a x)

case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => (1 - rnDerivAux κ (κ + η) a x).toNNReal)

case hg
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry (rnDeriv κ η))

tactic: rotate_left
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∫⁻ (b : γ) in s, ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal * rnDeriv κ η a b ∂(κ + η) a = (κ a) s

case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal * rnDeriv κ η a x)

case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => (1 - rnDerivAux κ (κ + η) a x).toNNReal)

case hg
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry (rnDeriv κ η))
state_after: case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal * rnDeriv κ η a x)

case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => (1 - rnDerivAux κ (κ + η) a x).toNNReal)

case hg
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry (rnDeriv κ η))

α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∫⁻ (b : γ) in s, ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal * rnDeriv κ η a b ∂(κ + η) a = (κ a) s

tactic: simp_rw [rnDeriv]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∫⁻ (b : γ) in s, ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal * rnDeriv κ η a b ∂(κ + η) a = (κ a) s
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∫⁻ (b : γ) in s,
      ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal *
        (ENNReal.ofReal (rnDerivAux κ (κ + η) a b) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a b)) ∂(κ + η) a =
    (κ a) s

tactic: have hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1 := by
  simp_rw [← not_mem_mutuallySingularSetSlice]
  exact fun x hx hx_mem ↦ hs hx hx_mem
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∫⁻ (b : γ) in s,
      ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal *
        (ENNReal.ofReal (rnDerivAux κ (κ + η) a b) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a b)) ∂(κ + η) a =
    (κ a) s
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
⊢ ∫⁻ (b : γ) in s,
      ↑(1 - rnDerivAux κ (κ + η) a b).toNNReal *
        (ENNReal.ofReal (rnDerivAux κ (κ + η) a b) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a b)) ∂(κ + η) a =
    (κ a) s

tactic: rw [rnDeriv_def']
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ (withDensity η fun a x => ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) fun a x =>
      ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)

tactic: congr
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ (withDensity η fun a x => ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) fun a x =>
      ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)
state_after: case e_κ
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ η = withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal

tactic: exact (withDensity_one_sub_rnDerivAux κ η).symm
state_before: case e_κ
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
⊢ η = withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal
state_after: no goals

tactic: exact ((measurable_const.sub (measurable_rnDerivAux _ _)).ennreal_ofReal.mul
(measurable_rnDeriv _ _))
state_before: case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal * rnDeriv κ η a x)
state_after: no goals

tactic: exact (measurable_const.sub (measurable_rnDerivAux _ _)).real_toNNReal
state_before: case hf
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry fun a x => (1 - rnDerivAux κ (κ + η) a x).toNNReal)
state_after: no goals

tactic: exact measurable_rnDeriv _ _
state_before: case hg
α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ Measurable (Function.uncurry (rnDeriv κ η))
state_after: no goals

tactic: simp_rw [← not_mem_mutuallySingularSetSlice]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∀ x ∈ s, x ∉ mutuallySingularSetSlice κ η a

tactic: exact fun x hx hx_mem ↦ hs hx hx_mem
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
⊢ ∀ x ∈ s, x ∉ mutuallySingularSetSlice κ η a
state_after: no goals

tactic: refine setLIntegral_congr_fun hsm (ae_of_all _ fun x hx ↦ ?_)
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
⊢ ∫⁻ (x : γ) in s,
      ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal *
        (ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)) ∂(κ + η) a =
    ∫⁻ (x : γ) in s, ENNReal.ofReal (rnDerivAux κ (κ + η) a x) ∂(κ + η) a
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal *
      (ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)) =
    ENNReal.ofReal (rnDerivAux κ (κ + η) a x)

tactic: rw [h_coe, ← ENNReal.ofReal_div_of_pos, div_eq_inv_mul, ← ENNReal.ofReal_mul, ← mul_assoc,
  mul_inv_cancel, one_mul]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal *
      (ENNReal.ofReal (rnDerivAux κ (κ + η) a x) / ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a x)) =
    ENNReal.ofReal (rnDerivAux κ (κ + η) a x)
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ 1 - rnDerivAux κ (κ + η) a x ≠ 0

α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ 0 ≤ 1 - rnDerivAux κ (κ + η) a x

α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ 0 < 1 - rnDerivAux κ (κ + η) a x

tactic: rw [ne_eq, sub_eq_zero]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ 1 - rnDerivAux κ (κ + η) a x ≠ 0
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ ¬1 = rnDerivAux κ (κ + η) a x

tactic: exact (hs' x hx).ne'
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ ¬1 = rnDerivAux κ (κ + η) a x
state_after: no goals

tactic: simp [(hs' x hx).le]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ 0 ≤ 1 - rnDerivAux κ (κ + η) a x
state_after: no goals

tactic: simp [hs' x hx]
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ η : ↥(kernel α γ)
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
inst✝¹ : IsFiniteKernel κ
inst✝ : IsFiniteKernel η
a : α
s : Set γ
hsm : MeasurableSet s
hs : s ⊆ (mutuallySingularSetSlice κ η a)ᶜ
h_coe : ∀ (b : ℝ), ↑b.toNNReal = ENNReal.ofReal b
this :
  withDensity η (rnDeriv κ η) =
    withDensity (withDensity (κ + η) fun a x => ↑(1 - rnDerivAux κ (κ + η) a x).toNNReal) (rnDeriv κ η)
hs' : ∀ x ∈ s, rnDerivAux κ (κ + η) a x < 1
x : γ
hx : x ∈ s
⊢ 0 < 1 - rnDerivAux κ (κ + η) a x
state_after: no goals