l3lab/ntp-mathlib huggingface dataset:
theorem mem_iInf_of_finite {ι : Type*} [Finite ι] {α : Type*} {f : ι → Filter α} (s) :
    (s ∈ ⨅ i, f i) ↔ ∃ t : ι → Set α, (∀ i, t i ∈ f i) ∧ s = ⋂ i, t i := by
  

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

Next tactic:
refine' ⟨exists_iInter_of_mem_iInf, _⟩
theorem mem_iInf_of_finite {ι : Type*} [Finite ι] {α : Type*} {f : ι → Filter α} (s) :
    (s ∈ ⨅ i, f i) ↔ ∃ t : ι → Set α, (∀ i, t i ∈ f i) ∧ s = ⋂ i, t i := by
  refine' ⟨exists_iInter_of_mem_iInf, _⟩
  

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

Next tactic:
rintro ⟨t, ht, rfl⟩
theorem mem_iInf_of_finite {ι : Type*} [Finite ι] {α : Type*} {f : ι → Filter α} (s) :
    (s ∈ ⨅ i, f i) ↔ ∃ t : ι → Set α, (∀ i, t i ∈ f i) ∧ s = ⋂ i, t i := by
  refine' ⟨exists_iInter_of_mem_iInf, _⟩
  rintro ⟨t, ht, rfl⟩
  

Proof state:
case intro.intro
α✝ : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α✝
s t✝ : Set α✝
ι : Type u_2
inst✝ : Finite ι
α : Type u_3
f : ι → Filter α
t : ι → Set α
ht : ∀ (i : ι), t i ∈ f i
⊢ ⋂ i, t i ∈ ⨅ i, f i

Next tactic:
exact iInter_mem.2 fun i => mem_iInf_of_mem i (ht i)
theorem principal_mono {s t : Set α} : 𝓟 s ≤ 𝓟 t ↔ s ⊆ t := 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, iff_self_iff, mem_principal]
@[simp] theorem principal_eq_iff_eq {s t : Set α} : 𝓟 s = 𝓟 t ↔ s = t := 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_antisymm_iff, le_principal_iff, mem_principal]
@[simp] theorem principal_eq_iff_eq {s t : Set α} : 𝓟 s = 𝓟 t ↔ s = t := by
  simp only [le_antisymm_iff, le_principal_iff, mem_principal]; 

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

Next tactic:
rfl
@[simp] theorem principal_univ : 𝓟 (univ : Set α) = ⊤ :=
  top_unique <| by 

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

Next tactic:
simp only [le_principal_iff, mem_top, eq_self_iff_true]
theorem generate_eq_biInf (S : Set (Set α)) : generate S = ⨅ s ∈ S, 𝓟 s :=
  eq_of_forall_le_iff fun f => by 

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

Next tactic:
simp [le_generate_iff, le_principal_iff, subset_def]
protected lemma disjoint_iff {f g : Filter α} : Disjoint f g ↔ ∃ s ∈ f, ∃ t ∈ g, Disjoint s t := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g✝ : Filter α
s t : Set α
f g : Filter α
⊢ Disjoint f g ↔ ∃ s ∈ f, ∃ t ∈ g, Disjoint s t

Next tactic:
simp only [disjoint_iff, ← empty_mem_iff_bot, mem_inf_iff, inf_eq_inter, bot_eq_empty,
    @eq_comm _ ∅]
theorem inf_eq_bot_iff {f g : Filter α} : f ⊓ g = ⊥ ↔ ∃ U ∈ f, ∃ V ∈ g, U ∩ V = ∅ := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g✝ : Filter α
s t : Set α
f g : Filter α
⊢ f ⊓ g = ⊥ ↔ ∃ U ∈ f, ∃ V ∈ g, U ∩ V = ∅

Next tactic:
simp only [← disjoint_iff, Filter.disjoint_iff, Set.disjoint_iff_inter_eq_empty]
theorem _root_.Pairwise.exists_mem_filter_of_disjoint {ι : Type*} [Finite ι] {l : ι → Filter α}
    (hd : Pairwise (Disjoint on l)) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ Pairwise (Disjoint on s) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s t : Set α
ι : Type u_2
inst✝ : Finite ι
l : ι → Filter α
hd : Pairwise (Disjoint on l)
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ Pairwise (Disjoint on s)

