Zulip Chat Archive

Stream: Equational

Topic: Faster elaboration of AllEquations


Joachim Breitner (Sep 28 2024 at 13:57):

Processing of AllEquations.lean was slow (70s on my machine!) and the bottle neck was type class inference.

In equational#52 I introduce syntax

equation 10 := x = x  (y  x)

which is more concise but, more importantly, elaborates more directly and avoiding instance synthesis, so the file now compiles in 10s. Much more usable.

Terence Tao (Sep 28 2024 at 14:00):

[deleted]

Joachim Breitner (Sep 28 2024 at 14:03):

In the interest of moving fast I’ll just merge this, futher clean-up and refinement can happen separately, unless someone stops me right away :-)

Terence Tao (Sep 28 2024 at 14:03):

Will this require a (slight) refactoring of Subgraph.lean and Equations.lean to use the new notation?

Joachim Breitner (Sep 28 2024 at 14:04):

No, it’s really just a macro that expands to the same definition of the Equation123. No downstream effects.

Joachim Breitner (Sep 28 2024 at 14:05):

Equations.lean can use the notation. It’s not pressing (as that file is small). But for consistency maybe it should use it. But actually, for understanding what’s going on it’s actually nicer to spell it out there using well-known lean syntax. We can revise later.


Last updated: May 02 2025 at 03:31 UTC