Closed Formula. A formula (in a first order language) is said to be closed if it has no free variables.
Closure of a Formula. Let $A[x_0, . . . , x_{n−1}]$ be a formula (in a first order language) whose free variables are among $x_0, . . . , x_{n−1}$ and $x_{n−1}$ is free in $A$, where $x_0, . . . , x_{n−1}$ are the first $n$ variables in alphabetical order. We call $\forall x_{n-1}\ldots\forall x_1\forall x_{0}A$ the closure of $A$.
Question.
Using these definitions, how can I show that if $A$ is closed, it is its own closure?
I thought that I will begin by assuming that $Q$ is the closure of $P$. But I don't understand what exactly it is that I need to show. Do I need to show that $P\leftrightarrow Q$ or that they are syntactically exactly same formula or something else? In any case I don't how to proceed. Can anyone help?
The definitions as stated may be problematic. Take any closed formula $A$. Then by the first definition $A$ has no free variables. Thus there is no natural number $n$ such that $x_{n-1}$ is a free variable in $A$, and so the second definition does not apply to $A$ and hence does not define the closure of $A$.
If the text from which these definitions come implicitly assumes that the second definition defines the closure for every formula, then the text is simply wrong. If however, the text does not assume that, then it must either specify later that the closure of a closed formula is itself, or it must never use that fact, since it cannot be proven from the two given definitions simply because of the above reason.
In any case, one correct way to define the closure of an arbitrary formula is as follows:
This definition is (unlike the one in the question) well-defined for all formulae, because every formula only contains finitely many variables, and hence the required $n$ always exists. Also, this definition satisfies the property that the closure of a closed formula is itself, which is easy to prove.
Anyway note that such a definition of closure is only compatible with the syntactical flavour of first-order logic that allows variable shadowing, namely that a quantified variable may be used outside the scope of the quantifier, such as in "$P(x,y) \land \forall y,z\ ( P(x,y) \land P(x,z) \to y=z )$", where the outer $y$ is shadowed by the quantified $y$ inside the scope of the quantifier. In practice this is a bad idea as it is confusing, but it is still often used in a formal definition of first-order logic.
Another definition of closure that is compatible even with flavours of first-order logic that do not allow variable shadowing is as follows:
Again, this definition applies to all formulae, and it is easy to prove that the closure of a closed formula is itself. Furthermore, this closure only adds the quantifiers needed, which is exactly what we would do in practice.