Section Select.
Context {X: Type}.
Fixpoint select (A: list nat) (B: list X)  :=
match A with
| nil => nil
| i :: A => match nth B i with
| Some x => x :: select A B
| None => select A B
end
end.

Lemma incl_select A B: A ⊆ B -> exists I, I ⊆ nats (length B) /\ select I B = A.