proposition: Lemma lookup_total_preimg m x i : i ∈ map_preimg m !!! x ↔ m !! i = Some x.
proof: Proof. rewrite lookup_total_alt. destruct (map_preimg m !! x) as [X|] eqn:HX. - by apply lookup_preimg_Some. - rewrite lookup_preimg_None in HX. set_solver. Qed.
imports: Coq(Permutation) stdpp(options)