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 / V03. Sets, finite structures and big operators

Mathlib.Data.Set.List

7 declarations. Mathlib docs · Source

theorem Set.range_list_map E1 #

∀ {α : Type u_1} {β : Type u_2} (f : α → β), Set.range (List.map f) = {l | ∀ x ∈ l, x ∈ Set.range f}

theorem Set.range_list_map_coe E0 #

∀ {α : Type u_1} (s : Set α), Set.range (List.map Subtype.val) = {l | ∀ x ∈ l, x ∈ s}

theorem Set.range_list_get E0 #

∀ {α : Type u_1} (l : List α), Set.range l.get = {x | x ∈ l}

theorem Set.range_list_getElem? E1 #

∀ {α : Type u_1} (l : List α), (Set.range fun x ↦ l[x]?) = insert none (some '' {x | x ∈ l})

theorem Set.range_list_getD E0 #

∀ {α : Type u_1} (l : List α) (d : α), (Set.range fun n ↦ l[n]?.getD d) = insert d {x | x ∈ l}

theorem Set.range_list_getI E0 #

∀ {α : Type u_1} [inst : Inhabited α] (l : List α), Set.range l.getI = insert default {x | x ∈ l}

instance List.canLift E0 #

∀ {α : Type u_1} {β : Type u_2} (c : β → α) (p : α → Prop) [CanLift α β c p],
  CanLift (List α) (List β) (List.map c) fun l ↦ ∀ x ∈ l, p x

If each element of a list can be lifted to some type, then the whole list can be lifted to this type.