Counting, mostly of finite sets, has various applications in mathematics. One important principle is that if two sets "X" and "Y" have the same finite number of elements, and a function is known to be injective, then it is also surjective, and vice versa. A related fact is known as the pigeonhole principle, which states that if two sets "X" and "Y" have finite numbers of elements "n" and "m" with , then any map is "not" injective (so there exist two distinct elements of "X" that "f" sends to the same element of "Y"); this follows from the former principle, since if "f" were injective, then so would its restriction to a strict subset "S" of "X" with "m" elements, which restriction would then be surjective, contradicting the fact that for "x" in "X" outside "S", "f"("x") cannot be in the image of the restriction. Similar counting arguments can prove the existence of certain objects without explicitly providing an example. In the case of infinite sets this can even apply in situations where it is impossible to give an example.