Zulip Chat Archive

Stream: lean4

Topic: strict grind only


Patrick Massot (Feb 01 2026 at 14:13):

Now that cc has been moved away from Mathlib, it becomes more urgent to understand how grind could fully replace it. Is there any way to have a strictgrind only that do not use local assumptions that it was not told to use?

Yury G. Kudryashov (Feb 01 2026 at 14:30):

Is grind fast enough to close all the relevant goals without this restriction?

Patrick Massot (Feb 01 2026 at 14:41):

This has nothing to do with speed. It's about control.

Patrick Massot (Feb 01 2026 at 14:42):

I secretly use cc in Verbose Lean where I need to control that students provide the relevant justifications.

Yury G. Kudryashov (Feb 01 2026 at 20:11):

Can you clear all other assumptions before calling grind only in your wrapper tactic?

Patrick Massot (Feb 02 2026 at 09:11):

Sure, I could do that, and I even thought about it. But it’s really super inconvenient.

Kim Morrison (Feb 02 2026 at 10:59):

What is the inconvenience? Just having to implement it, or is there a particular difficulty anticipated?

How about we write verbose_grind_wrapper [X, Y, Z] which:

  • checks which of X, Y, Z are names of local hypotheses
  • clears all local hypotheses except those (and hypotheses these depend on)
  • passes everything that was not a local hypothesis to grind only [...]

Is that the behaviour you want?

Kim Morrison :bot: (Feb 02 2026 at 11:14):

I've implemented a draft at https://github.com/kim-em/verbose-lean4/blob/grind_strict/Verbose/Tactics/Grind.lean

grind_strict [h1, h2, some_theorem]

Let me know if this matches what you need, or if you'd like adjustments.

Kim Morrison (Feb 10 2026 at 21:52):

@Patrick Massot, just checking if this satisfies your needs or not.

Patrick Massot (Feb 11 2026 at 09:27):

Sorry I haven’t found time to investigate yet. I must confess the bot thing is very off-putting too.

Andrés Goens (Feb 15 2026 at 12:13):

you could also just depend on https://github.com/Komyyy/legacy-cc in Verbose Lean?

Miyahara Kō (Feb 15 2026 at 13:37):

As for me, it's fine temporarily, but if you can avoid the dependency, I can archive the repository and spend the maintenance time on other things.


Last updated: Feb 28 2026 at 14:05 UTC