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.Subsingleton

78 declarations. Mathlib docs · Source

Subsingleton

Defines the predicate Subsingleton s : Prop, saying that s has at most one element.

Also defines Nontrivial s : Prop : the predicate saying that s has at least two distinct elements.

Subsingleton

Nontrivial

Monotonicity on singletons

def Set.Subsingleton E1 #

{α : Type u} → Set α → Prop

A set s is a Subsingleton if it has at most one element.

theorem Set.Subsingleton.anti E1 #

∀ {α : Type u} {s t : Set α}, t.Subsingleton → s ⊆ t → s.Subsingleton

theorem Set.subsingleton_empty E0 #

∀ {α : Type u}, ∅.Subsingleton

theorem Set.subsingleton_singleton E0 #

∀ {α : Type u} {a : α}, {a}.Subsingleton

theorem Set.subsingleton_of_subset_singleton E1 #

∀ {α : Type u} {a : α} {s : Set α}, s ⊆ {a} → s.Subsingleton

theorem Set.subsingleton_of_forall_eq E0 #

∀ {α : Type u} {s : Set α} (a : α), (∀ b ∈ s, b = a) → s.Subsingleton

theorem Set.subsingleton_iff_singleton E1 #

∀ {α : Type u} {s : Set α} {x : α}, x ∈ s → (s.Subsingleton ↔ s = {x})

theorem Set.subsingleton_iff_eq_empty_or_singleton E1 #

∀ {α : Type u} {s : Set α}, s.Subsingleton ↔ s = ∅ ∨ ∃ x, s = {x}

theorem Set.Subsingleton.induction_on E1 #

∀ {α : Type u} {s : Set α} {p : Set α → Prop}, s.Subsingleton → p ∅ → (∀ (x : α), p {x}) → p s

theorem Set.subsingleton_univ E1 #

∀ {α : Type u} [Subsingleton α], Set.univ.Subsingleton

theorem Set.subsingleton_of_univ_subsingleton E1 #

∀ {α : Type u}, Set.univ.Subsingleton → Subsingleton α

theorem Set.subsingleton_univ_iff E0 #

∀ {α : Type u}, Set.univ.Subsingleton ↔ Subsingleton α

theorem Set.Subsingleton.inter_singleton E1 #

∀ {α : Type u} {a : α} {s : Set α}, (s ∩ {a}).Subsingleton

theorem Set.Subsingleton.singleton_inter E1 #

∀ {α : Type u} {a : α} {s : Set α}, ({a} ∩ s).Subsingleton

theorem Set.subsingleton_of_subsingleton_inter_left E1 #

∀ {α : Type u} {s t : Set α}, (s ∪ t).Subsingleton → s.Subsingleton

theorem Set.subsingleton_of_subsingleton_inter_right E1 #

∀ {α : Type u} {s t : Set α}, (s ∪ t).Subsingleton → t.Subsingleton

theorem Set.subsingleton_of_subsingleton E1 #

∀ {α : Type u} [Subsingleton α] {s : Set α}, s.Subsingleton

theorem Set.subsingleton_isTop E1 #

∀ (α : Type u_1) [inst : PartialOrder α], {x | IsTop x}.Subsingleton

theorem Set.subsingleton_isBot E1 #

∀ (α : Type u_1) [inst : PartialOrder α], {x | IsBot x}.Subsingleton

theorem Set.exists_eq_singleton_iff_nonempty_subsingleton E1 #

∀ {α : Type u} {s : Set α}, (∃ a, s = {a}) ↔ s.Nonempty ∧ s.Subsingleton

theorem Set.subsingleton_coe E0 #

∀ {α : Type u} (s : Set α), Subsingleton ↑s ↔ s.Subsingleton

s, coerced to a type, is a subsingleton type if and only if s is a subsingleton set.

theorem Set.Subsingleton.coe_sort E0 #

∀ {α : Type u} {s : Set α}, s.Subsingleton → Subsingleton ↑s

instance Set.subsingleton_coe_of_subsingleton E0 #

∀ {α : Type u} [Subsingleton α] {s : Set α}, Subsingleton ↑s

The coe_sort of a set s in a subsingleton type is a subsingleton. For the corresponding result for Subtype, see subtype.subsingleton.

theorem Set.Subsingleton.denselyOrdered E1 #

∀ {α : Type u} {s : Set α} [inst : LT α], s.Subsingleton → DenselyOrdered ↑s

theorem ExistsUnique.setSubsingleton E1 #

∀ {α : Type u_1} {p : α → Prop}, ExistsUnique p → {x | p x}.Subsingleton

