Zulip Chat Archive

Stream: maths

Topic: sum grouping adjacent terms


Daniel Selsam (Feb 16 2022 at 17:41):

Does mathlib have some variant of https://github.com/openai/miniF2F/blob/main/lean/src/test.lean#L1332-L1341?

Ruben Van de Velde (Feb 16 2022 at 17:48):

I don't think I've seen anything like that, but could be added pretty easily, I guess

Daniel Selsam (Feb 16 2022 at 18:20):

Ruben Van de Velde said:

I don't think I've seen anything like that, but could be added pretty easily, I guess

Thanks. Happy to PR it -- where would it go?

Ruben Van de Velde (Feb 16 2022 at 18:24):

Big operators/basic, probably? (On mobile, can't link)

Eric Wieser (Feb 16 2022 at 18:52):

Maybe generalize it to

 k in finset.range (m * n), f k =  k in finset.range n,  i in finset.range m, f (m * k + i)

so that we can group triples as well?

Eric Wieser (Feb 16 2022 at 18:54):

(and of course to_additiveize it)

Eric Wieser (Feb 16 2022 at 19:03):

I was hoping docs#finset.sum_partition could produce a slick proof, but we're missing a lot of the machinery


Last updated: Dec 20 2023 at 11:08 UTC