Ryan Orendorff - Functional Programming + Dependent Types ≡ Verified Linear Algebra

Опубликовано: 29 Январь 2025
на канале: Konfy
1,468
35

Special thanks to the Haskell Foundation for supporting the production of this video!

Haskell Love 2021 schedule: https://emamo.com/event/haskell-love
Haskell Love twitter:   / _haskellove  


Linear algebra is the backbone of many critical algorithms such as self driving cars and machine learning. Modern tooling makes it easy to program with linear algebra, but the resulting code is prone to bugs from index mismatches and improperly defined matrices.

In this talk, we will formalize basic linear algebra operations by representing a matrix as a function from one vector space to another. This "matrix-free" construction will enable us to prove basic properties about linear algebra; from this base, we will show a framework for formulating optimization problems that is correct by construction, meaning that it will be impossible to represent improperly formed matrices. We will compare the Agda framework to similar frameworks written in Python and in dependently typed Haskell, and demonstrate proving properties about optimization algorithms using this framework.