Zulip Chat Archive

Stream: general

Topic: what do you prefer


Huỳnh Trần Khanh (Jul 04 2021 at 15:19):

what do you prefer, the equation compiler or the induction tactic? sometimes I find the equation compiler more flexible, like I can exploit well-founded recursion to prove theorems and I don't have to explicitly generalize variables

Huỳnh Trần Khanh (Jul 04 2021 at 15:20):

I used to say lemma, but now I have to say "theorem". Lean 4 is literally Newspeak.

Eric Wieser (Jul 04 2021 at 15:45):

For defs, the equation compiler produces helpful lemmas you wouldn't get if you used induction

Eric Wieser (Jul 04 2021 at 15:46):

However, there are lots of cases where the equation compiler picks brec and induction picks rec, and IIRC the later is computationally faster

Eric Wieser (Jul 04 2021 at 15:46):

Mario might be able to expand on that last point

Horatiu Cheval (Jul 04 2021 at 16:35):

I almost always use induction for proofs. I think the only situations where I found the equation compiler preferable are like this. Say you want to prove something by induction on both n m : nat and the only interesting case is the pattern n (n + 1), while the other cases are trivially impossible (and therefore trivially true by exfalso). Then using the equation compiler I could get away with just writing the interesting pattern, and it would just figure out the other cases by itself, without me having to write them.


Last updated: Dec 20 2023 at 11:08 UTC