Skip to content

Conversation

@kmill
Copy link
Collaborator

@kmill kmill commented Sep 29, 2025

This PR fixes an issue reported on Zulip where abstractMVars (which is used in typeclass inference and simp argument elaboration) was not instantiating metavariables in the types of metavariables, causing it to abstract already-assigned metavariables.

This also eliminates an unnecessary instantiateMVars and documents the invariant that the argument to abstractExprMVars must have its metavariables already instantiated.

This PR fixes an issue reported [on Zulip](https://leanprover.zulipchat.com/#narrow/channel/239415-metaprogramming-.2F-tactics/topic/.60abstractMVars.60.20not.20instantiating.20level.20mvars/near/541918246) where `abstractMVars` (which is used in typeclass inference and `simp` argument elaboration) was not instantiating metavariables in the types of metavariables, causing it to abstract already-assigned metavariables.
@kmill kmill added the changelog-language Language features and metaprograms label Sep 29, 2025
@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 29, 2025
@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2025-09-24 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2025-09-29 13:00:32)

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Sep 29, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Sep 29, 2025
@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Sep 29, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@kmill
Copy link
Collaborator Author

kmill commented Sep 29, 2025

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit c208f29.
There were no significant changes against commit ac0b829.

@kmill kmill added this pull request to the merge queue Sep 29, 2025
Merged via the queue into leanprover:master with commit 356d1f6 Sep 29, 2025
27 checks passed
arthur-adjedj pushed a commit to arthur-adjedj/lean4 that referenced this pull request Oct 6, 2025
…#10612)

This PR fixes an issue reported [on
Zulip](https://leanprover.zulipchat.com/#narrow/channel/239415-metaprogramming-.2F-tactics/topic/.60abstractMVars.60.20not.20instantiating.20level.20mvars/near/541918246)
where `abstractMVars` (which is used in typeclass inference and `simp`
argument elaboration) was not instantiating metavariables in the types
of metavariables, causing it to abstract already-assigned metavariables.

This also eliminates an unnecessary `instantiateMVars` and documents the
invariant that the argument to `abstractExprMVars` must have its
metavariables already instantiated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR 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.

3 participants