What's the notation for a function restricted to a subset of the codomain? Suppose I have a function f : A → B between two sets A and B. (The same question applies to group homomorphisms, continuous maps between topological spaces, etc. But for simpicity let's restrict ourselves to the case of arbitrary maps between sets.)
If I have subset A' ⊆ A of the domain A, then I can restrict f to A'. There is the function f|A' : A' → B which is given by f|A'(a) = f(a) for all a ∈ A'. 
Suppose now that I have subset B' ⊆ B of the codomain B that contains the image of the map f. Similarly I can restrict f to B', meaning that there is a function g : A → B' which is given by g(a) = f(a) for all a ∈ A. 
In general, it might be useful to consider such functions g and have a name for them, for example if I have a function B' → C that I want to apply afterwards. Unfortunately, I haven't seen a name or symbol for this function g in literature. 

Is there notation for the
  restriction g of f to a subset of the
  codomain similar to the notation
  f|A' for a restriction to a
  subset of the domain?

 A: It's called a range restriction.  There's no established notation, but you might as well use the Z notation which is f  ▷ B'. (f \rhd B' in LaTeX plus amsfonts)
A: The terminology I have seen for this is "astriction".
A: Here's some notation.
Given a morphism $f : A \rightarrow B$ and a subobject $b': B' \rightarrow B$, the astriction of $f$ to $B' \subseteq B$ can be denoted $b'\backslash\, f : A \rightarrow B'$, pronounced "$b'$ under $f$." It satisfies $b'\circ (b'\backslash\, f).$ For example, if we have a function $f : A \rightarrow B$ and subsets $X$ of $A$ and $Y$ of $B$ such that $f(X)\subseteq Y$, then the relevant map $X \rightarrow Y$ can be denoted $Y\,\backslash\, (f \circ X).$
Similar notation can be used in linear algebra to denote solution sets. For example; to denote the set of all vectors $x$ satisfying a linear equation $Ax=b,$ I tend to write $A \backslash b.$ This has an intuitive look about it: $$Ax = b \iff x \in A \backslash b.$$
The connection basically is that in the category of matrices, $Ax=b$ can be seen as a factorization of $b$ through the tail of $A$ (because $A$ is on the left). So, the general principle is that:

In any category, $g \backslash \,f$ is good notation for the set of all factorizations of $f$ through the tail of $g$, or for the unique such factorization just in case a unique factorization exists.

Dually, if we have a function $f : A \rightarrow B$ and a quotient object $a' : A \rightarrow A'$, we can write $f/a'$ for the relevant morphism $A' \rightarrow B$ when it exists, or else use this notation to denote the set of all such morphisms.
A: This would fit as a response to Harald Hanche-Olsen's remark, but I have not enough points for this. 
Anyway, Mizar mathematial library chose exactly this notation; actually, it is introduced in the article on basic relations RELAT_1.MIZ, Def. 12, so it fits any relation and any set.
In a Mizar article you have just ASCII, so no subscripts, but you can always avoid ambiguities like f|X versus X|f by typing the two objects appearing in the notation as Relation and set respectively. I find interesting that what is expressible on paper by varying font size is emulated by typing in a proof checker.
A: Concerning the name for the notion in question, but not the notation, Exposé 2 by A. Andreotti in the Séminaire A. Grothendieck 1957, available at www.numdam.org, suggests the following:
Consider a morphism $f:A\rightarrow B$ in some category, subobjects $i:U\rightarrow A$ and $j:V\rightarrow B$ of $A$ and $B$, respectively, and quotient objects $p:A\rightarrow P$ and $q:B\rightarrow Q$ of $A$ and $B$, respectively.
Then, $f\circ i$ is the restriction of $f$ to $U$. Dually, $q\circ f$ is the corestriction of $f$ to $Q$. (In particular, with the usual usage of the prefix "co", corestriction is not suitable for the notion in question.)
Moreover, if there is a morphism $g:P\rightarrow B$ with $g\circ p=f$, then $g$ is the astriction of $f$ to $P$. Dually, if there is a morphism $h:A\rightarrow V$ with $j\circ h=f$, then $h$ is the coastriction of $f$ to $V$. (Of course one can argue whether one should swap the terms astriction and coastriction (as suggested by Gerald Edgar).) 
A: I would call it simply a pullback (along $B'$). Thus, you may denote it by $f \times_B B'$.
If we pullback a map $f : A \to B$ along a subset $B' \subseteq B$, we get the map $f^{-1}(B') \to B', x \mapsto f(x)$. If the image of $f$ happens to be a subset of $B'$, then $f^{-1}(B')=A$.
A: If I wanted a name, I might use "corestriction."
