leanprover / leanprover/lean4

No `goalsAccomplished` message is produced for theorems generated using `elab`

Open
#15,044 1 comment 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

Prerequisites
Description

If I use elab to generate a theorem, Visual Studio Code does not display a checkmark in the left column when the theorem is proven.

The checkmark doesn't appear because Lean doesn't generate a goalsAccomplished message, which should happen in logGoalsAccomplishedSnapshotTask in Lean/Elab/MutalDef.lean.

Context

I originally pointed out this problem in a message on Lean Zulip.

Steps to Reproduce
import Lean
open Lean.Elab.Command

elab "bar" : command => do
  let c ← `(example: 0 = 0 := by trivial)
  elabCommand c

bar   -- no checkmark

Note that if a macro generates a theorem, a checkmark does appear as expected:

macro "foo" : command =>
  `(example: 0 = 0 := by trivial)

foo    -- checkmark appears in left column

Expected behavior:

A checkmark appears in the left column in VS Code, indicating that the theorem was proved.

Actual behavior:

There is no checkmark.

Versions

4.35.0 prerelease, built from git master at c155094f54eab345cca3da867dbd888a34fbf0d2

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 with the minimal examples in the issue and compare the macro-generated theorem with the theorem produced by elab. Read Lean/Elab/MutalDef.lean, especially logGoalsAccomplishedSnapshotTask, to trace why the goalsAccomplished message is missing. Done means the elab example produces a VS Code checkmark like the macro example.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.