Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Void

Lean: Hale.Base.Void | Haskell: Data.Void

Overview

Uninhabited type (alias for Empty). Provides absurd for ex falso reasoning.

API Mapping

LeanHaskellKind
VoidVoidType
Void.absurdabsurdFunction

Instances

  • BEq Void
  • Ord Void
  • ToString Void
  • Repr Void
  • Hashable Void
  • Inhabited (Void -> a) — functions from Void are always inhabited

Proofs & Guarantees

  • eq_absurd — uniqueness of void functions: any two functions from Void are equal

Example

-- A function from Void to any type is unique
def fromVoid : Void -> Nat := Void.absurd