8000 fix: strip optional parameters when elaborating the termination hints by wkrozowski · Pull Request #7335 · leanprover/lean4 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: strip optional parameters when elaborating the termination hints #7335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

wkrozowski
Copy link
Contributor
@wkrozowski wkrozowski commented Mar 4, 2025

This PR modifies elabTerminationByHints in a way that the type of the recursive function used for elaboration of the termination measure is striped of from optional parameters. It prevents introducing dependencies between the default values for arguments, that can cause the termination checker to fail.

Closes #6351.

@wkrozowski wkrozowski closed this Mar 4, 2025
@wkrozowski wkrozowski reopened this Mar 4, 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 Mar 4, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Mar 4, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 4, 2025
Copy link
Collaborator
@nomeata nomeata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it wouldn’t be more natural to pass (cleanupAnnotations := true) to the forallBoundedTelescopes within TerminationMeasure.elab

@leanprover-community-bot
Copy link
Collaborator
leanprover-community-bot commented Mar 4, 2025

Mathlib CI status (docs):

@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Mar 4, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Mar 4, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 4, 2025
@wkrozowski wkrozowski added the changelog-language Language features, tactics, and metaprograms label Mar 5, 2025
@wkrozowski wkrozowski added this pull request to the merge queue Mar 5, 2025
@nomeata nomeata removed this pull request from the merge queue due to a manual request Mar 5, 2025
@nomeata
Copy link
Collaborator
nomeata commented Mar 5, 2025

Before this gets merged – did you see my review comment

I wonder if it wouldn’t be more natural to pass (cleanupAnnotations := true) to the forallBoundedTelescopes within TerminationMeasure.elab

Also, this should come with a test case so that we don’t break it again. Just drop a suitable file in tests/lean/run/issue6351.lean.

leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Mar 5, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 5, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Mar 5, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Mar 5, 2025
@wkrozowski wkrozowski added this pull request to the merge queue Mar 5, 2025
Merged via the queue into leanprover:master with commit 2c8fb9d Mar 5, 2025
15 checks passed
@wkrozowski wkrozowski deleted the wojciech/optional_args_fix branch March 5, 2025 19:04
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, tactics, 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.

Termination proof failure in the presence of default arguments
3 participants
0