Skip to content

chore: revert "fix: do not export realizations triggered only from proofs" - #15655

Merged
Kha merged 1 commit into
masterfrom
revert-15559-no-export-proof-realizations
Oct 13, 2026
Merged

Kha merged 1 commit into
masterfrom
revert-15559-no-export-proof-realizations

Conversation

@Kha

@Kha Kha commented Oct 13, 2026

Copy link
Copy Markdown
Member

Reverts #15559 until leanprover/downstream-lean4#161 is addressed

@Kha
Kha changed the base branch from push-srmmnwktrunw to master October 13, 2026 13:51
…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]>
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Oct 13, 2026
@Kha
Kha force-pushed the revert-15559-no-export-proof-realizations branch from 14ff63c to f37e29b Compare October 13, 2026 16:32
@Kha
Kha enabled auto-merge October 13, 2026 16:32
@Kha
Kha added this pull request to the merge queue Oct 13, 2026
@Garmelon Garmelon added the blocks-release-v4.36.0 Blocks the next v4.36.0 release candidate or release from being published. label Oct 13, 2026
Merged via the queue into master with commit daa5601 Oct 13, 2026
23 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocks-release-v4.36.0 Blocks the next v4.36.0 release candidate or release from being published. toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants