l3lab/ntp-mathlib huggingface dataset:
/-- Assemble an `I`-indexed family of natural transformations into a single natural transformation.
-/
def sigma (α : ∀ i, F i ⟶ G i) : Functor.sigma F ⟶ Functor.sigma G where
  app f := SigmaHom.mk ((α f.1).app _)
  naturality := by
    

Proof state:
I : Type w₁
C : I → Type u₁
inst✝¹ : (i : I) → Category.{v₁, u₁} (C i)
D : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (D i)
F G : (i : I) → C i ⥤ D i
α : (i : I) → F i ⟶ G i
⊢ ∀ ⦃X Y : (i : I) × C i⦄ (f : X ⟶ Y),
    (Functor.sigma F).map f ≫ (fun f => SigmaHom.mk ((α f.fst).app f.snd)) Y =
      (fun f => SigmaHom.mk ((α f.fst).app f.snd)) X ≫ (Functor.sigma G).map f

Next tactic:
rintro ⟨i, X⟩ ⟨_, _⟩ ⟨f⟩
/-- Assemble an `I`-indexed family of natural transformations into a single natural transformation.
-/
def sigma (α : ∀ i, F i ⟶ G i) : Functor.sigma F ⟶ Functor.sigma G where
  app f := SigmaHom.mk ((α f.1).app _)
  naturality := by
    rintro ⟨i, X⟩ ⟨_, _⟩ ⟨f⟩
    

Proof state:
case mk.mk.mk
I : Type w₁
C : I → Type u₁
inst✝¹ : (i : I) → Category.{v₁, u₁} (C i)
D : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (D i)
F G : (i : I) → C i ⥤ D i
α : (i : I) → F i ⟶ G i
i : I
X Y✝ : C i
f : X ⟶ Y✝
⊢ (Functor.sigma F).map (SigmaHom.mk f) ≫ (fun f => SigmaHom.mk ((α f.fst).app f.snd)) { fst := i, snd := Y✝ } =
    (fun f => SigmaHom.mk ((α f.fst).app f.snd)) { fst := i, snd := X } ≫ (Functor.sigma G).map (SigmaHom.mk f)

Next tactic:
change SigmaHom.mk _ = SigmaHom.mk _
/-- Assemble an `I`-indexed family of natural transformations into a single natural transformation.
-/
def sigma (α : ∀ i, F i ⟶ G i) : Functor.sigma F ⟶ Functor.sigma G where
  app f := SigmaHom.mk ((α f.1).app _)
  naturality := by
    rintro ⟨i, X⟩ ⟨_, _⟩ ⟨f⟩
    change SigmaHom.mk _ = SigmaHom.mk _
    

Proof state:
case mk.mk.mk
I : Type w₁
C : I → Type u₁
inst✝¹ : (i : I) → Category.{v₁, u₁} (C i)
D : I → Type u₁
inst✝ : (i : I) → Category.{v₁, u₁} (D i)
F G : (i : I) → C i ⥤ D i
α : (i : I) → F i ⟶ G i
i : I
X Y✝ : C i
f : X ⟶ Y✝
⊢ SigmaHom.mk ((F { fst := i, snd := X }.fst).map f ≫ (α { fst := i, snd := Y✝ }.fst).app { fst := i, snd := Y✝ }.snd) =
    SigmaHom.mk ((α { fst := i, snd := X }.fst).app { fst := i, snd := X }.snd ≫ (G { fst := i, snd := X }.fst).map f)

Next tactic:
rw [(α i).naturality]
instance subsemiring (R : Type u) [Semiring R] (p : ℕ) [CharP R p] (S : Subsemiring R) :
    CharP S p :=
  ⟨fun x =>
    Iff.symm <|
      (CharP.cast_eq_zero_iff R p x).symm.trans
        ⟨fun h => Subtype.eq <| show S.subtype x = 0 by 

Proof state:
R : Type u
inst✝¹ : Semiring R
p : ℕ
inst✝ : CharP R p
S : Subsemiring R
x : ℕ
h : ↑x = 0
⊢ (Subsemiring.subtype S) ↑x = 0

Next tactic:
rw [map_natCast, h]
instance subsemiring (R : Type u) [Semiring R] (p : ℕ) [CharP R p] (S : Subsemiring R) :
    CharP S p :=
  ⟨fun x =>
    Iff.symm <|
      (CharP.cast_eq_zero_iff R p x).symm.trans
        ⟨fun h => Subtype.eq <| show S.subtype x = 0 by rw [map_natCast, h], fun h =>
          map_natCast S.subtype x ▸ by 

