Skip to content
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

feat: per-function termination hints #3040

Merged
merged 3 commits into from
Jan 10, 2024
Merged

feat: per-function termination hints #3040

merged 3 commits into from
Jan 10, 2024

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Dec 8, 2023

This change

  • moves termination_by and decreasing_by next to the function they apply to
  • simplify the syntax of termination_by
  • apply the decreasing_by goal to all goals at once, for better interactive use.

See the section in RELEASES.md for more details and migration advise.

This is a hard breaking change, requiring developers to touch every termination_by in their code base. We decided to still do it as a hard-breaking change, because supporting both old and new syntax at the same time would be non-trivial, and not save that much. Moreover, this requires changes to some metaprograms that developers might have written, and supporting both syntaxes at the same time would make their migration harder.

Std and mathlib updates are prepared at

Fixes #2921 and #3081.

@nomeata nomeata changed the title joachim/per function hints feat: Per-function termination hints Dec 8, 2023
@nomeata nomeata changed the title feat: Per-function termination hints feat: per-function termination hints Dec 8, 2023
@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 Dec 8, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 8, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Dec 8, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Dec 8, 2023

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 8, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 9, 2023
@nomeata nomeata force-pushed the joachim/per-function-hints branch from 6cd5349 to 31d5ba7 Compare December 11, 2023 11:57
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 11, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 11, 2023
nomeata added a commit to nomeata/batteries that referenced this pull request Dec 13, 2023
this makes the necessary changes to compile with the `termination_by`
syntax refactoring in leanprover/lean4#3040
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 13, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Dec 13, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 13, 2023
nomeata added a commit that referenced this pull request Dec 15, 2023
src/Lean/Elab/DefView.lean Outdated Show resolved Hide resolved
github-merge-queue bot pushed a commit that referenced this pull request Dec 18, 2023
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Dec 20, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan and removed builds-mathlib CI has verified that Mathlib builds against this PR labels Dec 20, 2023
src/Lean/Elab/PreDefinition/WF/GuessLex.lean Outdated Show resolved Hide resolved
src/Lean/Elab/PreDefinition/WF/GuessLex.lean Show resolved Hide resolved
src/Lean/Elab/PreDefinition/WF/GuessLex.lean Show resolved Hide resolved
@kim-em kim-em added awaiting-author Waiting for PR author to address issues and removed will-merge-soon …unless someone speaks up labels Jan 8, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 8, 2024 10:29 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2024
@nomeata nomeata force-pushed the joachim/per-function-hints branch from 8278b00 to f2bc037 Compare January 8, 2024 11:30
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 8, 2024 12:22 Inactive
@nomeata nomeata added will-merge-soon …unless someone speaks up and removed awaiting-author Waiting for PR author to address issues labels Jan 8, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 8, 2024
@nomeata nomeata force-pushed the joachim/per-function-hints branch from f2bc037 to 77da1f2 Compare January 9, 2024 09:46
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 9, 2024 10:30 Inactive
@nomeata nomeata force-pushed the joachim/per-function-hints branch 2 times, most recently from 44db469 to 6818314 Compare January 9, 2024 14:48
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 9, 2024 15:31 Inactive
@nomeata nomeata force-pushed the joachim/per-function-hints branch from 6818314 to 1e4eefb Compare January 10, 2024 14:58
This change

 * moves `termination_by` and `decreasing_by` next to the function they
   apply to
 * simplify the syntax of `termination_by`
 * apply the `decreasing_by` goal to all goals at once, for better
   interactive use.

See the section in `RELEASES.md` for more details and migration advise.

This is a hard breaking change, requiring developers to touch every
`termination_by` in their code base. We decided to still do it as a
hard-breaking change, because supporting both old and new syntax at the
same time would be non-trivial, and not save that much. Moreover, this
requires changes to some metaprograms that developers might have
written, and supporting both syntaxes at the same time would make
_their_ migration harder.
@nomeata nomeata force-pushed the joachim/per-function-hints branch from 1e4eefb to b93cd98 Compare January 10, 2024 14:59
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc January 10, 2024 15:40 Inactive
@Kha Kha merged commit 368ead5 into master Jan 10, 2024
20 checks passed
@nomeata nomeata deleted the joachim/per-function-hints branch January 10, 2024 16:28
kim-em added a commit to leanprover-community/aesop that referenced this pull request Jan 13, 2024
kim-em added a commit to leanprover-community/aesop that referenced this pull request Jan 13, 2024
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 language Lean language issue or PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN will-merge-soon …unless someone speaks up
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: Run decreasing_by tactic on all goals, not each goal
8 participants