-- Mathlib/Topology/Algebra/Support.lean
theorem LocallyFinite.exists_finset_nhd_mulSupport_subset {U : ι → Set X} [One R] {f : ι → X → R}
    (hlf : LocallyFinite fun i => mulSupport (f i)) (hso : ∀ i, mulTSupport (f i) ⊆ U i)
    (ho : ∀ i, IsOpen (U i)) (x : X) :
    ∃ (is : Finset ι), ∃ n, n ∈ 𝓝 x ∧ (n ⊆ ⋂ i ∈ is, U i) ∧
      ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ is

Proof state:
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hz : z ∈ (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i
⊢ z ∈ n

Tactic:
rw [inter_assoc] at hz

Result:
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hz : z ∈ n ∩ ((⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i)
⊢ z ∈ n

Proof state:
case intro.intro.refine_3
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hzn : z ∈ n
hz : ∀ (i : ι), (mulSupport (f i) ∩ n).Nonempty → x ∉ U i → z ∈ (mulTSupport (f i))ᶜ
i : ι
hi : i ∈ mulSupport fun i => f i z
⊢ i ∈ ↑hnf.toFinset

Tactic:
simp only [Finite.coe_toFinset, mem_setOf_eq]

Result:
case intro.intro.refine_3
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hzn : z ∈ n
hz : ∀ (i : ι), (mulSupport (f i) ∩ n).Nonempty → x ∉ U i → z ∈ (mulTSupport (f i))ᶜ
i : ι
hi : i ∈ mulSupport fun i => f i z
⊢ (mulSupport (f i) ∩ n).Nonempty

Proof state:
case intro.intro.refine_3
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hz : z ∈ (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i
⊢ (mulSupport fun i => f i z) ⊆ ↑is

Tactic:
have hzn : z ∈ n := by
  rw [inter_assoc] at hz
  exact mem_of_mem_inter_left hz

Result:
case intro.intro.refine_3
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hz : z ∈ (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i
hzn : z ∈ n
⊢ (mulSupport fun i => f i z) ⊆ ↑is

Proof state:
case intro.intro.refine_2
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
⊢ ⋂ i ∈ is, U i ∈ 𝓝 x

Tactic:
exact (biInter_finset_mem is).mpr fun i hi => (ho i).mem_nhds (Finset.mem_filter.mp hi).2

Result:
no goals

Proof state:
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hzn : z ∈ n
hz : ∀ (i : ι), (mulSupport (f i) ∩ n).Nonempty → x ∉ U i → z ∈ (mulTSupport (f i))ᶜ
this : (mulSupport fun i => f i z) ⊆ ↑hnf.toFinset
⊢ (mulSupport fun i => f i z) ⊆ ↑is

Tactic:
refine hnf.toFinset.subset_coe_filter_of_subset_forall _ this fun i hi => ?_

Result:
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hzn : z ∈ n
hz : ∀ (i : ι), (mulSupport (f i) ∩ n).Nonempty → x ∉ U i → z ∈ (mulTSupport (f i))ᶜ
this : (mulSupport fun i => f i z) ⊆ ↑hnf.toFinset
i : ι
hi : i ∈ mulSupport fun i => f i z
⊢ x ∈ U i

Proof state:
case intro.intro.refine_3
X : Type u_1
R : Type u_8
ι : Type u_9
inst✝¹ : TopologicalSpace X
U : ι → Set X
inst✝ : One R
f : ι → X → R
hlf : LocallyFinite fun i => mulSupport (f i)
hso : ∀ (i : ι), mulTSupport (f i) ⊆ U i
ho : ∀ (i : ι), IsOpen (U i)
x : X
n : Set X
hn : n ∈ 𝓝 x
hnf : {i | ((fun i => mulSupport (f i)) i ∩ n).Nonempty}.Finite
is : Finset ι := Finset.filter (fun i => x ∈ U i) hnf.toFinset
js : Finset ι := Finset.filter (fun j => x ∉ U j) hnf.toFinset
z : X
hzn : z ∈ n
hz : ∀ (i : ι), (mulSupport (f i) ∩ n).Nonempty → x ∉ U i → z ∈ (mulTSupport (f i))ᶜ
i : ι
hi : i ∈ mulSupport fun i => f i z
⊢ (mulSupport (f i) ∩ n).Nonempty

Tactic:
exact ⟨z, ⟨hi, hzn⟩⟩

Result:
no goals