239 lines
7.2 KiB
Text
239 lines
7.2 KiB
Text
[grind.assert] a = 3
|
|
[grind.assert] b = 3
|
|
[grind.assert] ¬a = b
|
|
[grind.eqc] f a = [1, 2]
|
|
[grind.eqc] f b = []
|
|
[grind.eqc] a = b
|
|
[grind.eqc] f a = f b
|
|
[grind.split] match x with
|
|
| 0 => 1
|
|
| n.succ => 2, generation: 0
|
|
grind_guide.lean:60:2-60:21: error: `grind` failed
|
|
case grind
|
|
x : Nat
|
|
x✝ :
|
|
(match x with
|
|
| 0 => 1
|
|
| n.succ => 2) =
|
|
0
|
|
⊢ False
|
|
[grind] Diagnostics
|
|
[facts] Asserted facts
|
|
[prop] (match x with
|
|
| 0 => 1
|
|
| n.succ => 2) =
|
|
0
|
|
[eqc] Equivalence classes
|
|
[eqc] {match x with
|
|
| 0 => 1
|
|
| n.succ => 2,
|
|
0}
|
|
[ematch] E-matching patterns
|
|
[thm] _example.match_1.eq_1: [_example.match_1 #2 `[0] #1 #0]
|
|
[thm] _example.match_1.eq_2: [_example.match_1 #3 (#2 + 1) #1 #0]
|
|
[limits] Thresholds reached
|
|
[limit] maximum number of case-splits has been reached, threshold: `(splits := 0)`
|
|
grind_guide.lean:68:2-68:7: error: `grind` failed
|
|
case grind.1
|
|
x : Nat
|
|
x✝ :
|
|
(match x with
|
|
| 0 => 1
|
|
| n.succ => 2) ≤
|
|
1
|
|
h : x = 0
|
|
⊢ False
|
|
[grind] Diagnostics
|
|
[facts] Asserted facts
|
|
[prop] (match x with
|
|
| 0 => 1
|
|
| n.succ => 2) ≤
|
|
1
|
|
[prop] x = 0
|
|
[prop] (match 0 with
|
|
| 0 => 1
|
|
| n.succ => 2) =
|
|
1
|
|
[eqc] True propositions
|
|
[prop] (match x with
|
|
| 0 => 1
|
|
| n.succ => 2) ≤
|
|
1
|
|
[prop] (match 0 with
|
|
| 0 => 1
|
|
| n.succ => 2) =
|
|
1
|
|
[eqc] Equivalence classes
|
|
[eqc] {match 0 with
|
|
| 0 => 1
|
|
| n.succ => 2,
|
|
match x with
|
|
| 0 => 1
|
|
| n.succ => 2,
|
|
1}
|
|
[eqc] {x, 0}
|
|
[cases] Case analyses
|
|
[cases] [1/2]: match x with
|
|
| 0 => 1
|
|
| n.succ => 2
|
|
[ematch] E-matching patterns
|
|
[thm] _example.match_1.eq_1: [_example.match_1 #2 `[0] #1 #0]
|
|
[thm] _example.match_1.eq_2: [_example.match_1 #3 (#2 + 1) #1 #0]
|
|
[offset] Assignment satisfying offset contraints
|
|
[assign] match x with
|
|
| 0 => 1
|
|
| n.succ => 2 := 1
|
|
[grind] Issues
|
|
[issue] #1 other goal(s) were not fully processed due to previous failures, threshold: `(failures := 1)`
|
|
[grind] Counters
|
|
[thm] E-Matching instances
|
|
[thm] _example.match_1.eq_1 ↦ 1
|
|
grind_guide.lean:82:19-82:21: warning: declaration uses 'sorry'
|
|
[grind.assert] f a = b
|
|
[grind.assert] a = g c
|
|
[grind.assert] ¬b = c
|
|
[grind.ematch.instance] fg: f (g c) = c
|
|
[grind.assert] f (g c) = c
|
|
grind_guide.lean:100:19-100:25: warning: declaration uses 'sorry'
|
|
grind_guide.lean:101:19-101:24: warning: declaration uses 'sorry'
|
|
[grind.assert] R a b
|
|
[grind.assert] R c b
|
|
[grind.assert] R d c
|
|
[grind.assert] ¬R a d
|
|
[grind.assert] R a d → R d a
|
|
[grind.assert] R d c → R c d
|
|
[grind.assert] R c b → R b c
|
|
[grind.assert] R a b → R b a
|
|
[grind.assert] R a d → R d c → R a c
|
|
[grind.assert] R d c → R c b → R d b
|
|
[grind.assert] R d b → R b d
|
|
[grind.assert] R a c → R c a
|
|
[grind.assert] R b a → R a b
|
|
[grind.assert] R b c → R c b
|
|
[grind.assert] R c d → R d c
|
|
[grind.assert] R d a → R a d
|
|
[grind.assert] R d b → R b c → R d c
|
|
[grind.assert] R d b → R b a → R d a
|
|
grind_guide.lean:114:8-114:14: warning: declaration uses 'sorry'
|
|
[grind.assert] bla a = b
|
|
[grind.assert] ¬bla b = b
|
|
[grind.assert] bla (bla a) = bla a
|
|
grind_guide.lean:137:20-137:30: warning: declaration uses 'sorry'
|
|
grind_guide.lean:144:2-144:12: error: `grind` failed
|
|
case grind
|
|
a b c d : Nat
|
|
a✝² : R a b
|
|
a✝¹ : R c b
|
|
a✝ : R d c
|
|
x✝ : ¬R a d
|
|
⊢ False
|
|
[grind] Diagnostics
|
|
[facts] Asserted facts
|
|
[prop] R a b
|
|
[prop] R c b
|
|
[prop] R d c
|
|
[prop] ¬R a d
|
|
[eqc] True propositions
|
|
[prop] R a b
|
|
[prop] R c b
|
|
[prop] R d c
|
|
[eqc] False propositions
|
|
[prop] R a d
|
|
Try this: grind only [→ Rtrans, → Rsymm]
|
|
[grind] Counters
|
|
[thm] E-Matching instances
|
|
[thm] Array.get_set_ne ↦ 3
|
|
[thm] Array.size_set ↦ 3
|
|
[diag] Diagnostics
|
|
[reduction] unfolded declarations (max: 76, num: 3):
|
|
[reduction] getElem ↦ 76
|
|
[reduction] LT.lt ↦ 47
|
|
[reduction] Nat.lt ↦ 35
|
|
[reduction] unfolded instances (max: 38, num: 1):
|
|
[reduction] Array.instGetElemNatLtSize ↦ 38
|
|
[reduction] unfolded reducible declarations (max: 351, num: 7):
|
|
[reduction] Array.size ↦ 351
|
|
[reduction] Array.toList ↦ 212
|
|
[reduction] outParam ↦ 172
|
|
[reduction] Ne ↦ 60
|
|
[reduction] GT.gt ↦ 46
|
|
[reduction] autoParam ↦ 39
|
|
[reduction] List.casesOn ↦ 24
|
|
[kernel] unfolded declarations (max: 106, num: 5):
|
|
[kernel] LT.lt ↦ 106
|
|
[kernel] outParam ↦ 46
|
|
[kernel] Array.size ↦ 36
|
|
[kernel] Array.toList ↦ 31
|
|
[kernel] autoParam ↦ 26
|
|
use `set_option diagnostics.threshold <num>` to control threshold for reporting counters
|
|
grind_guide.lean:266:43-268:7: error: unsolved goals
|
|
case h_1
|
|
b a : Vec Nat (0 + 1)
|
|
n✝¹ : Nat
|
|
v✝ w✝ : Vec Nat n✝¹
|
|
n✝ : Nat
|
|
x✝ : Vec Nat (n✝ + 1 + 1)
|
|
a✝² a✝¹ : Nat
|
|
a✝ : Vec Nat n✝
|
|
heq✝² : 0 + 1 = n✝ + 1 + 1
|
|
heq✝¹ : HEq a x✝
|
|
heq✝ : HEq b (Vec.cons a✝² (Vec.cons a✝¹ a✝))
|
|
⊢ b = Vec.cons 1 Vec.nil → 20 = 40
|
|
|
|
case h_2
|
|
b a : Vec Nat (0 + 1)
|
|
n✝ : Nat
|
|
v✝ w✝ : Vec Nat n✝
|
|
x✝ : Vec Nat 0
|
|
heq✝² : 0 + 1 = 0
|
|
heq✝¹ : HEq a Vec.nil
|
|
heq✝ : HEq b x✝
|
|
⊢ b = Vec.cons 1 Vec.nil → 30 = 40
|
|
|
|
case h_3
|
|
n✝ : Nat
|
|
v✝¹ w✝¹ : Vec Nat n✝
|
|
v✝ w✝ : Vec Nat (0 + 1)
|
|
x✝¹ :
|
|
∀ (n : Nat) (x : Vec Nat (n + 1 + 1)) (a a_1 : Nat) (a_2 : Vec Nat n),
|
|
0 + 1 = n + 1 + 1 → HEq v✝ x → HEq w✝ (Vec.cons a (Vec.cons a_1 a_2)) → False
|
|
x✝ : ∀ (x : Vec Nat 0), 0 + 1 = 0 → HEq v✝ Vec.nil → HEq w✝ x → False
|
|
⊢ w✝ = Vec.cons 1 Vec.nil → 40 = 40
|
|
Try this: (induction as, bs using app.induct) <;> grind? [= app]
|
|
grind_guide.lean:287:19-287:25: warning: declaration uses 'sorry'
|
|
grind_guide.lean:290:2-290:7: error: `grind` failed
|
|
case grind
|
|
x : Nat
|
|
x✝ : bomb x ≤ 10
|
|
⊢ False
|
|
[grind] Diagnostics
|
|
[facts] Asserted facts
|
|
[prop] bomb x ≤ 10
|
|
[prop] bomb x = bomb (bomb x) + 1
|
|
[prop] bomb (bomb x) = bomb (bomb (bomb x)) + 1
|
|
[prop] bomb (bomb (bomb x)) = bomb (bomb (bomb (bomb x))) + 1
|
|
[prop] bomb (bomb (bomb (bomb x))) = bomb (bomb (bomb (bomb (bomb x)))) + 1
|
|
[prop] bomb (bomb (bomb (bomb (bomb x)))) = bomb (bomb (bomb (bomb (bomb (bomb x))))) + 1
|
|
[eqc] True propositions
|
|
[prop] bomb x ≤ 10
|
|
[eqc] Equivalence classes
|
|
[eqc] {bomb (bomb (bomb (bomb (bomb x)))), bomb (bomb (bomb (bomb (bomb (bomb x))))) + 1}
|
|
[eqc] {bomb (bomb (bomb (bomb x))), bomb (bomb (bomb (bomb (bomb x)))) + 1}
|
|
[eqc] {bomb (bomb (bomb x)), bomb (bomb (bomb (bomb x))) + 1}
|
|
[eqc] {bomb (bomb x), bomb (bomb (bomb x)) + 1}
|
|
[eqc] {bomb x, bomb (bomb x) + 1}
|
|
[ematch] E-matching patterns
|
|
[thm] bombEx: [bomb #0]
|
|
[offset] Assignment satisfying offset contraints
|
|
[assign] bomb x := 5
|
|
[assign] bomb (bomb x) := 4
|
|
[assign] bomb (bomb (bomb x)) := 3
|
|
[assign] bomb (bomb (bomb (bomb x))) := 2
|
|
[assign] bomb (bomb (bomb (bomb (bomb x)))) := 1
|
|
[assign] bomb (bomb (bomb (bomb (bomb (bomb x))))) := 0
|
|
[limits] Thresholds reached
|
|
[limit] maximum number of E-matching rounds has been reached, threshold: `(ematch := 5)`
|
|
[limit] maximum term generation has been reached, threshold: `(gen := 5)`
|
|
[grind] Counters
|
|
[thm] E-Matching instances
|
|
[thm] bombEx ↦ 5
|