Theorem: MeasureTheory.AeMeasurable.ae_eq_of_forall_set_lintegral_eq
File: Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean

tactic: refine'
  ENNReal.eventuallyEq_of_toReal_eventuallyEq (ae_lt_top' hf hfi).ne_of_lt
    (ae_lt_top' hg hgi).ne_of_lt
    (Integrable.ae_eq_of_forall_set_integral_eq _ _
      (integrable_toReal_of_lintegral_ne_top hf hfi)
      (integrable_toReal_of_lintegral_ne_top hg hgi) fun s hs hs' => _)
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
⊢ f =ᵐ[μ] g

tactic: rw [integral_eq_lintegral_of_nonneg_ae, integral_eq_lintegral_of_nonneg_ae]
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ (∫ (x : α) in s, ENNReal.toReal (f x) ∂μ) = ∫ (x : α) in s, ENNReal.toReal (g x) ∂μ

tactic: exacts [ae_of_all _ fun x => ENNReal.toReal_nonneg,
  hg.ennreal_toReal.restrict.aestronglyMeasurable, ae_of_all _ fun x => ENNReal.toReal_nonneg,
  hf.ennreal_toReal.restrict.aestronglyMeasurable]
state_before: case hf
α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ 0 ≤ᵐ[Measure.restrict μ s] fun x => ENNReal.toReal (g x)

case hfm
α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ AEStronglyMeasurable (fun x => ENNReal.toReal (g x)) (Measure.restrict μ s)

case hf
α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ 0 ≤ᵐ[Measure.restrict μ s] fun x => ENNReal.toReal (f x)

case hfm
α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ AEStronglyMeasurable (fun x => ENNReal.toReal (f x)) (Measure.restrict μ s)

tactic: congr 1
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ ENNReal.toReal (∫⁻ (a : α) in s, ENNReal.ofReal (ENNReal.toReal (f a)) ∂μ) =
    ENNReal.toReal (∫⁻ (a : α) in s, ENNReal.ofReal (ENNReal.toReal (g a)) ∂μ)

tactic: rw [lintegral_congr_ae (ofReal_toReal_ae_eq _), lintegral_congr_ae (ofReal_toReal_ae_eq _)]
state_before: case e_a
α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ (∫⁻ (a : α) in s, ENNReal.ofReal (ENNReal.toReal (f a)) ∂μ) =
    ∫⁻ (a : α) in s, ENNReal.ofReal (ENNReal.toReal (g a)) ∂μ

tactic: exact hfg hs hs'
state_before: case e_a
α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ (∫⁻ (a : α) in s, f a ∂μ) = ∫⁻ (a : α) in s, g a ∂μ

tactic: refine' ae_lt_top' hg.restrict (ne_of_lt (lt_of_le_of_lt _ hgi.lt_top))
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, g x < ⊤

tactic: exact @set_lintegral_univ α _ μ g ▸ lintegral_mono_set (Set.subset_univ _)
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ (∫⁻ (x : α) in s, g x ∂μ) ≤ ∫⁻ (x : α), g x ∂μ

tactic: refine' ae_lt_top' hf.restrict (ne_of_lt (lt_of_le_of_lt _ hfi.lt_top))
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, f x < ⊤

tactic: exact @set_lintegral_univ α _ μ f ▸ lintegral_mono_set (Set.subset_univ _)
state_before: α : Type u_1
E : Type ?u.137396
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f g : α → ℝ≥0∞
hf : AEMeasurable f
hg : AEMeasurable g
hfi : (∫⁻ (x : α), f x ∂μ) ≠ ⊤
hgi : (∫⁻ (x : α), g x ∂μ) ≠ ⊤
hfg : ∀ ⦃s : Set α⦄, MeasurableSet s → ↑↑μ s < ⊤ → (∫⁻ (x : α) in s, f x ∂μ) = ∫⁻ (x : α) in s, g x ∂μ
s : Set α
hs : MeasurableSet s
hs' : ↑↑μ s < ⊤
⊢ (∫⁻ (x : α) in s, f x ∂μ) ≤ ∫⁻ (x : α), f x ∂μ