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.
IsEmpty α
expresses that α
is empty.
- false : α → False
Instances
- AddOpposite.instIsEmpty
- Empty.instIsEmpty
- Fin.isEmpty
- Fin.isEmpty'
- Finset.instIsEmpty
- Function.Embedding.is_empty
- LO.FirstOrder.Language.ORing.Func1IsEmpty
- LO.FirstOrder.Language.ORing.FuncGe3IsEmpty
- MulOpposite.instIsEmpty
- PEmpty.instIsEmpty
- PLift.instIsEmpty
- PProd.isEmpty_left
- PProd.isEmpty_right
- Prod.isEmpty_left
- Prod.isEmpty_right
- Quot.instIsEmpty
- Quotient.instIsEmpty
- Set.instIsEmptyElemEmptyCollection
- Sigma.isEmpty_left
- Subtype.isEmpty_false
- Sym.instIsEmptySucc
- ULift.instIsEmpty
- WithBot.instIsEmptySuccOrderOfNonempty
- WithTop.instIsEmptyPredOrderOfNonempty
- instIsEmptyFalse
- instIsEmptyForallOfNonempty
- instIsEmptyPSum
- instIsEmptySubtype
- instIsEmptySum
theorem
Function.Surjective.isEmpty
{α : Sort u_1}
{β : Sort u_2}
[IsEmpty α]
{f : α → β}
(hf : Surjective f)
:
IsEmpty β
subtypes by false are false.
Eliminate out of a type that IsEmpty
(without using projection notation).
Equations
- isEmptyElim a = ⋯.elim
Eliminate out of a type that IsEmpty
(using projection notation).
Equations
- x✝.elim a = isEmptyElim a
Non-dependent version of IsEmpty.elim
. Helpful if the elaborator cannot elaborate h.elim a
correctly.
Equations
- h.elim' a = ⋯.elim
@[simp]
@[simp]