File: Mathlib/Data/Set/Subsingleton.lean

full_name: Set.Subsingleton
code: /-- A set `s` is a `Subsingleton` if it has at most one element. -/
protected def Subsingleton (s : Set α) : Prop 
goal: Prop

full_name: Set.Subsingleton.anti
code: theorem Subsingleton.anti (ht : t.Subsingleton) (hst : s ⊆ t) : s.Subsingleton 
goal: s.Subsingleton

full_name: Set.Subsingleton.eq_singleton_of_mem
code: theorem Subsingleton.eq_singleton_of_mem (hs : s.Subsingleton) {x : α} (hx : x ∈ s) : s = {x} 
goal: s = {x}

full_name: Set.subsingleton_empty
code: @[simp]
theorem subsingleton_empty : (∅ : Set α).Subsingleton 
goal: ∅.Subsingleton

full_name: Set.subsingleton_singleton
code: @[simp]
theorem subsingleton_singleton {a} : ({a} : Set α).Subsingleton 
goal: {a}.Subsingleton

full_name: Set.subsingleton_of_subset_singleton
code: theorem subsingleton_of_subset_singleton (h : s ⊆ {a}) : s.Subsingleton 
goal: s.Subsingleton

full_name: Set.subsingleton_of_forall_eq
code: theorem subsingleton_of_forall_eq (a : α) (h : ∀ b ∈ s, b = a) : s.Subsingleton 
goal: s.Subsingleton

full_name: Set.subsingleton_iff_singleton
code: theorem subsingleton_iff_singleton {x} (hx : x ∈ s) : s.Subsingleton ↔ s = {x} 
goal: s.Subsingleton ↔ s = {x}

full_name: Set.Subsingleton.eq_empty_or_singleton
code: theorem Subsingleton.eq_empty_or_singleton (hs : s.Subsingleton) : s = ∅ ∨ ∃ x, s = {x} 
goal: s = ∅ ∨ ∃ x, s = {x}

full_name: Set.Subsingleton.induction_on
code: theorem Subsingleton.induction_on {p : Set α → Prop} (hs : s.Subsingleton) (he : p ∅)
    (h₁ : ∀ x, p {x}) : p s 
goal: p s

full_name: Set.subsingleton_univ
code: theorem subsingleton_univ [Subsingleton α] : (univ : Set α).Subsingleton 
goal: Set.univ.Subsingleton

full_name: Set.subsingleton_of_univ_subsingleton
code: theorem subsingleton_of_univ_subsingleton (h : (univ : Set α).Subsingleton) : Subsingleton α 
goal: Subsingleton α

full_name: Set.subsingleton_univ_iff
code: @[simp]
theorem subsingleton_univ_iff : (univ : Set α).Subsingleton ↔ Subsingleton α 
goal: Set.univ.Subsingleton ↔ Subsingleton α

full_name: Set.Subsingleton.inter_singleton
code: lemma Subsingleton.inter_singleton : (s ∩ {a}).Subsingleton 
goal: (s ∩ {a}).Subsingleton

full_name: Set.Subsingleton.singleton_inter
code: lemma Subsingleton.singleton_inter : ({a} ∩ s).Subsingleton 
goal: ({a} ∩ s).Subsingleton

full_name: Set.subsingleton_of_subsingleton
code: theorem subsingleton_of_subsingleton [Subsingleton α] {s : Set α} : Set.Subsingleton s 
goal: s.Subsingleton

full_name: Set.subsingleton_isTop
code: theorem subsingleton_isTop (α : Type*) [PartialOrder α] : Set.Subsingleton { x : α | IsTop x } 
goal: {x | IsTop x}.Subsingleton

full_name: Set.subsingleton_isBot
code: theorem subsingleton_isBot (α : Type*) [PartialOrder α] : Set.Subsingleton { x : α | IsBot x } 
goal: {x | IsBot x}.Subsingleton

