This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(library/tactic/simplify): add
simp!
- Loading branch information
1 parent
91b9e96
commit 368f17d
Showing
9 changed files
with
70 additions
and
12 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
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
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
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
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,29 @@ | ||
def f {α : Type} (a : α) : α := | ||
a | ||
|
||
example (a : nat) (h : a = 3) : [1,2].map nat.succ = [2, f a] := | ||
begin | ||
simp!, | ||
guard_target nat.succ 2 = f a, | ||
simp [f, h] | ||
end | ||
|
||
def foo : bool → bool → bool | ||
| tt tt := tt | ||
| ff ff := tt | ||
| _ _ := ff | ||
|
||
example : foo tt tt = f tt := | ||
begin | ||
simp!, | ||
guard_target tt = f tt, | ||
simp [f] | ||
end | ||
|
||
example (b : bool) (h : b = tt) : foo b tt = f tt := | ||
begin | ||
fail_if_success { simp! }, | ||
simp! [h], | ||
guard_target tt = f tt, | ||
simp [f] | ||
end |