Skip to content

Commit 4a14a09

Browse files
authored
chore: clean up grind annotations (#212)
1 parent 955976e commit 4a14a09

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

HumanEvalLean/HumanEval11.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def stringXor (a b : List Bool) : List Bool :=
55
|>.map (fun p => Bool.xor p.1 p.2)
66
|>.toList
77

8-
@[simp, grind]
8+
@[simp, grind =]
99
theorem length_stringXor {a b : List Bool} : (stringXor a b).length = min a.length b.length := by
1010
simp [stringXor]
1111

HumanEvalLean/HumanEval3.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ theorem hasPrefix_iff {P : List α → Prop} {l : List α} :
2828
l.HasPrefix P ↔ ∃ n, P (l.take n) := by
2929
grind [HasPrefix]
3030

31-
@[simp, grind]
31+
@[simp, grind =]
3232
theorem hasPrefix_nil {P : List α → Prop} : [].HasPrefix P ↔ P [] := by
3333
simp [hasPrefix_iff]
3434

35-
@[simp, grind]
35+
@[simp, grind .]
3636
theorem hasPrefix_of_nil {P : List α → Prop} {l : List α} (h : P []) : l.HasPrefix P :=
3737
⟨⟨0, by simpa⟩⟩
3838

39-
@[simp, grind]
39+
@[simp, grind .]
4040
theorem hasPrefix_of_all {P : List α → Prop} {l : List α} (h : P l) : l.HasPrefix P :=
4141
⟨⟨l.length, by simpa⟩⟩
4242

43-
@[grind]
43+
@[grind =]
4444
theorem hasPrefix_cons {P : List α → Prop} {a : α} {l : List α} :
4545
(a :: l).HasPrefix P ↔ P [] ∨ l.HasPrefix (fun l' => P (a :: l')) := by
4646
refine ⟨?_, ?_⟩
@@ -51,12 +51,12 @@ theorem hasPrefix_cons {P : List α → Prop} {a : α} {l : List α} :
5151
· exact hasPrefix_of_nil h
5252
· exact ⟨n + 1, by simpa⟩
5353

54-
@[grind]
54+
@[grind =]
5555
theorem hasPrefix_append {P : List α → Prop} {l l' : List α} :
5656
(l ++ l').HasPrefix P ↔ l.HasPrefix P ∨ l'.HasPrefix (fun l'' => P (l ++ l'')) := by
5757
induction l generalizing P with grind
5858

59-
@[grind]
59+
@[grind =]
6060
theorem sum_append_singleton_int {l₁ : List Int} {x : Int} : (l₁ ++ [x]).sum = l₁.sum + x := by
6161
simp [List.sum, ← List.foldr_assoc]
6262

HumanEvalLean/HumanEval43.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ theorem List.any₂_iff_not_pairwise {P : α → α → Prop} {l : List α} :
1414
l.Any₂ P ↔ ¬l.Pairwise (fun x y => ¬P x y) := by
1515
grind [List.Any₂]
1616

17-
@[simp, grind]
17+
@[simp, grind .]
1818
theorem not_any₂_nil {P : α → α → Prop} : ¬List.Any₂ P [] := by
1919
simp [List.any₂_iff_not_pairwise]
2020

21-
@[simp, grind]
21+
@[simp, grind =]
2222
theorem List.any₂_cons {P : α → α → Prop} {x : α} {xs : List α} :
2323
List.Any₂ P (x::xs) ↔ (∃ y ∈ xs, P x y) ∨ List.Any₂ P xs := by
2424
grind [List.any₂_iff_not_pairwise, pairwise_cons]
2525

26-
@[simp, grind]
26+
@[simp, grind =]
2727
theorem List.any₂_append {P : α → α → Prop} {xs ys : List α} :
2828
List.Any₂ P (xs ++ ys) ↔ List.Any₂ P xs ∨ List.Any₂ P ys ∨ (∃ x ∈ xs, ∃ y ∈ ys, P x y) := by
2929
grind [List.any₂_iff_not_pairwise]
@@ -173,11 +173,11 @@ theorem List.any₂_iff_exists_getElem (P : α → α → Prop) (l : List α) :
173173
exact ⟨l.take i, l[i], l.drop (i + 1), by simp,
174174
(List.exists_mem_iff_exists_getElem _ _).2 ⟨j - i - 1, by grind, by grind⟩⟩
175175

176-
@[simp, grind]
176+
@[simp, grind =]
177177
theorem List.any₂_append_singleton {P : α → α → Prop} {xs : List α} {x : α} :
178178
List.Any₂ P (xs ++ [x]) ↔ List.Any₂ P xs ∨ ∃ y ∈ xs, P y x := by
179179
grind [List.any₂_iff_not_pairwise]
180180

181-
@[simp, grind]
181+
@[simp, grind .]
182182
theorem not_any₂_singleton {P : α → α → Prop} {x : α} : ¬List.Any₂ P [x] := by
183183
simp [List.any₂_iff_not_pairwise]

0 commit comments

Comments
 (0)