Last active
February 12, 2025 17:53
-
-
Save lovely-error/57fde7ec56d53f85a9c0a15e74e90c6a to your computer and use it in GitHub Desktop.
Rewriting exprs the way I like in lean
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
macro "rwi" pat:term "=>" new:term ":=" prf:term : tactic => | |
`(tactic| rewrite [let _eq : $pat = $new := $prf ; _eq ]) | |
macro "rwi" pat:term "=>" new:term "at" loc:Lean.Parser.Tactic.locationHyp ":=" prf:term : tactic => | |
`(tactic| rewrite [let _eq : $pat = $new := $prf ; _eq ] at $loc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment