-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tactic/rcases): clear pattern
-
in rcases (#3868)
This allows you to write: ```lean example (h : ∃ x : ℕ, true) : true := begin rcases h with ⟨x, -⟩, -- x : ℕ |- true end ``` to clear unwanted hypotheses. Note that dependents are also cleared, meaning that you can get into trouble if you try to keep matching when a variable later in the pattern is deleted. The `_` pattern will match a hypothesis even if it has been deleted, so this is the recommended way to match on variables dependent on a deleted hypothesis. You can use `-` if you prefer, but watch out for unintended variables getting deleted if there are duplicate names!
- Loading branch information
Showing
2 changed files
with
81 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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