-- Mathlib/Order/Filter/ENNReal.lean
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u

Proof state:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ∃ᶠ (x : α) in f, ¬u x = 0 x
x : α
hx : ¬u x = 0
⊢ ⊤ ≤ if u x = 0 then 0 else ⊤

Tactic:
simp [hx]

Result:
no goals

Proof state:
case pos
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
exact limsup_const_mul_of_ne_top ha_top

Result:
no goals

Proof state:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
have hu_mul : ∃ᶠ x : α in f, ⊤ ≤ ite (u x = 0) (0 : ℝ≥0∞) ⊤ := by
  rw [EventuallyEq, not_eventually] at hu
  refine hu.mono fun x hx => ?_
  rw [Pi.zero_apply] at hx
  simp [hx]

Result:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
hu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Proof state:
case pos
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : u =ᶠ[f] 0
hau : (fun x => a * u x) =ᶠ[f] 0
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
simp only [limsup_congr hu, limsup_congr hau, Pi.zero_def, ← ENNReal.bot_eq_zero,
  limsup_const_bot]

Result:
case pos
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : u =ᶠ[f] 0
hau : (fun x => a * u x) =ᶠ[f] 0
⊢ ⊥ = a * ⊥

Proof state:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
hu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
have h_top_le : (f.limsup fun x : α => ite (u x = 0) (0 : ℝ≥0∞) ⊤) = ⊤ :=
  eq_top_iff.mpr (le_limsup_of_frequently_le hu_mul)

Result:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
hu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤
h_top_le : limsup (fun x => if u x = 0 then 0 else ⊤) f = ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Proof state:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ∃ᶠ (x : α) in f, ¬u x = 0 x
x : α
hx : ¬u x = 0 x
⊢ ⊤ ≤ if u x = 0 then 0 else ⊤

Tactic:
rw [Pi.zero_apply] at hx

Result:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ∃ᶠ (x : α) in f, ¬u x = 0 x
x : α
hx : ¬u x = 0
⊢ ⊤ ≤ if u x = 0 then 0 else ⊤

Proof state:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : ¬a ≠ ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
push_neg at ha_top

Result:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Proof state:
case pos
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : u =ᶠ[f] 0
hau : (fun x => a * u x) =ᶠ[f] 0
⊢ ⊥ = a * ⊥

Tactic:
simp

Result:
no goals

Proof state:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
by_cases ha_top : a ≠ ⊤

Result:
case pos
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : ¬a ≠ ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Proof state:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
⊢ ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤

Tactic:
rw [EventuallyEq, not_eventually] at hu

Result:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ∃ᶠ (x : α) in f, ¬u x = 0 x
⊢ ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤

Proof state:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ∃ᶠ (x : α) in f, ¬u x = 0 x
⊢ ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤

Tactic:
refine hu.mono fun x hx => ?_

Result:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ∃ᶠ (x : α) in f, ¬u x = 0 x
x : α
hx : ¬u x = 0 x
⊢ ⊤ ≤ if u x = 0 then 0 else ⊤

Proof state:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
by_cases hu : u =ᶠ[f] 0

Result:
case pos
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : u =ᶠ[f] 0
⊢ limsup (fun x => a * u x) f = a * limsup u f

case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
⊢ limsup (fun x => a * u x) f = a * limsup u f

Proof state:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
hu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤
h_top_le : limsup (fun x => if u x = 0 then 0 else ⊤) f = ⊤
hfu : limsup u f ≠ 0
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
simp only [ha_top, top_mul', h_top_le, hfu, ite_false]

Result:
no goals

Proof state:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
hu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤
h_top_le : limsup (fun x => if u x = 0 then 0 else ⊤) f = ⊤
⊢ limsup (fun x => a * u x) f = a * limsup u f

Tactic:
have hfu : f.limsup u ≠ 0 := mt limsup_eq_zero_iff.1 hu

Result:
case neg
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : ¬u =ᶠ[f] 0
hu_mul : ∃ᶠ (x : α) in f, ⊤ ≤ if u x = 0 then 0 else ⊤
h_top_le : limsup (fun x => if u x = 0 then 0 else ⊤) f = ⊤
hfu : limsup u f ≠ 0
⊢ limsup (fun x => a * u x) f = a * limsup u f

Proof state:
α : Type u_1
f : Filter α
inst✝ : CountableInterFilter f
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a = ⊤
hu : u =ᶠ[f] 0
x : α
hx : u x = 0 x
⊢ (fun x => a * u x) x = 0 x

Tactic:
simp [hx]

Result:
no goals