Documentation

Projects.Util.Data.Set.Part_002

@[simp]
theorem Set'.min?_eq_some_iff {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] {x : α} :
s.min? = some x ↔ x ∈ s ∧ ∀ y ∈ s, x ≤ y
@[simp]
theorem Set'.min?_empty {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : LinearOrder α] :
@[simp]
theorem Set'.min?_singleton {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : LinearOrder α] {x : α} :
@[simp]
theorem Set'.min?_insert {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] {x : α} :
(s.insert x).min? = some (s.min?.elim x (min x))
theorem Set'.max?_eq_getLast?_toList {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] :
@[simp]
theorem Set'.max?_eq_some_iff {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] {x : α} :
s.max? = some x ↔ x ∈ s ∧ ∀ y ∈ s, y ≤ x
@[simp]
theorem Set'.min?_ofList {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : LinearOrder α] {xs : List α} :
(ofList xs).min? = xs.min?
@[simp]
theorem Set'.max?_empty {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : LinearOrder α] :
@[simp]
theorem Set'.toList_singleton {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : LinearOrder α] {x : α} :
@[simp]
theorem Set'.max?_singleton {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : LinearOrder α] {x : α} :
@[simp]
theorem Set'.max?_insert {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] {x : α} :
(s.insert x).max? = some (s.max?.elim x (max x))
@[simp]
theorem Set'.dedup_toList {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] :
@[simp]
theorem Map.keysSet_ofList {α : Type u} {β : Type v} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {xs : List (α × β)} :
(ofList xs).keysSet = Set'.ofList (List.map (fun (x : α × β) => x.1) xs)
@[simp]
theorem Set'.size_univ {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] [ha : Fintype α] :
theorem Set'.toList_eq_of {α : Type u} [ha₁ : DecidableEq α] [ha₂ : Hashable α] {s : Set' α} [ha : LinearOrder α] {xs : List α} (h₁ : xs.SortedLT) (h₂ : ∀ (x : α), x ∈ s ↔ x ∈ xs) :
s.toList = xs