Types that are empty #
In this file we define a typeclass IsEmpty, which expresses that a type has no elements.
Main declaration #
IsEmpty: a typeclass that expresses that a type is empty.
theorem
Function.Surjective.isEmpty
{α : Sort u}
{β : Sort v}
[IsEmpty α]
{f : α → β}
(hf : Surjective f)
:
IsEmpty β
instance
instIsEmptyForallOfNonempty
{α : Sort u}
{p : α → Sort v}
[∀ (x : α), IsEmpty (p x)]
[h : Nonempty α]
:
IsEmpty ((x : α) → p x)
subtypes of an empty type are empty
theorem
Subtype.isEmpty_of_false
{α : Sort u}
{p : α → Prop}
(hp : ∀ (a : α), ¬p a)
:
IsEmpty (Subtype p)
subtypes by an all-false predicate are false.
subtypes by false are false.
Eliminate out of a type that IsEmpty (without using projection notation).
Instances For
Eliminate out of a type that IsEmpty (using projection notation).
Instances For
Non-dependent version of IsEmpty.elim. Helpful if the elaborator cannot elaborate h.elim a
correctly.
Instances For
@[simp]
@[simp]