Documentation

Mathlib.Data.List.Enum

Properties of List.enum #

Deprecation note #

Many lemmas in this file have been replaced by theorems in Lean4, in terms of xs[i]? and xs[i] rather than get and get?.

The deprecated results here are unused in Mathlib. Any downstream users who can not easily adapt may remove the deprecations as needed.

@[deprecated List.getElem?_enumFrom]
theorem List.get?_enumFrom {α : Type u_1} (n : ) (l : List α) (m : ) :
(List.enumFrom n l).get? m = Option.map (fun (a : α) => (n + m, a)) (l.get? m)
@[deprecated List.get?_enumFrom]
theorem List.enumFrom_get? {α : Type u_1} (n : ) (l : List α) (m : ) :
(List.enumFrom n l).get? m = Option.map (fun (a : α) => (n + m, a)) (l.get? m)

Alias of List.get?_enumFrom.

@[deprecated List.getElem?_enum]
theorem List.get?_enum {α : Type u_1} (l : List α) (n : ) :
l.enum.get? n = Option.map (fun (a : α) => (n, a)) (l.get? n)
@[deprecated List.get?_enum]
theorem List.enum_get? {α : Type u_1} (l : List α) (n : ) :
l.enum.get? n = Option.map (fun (a : α) => (n, a)) (l.get? n)

Alias of List.get?_enum.

@[deprecated List.getElem_enumFrom]
theorem List.get_enumFrom {α : Type u_1} (l : List α) (n : ) (i : Fin (List.enumFrom n l).length) :
(List.enumFrom n l).get i = (n + i, l.get (Fin.cast i))
@[deprecated List.getElem_enum]
theorem List.get_enum {α : Type u_1} (l : List α) (i : Fin l.enum.length) :
l.enum.get i = (i, l.get (Fin.cast i))
@[deprecated List.mk_add_mem_enumFrom_iff_getElem?]
theorem List.mk_add_mem_enumFrom_iff_get? {α : Type u_1} {n : } {i : } {x : α} {l : List α} :
(n + i, x) List.enumFrom n l l.get? i = some x
@[deprecated List.mk_mem_enumFrom_iff_le_and_getElem?_sub]
theorem List.mk_mem_enumFrom_iff_le_and_get?_sub {α : Type u_1} {n : } {i : } {x : α} {l : List α} :
(i, x) List.enumFrom n l n i l.get? (i - n) = some x
@[deprecated List.mk_mem_enum_iff_getElem?]
theorem List.mk_mem_enum_iff_get? {α : Type u_1} {i : } {x : α} {l : List α} :
(i, x) l.enum l.get? i = some x
@[deprecated List.mem_enum_iff_getElem?]
theorem List.mem_enum_iff_get? {α : Type u_1} {x : × α} {l : List α} :
x l.enum l.get? x.1 = some x.2
theorem List.forall_mem_enumFrom {α : Type u_1} {l : List α} {n : } {p : × αProp} :
(∀ (x : × α), x List.enumFrom n lp x) ∀ (i : ) (x : i < l.length), p (n + i, l[i])
theorem List.forall_mem_enum {α : Type u_1} {l : List α} {p : × αProp} :
(∀ (x : × α), x l.enump x) ∀ (i : ) (x : i < l.length), p (i, l[i])
theorem List.exists_mem_enumFrom {α : Type u_1} {l : List α} {n : } {p : × αProp} :
(∃ (x : × α), x List.enumFrom n l p x) ∃ (i : ), ∃ (x : i < l.length), p (n + i, l[i])
theorem List.exists_mem_enum {α : Type u_1} {l : List α} {p : × αProp} :
(∃ (x : × α), x l.enum p x) ∃ (i : ), ∃ (x : i < l.length), p (i, l[i])