leanprover-community / leanprover-community/lean

equation compiler error on "meta mutual def"

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
434
Forks
79
PR merge metrics
No merged PRs in 30d

Description

The equation compiler fails on mutual definitions that don't call each others, but only in meta lean.

--this works
mutual def f1, g1
with f1 : unit → unit
| () := ()
with g1 : unit → unit
| () := ()

--this works too
meta mutual def f2, g2
with f2 : unit → unit
| () := ()
with g2 : unit → unit
| () := f2 ()

--this doesn't:
--unexpected error, failed to generate equational lemmas in the front-end
meta mutual def f3, g3
with f3 : unit → unit
| () := ()
with g3 : unit → unit
| () := ()

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

The issue names no source file or test; start by reproducing the reported failure with the meta mutual def examples and trace the equation compiler path. Done means mutually defined functions that do not call each other compile successfully and their equational lemmas are generated without the front-end error.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.