Minimal example:
\begin{frame}
\newcommand \ovStepA 1
\newcommand \ovStepB 4
\newcommand \ovStepC 9
\newcommand \predOf[1] {%
% ???
}
\newcommand \succOf[1] {%
% ???
}
\only<-\predOf\ovStepB>{visible until step B (excluded)} % should expand to \only<-3>{...}
\only<\ovStepB->{visible from step B (included)}
\only<-\ovStepC>{visible up to step C (included)}
\only<\succOf\ovStepC->{visible after step C (excluded)} % should expand to \only<10->{...}
\end{frame}
Do overlay specifications have a syntax for that (similarly to how Git lets you refer to the predecessor of HEAD as HEAD^, for instance), or otherwise how to have \predOf and \succOf run some basic arithmetic?

beamer. – Joseph Wright Apr 25 '22 at 06:07\newcommand \ovStepA 1, which relies on how\newcommandis defined to add the braces that TeX requires: this should be\newcommand\ovStepA{1}. – Joseph Wright Apr 25 '22 at 06:08{ }are not just parentheses, now I’m learning that spaces are significant syntax tokens. Why, why, why… – Maëlan May 10 '22 at 19:56