proposition: Lemma filter_single : forall A B (IB:Inhab B) (f:A->B->Prop) x y, filter f (x \:= y) = If f x y then (x \:= y) else empty.
proof: Proof. Proof using. intros. case_if. { applys filter_all. intros k K. rewrite indom_single_eq in K. subst. rewrite* read_single. } { applys filter_none. intros k K. rewrite indom_single_eq in K. subst. rewrite* read_single. } Qed.
imports: TLC(LibTactics LibLogic LibReflect LibOption LibRelation LibLogic LibOperation LibEpsilon LibMonoid LibSet)