lean2/tests/lean/run/eq3.lean

8 lines
257 B
Text

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