Proof state:
R : Type u
inst✝¹ : Semiring R
p : ℕ
inst✝ : CharP R p
S : Subsemiring R
x : ℕ
h : ↑x = 0
⊢ (Subsemiring.subtype S) ↑x = 0

Next tactic:
rw [h, RingHom.map_zero]
instance subring (R : Type u) [Ring R] (p : ℕ) [CharP R p] (S : Subring R) : CharP S p :=
  ⟨fun x =>
    Iff.symm <|
      (CharP.cast_eq_zero_iff R p x).symm.trans
        ⟨fun h => Subtype.eq <| show S.subtype x = 0 by 

Proof state:
R : Type u
inst✝¹ : Ring R
p : ℕ
inst✝ : CharP R p
S : Subring R
x : ℕ
h : ↑x = 0
⊢ (Subring.subtype S) ↑x = 0

Next tactic:
rw [map_natCast, h]
instance subring (R : Type u) [Ring R] (p : ℕ) [CharP R p] (S : Subring R) : CharP S p :=
  ⟨fun x =>
    Iff.symm <|
      (CharP.cast_eq_zero_iff R p x).symm.trans
        ⟨fun h => Subtype.eq <| show S.subtype x = 0 by rw [map_natCast, h], fun h =>
          map_natCast S.subtype x ▸ by 

Proof state:
R : Type u
inst✝¹ : Ring R
p : ℕ
inst✝ : CharP R p
S : Subring R
x : ℕ
h : ↑x = 0
⊢ (Subring.subtype S) ↑x = 0

Next tactic:
rw [h, RingHom.map_zero]
theorem isBounded_bot : IsBounded r ⊥ ↔ Nonempty α := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
⊢ IsBounded r ⊥ ↔ Nonempty α

Next tactic:
simp [IsBounded, exists_true_iff_nonempty]
theorem isBounded_top : IsBounded r ⊤ ↔ ∃ t, ∀ x, r x t := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
⊢ IsBounded r ⊤ ↔ ∃ t, ∀ (x : α), r x t

Next tactic:
simp [IsBounded, eq_univ_iff_forall]
theorem isBounded_principal (s : Set α) : IsBounded r (𝓟 s) ↔ ∃ t, ∀ x ∈ s, r x t := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
s : Set α
⊢ IsBounded r (𝓟 s) ↔ ∃ t, ∀ x ∈ s, r x t

Next tactic:
simp [IsBounded, subset_def]
theorem IsBoundedUnder.mono_le [Preorder β] {l : Filter α} {u v : α → β}
    (hu : IsBoundedUnder (· ≤ ·) l u) (hv : v ≤ᶠ[l] u) : IsBoundedUnder (· ≤ ·) l v := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
inst✝ : Preorder β
l : Filter α
u v : α → β
hu : IsBoundedUnder (fun x x_1 => x ≤ x_1) l u
hv : v ≤ᶠ[l] u
⊢ IsBoundedUnder (fun x x_1 => x ≤ x_1) l v

Next tactic:
apply hu.imp
theorem IsBoundedUnder.mono_le [Preorder β] {l : Filter α} {u v : α → β}
    (hu : IsBoundedUnder (· ≤ ·) l u) (hv : v ≤ᶠ[l] u) : IsBoundedUnder (· ≤ ·) l v := by
  apply hu.imp
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
inst✝ : Preorder β
l : Filter α
u v : α → β
hu : IsBoundedUnder (fun x x_1 => x ≤ x_1) l u
hv : v ≤ᶠ[l] u
⊢ ∀ (a : β), (∀ᶠ (x : β) in map u l, (fun x x_1 => x ≤ x_1) x a) → ∀ᶠ (x : β) in map v l, (fun x x_1 => x ≤ x_1) x a

Next tactic:
exact fun b hb => (eventually_map.1 hb).mp <| hv.mono fun x => le_trans
theorem not_isBoundedUnder_of_tendsto_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atTop) : ¬IsBoundedUnder (· ≤ ·) l f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝² : Preorder β
inst✝¹ : NoMaxOrder β
f : α → β
l : Filter α
inst✝ : NeBot l
hf : Tendsto f l atTop
⊢ ¬IsBoundedUnder (fun x x_1 => x ≤ x_1) l f