Next tactic:
have : ∀ i j, i ≠ j → ∃ (s : {s // s ∈ l i}) (t : {t // t ∈ l j}), Disjoint s.1 t.1 := by
    simpa only [Pairwise, Function.onFun, Filter.disjoint_iff, exists_prop, Subtype.exists] using hd
theorem _root_.Pairwise.exists_mem_filter_of_disjoint {ι : Type*} [Finite ι] {l : ι → Filter α}
    (hd : Pairwise (Disjoint on l)) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ Pairwise (Disjoint on s) := by
  have : ∀ i j, i ≠ j → ∃ (s : {s // s ∈ l i}) (t : {t // t ∈ l j}), Disjoint s.1 t.1 := by
    

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s t : Set α
ι : Type u_2
inst✝ : Finite ι
l : ι → Filter α
hd : Pairwise (Disjoint on l)
⊢ ∀ (i j : ι), i ≠ j → ∃ s t, Disjoint ↑s ↑t

Next tactic:
simpa only [Pairwise, Function.onFun, Filter.disjoint_iff, exists_prop, Subtype.exists] using hd
theorem _root_.Pairwise.exists_mem_filter_of_disjoint {ι : Type*} [Finite ι] {l : ι → Filter α}
    (hd : Pairwise (Disjoint on l)) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ Pairwise (Disjoint on s) := by
  have : ∀ i j, i ≠ j → ∃ (s : {s // s ∈ l i}) (t : {t // t ∈ l j}), Disjoint s.1 t.1 := by
    simpa only [Pairwise, Function.onFun, Filter.disjoint_iff, exists_prop, Subtype.exists] using hd
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s t : Set α
ι : Type u_2
inst✝ : Finite ι
l : ι → Filter α
hd : Pairwise (Disjoint on l)
this : ∀ (i j : ι), i ≠ j → ∃ s t, Disjoint ↑s ↑t
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ Pairwise (Disjoint on s)

Next tactic:
choose! s t hst using this
theorem _root_.Pairwise.exists_mem_filter_of_disjoint {ι : Type*} [Finite ι] {l : ι → Filter α}
    (hd : Pairwise (Disjoint on l)) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ Pairwise (Disjoint on s) := by
  have : ∀ i j, i ≠ j → ∃ (s : {s // s ∈ l i}) (t : {t // t ∈ l j}), Disjoint s.1 t.1 := by
    simpa only [Pairwise, Function.onFun, Filter.disjoint_iff, exists_prop, Subtype.exists] using hd
  choose! s t hst using this
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t✝ : Set α
ι : Type u_2
inst✝ : Finite ι
l : ι → Filter α
hd : Pairwise (Disjoint on l)
s : (i : ι) → ι → { s // s ∈ l i }
t : ι → (j : ι) → { t // t ∈ l j }
hst : ∀ (i j : ι), i ≠ j → Disjoint ↑(s i j) ↑(t i j)
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ Pairwise (Disjoint on s)

Next tactic:
refine' ⟨fun i => ⋂ j, s i j ∩ t j i, fun i => _, fun i j hij => _⟩
theorem _root_.Pairwise.exists_mem_filter_of_disjoint {ι : Type*} [Finite ι] {l : ι → Filter α}
    (hd : Pairwise (Disjoint on l)) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ Pairwise (Disjoint on s) := by
  have : ∀ i j, i ≠ j → ∃ (s : {s // s ∈ l i}) (t : {t // t ∈ l j}), Disjoint s.1 t.1 := by
    simpa only [Pairwise, Function.onFun, Filter.disjoint_iff, exists_prop, Subtype.exists] using hd
  choose! s t hst using this
  refine' ⟨fun i => ⋂ j, s i j ∩ t j i, fun i => _, fun i j hij => _⟩
  

Proof state:
case refine'_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t✝ : Set α
ι : Type u_2
inst✝ : Finite ι
l : ι → Filter α
hd : Pairwise (Disjoint on l)
s : (i : ι) → ι → { s // s ∈ l i }
t : ι → (j : ι) → { t // t ∈ l j }
hst : ∀ (i j : ι), i ≠ j → Disjoint ↑(s i j) ↑(t i j)
i : ι
⊢ (fun i => ⋂ j, ↑(s i j) ∩ ↑(t j i)) i ∈ l i
case refine'_2
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t✝ : Set α
ι : Type u_2
inst✝ : Finite ι
l : ι → Filter α
hd : Pairwise (Disjoint on l)
s : (i : ι) → ι → { s // s ∈ l i }
t : ι → (j : ι) → { t // t ∈ l j }
hst : ∀ (i j : ι), i ≠ j → Disjoint ↑(s i j) ↑(t i j)
i j : ι
hij : i ≠ j
⊢ (Disjoint on fun i => ⋂ j, ↑(s i j) ∩ ↑(t j i)) i j

Next tactic:
exacts [iInter_mem.2 fun j => inter_mem (@s i j).2 (@t j i).2,
    (hst _ _ hij).mono ((iInter_subset _ j).trans (inter_subset_left _ _))
      ((iInter_subset _ i).trans (inter_subset_right _ _))]
theorem _root_.Set.PairwiseDisjoint.exists_mem_filter {ι : Type*} {l : ι → Filter α} {t : Set ι}
    (hd : t.PairwiseDisjoint l) (ht : t.Finite) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ t.PairwiseDisjoint s := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s t✝ : Set α
ι : Type u_2
l : ι → Filter α
t : Set ι
hd : PairwiseDisjoint t l
ht : Set.Finite t
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s

Next tactic:
haveI := ht.to_subtype
theorem _root_.Set.PairwiseDisjoint.exists_mem_filter {ι : Type*} {l : ι → Filter α} {t : Set ι}
    (hd : t.PairwiseDisjoint l) (ht : t.Finite) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ t.PairwiseDisjoint s := by
  haveI := ht.to_subtype
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s t✝ : Set α
ι : Type u_2
l : ι → Filter α
t : Set ι
hd : PairwiseDisjoint t l
ht : Set.Finite t
this : Finite ↑t
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s

Next tactic:
rcases (hd.subtype _ _).exists_mem_filter_of_disjoint with ⟨s, hsl, hsd⟩
theorem _root_.Set.PairwiseDisjoint.exists_mem_filter {ι : Type*} {l : ι → Filter α} {t : Set ι}
    (hd : t.PairwiseDisjoint l) (ht : t.Finite) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ t.PairwiseDisjoint s := by
  haveI := ht.to_subtype
  rcases (hd.subtype _ _).exists_mem_filter_of_disjoint with ⟨s, hsl, hsd⟩
  

Proof state:
case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t✝ : Set α
ι : Type u_2
l : ι → Filter α
t : Set ι
hd : PairwiseDisjoint t l
ht : Set.Finite t
this : Finite ↑t
s : ↑t → Set α
hsl : ∀ (i : ↑t), s i ∈ l ↑i
hsd : Pairwise (Disjoint on s)
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s

Next tactic:
lift s to (i : t) → {s // s ∈ l i} using hsl
theorem _root_.Set.PairwiseDisjoint.exists_mem_filter {ι : Type*} {l : ι → Filter α} {t : Set ι}
    (hd : t.PairwiseDisjoint l) (ht : t.Finite) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ t.PairwiseDisjoint s := by
  haveI := ht.to_subtype
  rcases (hd.subtype _ _).exists_mem_filter_of_disjoint with ⟨s, hsl, hsd⟩
  lift s to (i : t) → {s // s ∈ l i} using hsl
  -- TODO: Lean fails to find `CanLift` instance
  

Proof state:
case intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t✝ : Set α
ι : Type u_2
l : ι → Filter α
t : Set ι
hd : PairwiseDisjoint t l
ht : Set.Finite t
this : Finite ↑t
s : (i : ↑t) → { s // s ∈ l ↑i }
hsd : Pairwise (Disjoint on fun i => ↑(s i))
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s

Next tactic:
rcases @Subtype.exists_pi_extension ι (fun i => { s // s ∈ l i }) _ _ s with ⟨s, rfl⟩
theorem _root_.Set.PairwiseDisjoint.exists_mem_filter {ι : Type*} {l : ι → Filter α} {t : Set ι}
    (hd : t.PairwiseDisjoint l) (ht : t.Finite) :
    ∃ s : ι → Set α, (∀ i, s i ∈ l i) ∧ t.PairwiseDisjoint s := by
  haveI := ht.to_subtype
  rcases (hd.subtype _ _).exists_mem_filter_of_disjoint with ⟨s, hsl, hsd⟩
  lift s to (i : t) → {s // s ∈ l i} using hsl
  -- TODO: Lean fails to find `CanLift` instance
  rcases @Subtype.exists_pi_extension ι (fun i => { s // s ∈ l i }) _ _ s with ⟨s, 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 α
ι : Type u_2
l : ι → Filter α
t : Set ι
hd : PairwiseDisjoint t l
ht : Set.Finite t
this : Finite ↑t
s : (i : ι) → { s // s ∈ l i }
hsd : Pairwise (Disjoint on fun i => ↑((fun i => s ↑i) i))
⊢ ∃ s, (∀ (i : ι), s i ∈ l i) ∧ PairwiseDisjoint t s

Next tactic:
exact ⟨fun i => s i, fun i => (s i).2, hsd.set_of_subtype _ _⟩
/-- There are only two filters on a `subsingleton`: `⊥` and `⊤`. If the type is empty, then they are
equal. -/
theorem eq_top_of_neBot [Subsingleton α] (l : Filter α) [NeBot l] : l = ⊤ := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
⊢ l = ⊤

Next tactic:
refine' top_unique fun s hs => _
/-- There are only two filters on a `subsingleton`: `⊥` and `⊤`. If the type is empty, then they are
equal. -/
theorem eq_top_of_neBot [Subsingleton α] (l : Filter α) [NeBot l] : l = ⊤ := by
  refine' top_unique fun s hs => _
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
s : Set α
hs : s ∈ l
⊢ s ∈ ⊤

Next tactic:
obtain rfl : s = univ
/-- There are only two filters on a `subsingleton`: `⊥` and `⊤`. If the type is empty, then they are
equal. -/
theorem eq_top_of_neBot [Subsingleton α] (l : Filter α) [NeBot l] : l = ⊤ := by
  refine' top_unique fun s hs => _
  obtain rfl : s = univ; 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
s : Set α
hs : s ∈ l
⊢ s = univ
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
hs : univ ∈ l
⊢ univ ∈ ⊤

Next tactic:
exact Subsingleton.eq_univ_of_nonempty (nonempty_of_mem hs)
/-- There are only two filters on a `subsingleton`: `⊥` and `⊤`. If the type is empty, then they are
equal. -/
theorem eq_top_of_neBot [Subsingleton α] (l : Filter α) [NeBot l] : l = ⊤ := by
  refine' top_unique fun s hs => _
  obtain rfl : s = univ; exact Subsingleton.eq_univ_of_nonempty (nonempty_of_mem hs)
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s t : Set α
inst✝¹ : Subsingleton α
l : Filter α
inst✝ : NeBot l
hs : univ ∈ l
⊢ univ ∈ ⊤

Next tactic:
exact univ_mem
instance instNontrivialFilter [Nonempty α] : Nontrivial (Filter α) :=
  ⟨⟨⊤, ⊥, NeBot.ne <| forall_mem_nonempty_iff_neBot.1
    fun s hs => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f g : Filter α
s✝ t : Set α
inst✝ : Nonempty α
s : Set α
hs : s ∈ ⊤
⊢ Set.Nonempty s

Next tactic:
rwa [mem_top.1 hs, ← nonempty_iff_univ_nonempty]
theorem eq_biInf_of_mem_iff_exists_mem {f : ι → Filter α} {p : ι → Prop} {l : Filter α}
    (h : ∀ {s}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i) : l = ⨅ (i) (_ : p i), f i := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
p : ι → Prop
l : Filter α
h : ∀ {s : Set α}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i
⊢ l = ⨅ i, ⨅ (_ : p i), f i

Next tactic:
rw [iInf_subtype']
theorem eq_biInf_of_mem_iff_exists_mem {f : ι → Filter α} {p : ι → Prop} {l : Filter α}
    (h : ∀ {s}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i) : l = ⨅ (i) (_ : p i), f i := by
  rw [iInf_subtype']
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
p : ι → Prop
l : Filter α
h : ∀ {s : Set α}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i
⊢ l = ⨅ x, f ↑x

Next tactic:
exact eq_iInf_of_mem_iff_exists_mem <| fun {_} => by simp only [Subtype.exists, h, exists_prop]
theorem eq_biInf_of_mem_iff_exists_mem {f : ι → Filter α} {p : ι → Prop} {l : Filter α}
    (h : ∀ {s}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i) : l = ⨅ (i) (_ : p i), f i := by
  rw [iInf_subtype']
  exact eq_iInf_of_mem_iff_exists_mem <| fun {_} => by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
p : ι → Prop
l : Filter α
h : ∀ {s : Set α}, s ∈ l ↔ ∃ i, p i ∧ s ∈ f i
x✝ : Set α
⊢ x✝ ∈ l ↔ ∃ i, x✝ ∈ f ↑i

Next tactic:
simp only [Subtype.exists, h, exists_prop]
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α}, x ∈ ⋃ i, (f i).sets → x ⊆ y → y ∈ ⋃ i, (f i).sets

Next tactic:
simp only [mem_iUnion, exists_imp]
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        simp only [mem_iUnion, exists_imp]
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α} (x_1 : ι), x ∈ (f x_1).sets → x ⊆ y → ∃ i, y ∈ (f i).sets

Next tactic:
exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        simp only [mem_iUnion, exists_imp]
        exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
      inter_sets := by
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α}, x ∈ ⋃ i, (f i).sets → y ∈ ⋃ i, (f i).sets → x ∩ y ∈ ⋃ i, (f i).sets

Next tactic:
simp only [mem_iUnion, exists_imp]
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        simp only [mem_iUnion, exists_imp]
        exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
      inter_sets := by
        simp only [mem_iUnion, exists_imp]
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
⊢ ∀ {x y : Set α} (x_1 : ι), x ∈ (f x_1).sets → ∀ (x_2 : ι), y ∈ (f x_2).sets → ∃ i, x ∩ y ∈ (f i).sets

Next tactic:
intro x y a hx b hy
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        simp only [mem_iUnion, exists_imp]
        exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
      inter_sets := by
        simp only [mem_iUnion, exists_imp]
        intro x y a hx b hy
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
x y : Set α
a : ι
hx : x ∈ (f a).sets
b : ι
hy : y ∈ (f b).sets
⊢ ∃ i, x ∩ y ∈ (f i).sets

Next tactic:
rcases h a b with ⟨c, ha, hb⟩
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        simp only [mem_iUnion, exists_imp]
        exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
      inter_sets := by
        simp only [mem_iUnion, exists_imp]
        intro x y a hx b hy
        rcases h a b with ⟨c, ha, hb⟩
        

Proof state:
case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
x y : Set α
a : ι
hx : x ∈ (f a).sets
b : ι
hy : y ∈ (f b).sets
c : ι
ha : f a ≥ f c
hb : f b ≥ f c
⊢ ∃ i, x ∩ y ∈ (f i).sets

Next tactic:
exact ⟨c, inter_mem (ha hx) (hb hy)⟩
theorem iInf_sets_eq {f : ι → Filter α} (h : Directed (· ≥ ·) f) [ne : Nonempty ι] :
    (iInf f).sets = ⋃ i, (f i).sets :=
  let ⟨i⟩ := ne
  let u :=
    { sets := ⋃ i, (f i).sets
      univ_sets := mem_iUnion.2 ⟨i, univ_mem⟩
      sets_of_superset := by
        simp only [mem_iUnion, exists_imp]
        exact fun i hx hxy => ⟨i, mem_of_superset hx hxy⟩
      inter_sets := by
        simp only [mem_iUnion, exists_imp]
        intro x y a hx b hy
        rcases h a b with ⟨c, ha, hb⟩
        exact ⟨c, inter_mem (ha hx) (hb hy)⟩ }
  have : u = iInf f := eq_iInf_of_mem_iff_exists_mem mem_iUnion
  -- porting note: it was just `congr_arg filter.sets this.symm`
  (congr_arg Filter.sets this.symm).trans <| by 

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
ne : Nonempty ι
i : ι
u : Filter α :=
  { sets := ⋃ i, (f i).sets, univ_sets := (_ : univ ∈ ⋃ i, (f i).sets), sets_of_superset := ?m.91616,
    inter_sets := ?m.91617 }
this : u = iInf f
⊢ u.sets = ⋃ i, (f i).sets

Next tactic:
simp only
theorem mem_iInf_of_directed {f : ι → Filter α} (h : Directed (· ≥ ·) f) [Nonempty ι] (s) :
    s ∈ iInf f ↔ ∃ i, s ∈ f i := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t : Set α
f : ι → Filter α
h : Directed (fun x x_1 => x ≥ x_1) f
inst✝ : Nonempty ι
s : Set α
⊢ s ∈ iInf f ↔ ∃ i, s ∈ f i

Next tactic:
simp only [← Filter.mem_sets, iInf_sets_eq h, mem_iUnion]
theorem mem_biInf_of_directed {f : β → Filter α} {s : Set β} (h : DirectedOn (f ⁻¹'o (· ≥ ·)) s)
    (ne : s.Nonempty) {t : Set α} : (t ∈ ⨅ i ∈ s, f i) ↔ ∃ i ∈ s, t ∈ f i := 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 : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s
ne : Set.Nonempty s
t : Set α
⊢ t ∈ ⨅ i ∈ s, f i ↔ ∃ i ∈ s, t ∈ f i

Next tactic:
haveI := ne.to_subtype
theorem mem_biInf_of_directed {f : β → Filter α} {s : Set β} (h : DirectedOn (f ⁻¹'o (· ≥ ·)) s)
    (ne : s.Nonempty) {t : Set α} : (t ∈ ⨅ i ∈ s, f i) ↔ ∃ i ∈ s, t ∈ f i := by
  haveI := ne.to_subtype
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s✝ t✝ : Set α
f : β → Filter α
s : Set β
h : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s
ne : Set.Nonempty s
t : Set α
this : Nonempty ↑s
⊢ t ∈ ⨅ i ∈ s, f i ↔ ∃ i ∈ s, t ∈ f i

Next tactic:
simp_rw [iInf_subtype', mem_iInf_of_directed h.directed_val, Subtype.exists, exists_prop]
theorem biInf_sets_eq {f : β → Filter α} {s : Set β} (h : DirectedOn (f ⁻¹'o (· ≥ ·)) s)
    (ne : s.Nonempty) : (⨅ i ∈ s, f i).sets = ⋃ i ∈ s, (f i).sets :=
  ext fun t => 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 : DirectedOn (f ⁻¹'o fun x x_1 => x ≥ x_1) s
ne : Set.Nonempty s
t : Set α
⊢ t ∈ (⨅ i ∈ s, f i).sets ↔ t ∈ ⋃ i ∈ s, (f i).sets

Next tactic:
simp [mem_biInf_of_directed h ne]
theorem iInf_sets_eq_finite {ι : Type*} (f : ι → Filter α) :
    (⨅ i, f i).sets = ⋃ t : Finset ι, (⨅ i ∈ t, f i).sets := by
  

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

Next tactic:
rw [iInf_eq_iInf_finset, iInf_sets_eq]
theorem iInf_sets_eq_finite {ι : Type*} (f : ι → Filter α) :
    (⨅ i, f i).sets = ⋃ t : Finset ι, (⨅ i ∈ t, f i).sets := by
  rw [iInf_eq_iInf_finset, iInf_sets_eq]
  

Proof state:
case h
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f✝ g : Filter α
s t : Set α
ι : Type u_2
f : ι → Filter α
⊢ Directed (fun x x_1 => x ≥ x_1) fun t => ⨅ i ∈ t, f i

Next tactic:
exact directed_of_isDirected_le fun _ _ => biInf_mono
theorem iInf_sets_eq_finite' (f : ι → Filter α) :
    (⨅ i, f i).sets = ⋃ t : Finset (PLift ι), (⨅ i ∈ t, f (PLift.down i)).sets := by
  

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

Next tactic:
rw [← iInf_sets_eq_finite, ← Equiv.plift.surjective.iInf_comp]
theorem iInf_sets_eq_finite' (f : ι → Filter α) :
    (⨅ i, f i).sets = ⋃ t : Finset (PLift ι), (⨅ i ∈ t, f (PLift.down i)).sets := by
  rw [← iInf_sets_eq_finite, ← Equiv.plift.surjective.iInf_comp]
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
⊢ (⨅ x, f (Equiv.plift x)).sets = (⨅ i, f i.down).sets

Next tactic:
rfl