Documentation

Mathlib.Data.Set.Subsingleton

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 #

def Set.Subsingleton {α : Type u} (s : Set α) :

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

Equations
Instances For
    theorem Set.Subsingleton.anti {α : Type u} {s : Set α} {t : Set α} (ht : Set.Subsingleton t) (hst : s t) :
    theorem Set.Subsingleton.eq_singleton_of_mem {α : Type u} {s : Set α} (hs : Set.Subsingleton s) {x : α} (hx : x s) :
    s = {x}
    @[simp]
    theorem Set.subsingleton_singleton {α : Type u} {a : α} :
    theorem Set.subsingleton_of_subset_singleton {α : Type u} {a : α} {s : Set α} (h : s {a}) :
    theorem Set.subsingleton_of_forall_eq {α : Type u} {s : Set α} (a : α) (h : bs, b = a) :
    theorem Set.subsingleton_iff_singleton {α : Type u} {s : Set α} {x : α} (hx : x s) :
    theorem Set.Subsingleton.eq_empty_or_singleton {α : Type u} {s : Set α} (hs : Set.Subsingleton s) :
    s = ∃ (x : α), s = {x}
    theorem Set.Subsingleton.induction_on {α : Type u} {s : Set α} {p : Set αProp} (hs : Set.Subsingleton s) (he : p ) (h₁ : ∀ (x : α), p {x}) :
    p s
    @[simp]
    theorem Set.subsingleton_coe {α : Type u} (s : Set α) :

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

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

    Equations
    • =

    Nontrivial #

    def Set.Nontrivial {α : Type u} (s : Set α) :

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

    Equations
    Instances For
      theorem Set.nontrivial_of_mem_mem_ne {α : Type u} {s : Set α} {x : α} {y : α} (hx : x s) (hy : y s) (hxy : x y) :
      noncomputable def Set.Nontrivial.choose {α : Type u} {s : Set α} (hs : Set.Nontrivial s) :
      α × α

      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.

      Equations
      Instances For
        theorem Set.Nontrivial.mono {α : Type u} {s : Set α} {t : Set α} (hs : Set.Nontrivial s) (hst : s t) :
        theorem Set.nontrivial_pair {α : Type u} {x : α} {y : α} (hxy : x y) :
        theorem Set.nontrivial_of_pair_subset {α : Type u} {s : Set α} {x : α} {y : α} (hxy : x y) (h : {x, y} s) :
        theorem Set.Nontrivial.pair_subset {α : Type u} {s : Set α} (hs : Set.Nontrivial s) :
        ∃ (x : α) (y : α), x y {x, y} s
        theorem Set.nontrivial_iff_pair_subset {α : Type u} {s : Set α} :
        Set.Nontrivial s ∃ (x : α) (y : α), x y {x, y} s
        theorem Set.nontrivial_of_exists_ne {α : Type u} {s : Set α} {x : α} (hx : x s) (h : ∃ y ∈ s, y x) :
        theorem Set.Nontrivial.exists_ne {α : Type u} {s : Set α} (hs : Set.Nontrivial s) (z : α) :
        ∃ x ∈ s, x z
        theorem Set.nontrivial_iff_exists_ne {α : Type u} {s : Set α} {x : α} (hx : x s) :
        Set.Nontrivial s ∃ y ∈ s, y x
        theorem Set.nontrivial_of_lt {α : Type u} {s : Set α} [Preorder α] {x : α} {y : α} (hx : x s) (hy : y s) (hxy : x < y) :
        theorem Set.nontrivial_of_exists_lt {α : Type u} {s : Set α} [Preorder α] (H : ∃ x ∈ s, ∃ y ∈ s, x < y) :
        theorem Set.Nontrivial.exists_lt {α : Type u} {s : Set α} [LinearOrder α] (hs : Set.Nontrivial s) :
        ∃ x ∈ s, ∃ y ∈ s, x < y
        theorem Set.nontrivial_iff_exists_lt {α : Type u} {s : Set α} [LinearOrder α] :
        Set.Nontrivial s ∃ x ∈ s, ∃ y ∈ s, x < y
        theorem Set.Nontrivial.nonempty {α : Type u} {s : Set α} (hs : Set.Nontrivial s) :
        theorem Set.Nontrivial.ne_empty {α : Type u} {s : Set α} (hs : Set.Nontrivial s) :
        @[simp]
        theorem Set.not_nontrivial_singleton {α : Type u} {x : α} :
        theorem Set.Nontrivial.ne_singleton {α : Type u} {s : Set α} {x : α} (hs : Set.Nontrivial s) :
        s {x}
        theorem Set.Nontrivial.not_subset_singleton {α : Type u} {s : Set α} {x : α} (hs : Set.Nontrivial s) :
        ¬s {x}
        @[simp]
        @[simp]
        theorem Set.nontrivial_coe_sort {α : Type u} {s : Set α} :

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

        theorem Set.Nontrivial.coe_sort {α : Type u} {s : Set α} :

        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 {α : Type u} {s : Set α} (hs : Nontrivial s) :

        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 {α : Type u_1} {s : Set α} {t : Set α} (hst : s t) (hs : Nontrivial s) :

        Alias of the reverse direction of Set.not_nontrivial_iff.

        Alias of the reverse direction of Set.not_subsingleton_iff.

        theorem Set.eq_singleton_or_nontrivial {α : Type u} {a : α} {s : Set α} (ha : a s) :
        theorem Set.nontrivial_iff_ne_singleton {α : Type u} {a : α} {s : Set α} (ha : a s) :
        theorem Set.Nonempty.exists_eq_singleton_or_nontrivial {α : Type u} {s : Set α} :
        Set.Nonempty s(∃ (a : α), s = {a}) Set.Nontrivial s

        Monotonicity on singletons #

        theorem Set.Subsingleton.monotoneOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : Set.Subsingleton s) :
        theorem Set.Subsingleton.antitoneOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : Set.Subsingleton s) :
        theorem Set.Subsingleton.strictMonoOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : Set.Subsingleton s) :
        theorem Set.Subsingleton.strictAntiOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : Set.Subsingleton s) :
        @[simp]
        theorem Set.monotoneOn_singleton {α : Type u} {β : Type v} {a : α} [Preorder α] [Preorder β] (f : αβ) :
        @[simp]
        theorem Set.antitoneOn_singleton {α : Type u} {β : Type v} {a : α} [Preorder α] [Preorder β] (f : αβ) :
        @[simp]
        theorem Set.strictMonoOn_singleton {α : Type u} {β : Type v} {a : α} [Preorder α] [Preorder β] (f : αβ) :
        @[simp]
        theorem Set.strictAntiOn_singleton {α : Type u} {β : Type v} {a : α} [Preorder α] [Preorder β] (f : αβ) :