This is the definition of a minimization operator from A friendly Introduction to Mathematical Logic.
I'm having trouble understanding this. How can this map a function of $n+1$ variables to a function of $n$ variables if the operator seems to return a number $i$?
Can someone give me a simple example of a function $g$ and $(\mu i) g$?
Let $g$ be a function of arity $n + 1$ from $\Bbb N^{n+1}$ to $\Bbb N$.
Then, $(\mu i)[g(x_1, \dots, x_n, i)]$ denote the least natural number $i$ such that for any $j < i$, the value of $g(x_1, \dots x_n, j)$ is a natural number different from $0$ and the value of $g(x_1, \dots,x_n, i)$ is the natural number $0$.
We can view $(\mu i)[\dots]$ as an operator on functions. If we apply the operator to a function of $n+1$ variables, we get a function of $n$ variables.
See page 201-202 :
In this example, we have that $g : \mathbb N \times \mathbb N \to \mathbb N$ and $f : \mathbb N \to \mathbb N$.
The function $f(x)$ means : "the least number $i$ such that $x=i^2$".
For $x=1$ we have that $i=1$, and thus $f(1)=1$.
For $x=2$, we have no $i$, and thus $f(2)$ is undefined. The same for $x=3$.
For $x=4$, instead, we have that $i=2$ and thus $f(4)=2$.
And so on.
But see the complete definition of the $\mu$-operator :
Thus, Leary's definition must be read as a shorthand for :