Miscellaneous List
lemmas, that require more Nat
lemmas than are available in Init.Data.List.Lemmas
. #
In particular, omega
is available here.
dropLast #
@[simp]
filter #
reverse #
leftpad #
theorem
List.leftpad_length
{α : Type u_1}
(n : Nat)
(a : α)
(l : List α)
:
(List.leftpad n a l).length = max n l.length
The length of the List returned by List.leftpad n a l
is equal
to the larger of n
and l.length
eraseIdx #
min? #
max? #
@[reducible, inline, deprecated List.min?_cons']
abbrev
List.minimum?_cons'
{α : Type u_1}
{x : α}
[Min α]
{xs : List α}
:
(x :: xs).min? = some (List.foldl min x xs)
Equations
Instances For
@[reducible, inline, deprecated List.max?_cons']
abbrev
List.maximum?_cons'
{α : Type u_1}
{x : α}
[Max α]
{xs : List α}
:
(x :: xs).max? = some (List.foldl max x xs)