l3lab/ntp-mathlib huggingface dataset:
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        

Proof state:
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
t : T
i j k : ι
x✝¹ : ComplexShape.Rel c i j
x✝ : ComplexShape.Rel c j k
this : d C i j ≫ d C j k = 0
⊢ (fun i j => (d C i j).app t) i j ≫ (fun i j => (d C i j).app t) j k = 0

Next tactic:
rw [NatTrans.ext_iff, Function.funext_iff] at this
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        

Proof state:
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
t : T
i j k : ι
x✝¹ : ComplexShape.Rel c i j
x✝ : ComplexShape.Rel c j k
this : ∀ (a : T), (d C i j ≫ d C j k).app a = 0.app a
⊢ (fun i j => (d C i j).app t) i j ≫ (fun i j => (d C i j).app t) j k = 0

Next tactic:
exact this t
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t
      shape := fun i j h => by
        have := C.shape _ _ h
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t }
  map h :=
    { f := fun i => (C.X i).map h
      comm' := fun i j _ => NatTrans.naturality _ _ }
  map_id t := by
    

Proof state:
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
t : T
⊢ { obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
          map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
      (𝟙 t) =
    𝟙
      ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
            map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.obj
        t)

Next tactic:
ext i
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t
      shape := fun i j h => by
        have := C.shape _ _ h
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t }
  map h :=
    { f := fun i => (C.X i).map h
      comm' := fun i j _ => NatTrans.naturality _ _ }
  map_id t := by
    ext i
    

Proof state:
case h
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
t : T
i : ι
⊢ Hom.f
      ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
            map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
        (𝟙 t))
      i =
    Hom.f
      (𝟙
        ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
              map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.obj
          t))
      i

