l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem toOuterMeasure_bindOnSupport_apply :
    (p.bindOnSupport f).toOuterMeasure s =
      ∑' a, p a * if h : p a = 0 then 0 else (f a h).toOuterMeasure s := by
  simp only [toOuterMeasure_apply, Set.indicator_apply, bindOnSupport_apply]
  calc
    (∑' b, ite (b ∈ s) (∑' a, p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0) =
        ∑' (b) (a), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      tsum_congr fun b => by split_ifs with hbs <;> simp only [eq_self_iff_true, tsum_zero]
    _ = ∑' (a) (b), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      ENNReal.tsum_comm
    _ = ∑' a, p a * ∑' b, ite (b ∈ s) (dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      (tsum_congr fun a => by simp only [← ENNReal.tsum_mul_left, mul_ite, mul_zero])
    _ = ∑' a, p a * dite (p a = 0) (fun h => 0) fun h => ∑' b, ite (b ∈ s) (f a h b) 0 :=
      tsum_congr fun a => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f : (a : α) → a ∈ support p → PMF β
s : Set β
a : α
⊢ (p a * ∑' (b : β), if b ∈ s then if h : p a = 0 then 0 else (f a h) b else 0) =
    p a * if h : p a = 0 then 0 else ∑' (b : β), if b ∈ s then (f a h) b else 0

Next tactic:
split_ifs with ha
@[simp]
theorem toOuterMeasure_bindOnSupport_apply :
    (p.bindOnSupport f).toOuterMeasure s =
      ∑' a, p a * if h : p a = 0 then 0 else (f a h).toOuterMeasure s := by
  simp only [toOuterMeasure_apply, Set.indicator_apply, bindOnSupport_apply]
  calc
    (∑' b, ite (b ∈ s) (∑' a, p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0) =
        ∑' (b) (a), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      tsum_congr fun b => by split_ifs with hbs <;> simp only [eq_self_iff_true, tsum_zero]
    _ = ∑' (a) (b), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      ENNReal.tsum_comm
    _ = ∑' a, p a * ∑' b, ite (b ∈ s) (dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      (tsum_congr fun a => by simp only [← ENNReal.tsum_mul_left, mul_ite, mul_zero])
    _ = ∑' a, p a * dite (p a = 0) (fun h => 0) fun h => ∑' b, ite (b ∈ s) (f a h b) 0 :=
      tsum_congr fun a => by split_ifs with ha <;> 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f : (a : α) → a ∈ support p → PMF β
s : Set β
a : α
ha : p a = 0
⊢ (p a * ∑' (b : β), if b ∈ s then 0 else 0) = p a * 0

Next tactic:
simp only [ite_self, tsum_zero, eq_self_iff_true]
@[simp]
theorem toOuterMeasure_bindOnSupport_apply :
    (p.bindOnSupport f).toOuterMeasure s =
      ∑' a, p a * if h : p a = 0 then 0 else (f a h).toOuterMeasure s := by
  simp only [toOuterMeasure_apply, Set.indicator_apply, bindOnSupport_apply]
  calc
    (∑' b, ite (b ∈ s) (∑' a, p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0) =
        ∑' (b) (a), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      tsum_congr fun b => by split_ifs with hbs <;> simp only [eq_self_iff_true, tsum_zero]
    _ = ∑' (a) (b), ite (b ∈ s) (p a * dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      ENNReal.tsum_comm
    _ = ∑' a, p a * ∑' b, ite (b ∈ s) (dite (p a = 0) (fun h => 0) fun h => f a h b) 0 :=
      (tsum_congr fun a => by simp only [← ENNReal.tsum_mul_left, mul_ite, mul_zero])
    _ = ∑' a, p a * dite (p a = 0) (fun h => 0) fun h => ∑' b, ite (b ∈ s) (f a h b) 0 :=
      tsum_congr fun a => by split_ifs with ha <;> 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f : (a : α) → a ∈ support p → PMF β
s : Set β
a : α
ha : ¬p a = 0
⊢ (p a * ∑' (b : β), if b ∈ s then (f a ha) b else 0) = p a * ∑' (b : β), if b ∈ s then (f a ha) b else 0

Next tactic:
simp only [ite_self, tsum_zero, eq_self_iff_true]
/-- The measure of a set under `p.bindOnSupport f` is the sum over `a : α`
  of the probability of `a` under `p` times the measure of the set under `f a _`.
  The additional if statement is needed since `f` is only a partial function. -/
@[simp]
theorem toMeasure_bindOnSupport_apply [MeasurableSpace β] (hs : MeasurableSet s) :
    (p.bindOnSupport f).toMeasure s =
      ∑' a, p a * if h : p a = 0 then 0 else (f a h).toMeasure s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
p : PMF α
f : (a : α) → a ∈ support p → PMF β
s : Set β
inst✝ : MeasurableSpace β
hs : MeasurableSet s
⊢ ↑↑(toMeasure (bindOnSupport p f)) s = ∑' (a : α), p a * if h : p a = 0 then 0 else ↑↑(toMeasure (f a h)) s

Next tactic:
simp only [toMeasure_apply_eq_toOuterMeasure_apply _ _ hs, toOuterMeasure_bindOnSupport_apply]
theorem essSup_eq_sInf {m : MeasurableSpace α} (μ : Measure α) (f : α → β) :
    essSup f μ = sInf { a | μ { x | a < f x } = 0 } := by
  

Proof state:
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ essSup f μ = sInf {a | ↑↑μ {x | a < f x} = 0}

Next tactic:
dsimp [essSup, limsup, limsSup]
theorem essSup_eq_sInf {m : MeasurableSpace α} (μ : Measure α) (f : α → β) :
    essSup f μ = sInf { a | μ { x | a < f x } = 0 } := by
  dsimp [essSup, limsup, limsSup]
  

Proof state:
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ sInf {a | ∀ᶠ (n : β) in map f (Measure.ae μ), n ≤ a} = sInf {a | ↑↑μ {x | a < f x} = 0}

Next tactic:
simp only [eventually_map, ae_iff, not_le]
theorem essInf_eq_sSup {m : MeasurableSpace α} (μ : Measure α) (f : α → β) :
    essInf f μ = sSup { a | μ { x | f x < a } = 0 } := by
  

Proof state:
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ essInf f μ = sSup {a | ↑↑μ {x | f x < a} = 0}

Next tactic:
dsimp [essInf, liminf, limsInf]
theorem essInf_eq_sSup {m : MeasurableSpace α} (μ : Measure α) (f : α → β) :
    essInf f μ = sSup { a | μ { x | f x < a } = 0 } := by
  dsimp [essInf, liminf, limsInf]
  

Proof state:
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : Measure α
f : α → β
⊢ sSup {a | ∀ᶠ (n : β) in map f (Measure.ae μ), a ≤ n} = sSup {a | ↑↑μ {x | f x < a} = 0}

Next tactic:
simp only [eventually_map, ae_iff, not_le]
theorem meas_essSup_lt
    (hf : IsBoundedUnder (· ≤ ·) μ.ae f := by isBoundedDefault) :
    μ { y | essSup f μ < f y } = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | essSup f μ < f y} = 0

Next tactic:
simp_rw [← not_le]
theorem meas_essSup_lt
    (hf : IsBoundedUnder (· ≤ ·) μ.ae f := by isBoundedDefault) :
    μ { y | essSup f μ < f y } = 0 := by
  simp_rw [← not_le]
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | ¬f y ≤ essSup f μ} = 0

Next tactic:
exact ae_le_essSup hf
theorem meas_lt_essInf
    (hf : IsBoundedUnder (· ≥ ·) μ.ae f := by isBoundedDefault) :
    μ { y | f y < essInf f μ } = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | f y < essInf f μ} = 0

Next tactic:
simp_rw [← not_le]
theorem meas_lt_essInf
    (hf : IsBoundedUnder (· ≥ ·) μ.ae f := by isBoundedDefault) :
    μ { y | f y < essInf f μ } = 0 := by
  simp_rw [← not_le]
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : ConditionallyCompleteLinearOrder β
x : β
f : α → β
inst✝² : TopologicalSpace β
inst✝¹ : FirstCountableTopology β
inst✝ : OrderTopology β
hf : autoParam (IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f) _auto✝
⊢ ↑↑μ {y | ¬essInf f μ ≤ f y} = 0

Next tactic:
exact ae_essInf_le hf
@[simp]
theorem essSup_measure_zero {m : MeasurableSpace α} {f : α → β} : essSup f (0 : Measure α) = ⊥ :=
  le_bot_iff.mp (sInf_le (by 

Proof state:
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
m : MeasurableSpace α
f : α → β
⊢ ⊥ ∈ {a | ∀ᶠ (n : β) in map f (Measure.ae 0), n ≤ a}

Next tactic:
simp [Set.mem_setOf_eq, EventuallyLE, ae_iff]
theorem essSup_le_of_ae_le {f : α → β} (c : β) (hf : f ≤ᵐ[μ] fun _ => c) : essSup f μ ≤ c :=
  limsup_le_of_le (by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : β
hf : f ≤ᵐ[μ] fun x => c
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f

Next tactic:
isBoundedDefault
theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by
  

Proof state:
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ g (essSup f μ) = essSup (fun x => g (f x)) μ

Next tactic:
refine' OrderIso.limsup_apply g _ _ _ _
theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by
  refine' OrderIso.limsup_apply g _ _ _ _
  

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
case refine'_2
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f
case refine'_3
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => g (f x)
case refine'_4
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => g (f x)

Next tactic:
all_goals isBoundedDefault
theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by
  refine' OrderIso.limsup_apply g _ _ _ _
  all_goals 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f

Next tactic:
isBoundedDefault
theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by
  refine' OrderIso.limsup_apply g _ _ _ _
  all_goals 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f

Next tactic:
isBoundedDefault
theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by
  refine' OrderIso.limsup_apply g _ _ _ _
  all_goals 

Proof state:
case refine'_3
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => g (f x)

Next tactic:
isBoundedDefault
theorem OrderIso.essSup_apply {m : MeasurableSpace α} {γ} [CompleteLattice γ] (f : α → β)
    (μ : Measure α) (g : β ≃o γ) : g (essSup f μ) = essSup (fun x => g (f x)) μ := by
  refine' OrderIso.limsup_apply g _ _ _ _
  all_goals 

Proof state:
case refine'_4
α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝¹ : CompleteLattice β
m : MeasurableSpace α
γ : Type u_3
inst✝ : CompleteLattice γ
f : α → β
μ : Measure α
g : β ≃o γ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) fun x => g (f x)

Next tactic:
isBoundedDefault
theorem essSup_mono_measure {f : α → β} (hμν : ν ≪ μ) : essSup f ν ≤ essSup f μ := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ essSup f ν ≤ essSup f μ

Next tactic:
refine' limsup_le_limsup_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
theorem essSup_mono_measure {f : α → β} (hμν : ν ≪ μ) : essSup f ν ≤ essSup f μ := by
  refine' limsup_le_limsup_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
  

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae ν) f
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f

Next tactic:
all_goals isBoundedDefault
theorem essSup_mono_measure {f : α → β} (hμν : ν ≪ μ) : essSup f ν ≤ essSup f μ := by
  refine' limsup_le_limsup_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
  all_goals 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsCoboundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae ν) f

Next tactic:
isBoundedDefault
theorem essSup_mono_measure {f : α → β} (hμν : ν ≪ μ) : essSup f ν ≤ essSup f μ := by
  refine' limsup_le_limsup_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
  all_goals 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : ν ≪ μ
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) (Measure.ae μ) f

Next tactic:
isBoundedDefault
theorem essInf_antitone_measure {f : α → β} (hμν : μ ≪ ν) : essInf f ν ≤ essInf f μ := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ essInf f ν ≤ essInf f μ

Next tactic:
refine' liminf_le_liminf_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
theorem essInf_antitone_measure {f : α → β} (hμν : μ ≪ ν) : essInf f ν ≤ essInf f μ := by
  refine' liminf_le_liminf_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
  

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae ν) f
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f

Next tactic:
all_goals isBoundedDefault
theorem essInf_antitone_measure {f : α → β} (hμν : μ ≪ ν) : essInf f ν ≤ essInf f μ := by
  refine' liminf_le_liminf_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
  all_goals 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsBoundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae ν) f

Next tactic:
isBoundedDefault
theorem essInf_antitone_measure {f : α → β} (hμν : μ ≪ ν) : essInf f ν ≤ essInf f μ := by
  refine' liminf_le_liminf_of_le (Measure.ae_le_iff_absolutelyContinuous.mpr hμν) _ _
  all_goals 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
hμν : μ ≪ ν
⊢ IsCoboundedUnder (fun x x_1 => x ≥ x_1) (Measure.ae μ) f

Next tactic:
isBoundedDefault
theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) :
    essSup f (c • μ) = essSup f μ := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
⊢ essSup f (c • μ) = essSup f μ

Next tactic:
simp_rw [essSup]
theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) :
    essSup f (c • μ) = essSup f μ := by
  simp_rw [essSup]
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
⊢ limsup f (Measure.ae (c • μ)) = limsup f (Measure.ae μ)

Next tactic:
suffices h_smul : (c • μ).ae = μ.ae
theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) :
    essSup f (c • μ) = essSup f μ := by
  simp_rw [essSup]
  suffices h_smul : (c • μ).ae = μ.ae; · 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
