-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathExtScript.lean
103 lines (91 loc) · 1.99 KB
/
ExtScript.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/-
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
@[ext]
structure MyProd (α β : Type _) where
fst : α
snd : β
variable {α β γ δ ι: Type}
/--
info: Try this:
ext : 1
· sorry
· sorry
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
example {p q : MyProd α β} : p = q := by
aesop? (add safe Aesop.BuiltinRules.ext)
(config := { warnOnNonterminal := false })
all_goals sorry
/--
info: Try this:
ext : 1
· sorry
· ext : 1
· sorry
· sorry
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
example {p q : MyProd α (MyProd β γ)} : p = q := by
aesop? (add safe Aesop.BuiltinRules.ext)
(config := { warnOnNonterminal := false })
all_goals sorry
/--
info: Try this:
ext : 1
· ext x : 1
sorry
· sorry
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
example {p q : MyProd (α → β) γ} : p = q := by
aesop? (add safe Aesop.BuiltinRules.ext)
(config := { warnOnNonterminal := false })
all_goals sorry
/--
info: Try this:
ext : 1
· ext x : 1
sorry
· ext x x_1 : 2
sorry
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
example {p q : (α → β) × (γ → δ → ι)} : p = q := by
aesop? (add safe Aesop.BuiltinRules.ext)
(erase Aesop.BuiltinRules.destructProducts)
(config := { warnOnNonterminal := false })
all_goals sorry
-- This test case checks script generation for ext calls which generate subgoals
-- with different numbers of new hypotheses.
axiom T : Type
axiom U : Type
axiom u : U
axiom v : U
@[ext (iff := false)]
axiom T_ext : ∀ x y : T, u = v → (∀ u v : U, u = v) → x = y
/--
info: Try this:
ext u v : 1
· sorry
· sorry
---
warning: declaration uses 'sorry'
-/
#guard_msgs in
example (x y : T) : x = y := by
aesop? (add safe Aesop.BuiltinRules.ext)
(config := { warnOnNonterminal := false })
all_goals sorry