leanprover / leanprover/lean4

Private proof materializes a public equation theorem

Open
#14,986 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

Prerequisites
Description

A case where changing only the proof of a private theorem changes the exported .olean.

Context

Zulip thread

Steps to Reproduce
module
@[expose] public def f : Nat → Nat
    | n => n
-- version 1
private theorem privateProof : f 0 = 0 := by rfl
-- version 2
private theorem privateProof : f 0 = 0 := by simp [f]

Expected behavior: [Clear and concise description of what you expect to happen]

Two versions give the same .olean file.

Actual behavior: [Clear and concise description of what actually happens]

The generated .olean files are different.

Versions

Tested on Lean 4.35.0-nightly-2026-09-01 and Lean 4.33.1.

Additional Information
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 with the minimal Lean reproducer in the issue and compare the generated .olean files for the two private theorem proofs. Trace how the public equation theorem is materialized during compilation; done when changing only that private proof produces identical exported .olean files.

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
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.