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 t : Set α} (ht : t.Subsingleton) (hst : s t) :
      theorem Set.Subsingleton.eq_singleton_of_mem {α : Type u} {s : Set α} (hs : s.Subsingleton) {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 : s.Subsingleton) :
      s = ∃ (x : α), s = {x}
      theorem Set.Subsingleton.induction_on {α : Type u} {s : Set α} {p : Set αProp} (hs : s.Subsingleton) (he : p ) (h₁ : ∀ (x : α), p {x}) :
      p s
      theorem Set.Subsingleton.inter_singleton {α : Type u} {a : α} {s : Set α} :
      theorem Set.Subsingleton.singleton_inter {α : Type u} {a : α} {s : Set α} :
      @[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.

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

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

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

          Equations
            Instances For
              theorem Set.Nontrivial.choose_fst_mem {α : Type u} {s : Set α} (hs : s.Nontrivial) :
              theorem Set.Nontrivial.choose_snd_mem {α : Type u} {s : Set α} (hs : s.Nontrivial) :
              theorem Set.Nontrivial.mono {α : Type u} {s t : Set α} (hs : s.Nontrivial) (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 : s.Nontrivial) :
              ∃ (x : α) (y : α), x y {x, y} s
              theorem Set.nontrivial_iff_pair_subset {α : Type u} {s : Set α} :
              s.Nontrivial ∃ (x : α) (y : α), x y {x, y} s
              theorem Set.nontrivial_of_exists_ne {α : Type u} {s : Set α} {x : α} (hx : x s) (h : ys, y x) :
              theorem Set.Nontrivial.exists_ne {α : Type u} {s : Set α} (hs : s.Nontrivial) (z : α) :
              xs, x z
              theorem Set.nontrivial_iff_exists_ne {α : Type u} {s : Set α} {x : α} (hx : x s) :
              s.Nontrivial ys, 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 : xs, ys, x < y) :
              theorem Set.Nontrivial.exists_lt {α : Type u} {s : Set α} [LinearOrder α] (hs : s.Nontrivial) :
              xs, ys, x < y
              theorem Set.nontrivial_iff_exists_lt {α : Type u} {s : Set α} [LinearOrder α] :
              s.Nontrivial xs, ys, x < y
              theorem Set.Nontrivial.nonempty {α : Type u} {s : Set α} (hs : s.Nontrivial) :
              theorem Set.Nontrivial.ne_empty {α : Type u} {s : Set α} (hs : s.Nontrivial) :
              theorem Set.Nontrivial.not_subset_empty {α : Type u} {s : Set α} (hs : s.Nontrivial) :
              @[simp]
              theorem Set.not_nontrivial_singleton {α : Type u} {x : α} :
              theorem Set.Nontrivial.ne_singleton {α : Type u} {s : Set α} {x : α} (hs : s.Nontrivial) :
              s {x}
              theorem Set.Nontrivial.not_subset_singleton {α : Type u} {s : Set α} {x : α} (hs : s.Nontrivial) :
              @[simp]
              theorem Set.singleton_ne_univ {α : Type u} [Nontrivial α] (a : α) :
              @[simp]
              theorem Set.singleton_ssubset_univ {α : Type u} [Nontrivial α] (a : α) :
              theorem Set.nontrivial_of_nontrivial {α : Type u} {s : Set α} (hs : s.Nontrivial) :
              @[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 t : Set α} (hst : s t) (hs : Nontrivial s) :
              @[simp]
              @[simp]

              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 α} :
              s.Nonempty(∃ (a : α), s = {a}) s.Nontrivial

              Monotonicity on singletons #

              theorem Set.Subsingleton.monotoneOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : s.Subsingleton) :
              theorem Set.Subsingleton.antitoneOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : s.Subsingleton) :
              theorem Set.Subsingleton.strictMonoOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : s.Subsingleton) :
              theorem Set.Subsingleton.strictAntiOn {α : Type u} {β : Type v} {s : Set α} [Preorder α] [Preorder β] (f : αβ) (h : s.Subsingleton) :
              @[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 : αβ) :