l3lab/ntp-mathlib huggingface dataset:
@[elab_as_elim]
theorem iInf_sets_induct {f : ι → Filter α} {s : Set α} (hs : s ∈ iInf f) {p : Set α → Prop}
    (uni : p univ) (ins : ∀ {i s₁ s₂}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)) : p s := by
  rw [mem_iInf_finite'] at hs
  simp only [← Finset.inf_eq_iInf] at hs
  rcases hs with ⟨is, his⟩
  induction is using Finset.induction_on generalizing s
  case empty => 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : ι → Filter α
p : Set α → Prop
uni : p univ
ins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)
s : Set α
his : s ∈ Finset.inf ∅ fun a => f a.down
⊢ p s

Next tactic:
rwa [mem_top.1 his]
@[elab_as_elim]
theorem iInf_sets_induct {f : ι → Filter α} {s : Set α} (hs : s ∈ iInf f) {p : Set α → Prop}
    (uni : p univ) (ins : ∀ {i s₁ s₂}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)) : p s := by
  rw [mem_iInf_finite'] at hs
  simp only [← Finset.inf_eq_iInf] at hs
  rcases hs with ⟨is, his⟩
  induction is using Finset.induction_on generalizing s
  case empty => rwa [mem_top.1 his]
  

Proof state:
case intro.insert
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝¹ t : Set α
f : ι → Filter α
p : Set α → Prop
uni : p univ
ins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)
a✝² : PLift ι
s✝ : Finset (PLift ι)
a✝¹ : a✝² ∉ s✝
a✝ : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s
s : Set α
his : s ∈ Finset.inf (insert a✝² s✝) fun a => f a.down
⊢ p s

Next tactic:
case insert ih =>
    rw [Finset.inf_insert, mem_inf_iff] at his
    rcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩
    exact ins hs₁ (ih hs₂)
@[elab_as_elim]
theorem iInf_sets_induct {f : ι → Filter α} {s : Set α} (hs : s ∈ iInf f) {p : Set α → Prop}
    (uni : p univ) (ins : ∀ {i s₁ s₂}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)) : p s := by
  rw [mem_iInf_finite'] at hs
  simp only [← Finset.inf_eq_iInf] at hs
  rcases hs with ⟨is, his⟩
  induction is using Finset.induction_on generalizing s
  case empty => rwa [mem_top.1 his]
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝¹ t : Set α
f : ι → Filter α
p : Set α → Prop
uni : p univ
ins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)
a✝¹ : PLift ι
s✝ : Finset (PLift ι)
a✝ : a✝¹ ∉ s✝
ih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s
s : Set α
his : s ∈ Finset.inf (insert a✝¹ s✝) fun a => f a.down
⊢ p s

Next tactic:
case insert ih =>
    rw [Finset.inf_insert, mem_inf_iff] at his
    rcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩
    exact ins hs₁ (ih hs₂)
@[elab_as_elim]
theorem iInf_sets_induct {f : ι → Filter α} {s : Set α} (hs : s ∈ iInf f) {p : Set α → Prop}
    (uni : p univ) (ins : ∀ {i s₁ s₂}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)) : p s := by
  rw [mem_iInf_finite'] at hs
  simp only [← Finset.inf_eq_iInf] at hs
  rcases hs with ⟨is, his⟩
  induction is using Finset.induction_on generalizing s
  case empty => rwa [mem_top.1 his]
  case insert ih =>
    

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝¹ t : Set α
f : ι → Filter α
p : Set α → Prop
uni : p univ
ins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)
a✝¹ : PLift ι
s✝ : Finset (PLift ι)
a✝ : a✝¹ ∉ s✝
ih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s
s : Set α
his : s ∈ Finset.inf (insert a✝¹ s✝) fun a => f a.down
⊢ p s

