The promise is Simon's problem. If , then implies , so is an injective function. If , then each value has exactly the two preimages and ; thus is two-to-one and is constant on the two-element cosets of .