full_name: Set.exists_eq_singleton_iff_nonempty_subsingleton
code: theorem exists_eq_singleton_iff_nonempty_subsingleton :
    (∃ a : α, s = {a}) ↔ s.Nonempty ∧ s.Subsingleton 
goal: (∃ a, s = {a}) ↔ s.Nonempty ∧ s.Subsingleton

full_name: Set.subsingleton_coe
code: /-- `s`, coerced to a type, is a subsingleton type if and only if `s` is a subsingleton set. -/
@[simp, norm_cast]
theorem subsingleton_coe (s : Set α) : Subsingleton s ↔ s.Subsingleton 
goal: Subsingleton ↑s ↔ s.Subsingleton

full_name: Set.Subsingleton.coe_sort
code: theorem Subsingleton.coe_sort {s : Set α} : s.Subsingleton → Subsingleton s 
goal: s.Subsingleton → Subsingleton ↑s

full_name: Set.subsingleton_coe_of_subsingleton
code: /-- The `coe_sort` of a set `s` in a subsingleton type is a subsingleton.
For the corresponding result for `Subtype`, see `subtype.subsingleton`. -/
instance subsingleton_coe_of_subsingleton [Subsingleton α] {s : Set α} : Subsingleton s 
goal: Subsingleton ↑s

full_name: Set.Nontrivial
code: /-- A set `s` is `Set.Nontrivial` if it has at least two distinct elements. -/
protected def Nontrivial (s : Set α) : Prop 
goal: Prop

full_name: Set.nontrivial_of_mem_mem_ne
code: theorem nontrivial_of_mem_mem_ne {x y} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) : s.Nontrivial 
goal: s.Nontrivial

full_name: Set.Nontrivial.choose
code: /-- 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. -/
protected noncomputable def Nontrivial.choose (hs : s.Nontrivial) : α × α 
goal: α × α

full_name: Set.Nontrivial.choose_fst_mem
code: protected theorem Nontrivial.choose_fst_mem (hs : s.Nontrivial) : hs.choose.fst ∈ s 
goal: hs.choose.1 ∈ s

full_name: Set.Nontrivial.choose_snd_mem
code: protected theorem Nontrivial.choose_snd_mem (hs : s.Nontrivial) : hs.choose.snd ∈ s 
goal: hs.choose.2 ∈ s

full_name: Set.Nontrivial.choose_fst_ne_choose_snd
code: protected theorem Nontrivial.choose_fst_ne_choose_snd (hs : s.Nontrivial) :
    hs.choose.fst ≠ hs.choose.snd 
goal: hs.choose.1 ≠ hs.choose.2

full_name: Set.Nontrivial.mono
code: theorem Nontrivial.mono (hs : s.Nontrivial) (hst : s ⊆ t) : t.Nontrivial 
goal: t.Nontrivial

full_name: Set.nontrivial_pair
code: theorem nontrivial_pair {x y} (hxy : x ≠ y) : ({x, y} : Set α).Nontrivial 
goal: {x, y}.Nontrivial

full_name: Set.nontrivial_of_pair_subset
code: theorem nontrivial_of_pair_subset {x y} (hxy : x ≠ y) (h : {x, y} ⊆ s) : s.Nontrivial 
goal: s.Nontrivial

full_name: Set.Nontrivial.pair_subset
code: theorem Nontrivial.pair_subset (hs : s.Nontrivial) : ∃ x y, x ≠ y ∧ {x, y} ⊆ s 
goal: ∃ x y, x ≠ y ∧ {x, y} ⊆ s

full_name: Set.nontrivial_iff_pair_subset
code: theorem nontrivial_iff_pair_subset : s.Nontrivial ↔ ∃ x y, x ≠ y ∧ {x, y} ⊆ s 
goal: s.Nontrivial ↔ ∃ x y, x ≠ y ∧ {x, y} ⊆ s

full_name: Set.nontrivial_of_exists_ne
code: theorem nontrivial_of_exists_ne {x} (hx : x ∈ s) (h : ∃ y ∈ s, y ≠ x) : s.Nontrivial 
goal: s.Nontrivial

full_name: Set.Nontrivial.exists_ne
code: theorem Nontrivial.exists_ne (hs : s.Nontrivial) (z) : ∃ x ∈ s, x ≠ z 
goal: ∃ x ∈ s, x ≠ z

full_name: Set.nontrivial_iff_exists_ne
code: theorem nontrivial_iff_exists_ne {x} (hx : x ∈ s) : s.Nontrivial ↔ ∃ y ∈ s, y ≠ x 
goal: s.Nontrivial ↔ ∃ y ∈ s, y ≠ x

full_name: Set.nontrivial_of_lt
code: theorem nontrivial_of_lt [Preorder α] {x y} (hx : x ∈ s) (hy : y ∈ s) (hxy : x < y) :
    s.Nontrivial 
goal: s.Nontrivial

full_name: Set.nontrivial_of_exists_lt
code: theorem nontrivial_of_exists_lt [Preorder α]
    (H : ∃ᵉ (x ∈ s) (y ∈ s), x < y) : s.Nontrivial 
goal: s.Nontrivial

full_name: Set.Nontrivial.exists_lt
code: theorem Nontrivial.exists_lt [LinearOrder α] (hs : s.Nontrivial) : ∃ᵉ (x ∈ s) (y ∈ s), x < y 
goal: ∃ x ∈ s, ∃ y ∈ s, x < y

full_name: Set.nontrivial_iff_exists_lt
code: theorem nontrivial_iff_exists_lt [LinearOrder α] :
    s.Nontrivial ↔ ∃ᵉ (x ∈ s) (y ∈ s), x < y 
goal: s.Nontrivial ↔ ∃ x ∈ s, ∃ y ∈ s, x < y

full_name: Set.Nontrivial.nonempty
code: protected theorem Nontrivial.nonempty (hs : s.Nontrivial) : s.Nonempty 
goal: s.Nonempty

full_name: Set.Nontrivial.ne_empty
code: protected theorem Nontrivial.ne_empty (hs : s.Nontrivial) : s ≠ ∅ 
goal: s ≠ ∅

full_name: Set.Nontrivial.not_subset_empty
code: theorem Nontrivial.not_subset_empty (hs : s.Nontrivial) : ¬s ⊆ ∅ 
goal: ¬s ⊆ ∅

full_name: Set.not_nontrivial_empty
code: @[simp]
theorem not_nontrivial_empty : ¬(∅ : Set α).Nontrivial 
goal: ¬∅.Nontrivial

full_name: Set.not_nontrivial_singleton
code: @[simp]
theorem not_nontrivial_singleton {x} : ¬({x} : Set α).Nontrivial 
goal: ¬{x}.Nontrivial

full_name: Set.Nontrivial.ne_singleton
code: theorem Nontrivial.ne_singleton {x} (hs : s.Nontrivial) : s ≠ {x} 
goal: s ≠ {x}

full_name: Set.Nontrivial.not_subset_singleton
code: theorem Nontrivial.not_subset_singleton {x} (hs : s.Nontrivial) : ¬s ⊆ {x} 
goal: ¬s ⊆ {x}

full_name: Set.nontrivial_univ
code: theorem nontrivial_univ [Nontrivial α] : (univ : Set α).Nontrivial 
goal: Set.univ.Nontrivial

full_name: Set.nontrivial_of_univ_nontrivial
code: theorem nontrivial_of_univ_nontrivial (h : (univ : Set α).Nontrivial) : Nontrivial α 
goal: Nontrivial α

full_name: Set.nontrivial_univ_iff
code: @[simp]
theorem nontrivial_univ_iff : (univ : Set α).Nontrivial ↔ Nontrivial α 
goal: Set.univ.Nontrivial ↔ Nontrivial α

full_name: Set.nontrivial_of_nontrivial
code: theorem nontrivial_of_nontrivial (hs : s.Nontrivial) : Nontrivial α 
goal: Nontrivial α