Next tactic:
rintro ⟨b, hb⟩
theorem not_isBoundedUnder_of_tendsto_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atTop) : ¬IsBoundedUnder (· ≤ ·) l f := by
  rintro ⟨b, hb⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝² : Preorder β
inst✝¹ : NoMaxOrder β
f : α → β
l : Filter α
inst✝ : NeBot l
hf : Tendsto f l atTop
b : β
hb : ∀ᶠ (x : β) in map f l, (fun x x_1 => x ≤ x_1) x b
⊢ False

Next tactic:
rw [eventually_map] at hb
theorem not_isBoundedUnder_of_tendsto_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atTop) : ¬IsBoundedUnder (· ≤ ·) l f := by
  rintro ⟨b, hb⟩
  rw [eventually_map] at hb
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝² : Preorder β
inst✝¹ : NoMaxOrder β
f : α → β
l : Filter α
inst✝ : NeBot l
hf : Tendsto f l atTop
b : β
hb : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) (f a) b
⊢ False

Next tactic:
obtain ⟨b', h⟩ := exists_gt b
theorem not_isBoundedUnder_of_tendsto_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atTop) : ¬IsBoundedUnder (· ≤ ·) l f := by
  rintro ⟨b, hb⟩
  rw [eventually_map] at hb
  obtain ⟨b', h⟩ := exists_gt b
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝² : Preorder β
inst✝¹ : NoMaxOrder β
f : α → β
l : Filter α
inst✝ : NeBot l
hf : Tendsto f l atTop
b : β
hb : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) (f a) b
b' : β
h : b < b'
⊢ False

Next tactic:
have hb' := (tendsto_atTop.mp hf) b'
theorem not_isBoundedUnder_of_tendsto_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atTop) : ¬IsBoundedUnder (· ≤ ·) l f := by
  rintro ⟨b, hb⟩
  rw [eventually_map] at hb
  obtain ⟨b', h⟩ := exists_gt b
  have hb' := (tendsto_atTop.mp hf) b'
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝² : Preorder β
inst✝¹ : NoMaxOrder β
f : α → β
l : Filter α
inst✝ : NeBot l
hf : Tendsto f l atTop
b : β
hb : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) (f a) b
b' : β
h : b < b'
hb' : ∀ᶠ (a : α) in l, b' ≤ f a
⊢ False

