l3lab/ntp-mathlib huggingface dataset:
theorem mem_iInf_of_iInter {ι} {s : ι → Filter α} {U : Set α} {I : Set ι} (I_fin : I.Finite)
    {V : I → Set α} (hV : ∀ i, V i ∈ s i) (hU : ⋂ i, V i ⊆ U) : U ∈ ⨅ i, s i := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
I_fin : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
hU : ⋂ i, V i ⊆ U
⊢ U ∈ ⨅ i, s i

Next tactic:
haveI := I_fin.fintype
theorem mem_iInf_of_iInter {ι} {s : ι → Filter α} {U : Set α} {I : Set ι} (I_fin : I.Finite)
    {V : I → Set α} (hV : ∀ i, V i ∈ s i) (hU : ⋂ i, V i ⊆ U) : U ∈ ⨅ i, s i := by
  haveI := I_fin.fintype
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
I_fin : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
hU : ⋂ i, V i ⊆ U
this : Fintype ↑I
⊢ U ∈ ⨅ i, s i

Next tactic:
refine' mem_of_superset (iInter_mem.2 fun i => _) hU
theorem mem_iInf_of_iInter {ι} {s : ι → Filter α} {U : Set α} {I : Set ι} (I_fin : I.Finite)
    {V : I → Set α} (hV : ∀ i, V i ∈ s i) (hU : ⋂ i, V i ⊆ U) : U ∈ ⨅ i, s i := by
  haveI := I_fin.fintype
  refine' mem_of_superset (iInter_mem.2 fun i => _) hU
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
I_fin : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
hU : ⋂ i, V i ⊆ U
this : Fintype ↑I
i : ↑I
⊢ V i ∈ ⨅ i, s i

Next tactic:
exact mem_iInf_of_mem (i : ι) (hV _)
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  

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

Next tactic:
constructor
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · 

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

Next tactic:
rw [iInf_eq_generate, mem_generate_iff]
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    

Proof state:
case mp
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
⊢ (∃ t, ∃ (_ : t ⊆ ⋃ i, (s i).sets), Set.Finite t ∧ ⋂₀ t ⊆ U) →
    ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i

Next tactic:
rintro ⟨t, tsub, tfin, tinter⟩
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    

Proof state:
case mp.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t✝ : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
t : Set (Set α)
tsub : t ⊆ ⋃ i, (s i).sets
tfin : Set.Finite t
tinter : ⋂₀ t ⊆ U
⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i

Next tactic:
rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂₀ ⋃ i, σ i ⊆ U
⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i

Next tactic:
rw [sInter_iUnion] at tinter
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i

Next tactic:
set V := fun i => U ∪ ⋂₀ σ i with hV
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i

Next tactic:
have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
      exact mem_of_superset this (subset_union_right _ _)
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
⊢ ∀ (i : ↑{i | i ∈ I}), V i ∈ s ↑i

Next tactic:
rintro i
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
i : ↑{i | i ∈ I}
⊢ V i ∈ s ↑i

Next tactic:
have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
i : ↑{i | i ∈ I}
⊢ ⋂₀ σ i ∈ s ↑i

Next tactic:
rw [sInter_mem (σfin _)]
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
i : ↑{i | i ∈ I}
⊢ ∀ U ∈ σ i, U ∈ s ↑i

Next tactic:
apply σsub
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
      

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
i : ↑{i | i ∈ I}
this : ⋂₀ σ i ∈ s ↑i
⊢ V i ∈ s ↑i

Next tactic:
exact mem_of_superset this (subset_union_right _ _)
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
      exact mem_of_superset this (subset_union_right _ _)
    

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
V_in : ∀ (i : ↑{i | i ∈ I}), V i ∈ s ↑i
⊢ ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i

Next tactic:
refine' ⟨I, Ifin, V, V_in, _⟩
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
      exact mem_of_superset this (subset_union_right _ _)
    refine' ⟨I, Ifin, V, V_in, _⟩
    

Proof state:
case mp.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
I : Set ι
Ifin : Set.Finite I
σ : ↑{i | i ∈ I} → Set (Set α)
σfin : ∀ (i : ↑{i | i ∈ I}), Set.Finite (σ i)
σsub : ∀ (i : ↑{i | i ∈ I}), σ i ⊆ (s ↑i).sets
tsub : ⋃ i, σ i ⊆ ⋃ i, (s i).sets
tfin : Set.Finite (⋃ i, σ i)
tinter : ⋂ i, ⋂₀ σ i ⊆ U
V : ↑{i | i ∈ I} → Set α := fun i => U ∪ ⋂₀ σ i
hV : V = fun i => U ∪ ⋂₀ σ i
V_in : ∀ (i : ↑{i | i ∈ I}), V i ∈ s ↑i
⊢ U = ⋂ i, V i

Next tactic:
rwa [hV, ← union_iInter, union_eq_self_of_subset_right]
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
      exact mem_of_superset this (subset_union_right _ _)
    refine' ⟨I, Ifin, V, V_in, _⟩
    rwa [hV, ← union_iInter, union_eq_self_of_subset_right]
  · 

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

