Lean is a functional programming language that makes it easy to write correct and maintainable code. You can also use Lean as an interactive theorem prover. Lean programming primarily involves defining types and functions. This allows your focus to remain on the problem domain and manipulating its data, rather than the details of programming. Lean has numerous features, including:

  • Type inference
  • First-class functions
  • Powerful data types
  • Pattern matching
  • Type classes
  • Extensible syntax
  • Hygienic macros
  • Dependent types
  • Metaprogramming framework
  • Multithreading
  • Verification: you can prove properties of your functions using Lean itself

The Lean project was launched by Leonardo de Moura at Microsoft Research in 2013. It is an open source project, hosted on GitHub. Lean 4 is the latest version. The first milestone has been released on January 4, 2021, and nightly stable builds are available here. The mathematical components library mathlib is still based on Lean 3, but it will be ported to Lean 4. Further information about mathlib and the Lean 3 community releases can be found at the Lean Community website, including an online version of Lean.