Zulip Chat Archive

Stream: mathlib4

Topic: Move some tactics to separate package?


Jannis Limperg (Oct 26 2022 at 15:13):

I'm currently extending Aesop with the ability to generate proof scripts, which would make use of mathlib's on_goal tactic. This is a problem because I can't depend on mathlib. I think I can work around this by defining my own aesop_on_goal and using that instead of on_goal whenever on_goal is not available (which I can presumably detect).

But it made me think: many of the tactics in mathlib are quite general-purpose and will also be useful for people who don't use mathlib. So should they be split out into a separate package (maybe std, maybe a new std-tactics)?

Heather Macbeth (Oct 26 2022 at 15:14):

Just wondering, why can't you depend on mathlib? I'm sorry if I missed a previous discussion here.

Jannis Limperg (Oct 26 2022 at 15:20):

Because Aesop is supposed to be used in mathlib. So the alternative is really to move it into mathlib. That would also be fine with me, but if we want to move to a less monolithic ecosystem, it would be nice if tactics which are not intrinsically tied to mathlib aren't bundled with it.

Heather Macbeth (Oct 26 2022 at 15:22):

I see. Speaking just for myself, I'd certainly be happy to have it in mathlib.

In any case, during the current phase with mathlib4 changing very fast, it might be easier to keep a monolith ...

Jannis Limperg (Oct 26 2022 at 15:34):

That's fair. Splitting off a separate std-tactics, which would presumably depend on std, would be an issue with the current infrastructure.

Actually, now that I think about it, you can already use Aesop together with mathlib4 only if the two packages agree on which std commit they depend on.

Johan Commelin (Oct 26 2022 at 15:34):

I think we should first port mathlib, and then think about splitting things into packages. Doing both at once sounds like extra complications to me.

Alex J. Best (Oct 26 2022 at 15:51):

on_goal seems to fit nicely in std itself to me, its a tactic that shouldn't need mathematical background and is quite general purpose, maybe @Mario Carneiro should be the one to move it though

Mario Carneiro (Oct 27 2022 at 01:08):

Yes, on_goal should go in std. Feel free to open a thread on the #std4 stream whenever you have a request to move something from mathlib4 to std4.


Last updated: Dec 20 2023 at 11:08 UTC