I'm confused by an exercise. Here is how it goes.
Let $A$ be some hypotheses, $A_1=A\cup\{\exists xp(x)\rightarrow p(c)\}$, where $c$ is a constant that does not appear in $p(x)$. Prove that if $A\,\nvdash\bot$, so does $A_1$.
Proof given by the textbook: Suppose $A_1\vdash\bot$, then $A\,\vdash\neg(\exists xp(x)\rightarrow p(c))$ (proof by contradiction). From here we have the following proof from $A$: \begin{align}{ ......\\ \neg(\exists xp(x)\rightarrow p(c)),\\ \exists xp(x)\wedge\neg p(c),\\ \exists xp(x),\\ \neg p(c),\\ \neg p(y),\qquad\text{y is a variable that does not appear in any formula in this proof till this point}\\ \forall y\neg p(y),\\ ......\text{(some obvious use of axioms here)}\\ \exists xp(x)\wedge\neg \exists xp(x). }\end{align} Therefore, $A\,\vdash\bot$.
My question: why is it allowed to substitute the constant with a new variable? Do I misunderstand the concept of 'constant'?
Context: The book is mainly about ZFC, thus merely introduces classical first-order logic briefly. I can't find anything from it to justify such substitutions. Plus, the contradiction $A\,\vdash\bot$ seems easily avoided when there are more than $1$ object in the system.