Definition ad_monotonic (pf:ad -> ad) :=
    forall a a':ad, Nless a a' = true -> Nless (pf a) (pf a') = true.

Lemma alist_semantics_nth_ad : forall (l:alist A) (a:ad) (y:A), alist_semantics A l a = Some y -> {n : nat | S n <= length l /\ alist_nth_ad n l = a}.