File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change 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+
127theorem 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+
1140attribute [grind] List.getElem_append_left List.getElem_append_right
1241attribute [grind] List.length_cons List.length_nil
1342
1443example {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+ -- -
You can’t perform that action at this time.
0 commit comments