Skip to content

fix: reuse the instances of a non-exposed definition in inferInstanceAs - #15216

Merged
Kha merged 2 commits into
leanprover:masterfrom
gasparattila:inferInstanceAs-reuse-fix
Sep 22, 2026
Merged

Kha merged 2 commits into
leanprover:masterfrom
gasparattila:inferInstanceAs-reuse-fix

Conversation

@gasparattila

Copy link
Copy Markdown
Contributor

This PR makes inferInstanceAs reuse the existing instances of a non-exposed definition. This is done by checking the reusability of an instance in the private scope, as neither the auxiliary definitions being generated nor the ones in the existing instance are exposed in this case.

Closes #14470.

…eAs`

This PR makes `inferInstanceAs` reuse the existing instances of a non-exposed definition. This is done by checking the reusability of an instance in the private scope, as neither the auxiliary definitions being generated nor the ones in the existing instance are exposed in this case.

Closes leanprover#14470.
@gasparattila

Copy link
Copy Markdown
Contributor Author

changelog-language

@github-actions github-actions Bot added the changelog-language Language features and metaprograms label Sep 18, 2026
@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 Sep 18, 2026
@Kha
Kha added this pull request to the merge queue Sep 22, 2026
Merged via the queue into leanprover:master with commit 0888335 Sep 22, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-language Language features and metaprograms 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.

inferInstanceAs does not reuse existing instances of a non-exposed definition

2 participants