h_smul : Measure.ae (c • μ) = Measure.ae μ
⊢ limsup f (Measure.ae (c • μ)) = limsup f (Measure.ae μ)

Next tactic:
rw [h_smul]
theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) :
    essSup f (c • μ) = essSup f μ := by
  simp_rw [essSup]
  suffices h_smul : (c • μ).ae = μ.ae; · rw [h_smul]
  

Proof state:
case h_smul
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
⊢ Measure.ae (c • μ) = Measure.ae μ

Next tactic:
ext1
theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) :
    essSup f (c • μ) = essSup f μ := by
  simp_rw [essSup]
  suffices h_smul : (c • μ).ae = μ.ae; · rw [h_smul]
  ext1
  

Proof state:
case h_smul.a
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
s✝ : Set α
⊢ s✝ ∈ Measure.ae (c • μ) ↔ s✝ ∈ Measure.ae μ

Next tactic:
simp_rw [mem_ae_iff]
theorem essSup_smul_measure {f : α → β} {c : ℝ≥0∞} (hc : c ≠ 0) :
    essSup f (c • μ) = essSup f μ := by
  simp_rw [essSup]
  suffices h_smul : (c • μ).ae = μ.ae; · rw [h_smul]
  ext1
  simp_rw [mem_ae_iff]
  

