Equations
- List.head! _fun_discr = match _fun_discr with | [] => panicWithPosWithDecl "Init.Data.List.BasicAux" "List.head!" 31 12 "empty list" | a :: tail => a
Equations
- List.head? _fun_discr = match _fun_discr with | [] => none | a :: tail => some a
Equations
- List.headD _fun_discr _fun_discr = match _fun_discr, _fun_discr with | [], a₀ => a₀ | a :: tail, x => a
Equations
- List.tail! _fun_discr = match _fun_discr with | [] => panicWithPosWithDecl "Init.Data.List.BasicAux" "List.tail!" 46 13 "empty list" | head :: as => as
Equations
- List.tail? _fun_discr = match _fun_discr with | [] => none | head :: as => some as
Equations
- List.tailD _fun_discr _fun_discr = match _fun_discr, _fun_discr with | [], as₀ => as₀ | head :: as, x => as
Equations
- List.getLast [] h = absurd (_ : [] = []) h
- List.getLast [a] x = a
- List.getLast (head :: b :: as) x = List.getLast (b :: as) (_ : b :: as = [] → List.noConfusionType False (b :: as) [])
Equations
- One or more equations did not get rendered due to their size.
Equations
- List.getLast? _fun_discr = match _fun_discr with | [] => none | a :: as => some (List.getLast (a :: as) (_ : a :: as = [] → List.noConfusionType False (a :: as) []))
Equations
- List.getLastD _fun_discr _fun_discr = match _fun_discr, _fun_discr with | [], a₀ => a₀ | a :: as, x => List.getLast (a :: as) (_ : a :: as = [] → List.noConfusionType False (a :: as) [])
Equations
- List.rotateLeft xs n = let len := List.length xs; if len ≤ 1 then xs else let n := n % len; let b := List.take n xs; let e := List.drop n xs; e ++ b
Equations
- List.rotateRight xs n = let len := List.length xs; if len ≤ 1 then xs else let n := len - n % len; let b := List.take n xs; let e := List.drop n xs; e ++ b
theorem
List.get_append_left
{α : Type u_1}
{i : Nat}
(as : List α)
(bs : List α)
(h : i < List.length as)
{h' : i < List.length (as ++ bs)}
:
theorem
List.get_append_right
{α : Type u_1}
{i : Nat}
(as : List α)
(bs : List α)
(h : ¬i < List.length as)
{h' : i < List.length (as ++ bs)}
{h'' : i - List.length as < List.length bs}
:
theorem
List.get_last
{α : Type u_1}
{a : α}
{as : List α}
{i : Fin (List.length (as ++ [a]))}
(h : ¬i.val < List.length as)
:
Equations
- List.tacticSizeOf_list_dec = Lean.ParserDescr.node `List.tacticSizeOf_list_dec 1024 (Lean.ParserDescr.nonReservedSymbol "sizeOf_list_dec" false)
@[simp]