Documentation

Mathlib.Logic.IsEmpty

Types that are empty #

In this file we define a typeclass IsEmpty, which expresses that a type has no elements.

Main declaration #

class IsEmpty (α : Sort u_4) :

IsEmpty α expresses that α is empty.

Instances
    theorem Function.isEmpty {α : Sort u_1} {β : Sort u_2} [IsEmpty β] (f : αβ) :
    theorem Function.Surjective.isEmpty {α : Sort u_1} {β : Sort u_2} [IsEmpty α] {f : αβ} (hf : Function.Surjective f) :
    instance instIsEmptyForallOfNonempty {α : Sort u_1} {p : αSort u_4} [h : Nonempty α] [∀ (x : α), IsEmpty (p x)] :
    IsEmpty ((x : α) → p x)
    instance PProd.isEmpty_left {α : Sort u_1} {β : Sort u_2} [IsEmpty α] :
    IsEmpty (α ×' β)
    instance PProd.isEmpty_right {α : Sort u_1} {β : Sort u_2} [IsEmpty β] :
    IsEmpty (α ×' β)
    instance Prod.isEmpty_left {α : Type u_4} {β : Type u_5} [IsEmpty α] :
    IsEmpty (α × β)
    instance Prod.isEmpty_right {α : Type u_4} {β : Type u_5} [IsEmpty β] :
    IsEmpty (α × β)
    instance Quot.instIsEmpty {α : Sort u_4} [IsEmpty α] {r : ααProp} :
    instance Quotient.instIsEmpty {α : Sort u_4} [IsEmpty α] {s : Setoid α} :
    instance instIsEmptyPSum {α : Sort u_1} {β : Sort u_2} [IsEmpty α] [IsEmpty β] :
    IsEmpty (α ⊕' β)
    instance instIsEmptySum {α : Type u_4} {β : Type u_5} [IsEmpty α] [IsEmpty β] :
    IsEmpty (α β)
    instance instIsEmptySubtype {α : Sort u_1} [IsEmpty α] (p : αProp) :

    subtypes of an empty type are empty

    theorem Subtype.isEmpty_of_false {α : Sort u_1} {p : αProp} (hp : ∀ (a : α), ¬p a) :

    subtypes by an all-false predicate are false.

    instance Subtype.isEmpty_false {α : Sort u_1} :
    IsEmpty { _a : α // False }

    subtypes by false are false.

    instance Sigma.isEmpty_left {α : Type u_5} [IsEmpty α] {E : αType u_4} :
    def isEmptyElim {α : Sort u_1} [IsEmpty α] {p : αSort u_4} (a : α) :
    p a

    Eliminate out of a type that IsEmpty (without using projection notation).

    Equations
    Instances For
      theorem isEmpty_iff {α : Sort u_1} :
      IsEmpty α αFalse
      def IsEmpty.elim {α : Sort u} :
      IsEmpty α{p : αSort u_4} → (a : α) → p a

      Eliminate out of a type that IsEmpty (using projection notation).

      Equations
      Instances For
        def IsEmpty.elim' {α : Sort u_1} {β : Sort u_4} (h : IsEmpty α) (a : α) :
        β

        Non-dependent version of IsEmpty.elim. Helpful if the elaborator cannot elaborate h.elim a correctly.

        Equations
        • h.elim' a = .elim
        Instances For
          @[simp]
          theorem IsEmpty.forall_iff {α : Sort u_1} [IsEmpty α] {p : αProp} :
          (∀ (a : α), p a) True
          @[simp]
          theorem IsEmpty.exists_iff {α : Sort u_1} [IsEmpty α] {p : αProp} :
          (∃ (a : α), p a) False
          @[instance 100]
          instance IsEmpty.instSubsingleton {α : Sort u_1} [IsEmpty α] :
          @[simp]
          theorem not_nonempty_iff {α : Sort u_1} :
          @[simp]
          theorem not_isEmpty_iff {α : Sort u_1} :
          @[simp]
          theorem isEmpty_Prop {p : Prop} :
          @[simp]
          theorem isEmpty_pi {α : Sort u_1} {π : αSort u_4} :
          IsEmpty ((a : α) → π a) ∃ (a : α), IsEmpty (π a)
          theorem isEmpty_fun {α : Sort u_1} {β : Sort u_2} :
          IsEmpty (αβ) Nonempty α IsEmpty β
          @[simp]
          theorem nonempty_fun {α : Sort u_1} {β : Sort u_2} :
          Nonempty (αβ) IsEmpty α Nonempty β
          @[simp]
          theorem isEmpty_sigma {α : Type u_5} {E : αType u_4} :
          IsEmpty (Sigma E) ∀ (a : α), IsEmpty (E a)
          @[simp]
          theorem isEmpty_psigma {α : Sort u_5} {E : αSort u_4} :
          IsEmpty (PSigma E) ∀ (a : α), IsEmpty (E a)
          theorem isEmpty_subtype {α : Sort u_1} (p : αProp) :
          IsEmpty (Subtype p) ∀ (x : α), ¬p x
          @[simp]
          theorem isEmpty_prod {α : Type u_4} {β : Type u_5} :
          @[simp]
          theorem isEmpty_pprod {α : Sort u_1} {β : Sort u_2} :
          @[simp]
          theorem isEmpty_sum {α : Type u_4} {β : Type u_5} :
          @[simp]
          theorem isEmpty_psum {α : Sort u_4} {β : Sort u_5} :
          @[simp]
          @[simp]
          theorem isEmpty_plift {α : Sort u_4} :
          theorem wellFounded_of_isEmpty {α : Sort u_4} [IsEmpty α] (r : ααProp) :
          @[simp]
          theorem not_isEmpty_of_nonempty (α : Sort u_1) [h : Nonempty α] :
          theorem Function.extend_of_isEmpty {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} [IsEmpty α] (f : αβ) (g : αγ) (h : βγ) :
          @[simp]
          theorem leftTotal_empty {α : Type u_4} {β : Type u_5} (R : αβProp) [IsEmpty α] :
          @[simp]
          theorem rightTotal_empty {α : Type u_4} {β : Type u_5} (R : αβProp) [IsEmpty β] :
          @[simp]
          theorem biTotal_empty {α : Type u_4} {β : Type u_5} (R : αβProp) [IsEmpty α] [IsEmpty β] :