Skip to content

Commit 0f2ede4

Browse files
authored
chore: another failing grind test (leanprover#7848)
This PR adds another failing test case for `grind`.
1 parent ab4febd commit 0f2ede4

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed
Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,47 @@
1+
reset_grind_attrs%
2+
3+
attribute [grind] List.length_set
4+
attribute [grind →] List.eq_nil_of_length_eq_zero
5+
6+
open List in
7+
example {as : List α} {i : Nat} (h : i < as.length) :
8+
as.set i as[i] = as := by
9+
apply ext_getElem
10+
· sorry
11+
· -- works:
12+
grind [getElem_set]
13+
14+
attribute [grind] List.getElem_set
15+
16+
open List in
17+
example {as : List α} {i : Nat} (h : i < as.length) :
18+
as.set i as[i] = as := by
19+
apply ext_getElem
20+
· sorry
21+
· -- fails:
22+
grind
23+
24+
---
25+
reset_grind_attrs%
26+
127
theorem getElem?_eq_some_iff {l : List α} : l[i]? = some a ↔ ∃ h : i < l.length, l[i] = a := by
228
induction l
3-
· grind
29+
· sorry
430
· cases i
531
· -- Better support for implication and dependent implication.
632
-- We need inequality propagation (or case-splits)
733
grind
834
· -- Similarly
935
grind
1036

37+
---
38+
reset_grind_attrs%
39+
1140
attribute [grind] List.getElem_append_left List.getElem_append_right
1241
attribute [grind] List.length_cons List.length_nil
1342

1443
example {l : List α} {a : α} {i : Nat} (h : i = l.length) (w) :
1544
(l ++ [a])[i]'w = a := by
1645
grind -- Similar to issue above.
46+
47+
---

0 commit comments

Comments
 (0)