leanprover / leanprover/lean4

Adding `grind` annotation to Mathlib causes `PANIC at Lean.Meta.Grind.mkEqProofImpl … assertion violation`

Open
#12,479 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Description

Adding grind annotation as described below causes PANIC at Lean.Meta.Grind.mkEqProofImpl … assertion violation.

Steps to Reproduce
  1. Check out current master of Mathlib (currently at fd6add7853cc74a9c9937eb0c3e0eac905c6fa38).
  2. Open Mathlib/CategoryTheory/EqToHom.lean and change from @[simp] to @[simp, grind =] for theorem eqToHom_refl.
  3. Run lake build Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean
  4. Experience PANIC: info: Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean:107:0: PANIC at Lean.Meta.Grind.mkEqProofImpl Lean.Meta.Tactic.Grind.Proof:336:2: assertion violation: ( __do_lift._@.Lean.Meta.Tactic.Grind.Proof.911332591._hygCtx._hyg.11.0 )

Expected behavior: No PANIC.

Actual behavior: PANIC.

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with lake build Mathlib/AlgebraicTopology/DoldKan/Homotopies.lean after changing Mathlib/CategoryTheory/EqToHom.lean as described. Inspect the reported Lean.Meta.Grind.mkEqProofImpl assertion path; done means the grind annotation no longer causes a PANIC during that build.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.