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: Simp.Config.implicitDefEqProofs #4595

Merged
merged 13 commits into from
Nov 29, 2024
Merged

feat: Simp.Config.implicitDefEqProofs #4595

merged 13 commits into from
Nov 29, 2024

Conversation

leodemoura
Copy link
Member

@leodemoura leodemoura commented Jun 30, 2024

This PR implements Simp.Config.implicitDefEqsProofs. When true (default: true), simp will not create a proof term for a rewriting rule associated with an rfl-theorem. Rewriting rules are provided by users by annotating theorems with the attribute @[simp]. If the proof of the theorem is just rfl (reflexivity), and implicitDefEqProofs := true, simp will not create a proof term which is an application of the annotated theorem.

The default setting does change the existing behavior. Users can use simp -implicitDefEqProofs to force simp to create a proof term for rfl-theorems. This can positively impact proof checking time in the kernel.

This PR also fixes an issue in the split tactic that has been exposed by this feature. It was looking for split candidates in proofs and implicit arguments. See new test for issue exposed by the previous feature.

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc June 30, 2024 23:39 Inactive
@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 Jun 30, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jun 30, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jun 30, 2024
@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 release-ci Enable all CI checks for a PR, like is done for releases labels Jun 30, 2024
@leanprover-community-mathlib4-bot
Copy link
Collaborator

leanprover-community-mathlib4-bot commented Jun 30, 2024

Mathlib CI status (docs):

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc July 1, 2024 00:11 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jul 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jul 1, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc July 1, 2024 19:23 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jul 1, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jul 1, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc July 2, 2024 01:15 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jul 2, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jul 2, 2024
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Jul 11, 2024
(With leanprover/lean4#4595, `aesop` goes astray here, and this proof is better anyway.)
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Jul 11, 2024
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Jul 11, 2024
kim-em added a commit that referenced this pull request Jul 16, 2024
leodemoura added a commit that referenced this pull request Jul 18, 2024
Motivation: unblock PR #4595
`Simp.Config.implicitDefEqProofs := false` is currently creating too
many issues in Mathlib.
github-merge-queue bot pushed a commit that referenced this pull request Jul 18, 2024
Motivation: unblock PR #4595
`Simp.Config.implicitDefEqProofs := false` is currently creating too
many issues in Mathlib.
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc July 19, 2024 15:24 Inactive
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 29, 2024 01:56 Inactive
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Nov 29, 2024

Mathlib CI status (docs):

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 29, 2024 03:27 Inactive
@kim-em kim-em removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN labels Nov 29, 2024
@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 Nov 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 29, 2024
@leanprover-community-bot leanprover-community-bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Nov 29, 2024
@kim-em kim-em removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN labels Nov 29, 2024
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 29, 2024 06:03 Inactive
@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 Nov 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 29, 2024
@leanprover-community-bot leanprover-community-bot added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan 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 Nov 29, 2024
We want to overhead of processing every single partial application.
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc November 29, 2024 20:51 Inactive
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Nov 29, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 29, 2024
@leodemoura leodemoura added this pull request to the merge queue Nov 29, 2024
Merged via the queue into master with commit 27df5e9 Nov 29, 2024
24 checks passed
JovanGerb pushed a commit to JovanGerb/lean4 that referenced this pull request Jan 21, 2025
This PR implements `Simp.Config.implicitDefEqsProofs`. When `true`
(default: `true`), `simp` will **not** create a proof term for a
rewriting rule associated with an `rfl`-theorem. Rewriting rules are
provided by users by annotating theorems with the attribute `@[simp]`.
If the proof of the theorem is just `rfl` (reflexivity), and
`implicitDefEqProofs := true`, `simp` will **not** create a proof term
which is an application of the annotated theorem.

The default setting does change the existing behavior. Users can use
`simp -implicitDefEqProofs` to force `simp` to create a proof term for
`rfl`-theorems. This can positively impact proof checking time in the
kernel.

This PR also fixes an issue in the `split` tactic that has been exposed
by this feature. It was looking for `split` candidates in proofs and
implicit arguments. See new test for issue exposed by the previous
feature.

---------

Co-authored-by: Kim Morrison <kim@tqft.net>
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 release-ci Enable all CI checks for a PR, like is done for releases 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.

5 participants