mathlib3 documentation

lean-ga / examples.recursors

Recursors in functional programming #

This file contains the examples from section 2 of "Computing with the universal properties of the Clifford algebra and the even subalgebra".

While these are not related to GA at all, they are valuable for building intuition for how to think about clifford_algebra.lift and clifford_algebra.fold, along with other more complex recursion schemes.

Some quick remarks about Lean syntax from those coming from the paper:

def icacga.sum {R : Type u_1} [semiring R] :
list R R
Equations
def icacga.accum_from {R : Type u_1} [semiring R] :
Equations
def icacga.accum {R : Type u_1} [semiring R] :
Equations
def icacga.rev_accum_aux {R : Type u_1} [semiring R] :
list R R × list R
Equations
def icacga.rev_accum {R : Type u_1} [semiring R] :
Equations