Skip to content

Commit f3e8f62

Browse files
Out of scope comment
1 parent 0eb464e commit f3e8f62

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,18 @@ theorem finprod_eq_prod_of_mulSupport_subset (f : α → M) {s : Finset α} (h :
362362
simp only [Finset.prod_map, Equiv.coe_toEmbedding]
363363
congr
364364

365+
@[to_additive]
366+
theorem map_finprod_of_mulSupport_subset (φ : M →* N) (f : α → M) {s : Finset α}
367+
(h : mulSupport f ⊆ s) :
368+
∏ᶠ i, φ (f i) = ∏ i ∈ s, φ (f i) := by
369+
apply finprod_eq_prod_of_mulSupport_subset
370+
intro j hj
371+
simp only [mulSupport, ne_eq] at hj
372+
have hf : f j ≠ 1 := by
373+
contrapose! hj
374+
simp [hj]
375+
exact h hf
376+
365377
@[to_additive]
366378
theorem finprod_eq_prod_of_mulSupport_toFinset_subset (f : α → M) (hf : (mulSupport f).Finite)
367379
{s : Finset α} (h : hf.toFinset ⊆ s) : ∏ᶠ i, f i = ∏ i ∈ s, f i :=

Mathlib/Geometry/Manifold/ExistsRiemannianMetric.lean

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -357,19 +357,7 @@ def g_global_bilin_aux (f : SmoothPartitionOfUnity B IB B) (p : B) :
357357
E p →L[ℝ] (E p →L[ℝ] ℝ) :=
358358
∑ᶠ (j : B), (f j) p • g_bilin_aux F j p
359359

360-
lemma finsum_image_eq_sum {B E F : Type*} [AddCommMonoid E] [AddCommMonoid F]
361-
(φ : E →+ F) {f : B → E} {h_fin : Finset B}
362-
(h1 : Function.support f ⊆ h_fin) :
363-
∑ᶠ j, φ (f j) = ∑ j ∈ h_fin, φ (f j) := by
364-
apply finsum_eq_sum_of_support_subset
365-
intro j hj
366-
simp only [Function.mem_support, ne_eq] at hj
367-
have hf : f j ≠ 0 := by
368-
contrapose! hj
369-
simpa using (map_zero φ).symm ▸ congrArg φ hj
370-
exact h1 hf
371-
372-
def evalAt (b : B) (v w : E b) :
360+
private def evalAt (b : B) (v w : E b) :
373361
(E b →L[ℝ] (E b →L[ℝ] ℝ)) →+ ℝ where
374362
toFun f := (f.toFun v).toFun w
375363
map_zero' := by simp
@@ -401,11 +389,12 @@ lemma riemannian_metric_symm_aux (f : SmoothPartitionOfUnity B IB B) (b : B)
401389
calc ((∑ j ∈ h1.toFinset, (f j) b • g_bilin_aux F j b).toFun v).toFun w
402390
= ∑ j ∈ h1.toFinset, (((f j) b • g_bilin_aux F j b).toFun v).toFun w := (h3 v w).symm
403391
_ = ∑ᶠ (j : B), (((f j) b • g_bilin_aux F j b).toFun v).toFun w :=
404-
(finsum_image_eq_sum (evalAt b v w) (f := h) (h_fin := h1.toFinset) h2).symm
392+
(map_finsum_of_support_subset (φ := (evalAt b v w : (E b →L[ℝ] (E b →L[ℝ] ℝ)) →+ ℝ))
393+
(f := h) (s := h1.toFinset) h2).symm
405394
_ = ∑ᶠ (j : B), (((f j) b • g_bilin_aux F j b).toFun w).toFun v :=
406395
finsum_congr (fun j ↦ congrArg (HMul.hMul ((f j) b)) (g_bilin_symm_aux j b v w))
407396
_ = ∑ j ∈ h1.toFinset, (((f j) b • g_bilin_aux F j b).toFun w).toFun v :=
408-
finsum_image_eq_sum (evalAt b w v) (f := h) (h_fin := h1.toFinset) h2
397+
map_finsum_of_support_subset (evalAt b w v) (f := h) (s := h1.toFinset) h2
409398
_ = ((∑ j ∈ h1.toFinset, (f j) b • g_bilin_aux F j b).toFun w).toFun v := h3 w v
410399

411400
lemma riemannian_metric_pos_def_aux (f : SmoothPartitionOfUnity B IB B)
@@ -438,7 +427,7 @@ lemma riemannian_metric_pos_def_aux (f : SmoothPartitionOfUnity B IB B)
438427
exact mul_ne_zero_iff.mp (mul_ne_zero_iff.mpr hx) |>.1
439428
have hb : ∑ᶠ i, h' i =
440429
∑ j ∈ h1.toFinset, (((f j) b • g_bilin_aux F j b).toFun v).toFun v :=
441-
(finsum_image_eq_sum (evalAt b v v) (f := h) (h_fin := h1.toFinset) h3) ▸ rfl
430+
(map_finsum_of_support_subset (evalAt b v v) (f := h) (s := h1.toFinset) h3) ▸ rfl
442431
exact lt_of_lt_of_eq (finsum_pos h7 h8 h9) (hb.trans h2)
443432

444433
lemma riemannian_unit_ball_bounded_aux (f : SmoothPartitionOfUnity B IB B)

0 commit comments

Comments
 (0)