11.Β 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. 11.1. Natural Numbers
    1. 11.1.1. Logical Model
    2. 11.1.2. Run-Time Representation
      1. 11.1.2.1. Performance Notes
    3. 11.1.3. Syntax
    4. 11.1.4. API Reference
      1. 11.1.4.1. Arithmetic
        1. 11.1.4.1.1. Bitwise Operations
      2. 11.1.4.2. Minimum and Maximum
      3. 11.1.4.3. GCD and LCM
      4. 11.1.4.4. Powers of Two
      5. 11.1.4.5. Comparisons
        1. 11.1.4.5.1. Boolean Comparisons
        2. 11.1.4.5.2. Decidable Equality
        3. 11.1.4.5.3. Predicates
      6. 11.1.4.6. Iteration
      7. 11.1.4.7. Conversion
        1. 11.1.4.7.1. Metaprogramming and Internals
      8. 11.1.4.8. Casts
      9. 11.1.4.9. Elimination
        1. 11.1.4.9.1. Alternative Induction Principles
    5. 11.1.5. Simplification
  2. 11.2. Integers
  3. 11.3. Finite Natural Numbers
  4. 11.4. Fixed-Precision Integer Types
  5. 11.5. Bitvectors
  6. 11.6. Floating-Point Numbers
  7. 11.7. Characters
    1. 11.7.1. Syntax
    2. 11.7.2. Logical Model
    3. 11.7.3. Run-Time Representation
    4. 11.7.4. API Reference
      1. 11.7.4.1. Character Classes
  8. 11.8. Strings
    1. 11.8.1. Logical Model
    2. 11.8.2. Run-Time Representation
      1. 11.8.2.1. Performance Notes
    3. 11.8.3. Syntax
      1. 11.8.3.1. String Literals
      2. 11.8.3.2. Interpolated Strings
      3. 11.8.3.3. Raw String Literals
    4. 11.8.4. API Reference
      1. 11.8.4.1. Constructing
      2. 11.8.4.2. Conversions
      3. 11.8.4.3. Properties
      4. 11.8.4.4. Positions
      5. 11.8.4.5. Lookups and Modifications
      6. 11.8.4.6. Folds and Aggregation
      7. 11.8.4.7. Comparisons
      8. 11.8.4.8. Manipulation
      9. 11.8.4.9. Iterators
      10. 11.8.4.10. Substrings
      11. 11.8.4.11. Proof Automation
      12. 11.8.4.12. Metaprogramming
      13. 11.8.4.13. Encodings
    5. 11.8.5. FFI
  9. 11.9. The Unit Type
    1. 11.9.1. Definitional Equality
  10. 11.10. The Empty Type
  11. 11.11. Booleans
    1. 11.11.1. Run-Time Representation
    2. 11.11.2. Booleans and Propositions
    3. 11.11.3. Syntax
    4. 11.11.4. API Reference
      1. 11.11.4.1. Logical Operations
      2. 11.11.4.2. Comparisons
      3. 11.11.4.3. Conversions
  12. 11.12. Optional Values
  13. 11.13. Tuples
  14. 11.14. Sum Types
  15. 11.15. Dependent Pairs
  16. 11.16. Linked Lists
  17. 11.17. Arrays
    1. 11.17.1. Logical Model
    2. 11.17.2. Run-Time Representation
      1. 11.17.2.1. Performance Notes
    3. 11.17.3. Syntax
    4. 11.17.4. API Reference
      1. 11.17.4.1. Constructing Arrays
      2. 11.17.4.2. Size
      3. 11.17.4.3. Lookups
      4. 11.17.4.4. Conversions
      5. 11.17.4.5. Modification
      6. 11.17.4.6. Sorted Arrays
      7. 11.17.4.7. Iteration
      8. 11.17.4.8. Transformation
      9. 11.17.4.9. Filtering
      10. 11.17.4.10. Partitioning
      11. 11.17.4.11. Element Predicates
      12. 11.17.4.12. Comparisons
      13. 11.17.4.13. Termination Helpers
      14. 11.17.4.14. Proof Automation
    5. 11.17.5. Sub-Arrays
      1. 11.17.5.1. Size
      2. 11.17.5.2. Resizing
      3. 11.17.5.3. Lookups
      4. 11.17.5.4. Iteration
      5. 11.17.5.5. Element Predicates
    6. 11.17.6. FFI
  18. 11.18. Subtypes
  19. 11.19. Lazy Computations
  20. 11.20. Tasks and Threads