A boolean function of $n$ variables is a map \begin{align} &f : \{0,1\}^n \rightarrow \{0,1\} \tag 1\\ &(x_1, \dots, x_n) \mapsto f(x_1, \dots, x_n) \tag 2 \end{align} where $n= 1, 2, \dots$.
If $n=1$ I have $f: \{0,1\}\rightarrow \{0,1\}$.
So far so good. Feel free to correct me if the above is wrong in some way.
My main problem:
I want the variables to start from $0$ instead of $1$, i.e. $(x_0, \dots, x_{n-1})$, for the map \begin{align} &g : \{0,1\}^? \rightarrow \{0,1\}\tag 3\\ &(x_0, \dots, x_{n-1}) \mapsto g(x_0, \dots, x_{n-1}) \tag 4 \end{align} I guess $n=0, 1, \dots $ (or something else?).
My question: What is "?" in $(3)$, is it still $n$?
But $n=0$ gives $g: \{0,1\}^0 \rightarrow \{0,1\}$, which doesn't make sense (I want the same result as in $(1)$ and $(2)$).
The names of the variables are not part of the function's type. You could write a function of three variables as $f(x_1, x_2, x_3)$, $f(x_0, x_1, x_2)$, or $f(x,y,z)$; it's still a function $f:A^3\to B$.
The "where $n=1,2,3,\dots$" isn't referring to the variable names. It's saying "this definition applies to any natural number $n$". So they've defined what it means to be a function of 1 variable, what it means to be a function of 2 variables, and so on.