0

What is the proper notation when defining certain functions?

For example, consider the function $\phi:\mathbb{Q} \rightarrow \mathbb{Z}\times\mathbb{N}$ defined by $\phi(\frac{p}{q})=(p,q)$ for any $\frac{p}{q}\in\mathbb{Q}$ such that p and q have no common divisor except 1. The way this function is defined relies on how the set $\mathbb{Q}$ is defined, that is, $\mathbb{Q}=\{\frac{p}{q}:p\in\mathbb{Z},q\in\mathbb{N}\}$.

I have seen that sets can be defined in general as $\{\sigma(n_1,n_2,...,n_k):n_1\in N_1,n_2\in N_2,...,n_k\in N_k\}$, where $\sigma$ is some sort of formula that depends of the sets $N_1,N_2,...,N_k$. Can we somehow define this function, not by the form of the elements of $\mathbb{Q}$ but rather an arbitrary element, say r, such that we can write the images of $\phi$ as $\phi(r)$? It always confuses me that when these sort of functions are defined this way, the function depends of several variables instead of one like the one previously mentioned.

Arturo Magidin
  • 398,050
  • Your function $\phi$ is not well-defined: $\phi(1 / 2) = (1, 2) \neq (2, 4) = \phi(2 / 4)$, but obviously $1 / 2 = 2 / 4$ in $\mathbb{Q}$! – Ben Steffan Feb 16 '24 at 17:21
  • Sorry about that, I forgot to add that gcd(p,q)=1. – Manuel Osuna Feb 16 '24 at 17:27
  • You can of course define "$\phi(r) = (p, q)$ where $r = p / q$ and $\gcd(p, q) = 1$" which is longer and less clear, and you can always do something similar for arbitrary domains. The point of defining $\phi$ as in your questions is that it makes things shorter and easier to understand. – Ben Steffan Feb 16 '24 at 17:28
  • So what we actually have is a nested quantifier: for every $r\in\mathbb{Q}$, there are some $p\in\mathbb{Z},q\in\mathbb{N}$ such that $gcd(p,q)=1$ and $\phi(r)=(p,q)$. – Manuel Osuna Feb 16 '24 at 17:36
  • 1
    Yes, but that's not the point. You can always define a function that takes just a generic element $r$ as input, but if all elements of your domain have a certain form and your function explicitly makes use of this, doing this is suboptimal. – Ben Steffan Feb 16 '24 at 17:43
  • I understand that it is simpler and I won't define functions that way anytime soon as it becomes much longer, but I had a slight itch to know what was actually going on. Thanks for your time! – Manuel Osuna Feb 16 '24 at 17:53
  • As an aside, the general way to define a set is not what you have listed. That is how you define the image set of the function $\sigma$. It is far from general. The general form is ${x : P(x)}$, where $P(x)$ is some logical relation on the variable $x$. Your definition of $\Bbb Q$ is just a shorthand for ${r : \exists p \in \Bbb Z, \exists q \in \Bbb N, r = \frac pq}$. – Paul Sinclair Feb 17 '24 at 21:57

0 Answers0