Documentation

PfsProgs25.Unit10.Vec

Vectors as indexed inductive types #

There are two common ways to define vectors in Lean, as indexed inductive types or as structures. In Lean, Vectors are defined as structures. Here, we define vectors as indexed inductive types.

inductive Vec (α : Type u) :
Type u
Instances For
    def Vec.add {α : Type u_1} [Add α] {n : } :
    Vec α nVec α nVec α n
    Equations
    Instances For