-- Mathlib/Topology/PartitionOfUnity.lean
theorem sum_toPOUFun_eq (x : X) : ∑ᶠ i, f.toPOUFun i x = 1 - ∏ᶠ i, (1 - f i x)

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
classical
letI : LinearOrder ι := linearOrderOfSTO WellOrderingRel
rw [finsum_eq_sum_of_support_subset _ A, finprod_eq_prod_of_mulSupport_subset _ B,
  Finset.prod_one_sub_ordered, sub_sub_cancel]
refine Finset.sum_congr rfl fun i _ => ?_
convert f.toPOUFun_eq_mul_prod _ _ _ fun j _ hj => _
rwa [Finite.mem_toFinset]

Result:
no goals

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
⊢ (support fun i => f.toPOUFun i x) ⊆ {i | (f i) x ≠ 0}

Tactic:
exact fun i hi => f.support_toPOUFun_subset i hi

Result:
no goals

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
have B : (mulSupport fun i => 1 - f i x) ⊆ s := by
  rw [hs, mulSupport_one_sub]
  exact fun i => id

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
⊢ (support fun i => f.toPOUFun i x) ⊆ ↑s

Tactic:
rw [hs]

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
⊢ (support fun i => f.toPOUFun i x) ⊆ {i | (f i) x ≠ 0}

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
⊢ (mulSupport fun i => 1 - (f i) x) ⊆ ↑s

Tactic:
rw [hs, mulSupport_one_sub]

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
⊢ (support fun i => (f i) x) ⊆ {i | (f i) x ≠ 0}

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
this : LinearOrder ι := linearOrderOfSTO WellOrderingRel
⊢ ∑ i ∈ s, f.toPOUFun i x = ∑ i ∈ s, (f i) x * ∏ j ∈ Finset.filter (fun j => j < i) s, (1 - (f j) x)

Tactic:
refine Finset.sum_congr rfl fun i _ => ?_

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
this : LinearOrder ι := linearOrderOfSTO WellOrderingRel
i : ι
x✝ : i ∈ s
⊢ f.toPOUFun i x = (f i) x * ∏ j ∈ Finset.filter (fun j => j < i) s, (1 - (f j) x)

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
have A : (support fun i => toPOUFun f i x) ⊆ s := by
  rw [hs]
  exact fun i hi => f.support_toPOUFun_subset i hi

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
have hs : (s : Set ι) = { i | f i x ≠ 0 } := Finite.coe_toFinset _

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
letI : LinearOrder ι := linearOrderOfSTO WellOrderingRel

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
this : LinearOrder ι := linearOrderOfSTO WellOrderingRel
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
x : X
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
set s := (f.point_finite x).toFinset

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Proof state:
case convert_4
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
this : LinearOrder ι := linearOrderOfSTO WellOrderingRel
i : ι
x✝¹ : i ∈ s
j : ι
x✝ : WellOrderingRel j i
hj : (f j) x ≠ 0
⊢ j ∈ s

Tactic:
rwa [Finite.mem_toFinset]

Result:
no goals

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
⊢ (support fun i => (f i) x) ⊆ {i | (f i) x ≠ 0}

Tactic:
exact fun i => id

Result:
no goals

Proof state:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
this : LinearOrder ι := linearOrderOfSTO WellOrderingRel
⊢ ∑ᶠ (i : ι), f.toPOUFun i x = 1 - ∏ᶠ (i : ι), (1 - (f i) x)

Tactic:
rw [finsum_eq_sum_of_support_subset _ A, finprod_eq_prod_of_mulSupport_subset _ B,
  Finset.prod_one_sub_ordered, sub_sub_cancel]

Result:
ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s✝ : Set X
f : BumpCovering ι X s✝
x : X
s : Finset ι := ⋯.toFinset
hs : ↑s = {i | (f i) x ≠ 0}
A : (support fun i => f.toPOUFun i x) ⊆ ↑s
B : (mulSupport fun i => 1 - (f i) x) ⊆ ↑s
this : LinearOrder ι := linearOrderOfSTO WellOrderingRel
⊢ ∑ i ∈ s, f.toPOUFun i x = ∑ i ∈ s, (f i) x * ∏ j ∈ Finset.filter (fun j => j < i) s, (1 - (f j) x)