@@ -242,12 +242,10 @@ theorem sum_apply [Zero M] [AddCommMonoid N] {f : α →₀ M} {g : α → M →
242
242
(f.sum g) a₂ = f.sum fun a₁ b => g a₁ b a₂ :=
243
243
finset_sum_apply _ _ _
244
244
245
- -- Porting note: inserted ⇑ on the rhs
246
245
@[simp, norm_cast] theorem coe_finset_sum [AddCommMonoid N] (S : Finset ι) (f : ι → α →₀ N) :
247
246
⇑(∑ i ∈ S, f i) = ∑ i ∈ S, ⇑(f i) :=
248
247
map_sum (coeFnAddHom : (α →₀ N) →+ _) _ _
249
248
250
- -- Porting note: inserted ⇑ on the rhs
251
249
@[simp, norm_cast] theorem coe_sum [Zero M] [AddCommMonoid N] (f : α →₀ M) (g : α → M → β →₀ N) :
252
250
⇑(f.sum g) = f.sum fun a₁ b => ⇑(g a₁ b) :=
253
251
coe_finset_sum _ _
@@ -381,14 +379,12 @@ theorem univ_sum_single [Fintype α] [AddCommMonoid M] (f : α →₀ M) :
381
379
@[simp]
382
380
theorem univ_sum_single_apply [AddCommMonoid M] [Fintype α] (i : α) (m : M) :
383
381
∑ j : α, single i m j = m := by
384
- -- Porting note: rewrite due to leaky classical in lean3
385
382
classical rw [single, coe_mk, Finset.sum_pi_single']
386
383
simp
387
384
388
385
@[simp]
389
386
theorem univ_sum_single_apply' [AddCommMonoid M] [Fintype α] (i : α) (m : M) :
390
387
∑ j : α, single j m i = m := by
391
- -- Porting note: rewrite due to leaky classical in lean3
392
388
simp_rw [single, coe_mk]
393
389
classical rw [Finset.sum_pi_single]
394
390
simp
@@ -454,7 +450,6 @@ theorem support_sum_eq_biUnion {α : Type*} {ι : Type*} {M : Type*} [DecidableE
454
450
(h : ∀ i₁ i₂, i₁ ≠ i₂ → Disjoint (g i₁).support (g i₂).support) :
455
451
(∑ i ∈ s, g i).support = s.biUnion fun i => (g i).support := by
456
452
classical
457
- -- Porting note: apply Finset.induction_on s was not working; refine does.
458
453
refine Finset.induction_on s ?_ ?_
459
454
· simp
460
455
· intro i s hi
578
573
579
574
namespace Nat
580
575
581
- -- Porting note: Needed to replace pow with (· ^ ·)
582
576
/-- If `0 : ℕ` is not in the support of `f : ℕ →₀ ℕ` then `0 < ∏ x ∈ f.support, x ^ (f x)`. -/
583
577
theorem prod_pow_pos_of_zero_not_mem_support {f : ℕ →₀ ℕ} (nhf : 0 ∉ f.support) :
584
578
0 < f.prod (· ^ ·) :=
0 commit comments