Commit 2023-12-29 07:09 e04a464d
View on Github →style: use cases x with | ... instead of cases x; case => ... (#9321)
This converts usages of the pattern
cases h
case inl h' => ...
case inr h' => ...
which derive from mathported code, to the "structured cases" syntax:
cases h with
| inl h' => ...
| inr h' => ...
The case where the subgoals are handled with · instead of case is more contentious (and much more numerous) so I left those alone. This pattern also appears with cases', induction, induction', and rcases. Furthermore, there is a similar transformation for by_cases:
by_cases h : cond
case pos => ...
case neg => ...
is replaced by:
if h : cond then
...
else
...