[Haskell-cafe] set terminology

Dan Weston westondan at imageworks.com
Fri Feb 15 17:59:52 EST 2008

To clarify the distinction between domain/corange as I understand common 

For a total function, the domain and corange are equal. In the category 
of sets, all functions are total (by definition of a function). If we 
generalize to the category of CPOs by associating with every set an 
extra value called "bottom" (as well as appropriate sums and products 
containing bottom), and by expanding the concept of function to make use 
of these bottoms for otherwise undefined mappings, then the domain 
refers to the thing with the bottoms in it and the corange refers to the 
largest set (i.e. no bottoms) in the domain whose image contains no 
bottoms in it. So the corange may not be equal to the domain.

So, domain and codomain in Haskell are types (i.e. that include bottom). 
Range, corange, preimage, and image are only sets that don't include a 

Also, a minor correction (after consulting Wikipedia [1]): For any given 
subset of the range (called an image), there may be multiple subsets of 
the corange that have this image (the corresponding inverse image). The 
"preimage" (or complete inverse image) is the exactly one largest such 
subset of the corange to have the given image.

[1] http://en.wikipedia.org/wiki/Function_%28mathematics%29


Dan Weston wrote:
> Since no one else has replied, I will take a stab. This is the 
> terminology I have seen/heard:
> A mapping in a category is typed. It can map only from a "source" object 
> to a "target" object. There may be zero, one, or multiple such mappings 
> (functions) from a given source to a given target (but at least one if 
> source and target are the same, namely the identity map).
> For a particular source and target, where the source and target happen 
> not just to be opaque objects but have internal structure (with subset 
> operations), mappings are called functions, the source is called the 
> domain, and the target is called the codomain.
> Elements X in the domain are mapped to some element Y in the codomain. 
> The set of all such Y is the range, and the set of all such X is the 
> corange. (Wikipedia [1] suggests that there is ambiguity with the word 
> "domain", but I have never heard that elsewhere).
> Any given subset S of the corange (called a preimage) maps to the 
> corresponding image of S, which is a subset of the range. Preimage and 
> image apply to singleton sets as well, so (by trivial isomorphism) these 
> words apply to mapped elements themselves. In this case, the usual arrow 
> symbol gets a little vertical cap on the left end.
> In any case, I would not get too hung up on the terminology. It is much 
> more important to understand what is meant in any given setting.
> [1] http://en.wikipedia.org/wiki/Function_%28mathematics%29
> Dan
> PR Stanley wrote:
>> Hi
>> domain, source --- are the two different things? I'm sure I read 
>> somewhere that the source \subseteq domain in mappings. The same was 
>> said about range and target -- target \subseteq range.
>> Any ideas?
>> Thanks, Paul
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list