lean2/tests/lean/run/eq3.lean

9 lines
256 B
Text
Raw Normal View History

import data.vector
open nat vector
definition swap {A : Type} : Π {n}, vector A (succ (succ n)) → vector A (succ (succ n)),
swap (a :: b :: vs) := b :: a :: vs
example (n : nat) (a b : num) (v : vector num n) : swap (a :: b :: v) = b :: a :: v :=
rfl