Proof state:
case h_smul.a
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
f : α → β
c : ℝ≥0∞
hc : c ≠ 0
s✝ : Set α
⊢ ↑↑(c • μ) s✝ᶜ = 0 ↔ ↑↑μ s✝ᶜ = 0

Next tactic:
simp [hc]
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ)

Next tactic:
refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map (g ∘ f) (Measure.ae μ))

Next tactic:
isBoundedDefault
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by 

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map g (Measure.ae (Measure.map f μ)))

Next tactic:
isBoundedDefault
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ t ∈ map g (Measure.ae (Measure.map f μ)) → t ∈ map (g ∘ f) (Measure.ae μ)

Next tactic:
simp_rw [Filter.mem_map]
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
  simp_rw [Filter.mem_map]
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → g ∘ f ⁻¹' t ∈ Measure.ae μ

Next tactic:
have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
    ext1 x
    simp_rw [Set.mem_preimage, Function.comp]
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
  simp_rw [Filter.mem_map]
  have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
    

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)

Next tactic:
ext1 x
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
  simp_rw [Filter.mem_map]
  have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
    ext1 x
    

Proof state:
case h
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
x : α
⊢ x ∈ g ∘ f ⁻¹' t ↔ x ∈ f ⁻¹' (g ⁻¹' t)

Next tactic:
simp_rw [Set.mem_preimage, Function.comp]
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
  simp_rw [Filter.mem_map]
  have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
    ext1 x
    simp_rw [Set.mem_preimage, Function.comp]
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
this : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → g ∘ f ⁻¹' t ∈ Measure.ae μ

Next tactic:
rw [this]
theorem essSup_comp_le_essSup_map_measure (hf : AEMeasurable f μ) :
    essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ) := by
  refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
  simp_rw [Filter.mem_map]
  have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
    ext1 x
    simp_rw [Set.mem_preimage, Function.comp]
  rw [this]
  

Proof state:
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ ν : Measure α
inst✝ : CompleteLattice β
γ : Type u_3
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
this : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → f ⁻¹' (g ⁻¹' t) ∈ Measure.ae μ

Next tactic:
exact fun h => mem_ae_of_mem_ae_map hf h