leanprover / leanprover/lean4

`unsafe` term elaborator forces unassigned mvars early

Open
#6,237 0 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

#check let b := .true; (b : Bool)  -- works
#check let b := unsafe .true; (b : Bool)  -- "invalid dotted identifier notation"

This may very well be by design/unlikely to change as unsafe needs the nested term to elaborate fully before it can produce a result.

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 running the two #check examples in the issue and compare how the ordinary and unsafe terms elaborate. Trace the unsafe term elaborator to determine why unassigned metavariables are forced early. Done means either documenting the behavior as intentional or making the unsafe example elaborate successfully without the invalid dotted identifier error.

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
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.