Skip to content
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

rwa tactic behaviour doesn't match documentation #5792

Closed
Command-Master opened this issue Oct 21, 2024 · 2 comments · Fixed by #5811
Closed

rwa tactic behaviour doesn't match documentation #5792

Command-Master opened this issue Oct 21, 2024 · 2 comments · Fixed by #5811
Labels
bug Something isn't working

Comments

@Command-Master
Copy link
Contributor

Description

The documentation of rwa says "rwa calls rw, then closes any remaining goals using assumption.", but in fact rwa is a macro of rw $rws:rwRuleSeq $[$loc:location]?; assumption, and it only calls assumption once, on the first goal.
Either the documentation should be corrected, or the tactic definition should be modified to use all_goals assumption - I don't know what's the intended behavior.

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@Command-Master Command-Master added the bug Something isn't working label Oct 21, 2024
@nomeata
Copy link
Collaborator

nomeata commented Oct 21, 2024

Good question. I would assume the goal (heh) is to solve all side goals, i.e. all newly created goals, with assumption? Which I think we discussed elsewhere could actually benefit from it's own composable syntax. But I digress.

How important is this rwa tactic even? Does it pull it's weight in terms of things people need to know about, things that need to be documented etc?

@nomeata
Copy link
Collaborator

nomeata commented Oct 22, 2024

Looked at some uses in mathlib and core. There are certainly many! One idiom is rwa [foo] at h, presumably with the assumption (heh) that assumption will use h to close the goal. I’m not very fond of this fast-and-loose tactic (the assumption will happily use other hypotheses, and then the proof goes through when maybe it shouldn't have). But given that it’s heavily used, we can just update the docstring to match reality and move on.

nomeata added a commit that referenced this issue Oct 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 22, 2024
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this issue Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants