// The following variant of set comprehensions allows us to form the final set // elements by applying a function to the variables we quantify over. function SetMap(f: A -> B, s: set): set { set x | x in s :: f(x) } // Prove this size bound. lemma SizeSetMap(f: A -> B, s: set) ensures |SetMap(f, s)| <= |s|