Zulip Chat Archive

Stream: Is there code for X?

Topic: finset.sum over fin (n+1)


Adam Topaz (Apr 25 2021 at 16:59):

Do we have something like the following lemma?

lemma sum_eq {n} {α : Type*} [add_comm_monoid α] (ι : fin (n+1)  α) :
  ( (i : fin (n+1)), ι i) = ι 0 +  i : fin n, ι i.succ := sorry

Adam Topaz (Apr 25 2021 at 17:00):

Scratch that, library search took a little while but found an answer :)

Adam Topaz (Apr 25 2021 at 17:01):

(it's docs#fin.sum_univ_succ in case anyone is curious)

Scott Morrison (Apr 26 2021 at 01:02):

(library_search runtime is linear in the number of declarations it has to look at, so running it in a separate file with smaller imports is often helpful. Of course, that risks leaving out the essential import.)


Last updated: Dec 20 2023 at 11:08 UTC