full_name: Set.nontrivial_coe_sort
code: /-- `s`, coerced to a type, is a nontrivial type if and only if `s` is a nontrivial set. -/
@[simp, norm_cast]
theorem nontrivial_coe_sort {s : Set α} : Nontrivial s ↔ s.Nontrivial 
goal: Nontrivial ↑s ↔ s.Nontrivial

full_name: Set.nontrivial_of_nontrivial_coe
code: /-- 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 nontrivial_of_nontrivial_coe (hs : Nontrivial s) : Nontrivial α 
goal: Nontrivial α

full_name: Set.nontrivial_mono
code: theorem nontrivial_mono {α : Type*} {s t : Set α} (hst : s ⊆ t) (hs : Nontrivial s) :
    Nontrivial t 
goal: Nontrivial ↑t

full_name: Set.not_subsingleton_iff
code: @[simp]
theorem not_subsingleton_iff : ¬s.Subsingleton ↔ s.Nontrivial 
goal: ¬s.Subsingleton ↔ s.Nontrivial

full_name: Set.not_nontrivial_iff
code: @[simp]
theorem not_nontrivial_iff : ¬s.Nontrivial ↔ s.Subsingleton 
goal: ¬s.Nontrivial ↔ s.Subsingleton

full_name: Set.subsingleton_or_nontrivial
code: protected lemma subsingleton_or_nontrivial (s : Set α) : s.Subsingleton ∨ s.Nontrivial 
goal: s.Subsingleton ∨ s.Nontrivial

full_name: Set.eq_singleton_or_nontrivial
code: lemma eq_singleton_or_nontrivial (ha : a ∈ s) : s = {a} ∨ s.Nontrivial 
goal: s = {a} ∨ s.Nontrivial

full_name: Set.nontrivial_iff_ne_singleton
code: lemma nontrivial_iff_ne_singleton (ha : a ∈ s) : s.Nontrivial ↔ s ≠ {a} 
goal: s.Nontrivial ↔ s ≠ {a}

full_name: Set.Nonempty.exists_eq_singleton_or_nontrivial
code: lemma Nonempty.exists_eq_singleton_or_nontrivial : s.Nonempty → (∃ a, s = {a}) ∨ s.Nontrivial 
goal: s.Nonempty → (∃ a, s = {a}) ∨ s.Nontrivial

full_name: Set.univ_eq_true_false
code: theorem univ_eq_true_false : univ = ({True, False} : Set Prop) 
goal: Set.univ = {True, False}

full_name: Set.Subsingleton.monotoneOn
code: protected theorem Subsingleton.monotoneOn (h : s.Subsingleton) : MonotoneOn f s 
goal: MonotoneOn f s

full_name: Set.Subsingleton.antitoneOn
code: protected theorem Subsingleton.antitoneOn (h : s.Subsingleton) : AntitoneOn f s 
goal: AntitoneOn f s

full_name: Set.Subsingleton.strictMonoOn
code: protected theorem Subsingleton.strictMonoOn (h : s.Subsingleton) : StrictMonoOn f s 
goal: StrictMonoOn f s

full_name: Set.Subsingleton.strictAntiOn
code: protected theorem Subsingleton.strictAntiOn (h : s.Subsingleton) : StrictAntiOn f s 
goal: StrictAntiOn f s

full_name: Set.monotoneOn_singleton
code: @[simp]
theorem monotoneOn_singleton : MonotoneOn f {a} 
goal: MonotoneOn f {a}

full_name: Set.antitoneOn_singleton
code: @[simp]
theorem antitoneOn_singleton : AntitoneOn f {a} 
goal: AntitoneOn f {a}

full_name: Set.strictMonoOn_singleton
code: @[simp]
theorem strictMonoOn_singleton : StrictMonoOn f {a} 
goal: StrictMonoOn f {a}

full_name: Set.strictAntiOn_singleton
code: @[simp]
theorem strictAntiOn_singleton : StrictAntiOn f {a} 
goal: StrictAntiOn f {a}