Zulip Chat Archive

Stream: general

Topic: timeout and irreducibility


Patrick Massot (May 19 2019 at 20:18):

I don't have much time for careful Zulip reading those days. Could someone write a summary of what has been learned about slow elaboration and also about irreducible definitions? Are there approximate rules one could list?

Rob Lewis (May 19 2019 at 21:02):

We should be better about sealing off definitions by marking them as irreducible after the interface is finished. Irreducible doesn't mean completely opaque, you can always explicitly unfold it. But we're finding slow proofs that are caused by the elaborator doing way too much unfolding. If you run into a proof that seems like it should be fast, but isn't, see if tagging something as irreducible helps it along. This can show up especially when using tactics like assumption, which try to unify lots of things with the goal and depend on that failing quickly.

Kevin Buzzard (May 19 2019 at 21:03):

I remember a while ago when people decided that the reals were better off irreducible, and I was thinking "yeah, I mean, do I even care if they're Cauchy sequences of rationals or Dedekind cuts? Why would anyone ever care about that ever?". Is it the same sort of phenomenon?

Rob Lewis (May 19 2019 at 21:04):

Yes, it's exactly that.

Rob Lewis (May 19 2019 at 21:04):

For some things, the definitional reduction is useful and shouldn't be hidden.

Rob Lewis (May 19 2019 at 21:05):

But lots of things have an interface that, once it's there, removes the need to know how the thing is actually defined.

Chris Hughes (May 19 2019 at 21:12):

And we still mark things as irreducible when we do care about the definition (we care that exp is a power series), because I guess we don't care about it often enough, and there's an equation lemma we can still use.

Johan Commelin (May 29 2019 at 18:59):

Would it make sense to mark polynomial and mv_polynomial as irreducible? Would that speed up things that use them?

Johan Commelin (May 29 2019 at 19:00):

I don't understand enough about irreducible to even make an educated guess of whether this would be a reasonable move.

Johan Commelin (May 29 2019 at 19:01):

(Btw... I've written coeff for mv_polynomial, I'll PR it soonish. That should help having a good API for mv_polynomial if we indeed make it irreducible.)

Chris Hughes (May 29 2019 at 19:01):

I think probably not but possibly. I think the main reason they are slow is because of type class inference. I would do it anyway though, since they shouldn't really be unfolded.


Last updated: Dec 20 2023 at 11:08 UTC