Next tactic:
have : { x : α | f x ≤ b } ∩ { x : α | b' ≤ f x } = ∅ :=
    eq_empty_of_subset_empty fun x hx => (not_le_of_lt h) (le_trans hx.2 hx.1)
theorem not_isBoundedUnder_of_tendsto_atTop [Preorder β] [NoMaxOrder β] {f : α → β} {l : Filter α}
    [l.NeBot] (hf : Tendsto f l atTop) : ¬IsBoundedUnder (· ≤ ·) l f := by
  rintro ⟨b, hb⟩
  rw [eventually_map] at hb
  obtain ⟨b', h⟩ := exists_gt b
  have hb' := (tendsto_atTop.mp hf) b'
  have : { x : α | f x ≤ b } ∩ { x : α | b' ≤ f x } = ∅ :=
    eq_empty_of_subset_empty fun x hx => (not_le_of_lt h) (le_trans hx.2 hx.1)
  

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝² : Preorder β
inst✝¹ : NoMaxOrder β
f : α → β
l : Filter α
inst✝ : NeBot l
hf : Tendsto f l atTop
b : β
hb : ∀ᶠ (a : α) in l, (fun x x_1 => x ≤ x_1) (f a) b
b' : β
h : b < b'
hb' : ∀ᶠ (a : α) in l, b' ≤ f a
this : {x | f x ≤ b} ∩ {x | b' ≤ f x} = ∅
⊢ False

Next tactic:
exact (nonempty_of_mem (hb.and hb')).ne_empty this
theorem IsBoundedUnder.bddAbove_range_of_cofinite [Preorder β] [IsDirected β (· ≤ ·)] {f : α → β}
    (hf : IsBoundedUnder (· ≤ ·) cofinite f) : BddAbove (range f) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝¹ : Preorder β
inst✝ : IsDirected β fun x x_1 => x ≤ x_1
f : α → β
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) cofinite f
⊢ BddAbove (range f)

Next tactic:
rcases hf with ⟨b, hb⟩
theorem IsBoundedUnder.bddAbove_range_of_cofinite [Preorder β] [IsDirected β (· ≤ ·)] {f : α → β}
    (hf : IsBoundedUnder (· ≤ ·) cofinite f) : BddAbove (range f) := by
  rcases hf with ⟨b, hb⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝¹ : Preorder β
inst✝ : IsDirected β fun x x_1 => x ≤ x_1
f : α → β
b : β
hb : ∀ᶠ (x : β) in map f cofinite, (fun x x_1 => x ≤ x_1) x b
⊢ BddAbove (range f)

Next tactic:
haveI : Nonempty β := ⟨b⟩
theorem IsBoundedUnder.bddAbove_range_of_cofinite [Preorder β] [IsDirected β (· ≤ ·)] {f : α → β}
    (hf : IsBoundedUnder (· ≤ ·) cofinite f) : BddAbove (range f) := by
  rcases hf with ⟨b, hb⟩
  haveI : Nonempty β := ⟨b⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝¹ : Preorder β
inst✝ : IsDirected β fun x x_1 => x ≤ x_1
f : α → β
b : β
hb : ∀ᶠ (x : β) in map f cofinite, (fun x x_1 => x ≤ x_1) x b
this : Nonempty β
⊢ BddAbove (range f)

Next tactic:
rw [← image_univ, ← union_compl_self { x | f x ≤ b }, image_union, bddAbove_union]
theorem IsBoundedUnder.bddAbove_range_of_cofinite [Preorder β] [IsDirected β (· ≤ ·)] {f : α → β}
    (hf : IsBoundedUnder (· ≤ ·) cofinite f) : BddAbove (range f) := by
  rcases hf with ⟨b, hb⟩
  haveI : Nonempty β := ⟨b⟩
  rw [← image_univ, ← union_compl_self { x | f x ≤ b }, image_union, bddAbove_union]
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝¹ : Preorder β
inst✝ : IsDirected β fun x x_1 => x ≤ x_1
f : α → β
b : β
hb : ∀ᶠ (x : β) in map f cofinite, (fun x x_1 => x ≤ x_1) x b
this : Nonempty β
⊢ BddAbove (f '' {x | f x ≤ b}) ∧ BddAbove (f '' {x | f x ≤ b}ᶜ)

Next tactic:
exact ⟨⟨b, ball_image_iff.2 fun x => id⟩, (hb.image f).bddAbove⟩
theorem IsBoundedUnder.bddAbove_range [Preorder β] [IsDirected β (· ≤ ·)] {f : ℕ → β}
    (hf : IsBoundedUnder (· ≤ ·) atTop f) : BddAbove (range f) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝¹ : Preorder β
inst✝ : IsDirected β fun x x_1 => x ≤ x_1
f : ℕ → β
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop f
⊢ BddAbove (range f)

Next tactic:
rw [← Nat.cofinite_eq_atTop] at hf
theorem IsBoundedUnder.bddAbove_range [Preorder β] [IsDirected β (· ≤ ·)] {f : ℕ → β}
    (hf : IsBoundedUnder (· ≤ ·) atTop f) : BddAbove (range f) := by
  rw [← Nat.cofinite_eq_atTop] at hf
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f✝ g : Filter α
inst✝¹ : Preorder β
inst✝ : IsDirected β fun x x_1 => x ≤ x_1
f : ℕ → β
hf : IsBoundedUnder (fun x x_1 => x ≤ x_1) cofinite f
⊢ BddAbove (range f)

Next tactic:
exact hf.bddAbove_range_of_cofinite
theorem isCobounded_bot : IsCobounded r ⊥ ↔ ∃ b, ∀ x, r b x := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
⊢ IsCobounded r ⊥ ↔ ∃ b, ∀ (x : α), r b x

Next tactic:
simp [IsCobounded]
theorem isCobounded_top : IsCobounded r ⊤ ↔ Nonempty α := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
⊢ IsCobounded r ⊤ ↔ Nonempty α

Next tactic:
simp (config := { contextual := true }) [IsCobounded, eq_univ_iff_forall,
    exists_true_iff_nonempty]
theorem isCobounded_principal (s : Set α) :
    (𝓟 s).IsCobounded r ↔ ∃ b, ∀ a, (∀ x ∈ s, r x a) → r b a := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
r : α → α → Prop
f g : Filter α
s : Set α
⊢ IsCobounded r (𝓟 s) ↔ ∃ b, ∀ (a : α), (∀ x ∈ s, r x a) → r b a

Next tactic:
simp [IsCobounded, subset_def]
@[simp]
theorem _root_.OrderIso.isBoundedUnder_le_comp [Preorder α] [Preorder β] (e : α ≃o β) {l : Filter γ}
    {u : γ → α} : (IsBoundedUnder (· ≤ ·) l fun x => e (u x)) ↔ IsBoundedUnder (· ≤ ·) l u :=
  (Function.Surjective.exists e.surjective).trans <|
    exists_congr fun a => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ≃o β
l : Filter γ
u : γ → α
a : α
⊢ (∀ᶠ (x : β) in map (fun x => e (u x)) l, (fun x x_1 => x ≤ x_1) x (e a)) ↔
    ∀ᶠ (x : α) in map u l, (fun x x_1 => x ≤ x_1) x a

Next tactic:
simp only [eventually_map, e.le_iff_le]
theorem IsBoundedUnder.sup [SemilatticeSup α] {f : Filter β} {u v : β → α} :
    f.IsBoundedUnder (· ≤ ·) u →
      f.IsBoundedUnder (· ≤ ·) v → f.IsBoundedUnder (· ≤ ·) fun a => u a ⊔ v a
  | ⟨bu, (hu : ∀ᶠ x in f, u x ≤ bu)⟩, ⟨bv, (hv : ∀ᶠ x in f, v x ≤ bv)⟩ =>
    ⟨bu ⊔ bv, show ∀ᶠ x in f, u x ⊔ v x ≤ bu ⊔ bv
      by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : SemilatticeSup α
f : Filter β
u v : β → α
bu : α
hu : ∀ᶠ (x : β) in f, u x ≤ bu
bv : α
hv : ∀ᶠ (x : β) in f, v x ≤ bv
⊢ ∀ᶠ (x : β) in f, u x ⊔ v x ≤ bu ⊔ bv

Next tactic:
filter_upwards [hu, hv] with _ using sup_le_sup
@[simp]
theorem blimsup_true (f : Filter β) (u : β → α) : (blimsup u f fun _ => True) = limsup u f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : Filter β
u : β → α
⊢ (blimsup u f fun x => True) = limsup u f

Next tactic:
simp [blimsup_eq, limsup_eq]
@[simp]
theorem bliminf_true (f : Filter β) (u : β → α) : (bliminf u f fun _ => True) = liminf u f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : Filter β
u : β → α
⊢ (bliminf u f fun x => True) = liminf u f

Next tactic:
simp [bliminf_eq, liminf_eq]
lemma blimsup_eq_limsup {f : Filter β} {u : β → α} {p : β → Prop} :
    blimsup u f p = limsup u (f ⊓ 𝓟 {x | p x}) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : Filter β
u : β → α
p : β → Prop
⊢ blimsup u f p = limsup u (f ⊓ 𝓟 {x | p x})

Next tactic:
simp only [blimsup_eq, limsup_eq, eventually_inf_principal, mem_setOf_eq]
theorem blimsup_eq_limsup_subtype {f : Filter β} {u : β → α} {p : β → Prop} :
    blimsup u f p = limsup (u ∘ ((↑) : { x | p x } → β)) (comap (↑) f) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : Filter β
u : β → α
p : β → Prop
⊢ blimsup u f p = limsup (u ∘ Subtype.val) (comap Subtype.val f)

Next tactic:
rw [blimsup_eq_limsup, limsup, limsup, ← map_map, map_comap_setCoe_val]
theorem limsSup_principal {s : Set α} (h : BddAbove s) (hs : s.Nonempty) :
    limsSup (𝓟 s) = sSup s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
s : Set α
h : BddAbove s
hs : Set.Nonempty s
⊢ limsSup (𝓟 s) = sSup s

Next tactic:
simp only [limsSup, eventually_principal]
theorem limsSup_principal {s : Set α} (h : BddAbove s) (hs : s.Nonempty) :
    limsSup (𝓟 s) = sSup s := by
  simp only [limsSup, eventually_principal]; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
s : Set α
h : BddAbove s
hs : Set.Nonempty s
⊢ sInf {a | ∀ x ∈ s, x ≤ a} = sSup s

Next tactic:
exact csInf_upper_bounds_eq_csSup h hs
theorem limsup_congr {α : Type*} [ConditionallyCompleteLattice β] {f : Filter α} {u v : α → β}
    (h : ∀ᶠ a in f, u a = v a) : limsup u f = limsup v f := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : ConditionallyCompleteLattice α✝
α : Type u_6
inst✝ : ConditionallyCompleteLattice β
f : Filter α
u v : α → β
h : ∀ᶠ (a : α) in f, u a = v a
⊢ limsup u f = limsup v f

Next tactic:
rw [limsup_eq]
theorem limsup_congr {α : Type*} [ConditionallyCompleteLattice β] {f : Filter α} {u v : α → β}
    (h : ∀ᶠ a in f, u a = v a) : limsup u f = limsup v f := by
  rw [limsup_eq]
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : ConditionallyCompleteLattice α✝
α : Type u_6
inst✝ : ConditionallyCompleteLattice β
f : Filter α
u v : α → β
h : ∀ᶠ (a : α) in f, u a = v a
⊢ sInf {a | ∀ᶠ (n : α) in f, u n ≤ a} = limsup v f

Next tactic:
congr with b
theorem limsup_congr {α : Type*} [ConditionallyCompleteLattice β] {f : Filter α} {u v : α → β}
    (h : ∀ᶠ a in f, u a = v a) : limsup u f = limsup v f := by
  rw [limsup_eq]
  congr with b
  

Proof state:
case e_a.h
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : ConditionallyCompleteLattice α✝
α : Type u_6
inst✝ : ConditionallyCompleteLattice β
f : Filter α
u v : α → β
h : ∀ᶠ (a : α) in f, u a = v a
b : β
⊢ b ∈ {a | ∀ᶠ (n : α) in f, u n ≤ a} ↔ b ∈ {a | ∀ᶠ (n : β) in map v f, n ≤ a}

Next tactic:
exact eventually_congr (h.mono fun x hx => by simp [hx])
theorem limsup_congr {α : Type*} [ConditionallyCompleteLattice β] {f : Filter α} {u v : α → β}
    (h : ∀ᶠ a in f, u a = v a) : limsup u f = limsup v f := by
  rw [limsup_eq]
  congr with b
  exact eventually_congr (h.mono fun x hx => by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : ConditionallyCompleteLattice α✝
α : Type u_6
inst✝ : ConditionallyCompleteLattice β
f : Filter α
u v : α → β
h : ∀ᶠ (a : α) in f, u a = v a
b : β
x : α
hx : u x = v x
⊢ u x ≤ b ↔ v x ∈ {x | (fun n => n ≤ b) x}

Next tactic:
simp [hx]
theorem blimsup_congr {f : Filter β} {u v : β → α} {p : β → Prop} (h : ∀ᶠ a in f, p a → u a = v a) :
    blimsup u f p = blimsup v f p := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : Filter β
u v : β → α
p : β → Prop
h : ∀ᶠ (a : β) in f, p a → u a = v a
⊢ blimsup u f p = blimsup v f p

Next tactic:
simpa only [blimsup_eq_limsup] using limsup_congr <| eventually_inf_principal.2 h
theorem limsup_const {α : Type*} [ConditionallyCompleteLattice β] {f : Filter α} [NeBot f]
    (b : β) : limsup (fun _ => b) f = b := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝² : ConditionallyCompleteLattice α✝
α : Type u_6
inst✝¹ : ConditionallyCompleteLattice β
f : Filter α
inst✝ : NeBot f
b : β
⊢ limsup (fun x => b) f = b

Next tactic:
simpa only [limsup_eq, eventually_const] using csInf_Ici
theorem HasBasis.liminf_eq_sSup_iUnion_iInter {ι ι' : Type*} {f : ι → α} {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasBasis p s) :
    liminf f v = sSup (⋃ (j : Subtype p), ⋂ (i : s j), Iic (f i)) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
ι'✝ : Type u_5
inst✝ : ConditionallyCompleteLattice α
ι : Type u_6
ι' : Type u_7
f : ι → α
v : Filter ι
p : ι' → Prop
s : ι' → Set ι
hv : HasBasis v p s
⊢ liminf f v = sSup (⋃ j, ⋂ i, Iic (f ↑i))

Next tactic:
simp_rw [liminf_eq, hv.eventually_iff]
theorem HasBasis.liminf_eq_sSup_iUnion_iInter {ι ι' : Type*} {f : ι → α} {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasBasis p s) :
    liminf f v = sSup (⋃ (j : Subtype p), ⋂ (i : s j), Iic (f i)) := by
  simp_rw [liminf_eq, hv.eventually_iff]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
ι'✝ : Type u_5
inst✝ : ConditionallyCompleteLattice α
ι : Type u_6
ι' : Type u_7
f : ι → α
v : Filter ι
p : ι' → Prop
s : ι' → Set ι
hv : HasBasis v p s
⊢ sSup {a | ∃ i, p i ∧ ∀ ⦃x : ι⦄, x ∈ s i → a ≤ f x} = sSup (⋃ j, ⋂ i, Iic (f ↑i))

Next tactic:
congr
theorem HasBasis.liminf_eq_sSup_iUnion_iInter {ι ι' : Type*} {f : ι → α} {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasBasis p s) :
    liminf f v = sSup (⋃ (j : Subtype p), ⋂ (i : s j), Iic (f i)) := by
  simp_rw [liminf_eq, hv.eventually_iff]
  congr
  

Proof state:
case e_a
α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
ι'✝ : Type u_5
inst✝ : ConditionallyCompleteLattice α
ι : Type u_6
ι' : Type u_7
f : ι → α
v : Filter ι
p : ι' → Prop
s : ι' → Set ι
hv : HasBasis v p s
⊢ {a | ∃ i, p i ∧ ∀ ⦃x : ι⦄, x ∈ s i → a ≤ f x} = ⋃ j, ⋂ i, Iic (f ↑i)

Next tactic:
ext x
theorem HasBasis.liminf_eq_sSup_iUnion_iInter {ι ι' : Type*} {f : ι → α} {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasBasis p s) :
    liminf f v = sSup (⋃ (j : Subtype p), ⋂ (i : s j), Iic (f i)) := by
  simp_rw [liminf_eq, hv.eventually_iff]
  congr
  ext x
  

Proof state:
case e_a.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
ι'✝ : Type u_5
inst✝ : ConditionallyCompleteLattice α
ι : Type u_6
ι' : Type u_7
f : ι → α
v : Filter ι
p : ι' → Prop
s : ι' → Set ι
hv : HasBasis v p s
x : α
⊢ x ∈ {a | ∃ i, p i ∧ ∀ ⦃x : ι⦄, x ∈ s i → a ≤ f x} ↔ x ∈ ⋃ j, ⋂ i, Iic (f ↑i)

Next tactic:
simp only [mem_setOf_eq, iInter_coe_set, mem_iUnion, mem_iInter, mem_Iic, Subtype.exists,
    exists_prop]
theorem HasBasis.liminf_eq_sSup_univ_of_empty {f : ι → α} {v : Filter ι}
    {p : ι' → Prop} {s : ι' → Set ι} (hv : v.HasBasis p s) (i : ι') (hi : p i) (h'i : s i = ∅) :
    liminf f v = sSup univ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : ι → α
v : Filter ι
p : ι' → Prop
s : ι' → Set ι
hv : HasBasis v p s
i : ι'
hi : p i
h'i : s i = ∅
⊢ liminf f v = sSup univ

Next tactic:
simp [hv.eq_bot_iff.2 ⟨i, hi, h'i⟩, liminf_eq]
@[simp, nolint simpNF]
theorem liminf_nat_add (f : ℕ → α) (k : ℕ) :
    liminf (fun i => f (i + k)) atTop = liminf f atTop := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
k : ℕ
⊢ liminf (fun i => f (i + k)) atTop = liminf f atTop

Next tactic:
change liminf (f ∘ (· + k)) atTop = liminf f atTop
@[simp, nolint simpNF]
theorem liminf_nat_add (f : ℕ → α) (k : ℕ) :
    liminf (fun i => f (i + k)) atTop = liminf f atTop := by
  change liminf (f ∘ (· + k)) atTop = liminf f atTop
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
k : ℕ
⊢ liminf (f ∘ fun x => x + k) atTop = liminf f atTop

Next tactic:
rw [liminf, liminf, ← map_map, map_add_atTop_eq_nat]