Skip to content

Commit c0e34b1

Browse files
committed
Fix linter fail
Oddly enough, this line wasn't 100 characters long, so my editor's linter didn't even flag this 🤔
1 parent 8b65f75 commit c0e34b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: Batteries/Data/String/Lemmas.lean

+4-3
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ theorem get_append_of_valid {s t} {p : Pos} (h : p.Valid s) (h' : p ≠ endPos s
282282
(s ++ t).get p = s.get p := by
283283
match s, t, p with
284284
| ⟨[]⟩, _, _ => simp_all; contradiction;
285-
| ⟨_ :: _⟩, _, ⟨0⟩ => simp_all [cons_append]
285+
| ⟨_ :: _⟩, _, ⟨0⟩ => simp_all only [Pos.mk_zero, Pos.valid_zero, endPos_eq, utf8Len_cons,
286+
ne_eq, cons_append, get_cons_zero]
286287
| ⟨a :: l⟩, _, p@⟨k+1⟩ => next p_eq_succ =>
287288
have p_ne_zero : p ≠ 0 := by rw [ne_eq, Pos.ext_iff]; simp [p_eq_succ]
288289
have ⟨n, csize_a⟩ : ∃ n, p = ⟨n + csize a⟩ := by
@@ -877,8 +878,8 @@ theorem substrEq_loop_cons_addChar {off : Pos} :
877878
· rfl
878879
termination_by utf8Len s - off.1
879880

880-
theorem substrEq_loop_cons_zero :
881-
substrEq.loop ⟨c :: s⟩ ⟨c :: t⟩ 0 0 ⟨utf8Len (c :: s)⟩ = substrEq.loop ⟨s⟩ ⟨t⟩ 0 0 ⟨utf8Len s⟩ := by
881+
theorem substrEq_loop_cons_zero : substrEq.loop ⟨c :: s⟩ ⟨c :: t⟩ 0 0 ⟨utf8Len (c :: s)⟩
882+
= substrEq.loop ⟨s⟩ ⟨t⟩ 0 0 ⟨utf8Len s⟩ := by
882883
have : 0 < utf8Len s + csize c := add_csize_pos
883884
conv => lhs; rw [substrEq.loop]; simp [*]
884885
exact substrEq_loop_cons_addChar

0 commit comments

Comments
 (0)