-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathCompositeLocalRuleTerm.lean
49 lines (37 loc) · 1.18 KB
/
CompositeLocalRuleTerm.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
/-
Copyright (c) 2024 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
-- Composite terms are supported by the `apply` and `forward` builders...
structure A where
/--
error: tactic 'aesop' failed, made no progress
-/
#guard_msgs in
example (h : A → β → γ) (b : β) : γ := by
aesop
example (h : A → β → γ) (b : β) : γ := by
aesop (add safe apply (h {}))
example (h : A → β → γ) (b : β) : γ := by
aesop (add safe forward (h {}))
-- ... and also by the `simp` builder.
/--
error: tactic 'aesop' failed, made no progress
-/
#guard_msgs in
example {P : α → Prop} (h : A → x = y) (p : P x) : P y := by
aesop
example {P : α → Prop} (h : A → x = y) (p : P x) : P y := by
aesop (add simp (h {}))
/--
error: tactic 'aesop' failed, made no progress
-/
#guard_msgs in
example {P : α → Prop} (h₁ : A → x = y) (h₂ : A → y = z) (p : P x) : P z := by
aesop
example {P : α → Prop} (h₁ : A → x = y) (h₂ : A → y = z) (p : P x) : P z := by
aesop (add simp [(h₁ {}), (h₂ {})])