I was solving some functions problems and those exercises asked for stating the domain and range of the functions. In this process, I had my doubts about the function notation. I would like something to relate the Domain and Range. Considering the function f I've seen notations like \text{Dom}(f) and \text{Ran}(f), but I would like an alternative to this.
Take the example
f(x)=\frac{4-t^2}{2-t}=\frac{(2-t)(2+t)}{2-t}=2+t
Once t\neq2, the domain is (-\infty, 2)\cup(2, \infty). The range is t\neq4, which is the point (2, 4), where the function is undefined. Therefore, \text{Dom}(f)=\mathbb{R}-\{2\} and \text{Ran}(f)=\mathbb{R}-\{4\}. The example given is f:\mathbb{R}-\{2\}\to \mathbb{R}, and here is my doubt.
Once f:A\to B, where the domain is A and codomain B. I know that the difference between Codomain and Range is that Codomain contains elements that might be the imagens, and Range is exactly the images produced. Therefore, \text{Range}\subseteq \text{Codomain}.
Taking the example again, I can say f(\mathbb{R}-\{2\})=\mathbb{R}-\{4\}, but are there something wrong with f:\mathbb{R}-\{2\}\to \mathbb{R}-\{4\}? I can't use this that way? I found that way very straight. I would like to know/undertand better and improve my math notation, so recommendations and corrections are welcome.