I am looking for a pipe symbol that can be made to vary in height automatically.

One of the common ways of writing "such that" in mathematics is with the pipe symbol (|). The pipe can be represented in LaTeX directly as the character | or as `\vert`, but neither of these expands vertically in math presentation mode. I can adjust it manually this way:

```
\[\mathcal{H}=\left\lbrace h(x)=\sum_{i=0}^{k-1}a_{i}x_{i}\mod m\ \Bigg\vert
     \ a_{i}\in\mathbb{Z}_{m^{k}}\right\rbrace\]

```

![Using \Bigg\vert](https://i.stack.imgur.com/GKILs.png)

but I am looking for a true variable-sized option, parallel to `\lbrace` etc.

The `amsmath` package provides `\lvert` and `\rvert`, but I do not find them expanding as expected, and the `amsmath` documentation specifies that they should be used as binary delimiters (one on each side of something else), rather than alone.