-
Notifications
You must be signed in to change notification settings - Fork 24
feat: Simp, made simple #98
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
base: master
Are you sure you want to change the base?
feat: Simp, made simple #98
Conversation
5ed721a
to
2feca6c
Compare
This PR adds the first blog post in a series of three to introduce the concept of simprocs and explain how to write them. The second blog post can be found here: #98 Co-authored-by : Yaël Dillies <[email protected]>
Part 1 references this post, so maybe it can also be updated to have working links pointing here too. |
posts/simp-made-simple.md
Outdated
``` | ||
Note: The above snippet is a simplification and the constructors as shown actually belong to `Lean.TransformStep`, which `Lean.Meta.Simp.DStep` is an `abbrev` of. | ||
|
||
<span style="color:red">**(Yaël): Why is there a mismatch in docstrings between `Step.continue` and `DStep.continue`? [Zulip](https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Simp.2EStep.2Econtinue.20vs.20Simp.2EDStep.2Econtinue/with/509056271)**</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to remove this?
ed3714e
to
04f3d50
Compare
Co-authored-by: Paul Lezeau <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Bhavik Mehta <[email protected]>
Co-authored-by: Bhavik Mehta <[email protected]>
04f3d50
to
f7aa206
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for writing this
Co-authored-by: blizzard_inc <[email protected]>
For example, `simp [foo, -bar]` means "Simplify using the standard simp lemmas/simprocs except `bar`, with `foo` added". | ||
|
||
A perhaps surprising fact is that every simp lemma is internally turned into a simproc for `simp`'s consumption. | ||
From then on, we will refer to simp lemmas/simprocs as *procedures*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From then on, we will refer to simp lemmas/simprocs as *procedures*. | |
From now on, we will refer to simp lemmas/simprocs as *procedures*. |
posts/simp-made-simple.md
Outdated
``` | ||
|
||
`simp` does not consume bare elements of type `Simproc`. | ||
Instead, a simproc is an element of type `Simproc` annotated with tbe extra data mentioned in the overview subsection, like whether the simproc is `pre` or `post`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section on Step is great, and contains a lot of detail. These latter sections seem somewhat rushed and the ending of the blogpost feels abrupt to me.
For example, this sentence about annotations with extra data... could that be accompanied by a code block that shows exactly what is going on?
And would it make sense to give the exact definition of the simpM
monad, and add a bit more detail on it?
Maybe you could even end with a little cliff hanger about what will happen in the final blogpost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! I'm planning on spending some extra time adding stuff about SimpM
to the post this coming month.
Co-authored-by: Yaël Dillies <[email protected]>
This is the second part of #97.
Co-authored-by: Paul Lezeau [email protected]