refactor: cleanup simp types and pre and post method semantics#3210
Merged
refactor: cleanup simp types and pre and post method semantics#3210
simp types and pre and post method semantics#3210Conversation
|
Mathlib CI status (docs):
|
Member
Author
|
The |
3fae060 to
d2e1d59
Compare
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 24, 2024
d2e1d59 to
0a621c2
Compare
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
ghost
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jan 30, 2024
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
ghost
pushed a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jan 30, 2024
0a621c2 to
e68b154
Compare
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
ghost
pushed 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
ghost
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Jan 30, 2024
ghost
pushed 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
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] --> [](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>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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,
Simprocs were defined asExpr -> SimpM (Option Step), whereStepis inductively defined as follows:Here,
Resultis a structure containing the resulting expression and a proof demonstrating its equality to the input. Notably, the proof is optional; in its absence,simpassumes reflexivity.A simproc can:
none, indicating its inapplicability. In this case, the next suitable simproc is attempted, along with other simp extensions..visitconstructor. 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.Steptype is similar but useResultinstead ofExprbecause we need a proof.Other modifications:
preandpostmethods have now typeSimproc.simprocsfield atMethodswas deleted.andThencombinator forSimproc.simpLoopsemantics.Todo: cleanup
reduceStep.Recording adapation PRs here:
simprefactor leanprover-community/batteries#571 (working)