The Lean Language Reference

18. Basic Types🔗

Lean includes a number of built-in types that are specially supported by the compiler. Some, such as Nat, additionally have special support in the kernel. Other types don't have special compiler support per se, but rely in important ways on the internal representation of types for performance reasons.

  1. 18.1. Natural Numbers
  2. 18.2. Integers
  3. 18.3. Finite Natural Numbers
  4. 18.4. Fixed-Precision Integers
  5. 18.5. Bitvectors
  6. 18.6. Floating-Point Numbers
  7. 18.7. Characters
  8. 18.8. Strings
  9. 18.9. The Unit Type
  10. 18.10. The Empty Type
  11. 18.11. Booleans
  12. 18.12. Optional Values
  13. 18.13. Tuples
  14. 18.14. Sum Types
  15. 18.15. Linked Lists
  16. 18.16. Arrays
  17. 18.17. Subtypes
  18. 18.18. Lazy Computations