Next tactic:
dsimp
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t
      shape := fun i j h => by
        have := C.shape _ _ h
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t }
  map h :=
    { f := fun i => (C.X i).map h
      comm' := fun i j _ => NatTrans.naturality _ _ }
  map_id t := by
    ext i
    dsimp
    

Proof state:
case h
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
t : T
i : ι
⊢ (X C i).map (𝟙 t) = 𝟙 ((X C i).obj t)

Next tactic:
rw [(C.X i).map_id]
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t
      shape := fun i j h => by
        have := C.shape _ _ h
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t }
  map h :=
    { f := fun i => (C.X i).map h
      comm' := fun i j _ => NatTrans.naturality _ _ }
  map_id t := by
    ext i
    dsimp
    rw [(C.X i).map_id]
  map_comp h₁ h₂ := by
    

Proof state:
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
X✝ Y✝ Z✝ : T
h₁ : X✝ ⟶ Y✝
h₂ : Y✝ ⟶ Z✝
⊢ { obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
          map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
      (h₁ ≫ h₂) =
    { obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
            map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
        h₁ ≫
      { obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
            map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
        h₂

Next tactic:
ext i
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t
      shape := fun i j h => by
        have := C.shape _ _ h
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t }
  map h :=
    { f := fun i => (C.X i).map h
      comm' := fun i j _ => NatTrans.naturality _ _ }
  map_id t := by
    ext i
    dsimp
    rw [(C.X i).map_id]
  map_comp h₁ h₂ := by
    ext i
    

Proof state:
case h
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
X✝ Y✝ Z✝ : T
h₁ : X✝ ⟶ Y✝
h₂ : Y✝ ⟶ Z✝
i : ι
⊢ Hom.f
      ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
            map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
        (h₁ ≫ h₂))
      i =
    Hom.f
      ({ obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
              map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
          h₁ ≫
        { obj := fun t => mk (fun i => (X C i).obj t) fun i j => (d C i j).app t,
              map := fun {X Y} h => Hom.mk fun i => (HomologicalComplex.X C i).map h }.map
          h₂)
      i

Next tactic:
dsimp
/-- A complex of functors gives a functor to complexes. -/
@[simps obj map]
def asFunctor {T : Type*} [Category T] (C : HomologicalComplex (T ⥤ V) c) :
    T ⥤ HomologicalComplex V c where
  obj t :=
    { X := fun i => (C.X i).obj t
      d := fun i j => (C.d i j).app t
      d_comp_d' := fun i j k _ _ => by
        have := C.d_comp_d i j k
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t
      shape := fun i j h => by
        have := C.shape _ _ h
        rw [NatTrans.ext_iff, Function.funext_iff] at this
        exact this t }
  map h :=
    { f := fun i => (C.X i).map h
      comm' := fun i j _ => NatTrans.naturality _ _ }
  map_id t := by
    ext i
    dsimp
    rw [(C.X i).map_id]
  map_comp h₁ h₂ := by
    ext i
    dsimp
    

Proof state:
case h
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.78, u_2} T
C : HomologicalComplex (T ⥤ V) c
X✝ Y✝ Z✝ : T
h₁ : X✝ ⟶ Y✝
h₂ : Y✝ ⟶ Z✝
i : ι
⊢ (X C i).map (h₁ ≫ h₂) = (X C i).map h₁ ≫ (X C i).map h₂

Next tactic:
rw [Functor.map_comp]
/-- The functorial version of `HomologicalComplex.asFunctor`. -/
@[simps]
def complexOfFunctorsToFunctorToComplex {T : Type*} [Category T] :
    HomologicalComplex (T ⥤ V) c ⥤ T ⥤ HomologicalComplex V c where
  obj C := C.asFunctor
  map f :=
    { app := fun t =>
        { f := fun i => (f.f i).app t
          comm' := fun i j _ => NatTrans.congr_app (f.comm i j) t }
      naturality := fun t t' g => by
        

Proof state:
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.4461, u_2} T
X✝ Y✝ : HomologicalComplex (T ⥤ V) c
f : X✝ ⟶ Y✝
t t' : T
g : t ⟶ t'
⊢ ((fun C => asFunctor C) X✝).map g ≫ (fun t => Hom.mk fun i => (Hom.f f i).app t) t' =
    (fun t => Hom.mk fun i => (Hom.f f i).app t) t ≫ ((fun C => asFunctor C) Y✝).map g

Next tactic:
ext i
/-- The functorial version of `HomologicalComplex.asFunctor`. -/
@[simps]
def complexOfFunctorsToFunctorToComplex {T : Type*} [Category T] :
    HomologicalComplex (T ⥤ V) c ⥤ T ⥤ HomologicalComplex V c where
  obj C := C.asFunctor
  map f :=
    { app := fun t =>
        { f := fun i => (f.f i).app t
          comm' := fun i j _ => NatTrans.congr_app (f.comm i j) t }
      naturality := fun t t' g => by
        ext i
        

Proof state:
case h
V : Type u
inst✝² : Category.{v, u} V
inst✝¹ : HasZeroMorphisms V
ι : Type u_1
c : ComplexShape ι
T : Type u_2
inst✝ : Category.{?u.4461, u_2} T
X✝ Y✝ : HomologicalComplex (T ⥤ V) c
f : X✝ ⟶ Y✝
t t' : T
g : t ⟶ t'
i : ι
⊢ Hom.f (((fun C => asFunctor C) X✝).map g ≫ (fun t => Hom.mk fun i => (Hom.f f i).app t) t') i =
    Hom.f ((fun t => Hom.mk fun i => (Hom.f f i).app t) t ≫ ((fun C => asFunctor C) Y✝).map g) i

Next tactic:
exact (f.f i).naturality g
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  

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

Next tactic:
by_cases ha_zero : a = 0
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · 

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

Next tactic:
simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    

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

Next tactic:
exact limsup_const_bot
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  

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

Next tactic:
let g := fun x : ℝ≥0∞ => a * x
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  

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

Next tactic:
have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by
          simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]⟩⟩
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by 

Proof state:
α : Type u_1
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
ha_zero : ¬a = 0
g : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x
x : ℝ≥0∞
⊢ (fun x => a⁻¹ * x) (g x) = x

Next tactic:
simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top]
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by
          

Proof state:
α : Type u_1
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
ha_zero : ¬a = 0
g : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x
x : ℝ≥0∞
⊢ g ((fun x => a⁻¹ * x) x) = x

Next tactic:
simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by
          simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]⟩⟩
  

Proof state:
case neg
α : Type u_1
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
ha_zero : ¬a = 0
g : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x
hg_bij : Function.Bijective g
⊢ limsup (fun x => a * u x) f = a * limsup u f

Next tactic:
have hg_mono : StrictMono g :=
    Monotone.strictMono_of_injective (fun _ _ _ => by rwa [mul_le_mul_left ha_zero ha_top]) hg_bij.1
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by
          simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]⟩⟩
  have hg_mono : StrictMono g :=
    Monotone.strictMono_of_injective (fun _ _ _ => by 

Proof state:
α : Type u_1
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
ha_zero : ¬a = 0
g : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x
hg_bij : Function.Bijective g
x✝² x✝¹ : ℝ≥0∞
x✝ : x✝² ≤ x✝¹
⊢ g x✝² ≤ g x✝¹

Next tactic:
rwa [mul_le_mul_left ha_zero ha_top]
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by
          simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]⟩⟩
  have hg_mono : StrictMono g :=
    Monotone.strictMono_of_injective (fun _ _ _ => by rwa [mul_le_mul_left ha_zero ha_top]) hg_bij.1
  

Proof state:
case neg
α : Type u_1
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
ha_zero : ¬a = 0
g : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x
hg_bij : Function.Bijective g
hg_mono : StrictMono g
⊢ limsup (fun x => a * u x) f = a * limsup u f

Next tactic:
let g_iso := StrictMono.orderIsoOfSurjective g hg_mono hg_bij.2
theorem limsup_const_mul_of_ne_top {u : α → ℝ≥0∞} {a : ℝ≥0∞} (ha_top : a ≠ ⊤) :
    (f.limsup fun x : α => a * u x) = a * f.limsup u := by
  by_cases ha_zero : a = 0
  · simp_rw [ha_zero, zero_mul, ← ENNReal.bot_eq_zero]
    exact limsup_const_bot
  let g := fun x : ℝ≥0∞ => a * x
  have hg_bij : Function.Bijective g :=
    Function.bijective_iff_has_inverse.mpr
      ⟨fun x => a⁻¹ * x,
        ⟨fun x => by simp [← mul_assoc, ENNReal.inv_mul_cancel ha_zero ha_top], fun x => by
          simp [← mul_assoc, ENNReal.mul_inv_cancel ha_zero ha_top]⟩⟩
  have hg_mono : StrictMono g :=
    Monotone.strictMono_of_injective (fun _ _ _ => by rwa [mul_le_mul_left ha_zero ha_top]) hg_bij.1
  let g_iso := StrictMono.orderIsoOfSurjective g hg_mono hg_bij.2
  

Proof state:
case neg
α : Type u_1
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha_top : a ≠ ⊤
ha_zero : ¬a = 0
g : ℝ≥0∞ → ℝ≥0∞ := fun x => a * x
hg_bij : Function.Bijective g
hg_mono : StrictMono g
g_iso : ℝ≥0∞ ≃o ℝ≥0∞ := StrictMono.orderIsoOfSurjective g hg_mono (_ : Function.Surjective g)
⊢ limsup (fun x => a * u x) f = a * limsup u f

Next tactic:
exact (OrderIso.limsup_apply g_iso).symm
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  

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

Next tactic:
by_cases ha_top : a ≠ ⊤
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · 

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

Next tactic:
exact limsup_const_mul_of_ne_top ha_top
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  

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

Next tactic:
push_neg at ha_top
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  

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

Next tactic:
by_cases hu : u =ᶠ[f] 0
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  by_cases hu : u =ᶠ[f] 0
  · 

Proof state:
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

Next tactic:
have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  by_cases hu : u =ᶠ[f] 0
  · have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by 

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 = OfNat.ofNat 0 x
⊢ (fun x => a * u x) x = OfNat.ofNat 0 x

Next tactic:
simp [hx]
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  by_cases hu : u =ᶠ[f] 0
  · have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]
    

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

Next tactic:
simp only [limsup_congr hu, limsup_congr hau, Pi.zero_apply, ← ENNReal.bot_eq_zero,
      limsup_const_bot]
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  by_cases hu : u =ᶠ[f] 0
  · have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]
    simp only [limsup_congr hu, limsup_congr hau, Pi.zero_apply, ← ENNReal.bot_eq_zero,
      limsup_const_bot]
    

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 * ⊥

Next tactic:
simp
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  by_cases hu : u =ᶠ[f] 0
  · have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]
    simp only [limsup_congr hu, limsup_congr hau, Pi.zero_apply, ← ENNReal.bot_eq_zero,
      limsup_const_bot]
    simp
  · 

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

Next 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]
theorem limsup_const_mul [CountableInterFilter f] {u : α → ℝ≥0∞} {a : ℝ≥0∞} :
    f.limsup (a * u ·) = a * f.limsup u := by
  by_cases ha_top : a ≠ ⊤
  · exact limsup_const_mul_of_ne_top ha_top
  push_neg at ha_top
  by_cases hu : u =ᶠ[f] 0
  · have hau : (a * u ·) =ᶠ[f] 0 := hu.mono fun x hx => by simp [hx]
    simp only [limsup_congr hu, limsup_congr hau, Pi.zero_apply, ← ENNReal.bot_eq_zero,
      limsup_const_bot]
    simp
  · have hu_mul : ∃ᶠ x : α in f, ⊤ ≤ ite (u x = 0) (0 : ℝ≥0∞) ⊤ := by
      

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 ⊤

Next tactic:
rw [EventuallyEq, not_eventually] at hu