TITLE: Proving a function is well defined
QUESTION [5 upvotes]: The question I'm working on asks:

Let $J_4 =\{0,1,2,3\}$. Then $J_4 −\{0\}=\{1,2,3\}$. Student C tries to define
  a function S: $J_4 -\{0\}\to J_4 -\{0\}$ as follows: For each $x \in J_4 - \{0\}$,
  $S(x)$ is the number $y$ so that $(xy) \bmod 4 = 1$. Student F claims that $S$
  is not well defined. Who is right: student C or student D? Justify
  your answer.

I have several questions:

What is the salience of $J_4 - \{0\}$ ? I see that it removes $0$ from the list of elements, but this notation confuses me. I'm not sure exactly what it does, and it appears to be done twice (See function $S$).
Does subscript in $J_4$ mean $\bmod 4$ anything in the set?
The statement "$S(x)$ is the number $y$ so that $(xy) \bmod 4 = 1$" is also confusing me. $x$ remains the input and $y$ is the result of function $S$, right? 
To show that this is ill-defined would require showing that for an $x$, there are multiple $y$, making this not a function. To that it is well-defined I would have to do the opposite, right? For a problem like this, should I start off by just plugging numbers in and seeing what happens, or is there a systematic approach I should be aware of?

REPLY [2 votes]: 1.) I take $J_4-\{0\}$ in this context to just mean $J_4 \setminus \{0\}$, which is a more common notation in set theory, i.e $J$ "minus" $\{0\}$. There does not seem to be any ambiguity here.
2.) No, this is just standard (more or less) notation for $J_n=\{0,1,2,...,n-1\}$, which will have $n$ elements. Modulo is then a relation that you could invoke on the set. So we could say that we are "counting in $\mathbb{Z}_4=\{0,1,2,3\}$". This would usually refer to counting modulo $4$, in which we only use the numbers in $\mathbb{Z}_4$. (To be formal one defines these things using equivalence classes, but that is somewhat out of scope.)
3.) I understand how it can sound confusing but yes, it is exactly as it is written (I assume of course, I did not write it). So $S(x)=y$.
4.) If you think about it for a while, what is $S(1)$? It can only be sent to any of the elements in $J_4\setminus \{0\}$, i.e to any of $1,2,3$. But what number(s) $y$ has the property that $(xy)=1 \mod 4$? In conclusion, that it is not well defined refers to that it is not defined for all elements of its domain, i.e $J_4\setminus \{0\}$ in this case.
Hope this helps.