Documentation

Hale.Base.Data.Void

@[reducible, inline]
abbrev Data.Void :

The void type $\bot$ — uninhabited. Wraps Lean's Empty.

There exist no values of type $\text{Void}$, so any function $\text{Void} \to \alpha$ is vacuously total.

Equations
Instances For
    def Data.Void.absurd {α : Sort u} (v : Void) :
    α

    Eliminate from $\bot$ to any type: given $v : \bot$, produce any $\alpha$.

    $$\text{absurd} : \bot \to \alpha$$

    This is the ex falso quodlibet principle.

    Equations
    Instances For
      @[implicit_reducible]

      BEq instance for $\bot$. Vacuously satisfied since no two values exist to compare.

      Equations
      @[implicit_reducible]

      Ord instance for $\bot$. Vacuously satisfied since no values exist to order.

      Equations
      @[implicit_reducible]

      ToString instance for $\bot$. Vacuously satisfied — no value can be stringified.

      Equations
      @[implicit_reducible]

      Repr instance for $\bot$. Vacuously satisfied.

      Equations
      @[implicit_reducible]

      Hashable instance for $\bot$. Vacuously satisfied.

      Equations
      @[implicit_reducible]
      instance Data.Void.instInhabitedForall {α : Sort u_1} :
      Inhabited (Voidα)

      The function space $\bot \to \alpha$ is inhabited, witnessed by absurd.

      Since $|\bot| = 0$, there is exactly one function $\bot \to \alpha$ for any $\alpha$.

      Equations
      theorem Data.Void.eq_absurd {α : Sort u_1} (f : Voidα) :

      Any function from $\bot$ is vacuously equal to absurd:

      $$\forall\, f : \bot \to \alpha,\; f = \text{absurd}$$

      This follows because the function space $\bot \to \alpha$ is a singleton.