2015-01-02 22:22:20 -08:00
|
|
|
import data.vector
|
|
|
|
open nat vector
|
|
|
|
|
2015-02-25 16:20:44 -08:00
|
|
|
definition swap {A : Type} : Π {n}, vector A (succ (succ n)) → vector A (succ (succ n))
|
|
|
|
| swap (a :: b :: vs) := b :: a :: vs
|
2015-01-02 22:22:20 -08:00
|
|
|
|
|
|
|
example (n : nat) (a b : num) (v : vector num n) : swap (a :: b :: v) = b :: a :: v :=
|
|
|
|
rfl
|