blob: 4b8d98171647779848a60d6e682e8c2054bc0041 [file]
/-
Copyright (c) 2026 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Henrik Bรถving
-/
module
prelude
public import Init.Data.String.Basic
import Init.Data.String.Lemmas.Iterate
import Init.Data.Iterators.Lemmas.Consumers.Collect
/-!
This module contains `csimp` lemmas used to optimize `String` functions.
-/
public section
namespace String
def toListImpl (s : String) : List Char := s.revChars.toListRev
@[csimp]
theorem toList_eq_toListImpl : @toList = @toListImpl := by
funext
simp [toListImpl, Std.Iter.toListRev_eq]
end String