Repository navigation
chore: revert "fix: do not export realizations triggered only from proofs" - #15655
Merged
Merged
Conversation
…oofs (#15559)" This PR reverts #15559, which stopped a `module` from exporting constants such as `foo.eq_1` when they were realized only inside a proof. Tactics whose behavior depends on whether such a constant already exists changed behavior in importing modules as a result: `unfold f` on a non-recursive `f` rewrites with `f.eq_def` and reduces the resulting matcher application only if that theorem is visible, so proofs relying on an upstream `fun_cases f` having realized it broke, such as `Batteries.Data.Float.Lemmas.pack_unpack`. The change can be reapplied once `unfold` no longer depends on the visibility of `eq_def`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Kha
force-pushed
the
revert-15559-no-export-proof-realizations
branch
from
October 13, 2026 16:32
14ff63c to
f37e29b
Compare
Kha
enabled auto-merge
October 13, 2026 16:32
3 tasks done
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
(it does not include leanprover/lean4#15655 and this leads to failures e.g. in Batteries)
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
(it does not include leanprover/lean4#15655 and this leads to failures e.g. in Batteries)
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
(it does not include leanprover/lean4#15655 and this leads to failures e.g. in Batteries)
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 15, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 16, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For -rc2 at least, we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 16, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 17, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 17, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 18, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655).
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 19, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655). Also, make the cadical' buildInput overridable.
Rob23oba
pushed a commit
to Rob23oba/lean4
that referenced
this pull request
Nov 20, 2026
…r#16623) This PR stops a `module` from exporting constants such as `foo.eq_1` when they were realized only inside a proof, so that such proofs no longer trigger downstream rebuilds. Importing modules realize these constants again on demand. Previously, such a constant reached the exported `.olean` through the `allRealizations` fallback of `Environment.find?`, which returns the private constant info, so the theorem was exported together with its proof. `mkModuleData` and the exported-level filters of attributes, instances, matcher info, `MapDeclarationExtension`s, and the axiom extension now consider only constants known on the main environment branch. This re-applies leanprover#15559, which was reverted in leanprover#15655 because `unfold` on non-recursive definitions depended on the visibility of `eq_def`. Co-authored-by: Claude Opus 5.5 <[email protected]>
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 23, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655). Also, make the cadical' buildInput overridable.
alejo7797
added a commit
to alejo7797/nixpkgs
that referenced
this pull request
Nov 23, 2026
libcadical.a is now statically linked into libleanshared.so. Upstream builds libcadical.a with -fvisibility=hidden to avoid re-exporting its symbols. We can achieve the same result with suitable linker flags. For this release, it seems that we are forced to build up to stage2 to get around an issue with the checked-in stage0 (it does not include this revert: leanprover/lean4#15655). Also, make the cadical' buildInput overridable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #15559 until leanprover/downstream-lean4#161 is addressed