Next tactic:
rintro ⟨I, Ifin, V, V_in, rfl⟩
theorem mem_iInf {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔ ∃ I : Set ι, I.Finite ∧ ∃ V : I → Set α, (∀ i, V i ∈ s i) ∧ U = ⋂ i, V i := by
  constructor
  · rw [iInf_eq_generate, mem_generate_iff]
    rintro ⟨t, tsub, tfin, tinter⟩
    rcases eq_finite_iUnion_of_finite_subset_iUnion tfin tsub with ⟨I, Ifin, σ, σfin, σsub, rfl⟩
    rw [sInter_iUnion] at tinter
    set V := fun i => U ∪ ⋂₀ σ i with hV
    have V_in : ∀ i, V i ∈ s i := by
      rintro i
      have : ⋂₀ σ i ∈ s i := by
        rw [sInter_mem (σfin _)]
        apply σsub
      exact mem_of_superset this (subset_union_right _ _)
    refine' ⟨I, Ifin, V, V_in, _⟩
    rwa [hV, ← union_iInter, union_eq_self_of_subset_right]
  · rintro ⟨I, Ifin, V, V_in, rfl⟩
    

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

Next tactic:
exact mem_iInf_of_iInter Ifin V_in Subset.rfl
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  

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

Next tactic:
simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
⊢ (∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i) ↔
    ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ι), V i ∈ s i) ∧ (∀ i ∉ I, V i = univ) ∧ U = ⋂ x, V ↑x ∧ U = ⋂ i, V i

Next tactic:
refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  

Proof state:
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
U : Set α
⊢ (∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ↑I), V i ∈ s ↑i) ∧ U = ⋂ i, V i) →
    ∃ I, Set.Finite I ∧ ∃ V, (∀ (i : ι), V i ∈ s i) ∧ (∀ i ∉ I, V i = univ) ∧ U = ⋂ x, V ↑x ∧ U = ⋂ i, V i

Next tactic:
rintro ⟨I, If, V, hV, rfl⟩
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  rintro ⟨I, If, V, hV, 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
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
⊢ ∃ I_1,
    Set.Finite I_1 ∧
      ∃ V_1, (∀ (i : ι), V_1 i ∈ s i) ∧ (∀ i ∉ I_1, V_1 i = univ) ∧ ⋂ i, V i = ⋂ x, V_1 ↑x ∧ ⋂ i, V i = ⋂ i, V_1 i

Next tactic:
refine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  rintro ⟨I, If, V, hV, rfl⟩
  refine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩
  · 

Proof state:
case intro.intro.intro.intro.refine'_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
i : ι
⊢ (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) i ∈ s i

Next tactic:
dsimp only
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  rintro ⟨I, If, V, hV, rfl⟩
  refine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩
  · dsimp only
    

Proof state:
case intro.intro.intro.intro.refine'_1
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
i : ι
⊢ (if hi : i ∈ I then V { val := i, property := hi } else univ) ∈ s i

Next tactic:
split_ifs
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  rintro ⟨I, If, V, hV, rfl⟩
  refine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩
  · dsimp only
    split_ifs
    

Proof state:
case pos
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
i : ι
h✝ : i ∈ I
⊢ V { val := i, property := h✝ } ∈ s i
case neg
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
i : ι
h✝ : i ∉ I
⊢ univ ∈ s i

Next tactic:
exacts [hV _, univ_mem]
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  rintro ⟨I, If, V, hV, rfl⟩
  refine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩
  · dsimp only
    split_ifs
    exacts [hV _, univ_mem]
  · 

Proof state:
case intro.intro.intro.intro.refine'_2
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
i : ι
hi : i ∉ I
⊢ (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) i = univ

Next tactic:
exact dif_neg hi
theorem mem_iInf' {ι} {s : ι → Filter α} {U : Set α} :
    (U ∈ ⨅ i, s i) ↔
      ∃ I : Set ι, I.Finite ∧ ∃ V : ι → Set α, (∀ i, V i ∈ s i) ∧
        (∀ (i) (_hi : i ∉ I), V i = univ) ∧ (U = ⋂ i ∈ I, V i) ∧ U = ⋂ i, V i := by
  simp only [mem_iInf, SetCoe.forall', biInter_eq_iInter]
  refine' ⟨_, fun ⟨I, If, V, hVs, _, hVU, _⟩ => ⟨I, If, fun i => V i, fun i => hVs i, hVU⟩⟩
  rintro ⟨I, If, V, hV, rfl⟩
  refine' ⟨I, If, fun i => if hi : i ∈ I then V ⟨i, hi⟩ else univ, fun i => _, fun i hi => _, _⟩
  · dsimp only
    split_ifs
    exacts [hV _, univ_mem]
  · exact dif_neg hi
  · 

Proof state:
case intro.intro.intro.intro.refine'_3
α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι✝ : Sort x
f g : Filter α
s✝ t : Set α
ι : Type u_2
s : ι → Filter α
I : Set ι
If : Set.Finite I
V : ↑I → Set α
hV : ∀ (i : ↑I), V i ∈ s ↑i
⊢ ⋂ i, V i = ⋂ x, (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) ↑x ∧
    ⋂ i, V i = ⋂ i, (fun i => if hi : i ∈ I then V { val := i, property := hi } else univ) i

Next tactic:
simp only [iInter_dite, biInter_eq_iInter, dif_pos (Subtype.coe_prop _), Subtype.coe_eta,
      iInter_univ, inter_univ, eq_self_iff_true, true_and_iff]