Surjectivity and the Choice of Codomain

A mapping is surjective when every element of the chosen codomain is reached by at least one input.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Change one declaration
  2. Prove coverage constructively
  3. Look for a witness for each target
  4. Keep surjectivity separate from uniqueness of witnesses

Change one declaration

Map \(\{1,2,3\}\) to their parities, with codomain odd and even. Both outcomes are reached. Including unknown as a third codomain value makes this map fail surjectivity without changing its rule. See domain, codomain, and image.

Prove coverage constructively

For a small codomain, give one input per possible output. For larger sets, describe how to construct an input from a target. An inverse mapping needs the target to have a unique input as well.[1]

Look for a witness for each target

On domain \(\{1,2,3,4\}\), the remainder modulo two takes both possible values in codomain \(\{0,1\}\). Give input two as a witness for zero and input one for one. Extending the codomain by a new target two makes the same formula fail surjectivity. See domain, codomain and image.

Target 0 ← input 2
Target 1 ← input 1
Target 2 has no input under remainder modulo 2

Keep surjectivity separate from uniqueness of witnesses

Inputs one and three both map to one, so a witness need not be unique. When constructing an inverse-like operation, choose how to select among preimages. The definition of an inverse function demands more than coverage alone.

References

  1. Eric Lehman, F. Thomson Leighton and Albert R. Meyer, Mathematics for Computer Science ↩