On my recent exam, my professor wrote a note saying that the following notation shouldn't be used when discussing domains, and I'm not sure why it matters. So, my question:
I'll use a specific example, but I'm speaking generally when it comes to notation. When given a function of the form:
$$f(x) = \cases{ g(x) & if $x=1,2,3,...$ \\ h(x) & if $ x= -1, -2, -3, ..$} $$
Is it incorrect to write it as:
$$f(x) = \cases{ g(x) & if $x\in \mathbb N$ \\ h(x) & if $ x\in \mathbb Z<0$} $$
I've always been curious why this notation isn't used in textbooks, and my professors comment on my exam peaked my curiosity enough to post it here.
EDIT: I should mention I come from a physics and engineering background, not mathematics.
Thank you!