-
Notifications
You must be signed in to change notification settings - Fork 80
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): load options on simplifier entry (#456)
This allows the creation of a `simp?` tactic that locally enables the `simplify.trace.rewrite` option.
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 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,15 @@ | ||
-- Options (particularly trace options) are refreshed | ||
-- upon entry to the simplifier. | ||
|
||
example {p : Prop} (h : p) : p := | ||
begin | ||
have h₁ : true = true := rfl, | ||
have h₂ : true = true := rfl, | ||
have h₃ : true = true := rfl, | ||
simp at h₁, | ||
tactic.set_bool_option `trace.simplify.rewrite tt, | ||
simp at h₂, | ||
tactic.set_bool_option `pp.all tt, | ||
simp at h₃, | ||
exact h | ||
end |
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,2 @@ | ||
0. [simplify.rewrite] [eq_self_iff_true]: true = true ==> true | ||
0. [simplify.rewrite] [eq_self_iff_true]: @eq.{1} Prop true true ==> true |