Zulip Chat Archive

Stream: Is there code for X?

Topic: sum_sum


Yakov Pechersky (Dec 30 2021 at 17:00):

I can't find the finset sum lemma that is the association that makes this work, and guessing the name isn't working either. What am I missing?

import data.polynomial.basic

open polynomial

lemma sum_sum {R S T : Type*} [semiring R] [semiring S] [add_comm_monoid T]
  (p : polynomial R) (f :   R  polynomial S) (g :   S  T) :
  (p.sum f).sum g = p.sum (λ i a, (f i a).sum g) :=
begin
  simp_rw sum_def,
  sorry,
end

Yakov Pechersky (Dec 30 2021 at 17:01):

Feel free to place any add_monoid_hom requirements as necessary.

Yakov Pechersky (Dec 30 2021 at 17:43):

Seems like for my purposes, it's easier to just induct on the polynomial instead of juggling between sum and lsum, coeff and lcoeff.

Eric Wieser (Dec 30 2021 at 19:56):

docs#finsupp.sum_comm?

Eric Wieser (Dec 30 2021 at 19:57):

After the usual "unfold the polynomial to add_monoid_algebra" boilerplate

Yakov Pechersky (Dec 30 2021 at 20:36):

That's not exactly what I want. Take a look at #11139, #sum_taylor_eq

Ashvni Narayanan (Apr 17 2022 at 15:15):

(deleted)


Last updated: Dec 20 2023 at 11:08 UTC