I started to use levels and curves tools quite recently and now I mostly use the second one. Mostly this is due to the fact that I understand the underlied mathematics of curves better than levels. My current understanding of levels is that it is simplified linear version of curves. I mean that those left and right sliders in levels are responsible for the edges of the linear curve like this one
(but strictly linear in between). Am I right? Where can I find a strict mathematical description of levels?
The other version of the question: is it always possible to replace levels by curves? Or there are things which can be done only using levels?