Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    $\begingroup$ Thank you. So there's no mathematical inconsistency, programmatic errors that would appear in oop programming languages... I want to use Kotlin as the main language. $\endgroup$
    – Kid A
    Commented Feb 13 at 8:11
  • 1
    $\begingroup$ The ads say Lean 4 is implemented in Lean 4, so what's up with that? $\endgroup$ Commented Feb 13 at 9:34
  • $\begingroup$ @AndrejBauer Most of Lean 4 is implemented in Lean 4, including the language server, parser, elaborator, and tactics. See here.. The logical kernel is still in C++, as is the interpreter which runs non-compiled Lean code. (The compiler uses Lean 4 to compile to C as an intermediate language and then to byte code.) There is an alternate Lean 4 checker Lean4Lean written in pure Lean 4, which could be a kernel. It is slower but it’s in pure Lean so can in the future be proved correct which is exciting. $\endgroup$
    – Jason Rute
    Commented Feb 13 at 13:15
  • $\begingroup$ Also my understanding is that to build Lean 4 there is a bootstrap of Lean 4 written in C++ so that you can then build Lean 4 in the C++ implemented bootstrap of Lean 4. So in that sense you could also say Lean 4 is also written in C++. $\endgroup$
    – Jason Rute
    Commented Feb 13 at 13:24
  • 1
    $\begingroup$ @KidA The only real "difficulty" is that object-oriented programs tend to be difficult to "reason about". Functional languages are far easier in this regard, which is probably one more reason why most proof assistants are written in functional languages. Jason Rute's answer gives more reasons why functional languages may be preferable. $\endgroup$ Commented Feb 15 at 15:29