lecopivo / SciLean

Scientific computing in Lean 4
https://lecopivo.github.io/scientific-computing-lean/
Apache License 2.0
327 stars 29 forks source link
lean4 numerical-methods scientific-computing symbolic-computation

SciLean: Scientific Computing in Lean

Library for scientific computing such as solving differential equations, optimization or machine learning written in Lean. This library is in an early stage of development and at its current stage is just a proof of concept on how Lean can be used for scientific computing.

Lean is an expressive functional programming language that allows to formalize the mathematics behind these computations. This can offer several benefits:

Documentation

Manual:

Presentations:

Installation and running examples/tests

As we are using Lean programming language, you need Lean's version manager =elan=. Follow its installation instructions.

Getting and building SciLean simply:

git clone https://github.com/lecopivo/SciLean.git
cd SciLean
lake exe cache get
lake build

To run examples:

lake build HarmonicOscillator && .lake/build/bin/HarmonicOscillator
lake build WaveEquation && .lake/build/bin/WaveEquation 

Other examples in =examples= directory do not currently work.

To get an idea how SciLean works have a look at explanation of the harmonic oscillator example.