I have an IT background and I'm trying to find proper and formal definitions of partial and total functions.
I'm unsure about my answers, this is why I'm posting here.
Do you think you could give me some feedback? Do you think the following definitions are good? If not, could you please let me know what is wrong and eventually and good book about that?
Let $S \subseteq \mathbb{N}^k$.
Let $f: S \to \mathbb{N}$ be a function.
Partial function
$\exists x \in \mathbb{N}^k, f(x) \notin \mathbb{N}$. Then $f$ is known as a ``partial function''.
Total function
$\forall x \in \mathbb{N}^k, f(x) \in \mathbb{N}$. Then $f$ is known as a ``total function''.
Edit 1 - After some feedback
Let $S \subseteq \mathbb{N}^k$ (strict or equal to).
Let $f: S \to \mathbb{N}$ be a function.
If $S \neq \mathbb{N}^k$ then $\forall x \in \mathbb{N}^k \setminus S, f(x)$ is undefined and then $f$ is known as a partial function.
If $S = \mathbb{N}^k$ then $\forall x \in S, f(x)$ is defined and then $f$ is known as a total function.
Edit 2 - After more feedback
Partial function
Let $S \subsetneq \mathbb{N}^k$.
Let $f: S \rightharpoonup \mathbb{N}$ be a function.
$\forall x \in \mathbb{N}^k \setminus S, f(x)$ is undefined and then $f$ is known as a partial function.
Total function
Let $S = \mathbb{N}^k$.
Let $f: S \to \mathbb{N}$ be a function.
$\forall x \in S, f(x)$ is defined and then $f$ is known as a total function.
Thanks!
\subsetneq. – Eric Towers Nov 05 '21 at 20:07