Zulip Chat Archive

Stream: mathlib4

Topic: independent and auxiliary


Joseph O (Feb 21 2022 at 17:36):

So I have this function sum, which is standalone, but I also have another function, sumBy, which with my current design idea uses sum as an auxiliary function. Is that ok in mathlib4?

Joseph O (Feb 21 2022 at 18:46):

Or should i do

def sumBy ... :=
    let sum := ...
    ...use local sum...

Mario Carneiro (Feb 21 2022 at 18:51):

Of course

Mario Carneiro (Feb 21 2022 at 18:52):

The point of these functions is to be used, and mathlib is one of its own biggest users

Joseph O (Feb 21 2022 at 18:52):

Right, but the thing is, if someone took out sum, then sumBy wouldn't work.

Henrik Böving (Feb 21 2022 at 19:26):

That's...an argument you can make against writing any function in the first place? That doesn't exactly make sense when you think about it in the bigger picture

Joseph O (Feb 21 2022 at 19:50):

I guess so

Mario Carneiro (Feb 21 2022 at 19:52):

It's also not really true. If someone wanted to remove sum they would inline it into sumBy first so as to not break anything

Joseph O (Feb 21 2022 at 19:53):

That is reassuring. Thank you.

Joseph O (Feb 21 2022 at 21:41):

Not really related to this channel topic, but when the real mathlib4 port starts, will this repository get deleted, or stay as a public archive?


Last updated: Dec 20 2023 at 11:08 UTC