-
Notifications
You must be signed in to change notification settings - Fork 446
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
chore: rwa
tactic macro
#3299
chore: rwa
tactic macro
#3299
Conversation
This commit also allows the `rfl` tactic to be used as shorthand for `Iff.rfl` and `HEq.rfl`
Mathlib CI status (docs):
|
@@ -323,9 +323,14 @@ syntax (name := eqRefl) "eq_refl" : tactic | |||
`rfl` tries to close the current goal using reflexivity. | |||
This is supposed to be an extensible tactic and users can add their own support | |||
for new reflexive relations. | |||
|
|||
Remark: `rfl` is an extensible tactic. We later add `macro_rules` to try different | |||
reflexivity theorems (e.g., `Iff.rfl`). |
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.
“We later add” doesn't quite work well for a user facing docstring, does it?
/-- `rwa` calls `rw`, then closes any remaining goals using `assumption`. -/ | ||
macro "rwa " rws:rwRuleSeq loc:(location)? : tactic => | ||
`(tactic| (rw $rws:rwRuleSeq $[$loc:location]?; assumption)) | ||
|
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 docstring says “any goals” but the code looks like it will close exactly one goal. Should the docstring say “the remaining goal”?
has type | ||
?m ↔ ?m : Prop | ||
but is expected to have type | ||
b ≤ 2 : Prop |
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.
This seems to be a slight regression of error reporting, but for something so elementary as rfl
not irrelevant.
If macro rules are used, which tactic decides about the error message? Last or first? Can we somehow register a fail "trivial equality (or equivalence) expected"
or simply fail "rfl failed"
or something like this as the last tactic to try with rfl
?
No description provided.