@[simp]
theorem
String.length_append
(as : String)
(bs : String)
:
String.length (as ++ bs) = String.length as + String.length bs
@[simp]
@[simp]
theorem
String.leftpad_length
(n : ℕ)
(c : Char)
(s : String)
:
String.length (String.leftpad n c s) = max n (String.length s)
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
(n : ℕ)
(c : Char)
(s : String)
:
String.IsPrefix (String.replicate (n - String.length s) c) (String.leftpad n c s)
theorem
String.leftpad_suffix
(n : ℕ)
(c : Char)
(s : String)
:
String.IsSuffix s (String.leftpad n c s)