Skip to content

feat: add a check for impossible arguments in instance definitions#13333

Open
wkrozowski wants to merge 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/impossibleInstance
Open

feat: add a check for impossible arguments in instance definitions#13333
wkrozowski wants to merge 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/impossibleInstance

Conversation

@wkrozowski
Copy link
Copy Markdown
Contributor

@wkrozowski wkrozowski commented Apr 8, 2026

This PR adds a check in addInstance that detects arguments which cannot be inferred by the instance synthesis algorithm. Specifically, it flags arguments that are not instance-implicit and do not appear in any subsequent instance-implicit argument or in the return type. Previously, such instances would be silently accepted but could never be synthesised.

@wkrozowski wkrozowski added the changelog-language Language features and metaprograms label Apr 8, 2026
@wkrozowski
Copy link
Copy Markdown
Contributor Author

!bench

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Apr 8, 2026

Benchmark results for ffa2210 against e44351a are in. Significant changes detected! @wkrozowski

  • 🟥 build exited with code 2
  • 🟥 other exited with code 2

No significant changes detected.

@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 Apr 8, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e44351add937efe4d286669ccd4c33023ca2e60e --onto 4f6bcc5adac8d6234a9e3def3675402cb89823c6. You can force Mathlib CI using the force-mathlib-ci label. (2026-04-08 17:08:10)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase e44351add937efe4d286669ccd4c33023ca2e60e --onto 861bc19e0c1c45b5766cc5c9ef0488568368b236. You can force reference manual CI using the force-manual-ci label. (2026-04-08 17:08:12)

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.

3 participants