The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Data.String.Lemmas

6 declarations. Mathlib docs · Source

theorem String.congr_append E1 #

∀ (a b : String), a ++ b = String.ofList (a.toList ++ b.toList)

theorem String.length_replicate E0 #

∀ (n : ℕ) (c : Char), (String.replicate n c).length = n

theorem String.length_eq_list_length E1 #

∀ (l : List Char), (String.ofList l).length = l.length

theorem String.length_leftpad E0 #

∀ (n : ℕ) (c : Char) (s : String), (String.leftpad n c s).length = max n s.length

The length of the String returned by String.leftpad n a c is equal to the larger of n and s.length

theorem String.leftpad_prefix E1 #

∀ (n : ℕ) (c : Char) (s : String), (String.replicate (n - s.length) c).IsPrefix (String.leftpad n c s)

theorem String.leftpad_suffix E1 #

∀ (n : ℕ) (c : Char) (s : String), s.IsSuffix (String.leftpad n c s)