Theorem: essSup_indicator_eq_essSup_restrict
File: Mathlib/MeasureTheory/Function/EssSup.lean

tactic: refine'
  le_antisymm _
    (limsSup_le_limsSup_of_le (map_restrict_ae_le_map_indicator_ae hs)
      (by isBoundedDefault) (by isBoundedDefault) )
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ essSup (indicator s f) μ = essSup f (Measure.restrict μ s)

tactic: refine' limsSup_le_limsSup (by isBoundedDefault) (by isBoundedDefault) (fun c h_restrict_le => _)
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ essSup (indicator s f) μ ≤ essSup f (Measure.restrict μ s)

tactic: rw [eventually_map] at h_restrict_le⊢
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᶠ (n : β) in map f (Measure.ae (Measure.restrict μ s)), n ≤ c
⊢ ∀ᶠ (n : β) in map (indicator s f) (Measure.ae μ), n ≤ c

tactic: rw [ae_restrict_iff' hs] at h_restrict_le
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (a : α) ∂Measure.restrict μ s, f a ≤ c
⊢ ∀ᵐ (a : α) ∂μ, indicator s f a ≤ c

tactic: refine' h_restrict_le.mono fun x hxc => _
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
⊢ ∀ᵐ (a : α) ∂μ, indicator s f a ≤ c

tactic: by_cases hxs : x ∈ s
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
x : α
hxc : x ∈ s → f x ≤ c
⊢ indicator s f x ≤ c

tactic: isBoundedDefault
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map f (Measure.ae (Measure.restrict μ s)))

tactic: isBoundedDefault
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map (indicator s f) (Measure.ae μ))

tactic: isBoundedDefault
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map (indicator s f) (Measure.ae μ))

tactic: isBoundedDefault
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map f (Measure.ae (Measure.restrict μ s)))

tactic: rsuffices ⟨x, hx⟩ : ∃ x, 0 ≤ f x ∧ f x ≤ c
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ 0 ≤ c

tactic: exact hx.1.trans hx.2
state_before: case intro
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
x : α
hx : 0 ≤ f x ∧ f x ≤ c
⊢ 0 ≤ c

α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ x, 0 ≤ f x ∧ f x ≤ c

tactic: refine' Frequently.exists _
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ x, 0 ≤ f x ∧ f x ≤ c

tactic: rw [EventuallyLE, ae_restrict_iff' hs] at hf
state_before: case refine'_2
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ᵐ (x : α) ∂μ, 0 ≤ f x ∧ f x ≤ c

tactic: have hs' : ∃ᵐ x ∂μ, x ∈ s := by
  contrapose! hs_not_null
  rw [not_frequently, ae_iff] at hs_not_null
  suffices { a : α | ¬a ∉ s } = s by rwa [← this]
  simp
state_before: case refine'_2
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ᵐ (x : α) ∂μ, 0 ≤ f x ∧ f x ≤ c

tactic: refine' hs'.mp (hf.mp (h_restrict_le.mono fun x hxs_imp_c hxf_nonneg hxs => _))
state_before: case refine'_2
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs' : ∃ᵐ (x : α) ∂μ, x ∈ s
⊢ ∃ᵐ (x : α) ∂μ, 0 ≤ f x ∧ f x ≤ c

tactic: rw [Pi.zero_apply] at hxf_nonneg
state_before: case refine'_2
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs' : ∃ᵐ (x : α) ∂μ, x ∈ s
x : α
hxs_imp_c : x ∈ s → f x ≤ c
hxf_nonneg : x ∈ s → OfNat.ofNat 0 x ≤ f x
hxs : x ∈ s
⊢ 0 ≤ f x ∧ f x ≤ c

tactic: exact ⟨hxf_nonneg hxs, hxs_imp_c hxs⟩
state_before: case refine'_2
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs' : ∃ᵐ (x : α) ∂μ, x ∈ s
x : α
hxs_imp_c : x ∈ s → f x ≤ c
hxf_nonneg : x ∈ s → 0 ≤ f x
hxs : x ∈ s
⊢ 0 ≤ f x ∧ f x ≤ c

tactic: exact μ.ae
state_before: case refine'_1
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ Filter α

tactic: contrapose! hs_not_null
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
⊢ ∃ᵐ (x : α) ∂μ, x ∈ s

tactic: rw [not_frequently, ae_iff] at hs_not_null
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ¬∃ᵐ (x : α) ∂μ, x ∈ s
⊢ ↑↑μ s = 0

tactic: suffices { a : α | ¬a ∉ s } = s by rwa [← this]
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ↑↑μ {a | ¬¬a ∈ s} = 0
⊢ ↑↑μ s = 0

tactic: simp
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ↑↑μ {a | ¬¬a ∈ s} = 0
⊢ {a | ¬¬a ∈ s} = s

tactic: rwa [← this]
state_before: α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : ∀ᵐ (x : α) ∂μ, x ∈ s → OfNat.ofNat 0 x ≤ f x
hs : MeasurableSet s
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hs_not_null : ↑↑μ {a | ¬¬a ∈ s} = 0
this : {a | ¬¬a ∈ s} = s
⊢ ↑↑μ s = 0

tactic: simpa [hxs] using hxc hxs
state_before: case pos
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
x : α
hxc : x ∈ s → f x ≤ c
hxs : x ∈ s
⊢ indicator s f x ≤ c

tactic: simpa [hxs] using hc
state_before: case neg
α : Type u_2
β : Type u_1
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝¹ : CompleteLinearOrder β
inst✝ : Zero β
s : Set α
f : α → β
hf : 0 ≤ᵐ[Measure.restrict μ s] f
hs : MeasurableSet s
hs_not_null : ↑↑μ s ≠ 0
c : β
h_restrict_le : ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ c
hc : 0 ≤ c
x : α
hxc : x ∈ s → f x ≤ c
hxs : ¬x ∈ s
⊢ indicator s f x ≤ c