def Set.Nontrivial E1 #

{α : Type u} → Set α → Prop

A set s is Set.Nontrivial if it has at least two distinct elements.

theorem Set.nontrivial_of_mem_mem_ne E1 #

∀ {α : Type u} {s : Set α} {x y : α}, x ∈ s → y ∈ s → x ≠ y → s.Nontrivial

def Set.Nontrivial.choose E1 #

{α : Type u} → {s : Set α} → s.Nontrivial → α × α

Extract witnesses from s.nontrivial. This function might be used instead of case analysis on the argument. Note that it makes a proof depend on the classical.choice axiom.

theorem Set.Nontrivial.choose_fst_mem E1 #

∀ {α : Type u} {s : Set α} (hs : s.Nontrivial), hs.choose.1 ∈ s

theorem Set.Nontrivial.choose_snd_mem E1 #

∀ {α : Type u} {s : Set α} (hs : s.Nontrivial), hs.choose.2 ∈ s

theorem Set.Nontrivial.choose_fst_ne_choose_snd E1 #

∀ {α : Type u} {s : Set α} (hs : s.Nontrivial), hs.choose.1 ≠ hs.choose.2

theorem Set.Nontrivial.mono E1 #

∀ {α : Type u} {s t : Set α}, s.Nontrivial → s ⊆ t → t.Nontrivial

theorem Set.nontrivial_pair E1 #

∀ {α : Type u} {x y : α}, x ≠ y → {x, y}.Nontrivial

theorem Set.nontrivial_of_pair_subset E1 #

∀ {α : Type u} {s : Set α} {x y : α}, x ≠ y → {x, y} ⊆ s → s.Nontrivial

theorem Set.Nontrivial.pair_subset E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → ∃ x y, x ≠ y ∧ {x, y} ⊆ s

theorem Set.nontrivial_iff_pair_subset E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial ↔ ∃ x y, x ≠ y ∧ {x, y} ⊆ s

theorem Set.nontrivial_of_exists_ne E1 #

∀ {α : Type u} {s : Set α} {x : α}, x ∈ s → (∃ y ∈ s, y ≠ x) → s.Nontrivial

theorem Set.Nontrivial.exists_ne E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → ∀ (z : α), ∃ x ∈ s, x ≠ z

theorem Set.nontrivial_iff_exists_ne E1 #

∀ {α : Type u} {s : Set α} {x : α}, x ∈ s → (s.Nontrivial ↔ ∃ y ∈ s, y ≠ x)

theorem Set.nontrivial_of_lt E1 #

∀ {α : Type u} {s : Set α} [inst : Preorder α] {x y : α}, x ∈ s → y ∈ s → x < y → s.Nontrivial

theorem Set.nontrivial_of_exists_lt E1 #

∀ {α : Type u} {s : Set α} [inst : Preorder α], (∃ x ∈ s, ∃ y ∈ s, x < y) → s.Nontrivial

theorem Set.Nontrivial.exists_lt E1 #

∀ {α : Type u} {s : Set α} [inst : LinearOrder α], s.Nontrivial → ∃ x ∈ s, ∃ y ∈ s, x < y

theorem Set.nontrivial_iff_exists_lt E1 #

∀ {α : Type u} {s : Set α} [inst : LinearOrder α], s.Nontrivial ↔ ∃ x ∈ s, ∃ y ∈ s, x < y

theorem Set.Nontrivial.nonempty E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → s.Nonempty

theorem Set.Nontrivial.ne_empty E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → s ≠ ∅

theorem Set.Nontrivial.not_subset_empty E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → ¬s ⊆ ∅

theorem Set.not_nontrivial_empty E0 #

∀ {α : Type u}, ¬∅.Nontrivial

theorem Set.not_nontrivial_singleton E0 #

∀ {α : Type u} {x : α}, ¬{x}.Nontrivial

theorem Set.Nontrivial.ne_singleton E1 #

∀ {α : Type u} {s : Set α} {x : α}, s.Nontrivial → s ≠ {x}

theorem Set.Nontrivial.not_subset_singleton E1 #

∀ {α : Type u} {s : Set α} {x : α}, s.Nontrivial → ¬s ⊆ {x}

theorem Set.nontrivial_univ E1 #

∀ {α : Type u} [Nontrivial α], Set.univ.Nontrivial

theorem Set.nontrivial_of_univ_nontrivial E1 #

∀ {α : Type u}, Set.univ.Nontrivial → Nontrivial α

theorem Set.nontrivial_univ_iff E0 #

