l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
theorem continuous_extend_one [TopologicalSpace β] {U : Set α'} (hU : IsOpen U) {f : U → β}
    (cont : Continuous f) (supp : HasCompactMulSupport f) :
    Continuous (Subtype.val.extend f 1) :=
  continuous_of_mulTSupport fun x h ↦ by
    rw [show x = ↑(⟨x, Subtype.coe_image_subset _ _
      (supp.mulTSupport_extend_one_subset continuous_subtype_val h)⟩ : U) by 

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝⁶ : TopologicalSpace α
inst✝⁵ : TopologicalSpace α'
inst✝⁴ : One β
inst✝³ : One γ
inst✝² : One δ
g✝ : β → γ
f✝ : α → β
f₂ : α → γ
m : β → γ → δ
x✝ : α
inst✝¹ : T2Space α'
hf : HasCompactMulSupport f✝
g : α → α'
cont✝ : Continuous g
inst✝ : TopologicalSpace β
U : Set α'
hU : IsOpen U
f : ↑U → β
cont : Continuous f
supp : HasCompactMulSupport f
x : α'
h : x ∈ mulTSupport (extend Subtype.val f 1)
⊢ x = ↑{ val := x, property := (_ : x ∈ U) }

Next tactic:
rfl
@[to_additive]
theorem continuous_extend_one [TopologicalSpace β] {U : Set α'} (hU : IsOpen U) {f : U → β}
    (cont : Continuous f) (supp : HasCompactMulSupport f) :
    Continuous (Subtype.val.extend f 1) :=
  continuous_of_mulTSupport fun x h ↦ by
    rw [show x = ↑(⟨x, Subtype.coe_image_subset _ _
      (supp.mulTSupport_extend_one_subset continuous_subtype_val h)⟩ : U) by rfl,
      ← (hU.openEmbedding_subtype_val).continuousAt_iff, extend_comp Subtype.val_injective]
    

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝⁶ : TopologicalSpace α
inst✝⁵ : TopologicalSpace α'
inst✝⁴ : One β
inst✝³ : One γ
inst✝² : One δ
g✝ : β → γ
f✝ : α → β
f₂ : α → γ
m : β → γ → δ
x✝ : α
inst✝¹ : T2Space α'
hf : HasCompactMulSupport f✝
g : α → α'
cont✝ : Continuous g
inst✝ : TopologicalSpace β
U : Set α'
hU : IsOpen U
f : ↑U → β
cont : Continuous f
supp : HasCompactMulSupport f
x : α'
h : x ∈ mulTSupport (extend Subtype.val f 1)
⊢ ContinuousAt f { val := x, property := (_ : x ∈ U) }

Next tactic:
exact cont.continuousAt
theorem HasCompactSupport.smul_left (hf : HasCompactSupport f') : HasCompactSupport (f • f') := by
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : MonoidWithZero R
inst✝¹ : AddMonoid M
inst✝ : DistribMulAction R M
f : α → R
f' : α → M
x : α
hf : HasCompactSupport f'
⊢ HasCompactSupport (f • f')

Next tactic:
rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
theorem HasCompactSupport.smul_left (hf : HasCompactSupport f') : HasCompactSupport (f • f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : MonoidWithZero R
inst✝¹ : AddMonoid M
inst✝ : DistribMulAction R M
f : α → R
f' : α → M
x : α
hf : f' =ᶠ[coclosedCompact α] 0
⊢ f • f' =ᶠ[coclosedCompact α] 0

Next tactic:
exact hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]
theorem HasCompactSupport.smul_left (hf : HasCompactSupport f') : HasCompactSupport (f • f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  exact hf.mono fun x hx => by 

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : MonoidWithZero R
inst✝¹ : AddMonoid M
inst✝ : DistribMulAction R M
f : α → R
f' : α → M
x✝ : α
hf : f' =ᶠ[coclosedCompact α] 0
x : α
hx : f' x = OfNat.ofNat 0 x
⊢ (f • f') x = OfNat.ofNat 0 x

Next tactic:
simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]
theorem HasCompactSupport.smul_right (hf : HasCompactSupport f) : HasCompactSupport (f • f') := by
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : Zero R
inst✝¹ : Zero M
inst✝ : SMulWithZero R M
f : α → R
f' : α → M
x : α
hf : HasCompactSupport f
⊢ HasCompactSupport (f • f')

Next tactic:
rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
theorem HasCompactSupport.smul_right (hf : HasCompactSupport f) : HasCompactSupport (f • f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : Zero R
inst✝¹ : Zero M
inst✝ : SMulWithZero R M
f : α → R
f' : α → M
x : α
hf : f =ᶠ[coclosedCompact α] 0
⊢ f • f' =ᶠ[coclosedCompact α] 0

Next tactic:
exact hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, zero_smul]
theorem HasCompactSupport.smul_right (hf : HasCompactSupport f) : HasCompactSupport (f • f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  exact hf.mono fun x hx => by 

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : Zero R
inst✝¹ : Zero M
inst✝ : SMulWithZero R M
f : α → R
f' : α → M
x✝ : α
hf : f =ᶠ[coclosedCompact α] 0
x : α
hx : f x = OfNat.ofNat 0 x
⊢ (f • f') x = OfNat.ofNat 0 x

Next tactic:
simp_rw [Pi.smul_apply', hx, Pi.zero_apply, zero_smul]
theorem HasCompactSupport.smul_left' (hf : HasCompactSupport f') : HasCompactSupport (f • f') := by
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : Zero R
inst✝¹ : Zero M
inst✝ : SMulWithZero R M
f : α → R
f' : α → M
x : α
hf : HasCompactSupport f'
⊢ HasCompactSupport (f • f')

Next tactic:
rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
theorem HasCompactSupport.smul_left' (hf : HasCompactSupport f') : HasCompactSupport (f • f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : Zero R
inst✝¹ : Zero M
inst✝ : SMulWithZero R M
f : α → R
f' : α → M
x : α
hf : f' =ᶠ[coclosedCompact α] 0
⊢ f • f' =ᶠ[coclosedCompact α] 0

Next tactic:
refine' hf.mono fun x hx => by simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]
theorem HasCompactSupport.smul_left' (hf : HasCompactSupport f') : HasCompactSupport (f • f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  refine' hf.mono fun x hx => by 

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝³ : TopologicalSpace α
inst✝² : Zero R
inst✝¹ : Zero M
inst✝ : SMulWithZero R M
f : α → R
f' : α → M
x✝ : α
hf : f' =ᶠ[coclosedCompact α] 0
x : α
hx : f' x = OfNat.ofNat 0 x
⊢ (f • f') x = OfNat.ofNat 0 x

Next tactic:
simp_rw [Pi.smul_apply', hx, Pi.zero_apply, smul_zero]
theorem HasCompactSupport.mul_right (hf : HasCompactSupport f) : HasCompactSupport (f * f') := by
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : HasCompactSupport f
⊢ HasCompactSupport (f * f')

Next tactic:
rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
theorem HasCompactSupport.mul_right (hf : HasCompactSupport f) : HasCompactSupport (f * f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : f =ᶠ[coclosedCompact α] 0
⊢ f * f' =ᶠ[coclosedCompact α] 0

Next tactic:
refine' hf.mono fun x hx => by simp_rw [Pi.mul_apply, hx, Pi.zero_apply, zero_mul]
theorem HasCompactSupport.mul_right (hf : HasCompactSupport f) : HasCompactSupport (f * f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  refine' hf.mono fun x hx => by 

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x✝ : α
hf : f =ᶠ[coclosedCompact α] 0
x : α
hx : f x = OfNat.ofNat 0 x
⊢ (f * f') x = OfNat.ofNat 0 x

Next tactic:
simp_rw [Pi.mul_apply, hx, Pi.zero_apply, zero_mul]
theorem HasCompactSupport.mul_left (hf : HasCompactSupport f') : HasCompactSupport (f * f') := by
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : HasCompactSupport f'
⊢ HasCompactSupport (f * f')

Next tactic:
rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
theorem HasCompactSupport.mul_left (hf : HasCompactSupport f') : HasCompactSupport (f * f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : f' =ᶠ[coclosedCompact α] 0
⊢ f * f' =ᶠ[coclosedCompact α] 0

Next tactic:
refine' hf.mono fun x hx => by simp_rw [Pi.mul_apply, hx, Pi.zero_apply, mul_zero]
theorem HasCompactSupport.mul_left (hf : HasCompactSupport f') : HasCompactSupport (f * f') := by
  rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
  refine' hf.mono fun x hx => by 

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x✝ : α
hf : f' =ᶠ[coclosedCompact α] 0
x : α
hx : f' x = OfNat.ofNat 0 x
⊢ (f * f') x = OfNat.ofNat 0 x

Next tactic:
simp_rw [Pi.mul_apply, hx, Pi.zero_apply, mul_zero]
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  

Proof state:
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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
⊢ ∃ is, ∃ n ∈ 𝓝 x, n ⊆ ⋂ i ∈ is, U i ∧ ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ ↑is

Next tactic:
obtain ⟨n, hn, hnf⟩ := hlf x
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  

Proof state:
case intro.intro
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
⊢ ∃ is, ∃ n ∈ 𝓝 x, n ⊆ ⋂ i ∈ is, U i ∧ ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ ↑is

Next tactic:
classical
    let is := hnf.toFinset.filter fun i => x ∈ U i
    let js := hnf.toFinset.filter fun j => x ∉ U j
    refine'
      ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _,
        inter_subset_right _ _, fun z hz => _⟩
    · exact (biInter_finset_mem js).mpr fun j hj => IsClosed.compl_mem_nhds (isClosed_mulTSupport _)
        (Set.not_mem_subset (hso j) (Finset.mem_filter.mp hj).2)
    · exact (biInter_finset_mem is).mpr fun i hi => (ho i).mem_nhds (Finset.mem_filter.mp hi).2
    · have hzn : z ∈ n := by
        rw [inter_assoc] at hz
        exact mem_of_mem_inter_left hz
      replace hz := mem_of_mem_inter_right (mem_of_mem_inter_left hz)
      simp only [Finset.mem_filter, Finite.mem_toFinset, mem_setOf_eq, mem_iInter, and_imp] at hz
      suffices (mulSupport fun i => f i z) ⊆ hnf.toFinset by
        refine' hnf.toFinset.subset_coe_filter_of_subset_forall _ this fun i hi => _
        specialize hz i ⟨z, ⟨hi, hzn⟩⟩
        contrapose hz
        simp [hz, subset_mulTSupport (f i) hi]
      intro i hi
      simp only [Finite.coe_toFinset, mem_setOf_eq]
      exact ⟨z, ⟨hi, hzn⟩⟩
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  classical
    

Proof state:
case intro.intro
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
⊢ ∃ is, ∃ n ∈ 𝓝 x, n ⊆ ⋂ i ∈ is, U i ∧ ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ ↑is

Next tactic:
let is := hnf.toFinset.filter fun i => x ∈ U i
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  classical
    let is := hnf.toFinset.filter fun i => x ∈ U i
    

Proof state:
case intro.intro
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
is : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)
⊢ ∃ is, ∃ n ∈ 𝓝 x, n ⊆ ⋂ i ∈ is, U i ∧ ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ ↑is

Next tactic:
let js := hnf.toFinset.filter fun j => x ∉ U j
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  classical
    let is := hnf.toFinset.filter fun i => x ∈ U i
    let js := hnf.toFinset.filter fun j => x ∉ U j
    

Proof state:
case intro.intro
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
is : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)
js : Finset ι := Finset.filter (fun j => x ∉ U j) (Finite.toFinset hnf)
⊢ ∃ is, ∃ n ∈ 𝓝 x, n ⊆ ⋂ i ∈ is, U i ∧ ∀ z ∈ n, (mulSupport fun i => f i z) ⊆ ↑is

Next tactic:
refine'
      ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _,
        inter_subset_right _ _, fun z hz => _⟩
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  classical
    let is := hnf.toFinset.filter fun i => x ∈ U i
    let js := hnf.toFinset.filter fun j => x ∉ U j
    refine'
      ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _,
        inter_subset_right _ _, fun z hz => _⟩
    · 

Proof state:
case intro.intro.refine'_1
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
is : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)
js : Finset ι := Finset.filter (fun j => x ∉ U j) (Finite.toFinset hnf)
⊢ ⋂ j ∈ js, (mulTSupport (f j))ᶜ ∈ 𝓝 x

Next tactic:
exact (biInter_finset_mem js).mpr fun j hj => IsClosed.compl_mem_nhds (isClosed_mulTSupport _)
        (Set.not_mem_subset (hso j) (Finset.mem_filter.mp hj).2)
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  classical
    let is := hnf.toFinset.filter fun i => x ∈ U i
    let js := hnf.toFinset.filter fun j => x ∉ U j
    refine'
      ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _,
        inter_subset_right _ _, fun z hz => _⟩
    · exact (biInter_finset_mem js).mpr fun j hj => IsClosed.compl_mem_nhds (isClosed_mulTSupport _)
        (Set.not_mem_subset (hso j) (Finset.mem_filter.mp hj).2)
    · 

Proof state:
case intro.intro.refine'_2
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
is : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)
js : Finset ι := Finset.filter (fun j => x ∉ U j) (Finite.toFinset hnf)
⊢ ⋂ i ∈ is, U i ∈ 𝓝 x

Next tactic:
exact (biInter_finset_mem is).mpr fun i hi => (ho i).mem_nhds (Finset.mem_filter.mp hi).2
/-- If a family of functions `f` has locally-finite multiplicative support, subordinate to a family
of open sets, then for any point we can find a neighbourhood on which only finitely-many members of
`f` are not equal to 1. -/
@[to_additive " If a family of functions `f` has locally-finite support, subordinate to a family of
open sets, then for any point we can find a neighbourhood on which only finitely-many members of `f`
are non-zero. "]
theorem exists_finset_nhd_mulSupport_subset {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 := by
  obtain ⟨n, hn, hnf⟩ := hlf x
  classical
    let is := hnf.toFinset.filter fun i => x ∈ U i
    let js := hnf.toFinset.filter fun j => x ∉ U j
    refine'
      ⟨is, (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i, inter_mem (inter_mem hn _) _,
        inter_subset_right _ _, fun z hz => _⟩
    · exact (biInter_finset_mem js).mpr fun j hj => IsClosed.compl_mem_nhds (isClosed_mulTSupport _)
        (Set.not_mem_subset (hso j) (Finset.mem_filter.mp hj).2)
    · exact (biInter_finset_mem is).mpr fun i hi => (ho i).mem_nhds (Finset.mem_filter.mp hi).2
    · 

Proof state:
case intro.intro.refine'_3
X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
ι : Type u_10
U : ι → Set X
inst✝¹ : TopologicalSpace 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 : Set.Finite {i | Set.Nonempty ((fun i => mulSupport (f i)) i ∩ n)}
is : Finset ι := Finset.filter (fun i => x ∈ U i) (Finite.toFinset hnf)
js : Finset ι := Finset.filter (fun j => x ∉ U j) (Finite.toFinset hnf)
z : X
hz : z ∈ (n ∩ ⋂ j ∈ js, (mulTSupport (f j))ᶜ) ∩ ⋂ i ∈ is, U i
⊢ (mulSupport fun i => f i z) ⊆ ↑is

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