Fixpoint Lget (A:Set) (n:nat) (l:list A) {struct l}:option A :=
match l with nil => None
| x::q =>
match n with O => Some x
| S m => Lget A m q
end end .

Lemma length_map : forall (A B:Set) (f:A -> B) l, length (List.map f l) = length l.