ryanorendorff / functional-linear-algebra-talk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Formalizing Linear Algebra Algorithms using Dependently Typed Functional Programming

Presentation Type Checks Presentation PDF Builds

Download Presentation PDF Download Handout PDF

This is a presentation about the Agda library functional-linear-algebra, which formalizes the matrix-free functional representation of linear algebra.

Abstract

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.

How to play around with the Agda code in this repository

If you have the Nix package manager installed, you can run

nix-shell

at the root of this presentation and then launch emacs

emacs src/FunctionalPresentation.lagda.md

More information on the Agda emacs mode can be found here. If you use Spacemacs, the documentation for its Agda mode is here.

How to build the presentation

nix-build presentation.nix

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Nix 98.5%Language:Agda 1.5%