when you write $abs(x)$ it is displayed as |x|. That is because math.abs is a Typst function that implements this behavior. when you write $sin(x)$ instead, you get sin(x), because sin is a text operator that is displayed, and the (x) is displayed separately from it. From a Typst execution standpoint, these are very different things, even though written the same way. And since shenanigans like let sin = math.abs are possible, you can’t differentiate the two before it’s too late.
3 Likes