-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for `let_fun` to the `intro` and `intros` tactics. Also adds support to `intro` for anonymous binder names, since the default variable name for a `letFun` with an eta reduced body is anonymous.
- Loading branch information
Showing
2 changed files
with
62 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Lean.Elab.Tactic.Basic | ||
import Lean.Meta.Tactic.Intro | ||
/-! | ||
# Testing `intro` with `letFun` | ||
-/ | ||
|
||
/-! | ||
Explicit `intro`. | ||
-/ | ||
example : have x := 2; ∀ _ : Nat, x = x := by | ||
intro x _ | ||
rfl | ||
|
||
/-! | ||
`intros` is aware of `letFun`. | ||
-/ | ||
example : have x := 2; ∀ _ : Nat, x = x := by | ||
intros | ||
rfl | ||
|
||
/-! | ||
Check that it works for `letFun` with an eta reduced argument. | ||
-/ | ||
example (p : Nat → Prop) (h : ∀ x, p x) : letFun 2 p := by | ||
intro | ||
apply h |