l3lab/ntp-mathlib huggingface dataset:
/-- If `f : α → α` is a morphism of complete lattices, then the limsup of its iterates of any
`a : α` is a fixed point. -/
@[simp]
theorem CompleteLatticeHom.apply_limsup_iterate (f : CompleteLatticeHom α α) (a : α) :
    f (limsup (fun n => f^[n] a) atTop) = limsup (fun n => f^[n] a) atTop := by
  rw [limsup_eq_iInf_iSup_of_nat', map_iInf]
  simp_rw [_root_.map_iSup, ← Function.comp_apply (f := f), ← Function.iterate_succ' f,
    ← Nat.add_succ]
  conv_rhs => rw [iInf_split _ (0 < ·)]
  simp only [not_lt, le_zero_iff, iInf_iInf_eq_left, add_zero, iInf_nat_gt_zero_eq, left_eq_inf]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f : CompleteLatticeHom α α
a : α
⊢ ⨅ i, ⨆ i_1, (⇑f)^[i_1 + Nat.succ i] a ≤ ⨆ i, (⇑f)^[i] a

Next tactic:
refine' (iInf_le (fun i => ⨆ j, f^[j + (i + 1)] a) 0).trans _
/-- If `f : α → α` is a morphism of complete lattices, then the limsup of its iterates of any
`a : α` is a fixed point. -/
@[simp]
theorem CompleteLatticeHom.apply_limsup_iterate (f : CompleteLatticeHom α α) (a : α) :
    f (limsup (fun n => f^[n] a) atTop) = limsup (fun n => f^[n] a) atTop := by
  rw [limsup_eq_iInf_iSup_of_nat', map_iInf]
  simp_rw [_root_.map_iSup, ← Function.comp_apply (f := f), ← Function.iterate_succ' f,
    ← Nat.add_succ]
  conv_rhs => rw [iInf_split _ (0 < ·)]
  simp only [not_lt, le_zero_iff, iInf_iInf_eq_left, add_zero, iInf_nat_gt_zero_eq, left_eq_inf]
  refine' (iInf_le (fun i => ⨆ j, f^[j + (i + 1)] a) 0).trans _
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f : CompleteLatticeHom α α
a : α
⊢ ⨆ j, (⇑f)^[j + (0 + 1)] a ≤ ⨆ i, (⇑f)^[i] a

Next tactic:
simp only [zero_add, Function.comp_apply, iSup_le_iff]
/-- If `f : α → α` is a morphism of complete lattices, then the limsup of its iterates of any
`a : α` is a fixed point. -/
@[simp]
theorem CompleteLatticeHom.apply_limsup_iterate (f : CompleteLatticeHom α α) (a : α) :
    f (limsup (fun n => f^[n] a) atTop) = limsup (fun n => f^[n] a) atTop := by
  rw [limsup_eq_iInf_iSup_of_nat', map_iInf]
  simp_rw [_root_.map_iSup, ← Function.comp_apply (f := f), ← Function.iterate_succ' f,
    ← Nat.add_succ]
  conv_rhs => rw [iInf_split _ (0 < ·)]
  simp only [not_lt, le_zero_iff, iInf_iInf_eq_left, add_zero, iInf_nat_gt_zero_eq, left_eq_inf]
  refine' (iInf_le (fun i => ⨆ j, f^[j + (i + 1)] a) 0).trans _
  simp only [zero_add, Function.comp_apply, iSup_le_iff]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f : CompleteLatticeHom α α
a : α
⊢ ∀ (i : ℕ), (⇑f)^[i + 1] a ≤ ⨆ i, (⇑f)^[i] a

Next tactic:
exact fun i => le_iSup (fun i => f^[i] a) (i + 1)
theorem blimsup_mono (h : ∀ x, p x → q x) : blimsup u f p ≤ blimsup u f q :=
  sInf_le_sInf fun a ha => ha.mono <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
h : ∀ (x : β), p x → q x
a : α
ha : a ∈ {a | ∀ᶠ (x : β) in f, q x → u x ≤ a}
⊢ ∀ (x : β), (q x → u x ≤ a) → p x → u x ≤ a

Next tactic:
tauto
theorem bliminf_antitone (h : ∀ x, p x → q x) : bliminf u f q ≤ bliminf u f p :=
  sSup_le_sSup fun a ha => ha.mono <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
h : ∀ (x : β), p x → q x
a : α
ha : a ∈ {a | ∀ᶠ (x : β) in f, q x → a ≤ u x}
⊢ ∀ (x : β), (q x → a ≤ u x) → p x → a ≤ u x

Next tactic:
tauto
theorem blimsup_and_le_inf : (blimsup u f fun x => p x ∧ q x) ≤ blimsup u f p ⊓ blimsup u f q :=
  le_inf (blimsup_mono <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
⊢ ∀ (x : β), p x ∧ q x → p x

Next tactic:
tauto
theorem blimsup_and_le_inf : (blimsup u f fun x => p x ∧ q x) ≤ blimsup u f p ⊓ blimsup u f q :=
  le_inf (blimsup_mono <| by tauto) (blimsup_mono <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
⊢ ∀ (x : β), p x ∧ q x → q x

Next tactic:
tauto
/-- See also `Filter.blimsup_or_eq_sup`. -/
-- @[simp] -- Porting note: simp_nf linter, lhs simplifies, added _aux simp versions below
theorem blimsup_sup_le_or : blimsup u f p ⊔ blimsup u f q ≤ blimsup u f fun x => p x ∨ q x :=
  sup_le (blimsup_mono <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
⊢ ∀ (x : β), p x → p x ∨ q x

Next tactic:
tauto
/-- See also `Filter.blimsup_or_eq_sup`. -/
-- @[simp] -- Porting note: simp_nf linter, lhs simplifies, added _aux simp versions below
theorem blimsup_sup_le_or : blimsup u f p ⊔ blimsup u f q ≤ blimsup u f fun x => p x ∨ q x :=
  sup_le (blimsup_mono <| by tauto) (blimsup_mono <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
⊢ ∀ (x : β), q x → p x ∨ q x

Next tactic:
tauto
theorem OrderIso.apply_blimsup [CompleteLattice γ] (e : α ≃o γ) :
    FunLike.coe e (blimsup u f p) = blimsup ((FunLike.coe e) ∘ u) f p := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
e : α ≃o γ
⊢ e (blimsup u f p) = blimsup (⇑e ∘ u) f p

Next tactic:
simp only [blimsup_eq, map_sInf, Function.comp_apply]
theorem OrderIso.apply_blimsup [CompleteLattice γ] (e : α ≃o γ) :
    FunLike.coe e (blimsup u f p) = blimsup ((FunLike.coe e) ∘ u) f p := by
  simp only [blimsup_eq, map_sInf, Function.comp_apply]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
e : α ≃o γ
⊢ sInf (⇑e '' {a | ∀ᶠ (x : β) in f, p x → u x ≤ a}) = sInf {a | ∀ᶠ (x : β) in f, p x → e (u x) ≤ a}

Next tactic:
congr
theorem OrderIso.apply_blimsup [CompleteLattice γ] (e : α ≃o γ) :
    FunLike.coe e (blimsup u f p) = blimsup ((FunLike.coe e) ∘ u) f p := by
  simp only [blimsup_eq, map_sInf, Function.comp_apply]
  congr
  

Proof state:
case e_a
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
e : α ≃o γ
⊢ ⇑e '' {a | ∀ᶠ (x : β) in f, p x → u x ≤ a} = {a | ∀ᶠ (x : β) in f, p x → e (u x) ≤ a}

Next tactic:
ext c
theorem OrderIso.apply_blimsup [CompleteLattice γ] (e : α ≃o γ) :
    FunLike.coe e (blimsup u f p) = blimsup ((FunLike.coe e) ∘ u) f p := by
  simp only [blimsup_eq, map_sInf, Function.comp_apply]
  congr
  ext c
  

Proof state:
case e_a.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
e : α ≃o γ
c : γ
⊢ c ∈ ⇑e '' {a | ∀ᶠ (x : β) in f, p x → u x ≤ a} ↔ c ∈ {a | ∀ᶠ (x : β) in f, p x → e (u x) ≤ a}

Next tactic:
obtain ⟨a, rfl⟩ := e.surjective c
theorem OrderIso.apply_blimsup [CompleteLattice γ] (e : α ≃o γ) :
    FunLike.coe e (blimsup u f p) = blimsup ((FunLike.coe e) ∘ u) f p := by
  simp only [blimsup_eq, map_sInf, Function.comp_apply]
  congr
  ext c
  obtain ⟨a, rfl⟩ := e.surjective c
  

Proof state:
case e_a.h.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
e : α ≃o γ
a : α
⊢ e a ∈ ⇑e '' {a | ∀ᶠ (x : β) in f, p x → u x ≤ a} ↔ e a ∈ {a | ∀ᶠ (x : β) in f, p x → e (u x) ≤ a}

Next tactic:
simp
theorem SupHom.apply_blimsup_le [CompleteLattice γ] (g : sSupHom α γ) :
    g (blimsup u f p) ≤ blimsup (g ∘ u) f p := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g✝ : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
g : sSupHom α γ
⊢ g (blimsup u f p) ≤ blimsup (⇑g ∘ u) f p

Next tactic:
simp only [blimsup_eq_iInf_biSup, Function.comp]
theorem SupHom.apply_blimsup_le [CompleteLattice γ] (g : sSupHom α γ) :
    g (blimsup u f p) ≤ blimsup (g ∘ u) f p := by
  simp only [blimsup_eq_iInf_biSup, Function.comp]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g✝ : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
g : sSupHom α γ
⊢ g (⨅ s ∈ f, ⨆ b, ⨆ (_ : p b ∧ b ∈ s), u b) ≤ ⨅ s ∈ f, ⨆ b, ⨆ (_ : p b ∧ b ∈ s), g (u b)

Next tactic:
refine' ((OrderHomClass.mono g).map_iInf₂_le _).trans _
theorem SupHom.apply_blimsup_le [CompleteLattice γ] (g : sSupHom α γ) :
    g (blimsup u f p) ≤ blimsup (g ∘ u) f p := by
  simp only [blimsup_eq_iInf_biSup, Function.comp]
  refine' ((OrderHomClass.mono g).map_iInf₂_le _).trans _
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteLattice α
f g✝ : Filter β
p q : β → Prop
u v : β → α
inst✝ : CompleteLattice γ
g : sSupHom α γ
⊢ ⨅ i ∈ f, g (⨆ b, ⨆ (_ : p b ∧ b ∈ i), u b) ≤ ⨅ s ∈ f, ⨆ b, ⨆ (_ : p b ∧ b ∈ s), g (u b)

Next tactic:
simp only [_root_.map_iSup, le_refl]
lemma limsup_sup_filter {g} : limsup u (f ⊔ g) = limsup u f ⊔ limsup u g := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
g : Filter β
⊢ limsup u (f ⊔ g) = limsup u f ⊔ limsup u g

Next tactic:
refine le_antisymm ?_
    (sup_le (limsup_le_limsup_of_le le_sup_left) (limsup_le_limsup_of_le le_sup_right))
lemma limsup_sup_filter {g} : limsup u (f ⊔ g) = limsup u f ⊔ limsup u g := by
  refine le_antisymm ?_
    (sup_le (limsup_le_limsup_of_le le_sup_left) (limsup_le_limsup_of_le le_sup_right))
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
g : Filter β
⊢ limsup u (f ⊔ g) ≤ limsup u f ⊔ limsup u g

Next tactic:
simp_rw [limsup_eq, sInf_sup_eq, sup_sInf_eq, mem_setOf_eq, le_iInf₂_iff]
lemma limsup_sup_filter {g} : limsup u (f ⊔ g) = limsup u f ⊔ limsup u g := by
  refine le_antisymm ?_
    (sup_le (limsup_le_limsup_of_le le_sup_left) (limsup_le_limsup_of_le le_sup_right))
  simp_rw [limsup_eq, sInf_sup_eq, sup_sInf_eq, mem_setOf_eq, le_iInf₂_iff]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
g : Filter β
⊢ ∀ (i : α),
    (∀ᶠ (n : β) in f, u n ≤ i) →
      ∀ (i_1 : α), (∀ᶠ (n : β) in g, u n ≤ i_1) → sInf {a | ∀ᶠ (n : β) in f ⊔ g, u n ≤ a} ≤ i ⊔ i_1

Next tactic:
intro a ha b hb
lemma limsup_sup_filter {g} : limsup u (f ⊔ g) = limsup u f ⊔ limsup u g := by
  refine le_antisymm ?_
    (sup_le (limsup_le_limsup_of_le le_sup_left) (limsup_le_limsup_of_le le_sup_right))
  simp_rw [limsup_eq, sInf_sup_eq, sup_sInf_eq, mem_setOf_eq, le_iInf₂_iff]
  intro a ha b hb
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
g : Filter β
a : α
ha : ∀ᶠ (n : β) in f, u n ≤ a
b : α
hb : ∀ᶠ (n : β) in g, u n ≤ b
⊢ sInf {a | ∀ᶠ (n : β) in f ⊔ g, u n ≤ a} ≤ a ⊔ b

Next tactic:
exact sInf_le ⟨ha.mono fun _ h ↦ h.trans le_sup_left, hb.mono fun _ h ↦ h.trans le_sup_right⟩
@[simp]
theorem blimsup_or_eq_sup : (blimsup u f fun x => p x ∨ q x) = blimsup u f p ⊔ blimsup u f q := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
⊢ (blimsup u f fun x => p x ∨ q x) = blimsup u f p ⊔ blimsup u f q

Next tactic:
simp only [blimsup_eq_limsup, ← limsup_sup_filter, ← inf_sup_left, sup_principal, setOf_or]
@[simp]
lemma blimsup_sup_not : blimsup u f p ⊔ blimsup u f (¬p ·) = limsup u f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
⊢ (blimsup u f p ⊔ blimsup u f fun x => ¬p x) = limsup u f

Next tactic:
simp_rw [← blimsup_or_eq_sup, or_not, blimsup_true]
@[simp]
lemma blimsup_not_sup : blimsup u f (¬p ·) ⊔ blimsup u f p = limsup u f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
⊢ (blimsup u f fun x => ¬p x) ⊔ blimsup u f p = limsup u f

Next tactic:
simpa only [not_not] using blimsup_sup_not (p := (¬p ·))
lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
s : Set β
inst✝ : DecidablePred fun x => x ∈ s
v : β → α
⊢ limsup (piecewise s u v) f = (blimsup u f fun x => x ∈ s) ⊔ blimsup v f fun x => x ∉ s

Next tactic:
rw [← blimsup_sup_not (p := (· ∈ s))]
lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s) := by
  rw [← blimsup_sup_not (p := (· ∈ s))]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
s : Set β
inst✝ : DecidablePred fun x => x ∈ s
v : β → α
⊢ ((blimsup (piecewise s u v) f fun x => x ∈ s) ⊔ blimsup (piecewise s u v) f fun x => x ∉ s) =
    (blimsup u f fun x => x ∈ s) ⊔ blimsup v f fun x => x ∉ s

Next tactic:
refine congr_arg₂ _ (blimsup_congr ?_) (blimsup_congr ?_)
lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s) := by
  rw [← blimsup_sup_not (p := (· ∈ s))]
  refine congr_arg₂ _ (blimsup_congr ?_) (blimsup_congr ?_) <;>
    

Proof state:
case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
s : Set β
inst✝ : DecidablePred fun x => x ∈ s
v : β → α
⊢ ∀ᶠ (a : β) in f, a ∈ s → piecewise s u v a = u a

Next tactic:
refine eventually_of_forall fun _ h ↦ ?_
lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s) := by
  rw [← blimsup_sup_not (p := (· ∈ s))]
  refine congr_arg₂ _ (blimsup_congr ?_) (blimsup_congr ?_) <;>
    

Proof state:
case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
s : Set β
inst✝ : DecidablePred fun x => x ∈ s
v : β → α
⊢ ∀ᶠ (a : β) in f, a ∉ s → piecewise s u v a = v a

Next tactic:
refine eventually_of_forall fun _ h ↦ ?_
lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s) := by
  rw [← blimsup_sup_not (p := (· ∈ s))]
  refine congr_arg₂ _ (blimsup_congr ?_) (blimsup_congr ?_) <;>
    refine eventually_of_forall fun _ h ↦ ?_ <;> 

Proof state:
case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
s : Set β
inst✝ : DecidablePred fun x => x ∈ s
v : β → α
x✝ : β
h : x✝ ∈ s
⊢ piecewise s u v x✝ = u x✝

Next tactic:
simp [h]
lemma limsup_piecewise {s : Set β} [DecidablePred (· ∈ s)] {v} :
    limsup (s.piecewise u v) f = blimsup u f (· ∈ s) ⊔ blimsup v f (· ∉ s) := by
  rw [← blimsup_sup_not (p := (· ∈ s))]
  refine congr_arg₂ _ (blimsup_congr ?_) (blimsup_congr ?_) <;>
    refine eventually_of_forall fun _ h ↦ ?_ <;> 

Proof state:
case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
s : Set β
inst✝ : DecidablePred fun x => x ∈ s
v : β → α
x✝ : β
h : x✝ ∉ s
⊢ piecewise s u v x✝ = v x✝

Next tactic:
simp [h]
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
⊢ a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f

Next tactic:
simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
⊢ ⨅ i ∈ f, a ⊔ ⨆ a ∈ i, u a = ⨅ s ∈ f, (⨆ x ∈ s, a) ⊔ ⨆ x ∈ s, u x

Next tactic:
congr
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
  congr; 

Proof state:
case e_s
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
⊢ (fun i => ⨅ (_ : i ∈ f), a ⊔ ⨆ a ∈ i, u a) = fun s => ⨅ (_ : s ∈ f), (⨆ x ∈ s, a) ⊔ ⨆ x ∈ s, u x

Next tactic:
ext s
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
  congr; ext s; 

Proof state:
case e_s.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
s : Set β
⊢ ⨅ (_ : s ∈ f), a ⊔ ⨆ a ∈ s, u a = ⨅ (_ : s ∈ f), (⨆ x ∈ s, a) ⊔ ⨆ x ∈ s, u x

Next tactic:
congr
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
  congr; ext s; congr; 

Proof state:
case e_s.h.e_s
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
s : Set β
⊢ (fun j => a ⊔ ⨆ a ∈ s, u a) = fun x => (⨆ x ∈ s, a) ⊔ ⨆ x ∈ s, u x

Next tactic:
ext hs
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
  congr; ext s; congr; ext hs; 

Proof state:
case e_s.h.e_s.h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
s : Set β
hs : s ∈ f
⊢ a ⊔ ⨆ a ∈ s, u a = (⨆ x ∈ s, a) ⊔ ⨆ x ∈ s, u x

Next tactic:
congr
theorem sup_limsup [NeBot f] (a : α) : a ⊔ limsup u f = limsup (fun x => a ⊔ u x) f := by
  simp only [limsup_eq_iInf_iSup, iSup_sup_eq, sup_iInf₂_eq]
  congr; ext s; congr; ext hs; congr
  

Proof state:
case e_s.h.e_s.h.e_a
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
inst✝ : NeBot f
a : α
s : Set β
hs : s ∈ f
⊢ a = ⨆ x ∈ s, a

Next tactic:
exact (biSup_const (nonempty_of_mem hs)).symm
theorem sup_liminf (a : α) : a ⊔ liminf u f = liminf (fun x => a ⊔ u x) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
a : α
⊢ a ⊔ liminf u f = liminf (fun x => a ⊔ u x) f

Next tactic:
simp only [liminf_eq_iSup_iInf]
theorem sup_liminf (a : α) : a ⊔ liminf u f = liminf (fun x => a ⊔ u x) f := by
  simp only [liminf_eq_iSup_iInf]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
a : α
⊢ a ⊔ ⨆ s ∈ f, ⨅ a ∈ s, u a = ⨆ s ∈ f, ⨅ a_1 ∈ s, a ⊔ u a_1

Next tactic:
rw [sup_comm, biSup_sup (⟨univ, univ_mem⟩ : ∃ i : Set β, i ∈ f)]
theorem sup_liminf (a : α) : a ⊔ liminf u f = liminf (fun x => a ⊔ u x) f := by
  simp only [liminf_eq_iSup_iInf]
  rw [sup_comm, biSup_sup (⟨univ, univ_mem⟩ : ∃ i : Set β, i ∈ f)]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteDistribLattice α
f : Filter β
p q : β → Prop
u : β → α
a : α
⊢ ⨆ i ∈ f, (⨅ a ∈ i, u a) ⊔ a = ⨆ s ∈ f, ⨅ a_1 ∈ s, a ⊔ u a_1

Next tactic:
simp_rw [iInf₂_sup_eq, sup_comm (a := a)]
theorem limsup_compl : (limsup u f)ᶜ = liminf (compl ∘ u) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
⊢ (limsup u f)ᶜ = liminf (compl ∘ u) f

Next tactic:
simp only [limsup_eq_iInf_iSup, compl_iInf, compl_iSup, liminf_eq_iSup_iInf, Function.comp_apply]
theorem liminf_compl : (liminf u f)ᶜ = limsup (compl ∘ u) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
⊢ (liminf u f)ᶜ = limsup (compl ∘ u) f

Next tactic:
simp only [limsup_eq_iInf_iSup, compl_iInf, compl_iSup, liminf_eq_iSup_iInf, Function.comp_apply]
theorem limsup_sdiff (a : α) : limsup u f \ a = limsup (fun b => u b \ a) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
a : α
⊢ limsup u f \ a = limsup (fun b => u b \ a) f

Next tactic:
simp only [limsup_eq_iInf_iSup, sdiff_eq]
theorem limsup_sdiff (a : α) : limsup u f \ a = limsup (fun b => u b \ a) f := by
  simp only [limsup_eq_iInf_iSup, sdiff_eq]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
a : α
⊢ (⨅ s ∈ f, ⨆ a ∈ s, u a) ⊓ aᶜ = ⨅ s ∈ f, ⨆ a_1 ∈ s, u a_1 ⊓ aᶜ

Next tactic:
rw [biInf_inf (⟨univ, univ_mem⟩ : ∃ i : Set β, i ∈ f)]
theorem limsup_sdiff (a : α) : limsup u f \ a = limsup (fun b => u b \ a) f := by
  simp only [limsup_eq_iInf_iSup, sdiff_eq]
  rw [biInf_inf (⟨univ, univ_mem⟩ : ∃ i : Set β, i ∈ f)]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
a : α
⊢ ⨅ i ∈ f, (⨆ a ∈ i, u a) ⊓ aᶜ = ⨅ s ∈ f, ⨆ a_1 ∈ s, u a_1 ⊓ aᶜ

Next tactic:
simp_rw [inf_comm, inf_iSup₂_eq, inf_comm]
theorem liminf_sdiff [NeBot f] (a : α) : liminf u f \ a = liminf (fun b => u b \ a) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
inst✝ : NeBot f
a : α
⊢ liminf u f \ a = liminf (fun b => u b \ a) f

Next tactic:
simp only [sdiff_eq, inf_comm (b := aᶜ), inf_liminf]
theorem sdiff_limsup [NeBot f] (a : α) : a \ limsup u f = liminf (fun b => a \ u b) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
inst✝ : NeBot f
a : α
⊢ a \ limsup u f = liminf (fun b => a \ u b) f

Next tactic:
rw [← compl_inj_iff]
theorem sdiff_limsup [NeBot f] (a : α) : a \ limsup u f = liminf (fun b => a \ u b) f := by
  rw [← compl_inj_iff]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝¹ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
inst✝ : NeBot f
a : α
⊢ (a \ limsup u f)ᶜ = (liminf (fun b => a \ u b) f)ᶜ

Next tactic:
simp only [sdiff_eq, liminf_compl, (· ∘ ·), compl_inf, compl_compl, sup_limsup]
theorem sdiff_liminf (a : α) : a \ liminf u f = limsup (fun b => a \ u b) f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
a : α
⊢ a \ liminf u f = limsup (fun b => a \ u b) f

Next tactic:
rw [← compl_inj_iff]
theorem sdiff_liminf (a : α) : a \ liminf u f = limsup (fun b => a \ u b) f := by
  rw [← compl_inj_iff]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
ι' : Type u_5
inst✝ : CompleteBooleanAlgebra α
f : Filter β
u : β → α
a : α
⊢ (a \ liminf u f)ᶜ = (limsup (fun b => a \ u b) f)ᶜ

Next tactic:
simp only [sdiff_eq, limsup_compl, (· ∘ ·), compl_inf, compl_compl, sup_liminf]