∀ {α : Type u}, Set.univ.Nontrivial ↔ Nontrivial α

theorem Set.singleton_ne_univ E0 #

∀ {α : Type u} [Nontrivial α] (a : α), {a} ≠ Set.univ

theorem Set.singleton_ssubset_univ E0 #

∀ {α : Type u} [Nontrivial α] (a : α), {a} ⊂ Set.univ

theorem Set.nontrivial_of_nontrivial E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → Nontrivial α

theorem Set.nontrivial_coe_sort E0 #

∀ {α : Type u} {s : Set α}, Nontrivial ↑s ↔ s.Nontrivial

s, coerced to a type, is a nontrivial type if and only if s is a nontrivial set.

theorem Set.Nontrivial.coe_sort E0 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → Nontrivial ↑s

Alias of the reverse direction of Set.nontrivial_coe_sort.


s, coerced to a type, is a nontrivial type if and only if s is a nontrivial set.

theorem Set.nontrivial_of_nontrivial_coe E0 #

∀ {α : Type u} {s : Set α}, Nontrivial ↑s → Nontrivial α

A type with a set s whose coe_sort is a nontrivial type is nontrivial. For the corresponding result for Subtype, see Subtype.nontrivial_iff_exists_ne.

theorem Set.nontrivial_mono E1 #

∀ {α : Type u_1} {s t : Set α}, s ⊆ t → Nontrivial ↑s → Nontrivial ↑t

theorem Set.not_subsingleton_iff E0 #

∀ {α : Type u} {s : Set α}, ¬s.Subsingleton ↔ s.Nontrivial

theorem Set.not_nontrivial_iff E0 #

∀ {α : Type u} {s : Set α}, ¬s.Nontrivial ↔ s.Subsingleton

theorem Set.Subsingleton.not_nontrivial E1 #

∀ {α : Type u} {s : Set α}, s.Subsingleton → ¬s.Nontrivial

Alias of the reverse direction of Set.not_nontrivial_iff.

theorem Set.Nontrivial.not_subsingleton E1 #

∀ {α : Type u} {s : Set α}, s.Nontrivial → ¬s.Subsingleton

Alias of the reverse direction of Set.not_subsingleton_iff.

theorem Set.subsingleton_or_nontrivial E1 #

∀ {α : Type u} (s : Set α), s.Subsingleton ∨ s.Nontrivial

theorem Set.nontrivial_iff_ne_singleton E1 #

∀ {α : Type u} {a : α} {s : Set α}, a ∈ s → (s.Nontrivial ↔ s ≠ {a})

theorem Set.Nonempty.exists_eq_singleton_or_nontrivial E1 #

∀ {α : Type u} {s : Set α}, s.Nonempty → (∃ a, s = {a}) ∨ s.Nontrivial

theorem Set.univ_eq_true_false E1 #

Set.univ = {True, False}

theorem Set.univ_set_of_isEmpty E0 #

∀ {α : Type u} [IsEmpty α], Set.univ = {∅}

theorem Set.univ_set_eq_singleton_empty_iff E0 #

∀ {α : Type u}, Set.univ = {∅} ↔ IsEmpty α

theorem Set.Subsingleton.monotoneOn E1 #

∀ {α : Type u} {β : Type v} {s : Set α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β),
  s.Subsingleton → MonotoneOn f s

theorem Set.Subsingleton.antitoneOn E1 #

∀ {α : Type u} {β : Type v} {s : Set α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β),
  s.Subsingleton → AntitoneOn f s

theorem Set.Subsingleton.strictMonoOn E1 #

∀ {α : Type u} {β : Type v} {s : Set α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β),
  s.Subsingleton → StrictMonoOn f s

theorem Set.Subsingleton.strictAntiOn E1 #

∀ {α : Type u} {β : Type v} {s : Set α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β),
  s.Subsingleton → StrictAntiOn f s

theorem Set.monotoneOn_singleton E0 #

∀ {α : Type u} {β : Type v} {a : α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β), MonotoneOn f {a}

theorem Set.antitoneOn_singleton E0 #

∀ {α : Type u} {β : Type v} {a : α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β), AntitoneOn f {a}

theorem Set.strictMonoOn_singleton E0 #

∀ {α : Type u} {β : Type v} {a : α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β), StrictMonoOn f {a}

theorem Set.strictAntiOn_singleton E0 #

∀ {α : Type u} {β : Type v} {a : α} [inst : Preorder α] [inst_1 : Preorder β] (f : α → β), StrictAntiOn f {a}