Skip to content

Commit

Permalink
chore: make some proofs more robust (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Aug 21, 2024
1 parent a975dea commit d747f07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Batteries/Data/String/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ theorem utf8GetAux?_of_valid (cs cs' : List Char) {i p : Nat} (hp : i + utf8Len
| c::cs, cs' =>
simp only [utf8GetAux?, List.append_eq]
rw [if_neg]
case hnc => simp [← hp, Pos.ext_iff]; exact ne_self_add_add_utf8Size
case hnc => simp only [← hp, Pos.ext_iff]; exact ne_self_add_add_utf8Size
refine utf8GetAux?_of_valid cs cs' ?_
simpa [Nat.add_assoc, Nat.add_comm] using hp

Expand All @@ -189,7 +189,7 @@ theorem utf8SetAux_of_valid (c' : Char) (cs cs' : List Char) {i p : Nat} (hp : i
| c::cs, cs' =>
simp only [utf8SetAux, List.append_eq, List.cons_append]
rw [if_neg]
case hnc => simp [← hp, Pos.ext_iff]; exact ne_self_add_add_utf8Size
case hnc => simp only [← hp, Pos.ext_iff]; exact ne_self_add_add_utf8Size
refine congrArg (c::·) (utf8SetAux_of_valid c' cs cs' ?_)
simpa [Nat.add_assoc, Nat.add_comm] using hp

Expand Down

0 comments on commit d747f07

Please sign in to comment.