Next tactic:
rw [Finset.inf_insert, mem_inf_iff] at his
@[elab_as_elim]
theorem iInf_sets_induct {f : ι → Filter α} {s : Set α} (hs : s ∈ iInf f) {p : Set α → Prop}
    (uni : p univ) (ins : ∀ {i s₁ s₂}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)) : p s := by
  rw [mem_iInf_finite'] at hs
  simp only [← Finset.inf_eq_iInf] at hs
  rcases hs with ⟨is, his⟩
  induction is using Finset.induction_on generalizing s
  case empty => rwa [mem_top.1 his]
  case insert ih =>
    rw [Finset.inf_insert, mem_inf_iff] at his
    

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝¹ t : Set α
f : ι → Filter α
p : Set α → Prop
uni : p univ
ins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)
a✝¹ : PLift ι
s✝ : Finset (PLift ι)
a✝ : a✝¹ ∉ s✝
ih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s
s : Set α
his : ∃ t₁ ∈ f a✝¹.down, ∃ t₂ ∈ Finset.inf s✝ fun a => f a.down, s = t₁ ∩ t₂
⊢ p s

Next tactic:
rcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩
@[elab_as_elim]
theorem iInf_sets_induct {f : ι → Filter α} {s : Set α} (hs : s ∈ iInf f) {p : Set α → Prop}
    (uni : p univ) (ins : ∀ {i s₁ s₂}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)) : p s := by
  rw [mem_iInf_finite'] at hs
  simp only [← Finset.inf_eq_iInf] at hs
  rcases hs with ⟨is, his⟩
  induction is using Finset.induction_on generalizing s
  case empty => rwa [mem_top.1 his]
  case insert ih =>
    rw [Finset.inf_insert, mem_inf_iff] at his
    rcases his with ⟨s₁, hs₁, s₂, hs₂, rfl⟩
    

Proof state:
case intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
p : Set α → Prop
uni : p univ
ins : ∀ {i : ι} {s₁ s₂ : Set α}, s₁ ∈ f i → p s₂ → p (s₁ ∩ s₂)
a✝¹ : PLift ι
s✝ : Finset (PLift ι)
a✝ : a✝¹ ∉ s✝
ih : ∀ {s : Set α}, (s ∈ Finset.inf s✝ fun a => f a.down) → p s
s₁ : Set α
hs₁ : s₁ ∈ f a✝¹.down
s₂ : Set α
hs₂ : s₂ ∈ Finset.inf s✝ fun a => f a.down
⊢ p (s₁ ∩ s₂)

Next tactic:
exact ins hs₁ (ih hs₂)
@[simp]
theorem inf_principal {s t : Set α} : 𝓟 s ⊓ 𝓟 t = 𝓟 (s ∩ t) :=
  le_antisymm
    (by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t : Set α
⊢ 𝓟 s ⊓ 𝓟 t ≤ 𝓟 (s ∩ t)

Next tactic:
simp only [le_principal_iff, mem_inf_iff]
@[simp]
theorem inf_principal {s t : Set α} : 𝓟 s ⊓ 𝓟 t = 𝓟 (s ∩ t) :=
  le_antisymm
    (by simp only [le_principal_iff, mem_inf_iff]; 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t : Set α
⊢ ∃ t₁ ∈ 𝓟 s, ∃ t₂ ∈ 𝓟 t, s ∩ t = t₁ ∩ t₂

Next tactic:
exact ⟨s, Subset.rfl, t, Subset.rfl, rfl⟩
@[simp]
theorem inf_principal {s t : Set α} : 𝓟 s ⊓ 𝓟 t = 𝓟 (s ∩ t) :=
  le_antisymm
    (by simp only [le_principal_iff, mem_inf_iff]; exact ⟨s, Subset.rfl, t, Subset.rfl, rfl⟩)
    (by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t : Set α
⊢ 𝓟 (s ∩ t) ≤ 𝓟 s ⊓ 𝓟 t

Next tactic:
simp [le_inf_iff, inter_subset_left, inter_subset_right]
@[simp]
theorem sup_principal {s t : Set α} : 𝓟 s ⊔ 𝓟 t = 𝓟 (s ∪ t) :=
  Filter.ext fun u => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t✝ s t u : Set α
⊢ u ∈ 𝓟 s ⊔ 𝓟 t ↔ u ∈ 𝓟 (s ∪ t)

Next tactic:
simp only [union_subset_iff, mem_sup, mem_principal]
@[simp]
theorem iSup_principal {ι : Sort w} {s : ι → Set α} : ⨆ x, 𝓟 (s x) = 𝓟 (⋃ i, s i) :=
  Filter.ext fun x => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Sort w
s : ι → Set α
x : Set α
⊢ x ∈ ⨆ x, 𝓟 (s x) ↔ x ∈ 𝓟 (⋃ i, s i)

Next tactic:
simp only [mem_iSup, mem_principal, iUnion_subset_iff]
theorem isCompl_principal (s : Set α) : IsCompl (𝓟 s) (𝓟 sᶜ) :=
  IsCompl.of_eq (by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t s : Set α
⊢ 𝓟 s ⊓ 𝓟 sᶜ = ⊥

Next tactic:
rw [inf_principal, inter_compl_self, principal_empty]
theorem isCompl_principal (s : Set α) : IsCompl (𝓟 s) (𝓟 sᶜ) :=
  IsCompl.of_eq (by rw [inf_principal, inter_compl_self, principal_empty]) <| by
    

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t s : Set α
⊢ 𝓟 s ⊔ 𝓟 sᶜ = ⊤

Next tactic:
rw [sup_principal, union_compl_self, principal_univ]
theorem mem_inf_principal' {f : Filter α} {s t : Set α} : s ∈ f ⊓ 𝓟 t ↔ tᶜ ∪ s ∈ f := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : Filter α
s t : Set α
⊢ s ∈ f ⊓ 𝓟 t ↔ tᶜ ∪ s ∈ f

Next tactic:
simp only [← le_principal_iff, (isCompl_principal s).le_left_iff, disjoint_assoc, inf_principal,
    ← (isCompl_principal (t ∩ sᶜ)).le_right_iff, compl_inter, compl_compl]
lemma mem_inf_principal {f : Filter α} {s t : Set α} : s ∈ f ⊓ 𝓟 t ↔ { x | x ∈ t → x ∈ s } ∈ f := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : Filter α
s t : Set α
⊢ s ∈ f ⊓ 𝓟 t ↔ {x | x ∈ t → x ∈ s} ∈ f

Next tactic:
simp only [mem_inf_principal', imp_iff_not_or]
lemma mem_inf_principal {f : Filter α} {s t : Set α} : s ∈ f ⊓ 𝓟 t ↔ { x | x ∈ t → x ∈ s } ∈ f := by
  simp only [mem_inf_principal', imp_iff_not_or]
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : Filter α
s t : Set α
⊢ tᶜ ∪ s ∈ f ↔ {x | x ∉ t ∨ x ∈ s} ∈ f

Next tactic:
rfl
lemma iSup_inf_principal (f : ι → Filter α) (s : Set α) : ⨆ i, f i ⊓ 𝓟 s = (⨆ i, f i) ⊓ 𝓟 s := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : ι → Filter α
s : Set α
⊢ ⨆ i, f i ⊓ 𝓟 s = (⨆ i, f i) ⊓ 𝓟 s

Next tactic:
ext
lemma iSup_inf_principal (f : ι → Filter α) (s : Set α) : ⨆ i, f i ⊓ 𝓟 s = (⨆ i, f i) ⊓ 𝓟 s := by
  ext
  

Proof state:
case a
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝¹ t : Set α
f : ι → Filter α
s s✝ : Set α
⊢ s✝ ∈ ⨆ i, f i ⊓ 𝓟 s ↔ s✝ ∈ (⨆ i, f i) ⊓ 𝓟 s

Next tactic:
simp only [mem_iSup, mem_inf_principal]
theorem inf_principal_eq_bot {f : Filter α} {s : Set α} : f ⊓ 𝓟 s = ⊥ ↔ sᶜ ∈ f := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : Filter α
s : Set α
⊢ f ⊓ 𝓟 s = ⊥ ↔ sᶜ ∈ f

Next tactic:
rw [← empty_mem_iff_bot, mem_inf_principal]
theorem inf_principal_eq_bot {f : Filter α} {s : Set α} : f ⊓ 𝓟 s = ⊥ ↔ sᶜ ∈ f := by
  rw [← empty_mem_iff_bot, mem_inf_principal]
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : Filter α
s : Set α
⊢ {x | x ∈ s → x ∈ ∅} ∈ f ↔ sᶜ ∈ f

Next tactic:
rfl
theorem mem_of_eq_bot {f : Filter α} {s : Set α} (h : f ⊓ 𝓟 sᶜ = ⊥) : s ∈ f := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : Filter α
s : Set α
h : f ⊓ 𝓟 sᶜ = ⊥
⊢ s ∈ f

Next tactic:
rwa [inf_principal_eq_bot, compl_compl] at h
theorem principal_le_iff {s : Set α} {f : Filter α} : 𝓟 s ≤ f ↔ ∀ V ∈ f, s ⊆ V := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t s : Set α
f : Filter α
⊢ 𝓟 s ≤ f ↔ ∀ V ∈ f, s ⊆ V

Next tactic:
change (∀ V, V ∈ f → V ∈ _) ↔ _
theorem principal_le_iff {s : Set α} {f : Filter α} : 𝓟 s ≤ f ↔ ∀ V ∈ f, s ⊆ V := by
  change (∀ V, V ∈ f → V ∈ _) ↔ _
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t s : Set α
f : Filter α
⊢ (∀ V ∈ f, V ∈ 𝓟 s) ↔ ∀ V ∈ f, s ⊆ V

Next tactic:
simp_rw [mem_principal]
@[simp]
theorem iInf_principal_finset {ι : Type w} (s : Finset ι) (f : ι → Set α) :
    ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s✝ t : Set α
ι : Type w
s : Finset ι
f : ι → Set α
⊢ ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i)

Next tactic:
induction' s using Finset.induction_on with i s _ hs
@[simp]
theorem iInf_principal_finset {ι : Type w} (s : Finset ι) (f : ι → Set α) :
    ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i) := by
  induction' s using Finset.induction_on with i s _ hs
  · 

Proof state:
case empty
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s t : Set α
ι : Type w
f : ι → Set α
⊢ ⨅ i ∈ ∅, 𝓟 (f i) = 𝓟 (⋂ i ∈ ∅, f i)

Next tactic:
simp
@[simp]
theorem iInf_principal_finset {ι : Type w} (s : Finset ι) (f : ι → Set α) :
    ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i) := by
  induction' s using Finset.induction_on with i s _ hs
  · simp
  · 

Proof state:
case insert
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s✝ t : Set α
ι : Type w
f : ι → Set α
i : ι
s : Finset ι
a✝ : i ∉ s
hs : ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i)
⊢ ⨅ i_1 ∈ insert i s, 𝓟 (f i_1) = 𝓟 (⋂ i_1 ∈ insert i s, f i_1)

Next tactic:
rw [Finset.iInf_insert, Finset.set_biInter_insert, hs, inf_principal]
@[simp]
theorem iInf_principal {ι : Type w} [Finite ι] (f : ι → Set α) : ⨅ i, 𝓟 (f i) = 𝓟 (⋂ i, f i) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s t : Set α
ι : Type w
inst✝ : Finite ι
f : ι → Set α
⊢ ⨅ i, 𝓟 (f i) = 𝓟 (⋂ i, f i)

Next tactic:
cases nonempty_fintype ι
@[simp]
theorem iInf_principal {ι : Type w} [Finite ι] (f : ι → Set α) : ⨅ i, 𝓟 (f i) = 𝓟 (⋂ i, f i) := by
  cases nonempty_fintype ι
  

Proof state:
case intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s t : Set α
ι : Type w
inst✝ : Finite ι
f : ι → Set α
val✝ : Fintype ι
⊢ ⨅ i, 𝓟 (f i) = 𝓟 (⋂ i, f i)

Next tactic:
simpa using iInf_principal_finset Finset.univ f
theorem iInf_principal_finite {ι : Type w} {s : Set ι} (hs : s.Finite) (f : ι → Set α) :
    ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s✝ t : Set α
ι : Type w
s : Set ι
hs : Set.Finite s
f : ι → Set α
⊢ ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i)

Next tactic:
lift s to Finset ι using hs
theorem iInf_principal_finite {ι : Type w} {s : Set ι} (hs : s.Finite) (f : ι → Set α) :
    ⨅ i ∈ s, 𝓟 (f i) = 𝓟 (⋂ i ∈ s, f i) := by
  lift s to Finset ι using hs
  

Proof state:
case intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s✝ t : Set α
ι : Type w
f : ι → Set α
s : Finset ι
⊢ ⨅ i ∈ ↑s, 𝓟 (f i) = 𝓟 (⋂ i ∈ ↑s, f i)

Next tactic:
exact mod_cast iInf_principal_finset s f
@[simp]
theorem eventually_const {f : Filter α} [t : NeBot f] {p : Prop} : (∀ᶠ _ in f, p) ↔ p :=
  by_cases (fun h : p => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
t : NeBot f
p : Prop
h : p
⊢ (∀ᶠ (x : α) in f, p) ↔ p

Next tactic:
simp [h]
@[simp]
theorem eventually_const {f : Filter α} [t : NeBot f] {p : Prop} : (∀ᶠ _ in f, p) ↔ p :=
  by_cases (fun h : p => by simp [h]) fun h => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
t : NeBot f
p : Prop
h : ¬p
⊢ (∀ᶠ (x : α) in f, p) ↔ p

Next tactic:
simpa [h] using t.ne
theorem eventually_congr {f : Filter α} {p q : α → Prop} (h : ∀ᶠ x in f, p x ↔ q x) :
    (∀ᶠ x in f, p x) ↔ ∀ᶠ x in f, q x :=
  ⟨fun hp => hp.congr h, fun hq => hq.congr <| by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
p q : α → Prop
h : ∀ᶠ (x : α) in f, p x ↔ q x
hq : ∀ᶠ (x : α) in f, q x
⊢ ∀ᶠ (x : α) in f, q x ↔ p x

Next tactic:
simpa only [Iff.comm] using h
@[simp]
theorem eventually_all {ι : Sort*} [Finite ι] {l} {p : ι → α → Prop} :
    (∀ᶠ x in l, ∀ i, p i x) ↔ ∀ i, ∀ᶠ x in l, p i x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
ι : Sort u_2
inst✝ : Finite ι
l : Filter α
p : ι → α → Prop
⊢ (∀ᶠ (x : α) in l, ∀ (i : ι), p i x) ↔ ∀ (i : ι), ∀ᶠ (x : α) in l, p i x

Next tactic:
simpa only [Filter.Eventually, setOf_forall] using iInter_mem
@[simp]
theorem eventually_all_finite {ι} {I : Set ι} (hI : I.Finite) {l} {p : ι → α → Prop} :
    (∀ᶠ x in l, ∀ i ∈ I, p i x) ↔ ∀ i ∈ I, ∀ᶠ x in l, p i x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
ι : Type u_2
I : Set ι
hI : Set.Finite I
l : Filter α
p : ι → α → Prop
⊢ (∀ᶠ (x : α) in l, ∀ i ∈ I, p i x) ↔ ∀ i ∈ I, ∀ᶠ (x : α) in l, p i x

Next tactic:
simpa only [Filter.Eventually, setOf_forall] using biInter_mem hI
@[simp]
theorem eventually_or_distrib_left {f : Filter α} {p : Prop} {q : α → Prop} :
    (∀ᶠ x in f, p ∨ q x) ↔ p ∨ ∀ᶠ x in f, q x :=
  by_cases (fun h : p => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
p : Prop
q : α → Prop
h : p
⊢ (∀ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∀ᶠ (x : α) in f, q x

Next tactic:
simp [h]
@[simp]
theorem eventually_or_distrib_left {f : Filter α} {p : Prop} {q : α → Prop} :
    (∀ᶠ x in f, p ∨ q x) ↔ p ∨ ∀ᶠ x in f, q x :=
  by_cases (fun h : p => by simp [h]) fun h => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
p : Prop
q : α → Prop
h : ¬p
⊢ (∀ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∀ᶠ (x : α) in f, q x

Next tactic:
simp [h]
@[simp]
theorem eventually_or_distrib_right {f : Filter α} {p : α → Prop} {q : Prop} :
    (∀ᶠ x in f, p x ∨ q) ↔ (∀ᶠ x in f, p x) ∨ q := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
p : α → Prop
q : Prop
⊢ (∀ᶠ (x : α) in f, p x ∨ q) ↔ (∀ᶠ (x : α) in f, p x) ∨ q

Next tactic:
simp only [@or_comm _ q, eventually_or_distrib_left]
theorem Frequently.and_eventually {p q : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x)
    (hq : ∀ᶠ x in f, q x) : ∃ᶠ x in f, p x ∧ q x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p q : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
hq : ∀ᶠ (x : α) in f, q x
⊢ ∃ᶠ (x : α) in f, p x ∧ q x

Next tactic:
refine' mt (fun h => hq.mp <| h.mono _) hp
theorem Frequently.and_eventually {p q : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x)
    (hq : ∀ᶠ x in f, q x) : ∃ᶠ x in f, p x ∧ q x := by
  refine' mt (fun h => hq.mp <| h.mono _) hp
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p q : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
hq : ∀ᶠ (x : α) in f, q x
h : ∀ᶠ (x : α) in f, ¬(fun x => p x ∧ q x) x
⊢ ∀ (x : α), ¬(fun x => p x ∧ q x) x → q x → ¬(fun x => p x) x

Next tactic:
exact fun x hpq hq hp => hpq ⟨hp, hq⟩
theorem Eventually.and_frequently {p q : α → Prop} {f : Filter α} (hp : ∀ᶠ x in f, p x)
    (hq : ∃ᶠ x in f, q x) : ∃ᶠ x in f, p x ∧ q x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p q : α → Prop
f : Filter α
hp : ∀ᶠ (x : α) in f, p x
hq : ∃ᶠ (x : α) in f, q x
⊢ ∃ᶠ (x : α) in f, p x ∧ q x

Next tactic:
simpa only [and_comm] using hq.and_eventually hp
theorem Frequently.exists {p : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x) : ∃ x, p x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
⊢ ∃ x, p x

Next tactic:
by_contra H
theorem Frequently.exists {p : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x) : ∃ x, p x := by
  by_contra H
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
H : ¬∃ x, p x
⊢ False

Next tactic:
replace H : ∀ᶠ x in f, ¬p x
theorem Frequently.exists {p : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x) : ∃ x, p x := by
  by_contra H
  replace H : ∀ᶠ x in f, ¬p x; 

Proof state:
case H
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
H : ¬∃ x, p x
⊢ ∀ᶠ (x : α) in f, ¬p x
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
H : ∀ᶠ (x : α) in f, ¬p x
⊢ False

Next tactic:
exact eventually_of_forall (not_exists.1 H)
theorem Frequently.exists {p : α → Prop} {f : Filter α} (hp : ∃ᶠ x in f, p x) : ∃ x, p x := by
  by_contra H
  replace H : ∀ᶠ x in f, ¬p x; exact eventually_of_forall (not_exists.1 H)
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
hp : ∃ᶠ (x : α) in f, p x
H : ∀ᶠ (x : α) in f, ¬p x
⊢ False

Next tactic:
exact hp H
lemma frequently_iff_neBot {p : α → Prop} : (∃ᶠ x in l, p x) ↔ NeBot (l ⊓ 𝓟 {x | p x}) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
p : α → Prop
⊢ (∃ᶠ (x : α) in l, p x) ↔ NeBot (l ⊓ 𝓟 {x | p x})

Next tactic:
rw [neBot_iff, Ne.def, inf_principal_eq_bot]
lemma frequently_iff_neBot {p : α → Prop} : (∃ᶠ x in l, p x) ↔ NeBot (l ⊓ 𝓟 {x | p x}) := by
  rw [neBot_iff, Ne.def, inf_principal_eq_bot]; 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l : Filter α
p : α → Prop
⊢ (∃ᶠ (x : α) in l, p x) ↔ {x | p x}ᶜ ∉ l

Next tactic:
rfl
theorem frequently_iff_forall_eventually_exists_and {p : α → Prop} {f : Filter α} :
    (∃ᶠ x in f, p x) ↔ ∀ {q : α → Prop}, (∀ᶠ x in f, q x) → ∃ x, p x ∧ q x :=
  ⟨fun hp q hq => (hp.and_eventually hq).exists, fun H hp => by
    

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
H : ∀ {q : α → Prop}, (∀ᶠ (x : α) in f, q x) → ∃ x, p x ∧ q x
hp : ∀ᶠ (x : α) in f, ¬(fun x => p x) x
⊢ False

Next tactic:
simpa only [and_not_self_iff, exists_false] using H hp
theorem frequently_iff {f : Filter α} {P : α → Prop} :
    (∃ᶠ x in f, P x) ↔ ∀ {U}, U ∈ f → ∃ x ∈ U, P x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
P : α → Prop
⊢ (∃ᶠ (x : α) in f, P x) ↔ ∀ {U : Set α}, U ∈ f → ∃ x ∈ U, P x

Next tactic:
simp only [frequently_iff_forall_eventually_exists_and, @and_comm (P _)]
theorem frequently_iff {f : Filter α} {P : α → Prop} :
    (∃ᶠ x in f, P x) ↔ ∀ {U}, U ∈ f → ∃ x ∈ U, P x := by
  simp only [frequently_iff_forall_eventually_exists_and, @and_comm (P _)]
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
P : α → Prop
⊢ (∀ {q : α → Prop}, (∀ᶠ (x : α) in f, q x) → ∃ x, q x ∧ P x) ↔ ∀ {U : Set α}, U ∈ f → ∃ x ∈ U, P x

Next tactic:
rfl
@[simp]
theorem not_eventually {p : α → Prop} {f : Filter α} : (¬∀ᶠ x in f, p x) ↔ ∃ᶠ x in f, ¬p x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
⊢ (¬∀ᶠ (x : α) in f, p x) ↔ ∃ᶠ (x : α) in f, ¬p x

Next tactic:
simp [Filter.Frequently]
@[simp]
theorem not_frequently {p : α → Prop} {f : Filter α} : (¬∃ᶠ x in f, p x) ↔ ∀ᶠ x in f, ¬p x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
p : α → Prop
f : Filter α
⊢ (¬∃ᶠ (x : α) in f, p x) ↔ ∀ᶠ (x : α) in f, ¬p x

Next tactic:
simp only [Filter.Frequently, not_not]
@[simp]
theorem frequently_true_iff_neBot (f : Filter α) : (∃ᶠ _ in f, True) ↔ NeBot f := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
⊢ (∃ᶠ (x : α) in f, True) ↔ NeBot f

Next tactic:
simp [frequently_iff_neBot]
@[simp]
theorem frequently_false (f : Filter α) : ¬∃ᶠ _ in f, False := by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
⊢ ¬∃ᶠ (x : α) in f, False

Next tactic:
simp
@[simp]
theorem frequently_const {f : Filter α} [NeBot f] {p : Prop} : (∃ᶠ _ in f, p) ↔ p :=
  by_cases (fun h : p => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
inst✝ : NeBot f
p : Prop
h : p
⊢ (∃ᶠ (x : α) in f, p) ↔ p

Next tactic:
simpa [h]
@[simp]
theorem frequently_const {f : Filter α} [NeBot f] {p : Prop} : (∃ᶠ _ in f, p) ↔ p :=
  by_cases (fun h : p => by simpa [h] ) fun h => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
inst✝ : NeBot f
p : Prop
h : ¬p
⊢ (∃ᶠ (x : α) in f, p) ↔ p

Next tactic:
simp [h]
@[simp]
theorem frequently_or_distrib {f : Filter α} {p q : α → Prop} :
    (∃ᶠ x in f, p x ∨ q x) ↔ (∃ᶠ x in f, p x) ∨ ∃ᶠ x in f, q x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
p q : α → Prop
⊢ (∃ᶠ (x : α) in f, p x ∨ q x) ↔ (∃ᶠ (x : α) in f, p x) ∨ ∃ᶠ (x : α) in f, q x

Next tactic:
simp only [Filter.Frequently, ← not_and_or, not_or, eventually_and]
theorem frequently_or_distrib_left {f : Filter α} [NeBot f] {p : Prop} {q : α → Prop} :
    (∃ᶠ x in f, p ∨ q x) ↔ p ∨ ∃ᶠ x in f, q x := by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
inst✝ : NeBot f
p : Prop
q : α → Prop
⊢ (∃ᶠ (x : α) in f, p ∨ q x) ↔ p ∨ ∃ᶠ (x : α) in f, q x

Next tactic:
simp
theorem frequently_or_distrib_right {f : Filter α} [NeBot f] {p : α → Prop} {q : Prop} :
    (∃ᶠ x in f, p x ∨ q) ↔ (∃ᶠ x in f, p x) ∨ q := by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
inst✝ : NeBot f
p : α → Prop
q : Prop
⊢ (∃ᶠ (x : α) in f, p x ∨ q) ↔ (∃ᶠ (x : α) in f, p x) ∨ q

Next tactic:
simp
theorem frequently_imp_distrib {f : Filter α} {p q : α → Prop} :
    (∃ᶠ x in f, p x → q x) ↔ (∀ᶠ x in f, p x) → ∃ᶠ x in f, q x := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
p q : α → Prop
⊢ (∃ᶠ (x : α) in f, p x → q x) ↔ (∀ᶠ (x : α) in f, p x) → ∃ᶠ (x : α) in f, q x

Next tactic:
simp [imp_iff_not_or]