-
Notifications
You must be signed in to change notification settings - Fork 432
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
refactor: cleanup simp
types and pre
and post
method semantics
#3210
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
label
Jan 23, 2024
Mathlib CI status (docs):
|
The |
leodemoura
force-pushed
the
simp_refactor
branch
from
January 24, 2024 01:31
3fae060
to
d2e1d59
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 24, 2024
leodemoura
force-pushed
the
simp_refactor
branch
from
January 30, 2024 02:45
d2e1d59
to
0a621c2
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jan 30, 2024
leanprover-community-mathlib4-bot
added
breaks-mathlib
This is not necessarily a blocker for merging: but there needs to be a plan
full-ci
labels
Jan 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jan 30, 2024
leodemoura
force-pushed
the
simp_refactor
branch
from
January 30, 2024 20:57
0a621c2
to
e68b154
Compare
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jan 30, 2024
leodemoura
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jan 30, 2024
kim-em
added a commit
to leanprover-community/aesop
that referenced
this pull request
Jan 31, 2024
This was referenced Jan 31, 2024
The command `register_simp_attr` now also declares a `simproc` set.
We don't need to keep passing `discharge?` method around anymore.
When we declare a `simp` set using `register_simp_attr`, we automatically create `simproc` set. However, users may create `simp` sets programmatically, and the associated `simproc` set may be missing and vice-versa.
kim-em
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Feb 1, 2024
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
Feb 1, 2024
kim-em
added a commit
to leanprover-community/aesop
that referenced
this pull request
Feb 1, 2024
Co-authored-by: Joachim Breitner <mail@joachim-breitner.de> Co-authored-by: Leonardo de Moura <leomoura@amazon.com> Co-authored-by: Jannis Limperg <jannis@limperg.de>
kim-em
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Feb 2, 2024
This is the adaptation PR for nightly-2024-02-01. It rolls in the branches * #9843, prepared by @mattrobball, which has the adaptations for leanprover/lean4#2478 * #10133, prepared by @semorrison, which has the adaptations for leanprover/lean4#3210 As these both landed in the same nightly, we're having to do the update in one go. Note this nightly is intended to become `v4.6.0-rc1` tomorrow. --- <!-- The text above the `---` will become the commit message when your PR is merged. Please leave a blank newline before the `---`, otherwise GitHub will format the text above it as a title. To indicate co-authors, include lines at the bottom of the commit message (that is, before the `---`) using the following format: Co-authored-by: Author Name <author@email.com> Any other comments you want to keep out of the PR commit should go below the `---`, and placed outside this HTML comment, or else they will be invisible to reviewers. If this PR depends on other PRs, please list them below this comment, using the following format: - [ ] depends on: #abc [optional extra text] - [ ] depends on: #xyz [optional extra text] --> [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/) --------- Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk> Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
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
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this commit,
Simproc
s were defined asExpr -> SimpM (Option Step)
, whereStep
is inductively defined as follows:Here,
Result
is a structure containing the resulting expression and a proof demonstrating its equality to the input. Notably, the proof is optional; in its absence,simp
assumes reflexivity.A simproc can:
none
, indicating its inapplicability. In this case, the next suitable simproc is attempted, along with other simp extensions..visit
constructor. This action returns control to the beginning of the
simplification loop.
simplifications. However, I find the current approach unsatisfactory, as it does not align with the methodology employed in
Transform.lean
, where we have the type:This type makes it clearer what is going on. The new
Simp.Step
type is similar but useResult
instead ofExpr
because we need a proof.Other modifications:
pre
andpost
methods have now typeSimproc
.simprocs
field atMethods
was deleted.andThen
combinator forSimproc
.simpLoop
semantics.Todo: cleanup
reduceStep
.Recording adapation PRs here:
simp
refactor leanprover-community/batteries#571 (working)