leanprover / leanprover/lean4

Mark definitions in a `noncomputable section` that fail to compile with `noncomputable` attribute

Open
#9,021 1 comment 0 reactions 1 assignee View on GitHub

@zwarich is already working on this.

Since Jun 27, 2025.

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

Description

Currently, definitions in a noncomputable section that fail to compile do not get marked with noncomputable. The current check for noncomputable in the toMono pass checks for the attribute, but there is a second check in the IR phase for definitions without any IR. This still catches most issues, but it is possible for the use of a noncomputable definition to be erroneously optimized away between these two checks.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.