-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathErase.lean
53 lines (40 loc) · 1.2 KB
/
Erase.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/-
Copyright (c) 2022 Jannis Limperg. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jannis Limperg
-/
import Aesop
set_option aesop.check.all true
set_option aesop.smallErrorMessages true
@[aesop [10% cases, safe constructors]]
inductive Even : Nat → Prop
| zero : Even 0
| plus_two : Even n → Even (n + 2)
example : Even 2 := by
aesop
-- Removing the Aesop attribute erases all rules associated with the identifier
-- from all rule sets.
attribute [-aesop] Even
/--
error: tactic 'aesop' failed, failed to prove the goal after exhaustive search.
-/
#guard_msgs in
example : Even 2 := by
aesop (config := { terminal := true })
example : Even 2 := by
aesop (add safe Even)
-- We can also selectively remove rules in a certain phase or with a certain
-- builder.
attribute [aesop [unsafe 10% cases, safe constructors]] Even
erase_aesop_rules [ unsafe Even ]
example : Even 2 := by
aesop
erase_aesop_rules [ constructors Even ]
/--
error: tactic 'aesop' failed, failed to prove the goal after exhaustive search.
-/
#guard_msgs in
example : Even 2 := by
aesop (config := { terminal := true })
example : Even 2 := by
aesop (add safe constructors Even)