what is the test for a function to be well defined
Answers
Let A 0 , A 1 be sets, let A = A 0 ∪ A 1 and "define" f : A → { 0 , 1 } as f ( a ) = 0 if a ∈ A 0 and f ( a ) = 1 if a ∈ A 1.
Then f is well-defined if A 0 ∩ A 1 = ∅. This is e. g. the case when A 0 := { 2 , 4 } , A 1 := { 3 , 5 } (then f(a) happens to be mod ( a , 2 ).
If however A 0 ∩ A 1 ≠ ∅ then f is not well-defined because f ( a ) is "ambiguous" for a ∈ A 0 ∩ A 1. This is e. g. the case when A 0 := { 2 } and A 1 := { 2 } . Indeed, A 0 ∩ A 1 = { 2 } ∋ 2 and f(2) would have to be 0 as well as 1, which is impossible. Therefore, the latter f is not well-defined and thus not a function.