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.

  • false : ∀ (a : α), False
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 : Surjective f) :
    instance instIsEmptyForallOfNonempty {α : Sort u_1} {p : α → Sort u_4} [∀ (x : α), IsEmpty (p x)] [h : Nonempty α] :
    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} :

    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 α ↔ ∀ (a : α), 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
        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 : β → γ) :
          extend f g h = h
          @[simp]
          theorem leftTotal_empty {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty α] :
          theorem leftTotal_iff_isEmpty_left {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty β] :
          @[simp]
          theorem rightTotal_empty {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty β] :
          theorem rightTotal_iff_isEmpty_right {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty α] :
          @[simp]
          theorem biTotal_empty {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty α] [IsEmpty β] :
          theorem biTotal_iff_isEmpty_right {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty α] :
          theorem biTotal_iff_isEmpty_left {α : Type u_4} {β : Type u_5} (R : α → β → Prop) [IsEmpty β] :
          theorem Function.Bijective.of_isEmpty {α : Type u_4} {β : Type u_5} (f : α → β) [IsEmpty β] :