Definition:Restriction/Notation

Notation
The use of the symbol $\restriction$ is a recent innovation over the more commonly-encountered $\vert$.

Thus the notation $\RR \vert_{X \times Y}$ and $\struct {T, \circ \vert_T}$, etc. are currently more likely to be seen than $\RR {\restriction_{X \times Y} }$ and $\struct {T, \circ {\restriction_T} }$.

No doubt as the convention becomes more established, $\restriction$ will develop.

It is strongly arguable that $\restriction$, affectionately known as the harpoon, is preferable to $\vert$ as the latter is suffering from the potential ambiguity of overuse.

Some authors prefer not to subscript the subset, and render the notation as:
 * $f \mathbin \restriction X = \set {\tuple {x, \map f x}: x \in X}$

but this is not recommended on because it has less clarity.

Also note that it is commonplace even to omit the $\restriction$ symbol altogether, and merely render as $\RR_{X \times Y}$ or $\struct {T, \circ_T}$, and so on.