Section Find.
Context {X: Type}.
Context {D: Dis X}.
Fixpoint find (x: X) (A: list X) : option nat :=
match A with
| nil => None
| y :: A => if x == y then Some 0 else option_map S (find x A)
end.
End Find.

Lemma find_map_inv X Y {D1: Dis X} {D2: Dis Y} y (f: X -> Y) (A: list X) (n: nat):
find y (map f A) = Some n -> exists x, f x = y /\ find x A = Some n.