I would like to have a command `\catlim` which behaves differently in inline vs in display mode. Namely, in inline mode, it should be equivalent to `\lim` and in display mode, it should be equivalent to `\varprojlim` (or some nicer version of it) with arrow below the limit. Here is an example what the result should look like:

```
% arara: lualatex
\documentclass{article}
\usepackage{amsmath}
\usepackage{unicode-math}

\begin{document}

Inline \(\lim_{i \in \mathbb{N}} \mathbb{Z} / p^i \mathbb{Z}\) and display:
\begin{equation*}
  \varprojlim_{i \in \mathbb{N}} \mathbb{Z} / p^i \mathbb{Z}.
\end{equation*}

\end{document}

```