Usages of "Let" in the cases of 1) Antecedent Assumption, 2) Existential Instantiation, and 3) Labeling A practice problem led me to produce the following statement (the below result is specific to the practice problem):

For any non-empty interval $I$ (open or closed) in $\mathbb R$: $\forall a,b \in I \left[f(a)=f(b) \right]$

It seemed intuitive that I could conclude the function $f$ was constant over the interval $I$. In attempt to be more formal, I constructed the following claim:
$$\forall a,b \in I \left[f(a)=f(b) \right] \rightarrow \exists C \in \mathbb R \text{ s.t. } \forall x \in I \left [f(x)=C \right]$$
For the purpose of my question, I am going to expand the universal statements into their "full" form and use some color coding:
$$\color{blue}{\forall a,b \big( a \in I \land b \in I} \rightarrow f(a)=f(b) \big) \rightarrow \color{red}{\exists C} \in \mathbb R \text{ s.t. } \color{orange}{\forall x \big ( x \in I} \rightarrow f(x)=C \big)$$
Here is how I would prove this statement:

*

*$I$ is a non-empty set and therefore $\exists y \in I$


*$\color{red}{\text{Let }y} \text{ be an arbitrary element of } I$.


*$\color{orange}{\text{Let  }x } \text{ be an arbitrary element of } I$.


*By our $\color{blue}{\text{assumption}}$, we then conclude that $f(x)=f(y)$.


*Let $f(y)$ be represented by the symbol $C$...i.e. $C=f(y)$.


*Therefore, $f(x)=C$.


*$x$ was arbitrary so we can generalize to all $x$ in $I \quad \square$

I have a series of questions about Step 2, Step 3, and Step 5. I very purposely used the same verb  "let" for the three different statements...because I have encountered all such usages of this word. I apologize in advanced if the proper math jargon that is germane to this question is lacking.
Firstly, although Step 2 and Step 3 are both introducing symbols with the same feature of belonging to the non-empty interval $I$, these two steps seem fundamentally different to me. The ability to bring the object $x$ into the argument seems to emerge naturally for proofs involving implications: I am assuming that $x$ is in $I$ - I refer to this as an "Antecedent Assumption" and am unsure if it has a technical name. My impression is that Step 3 does not depend on Step 1.
Conversely, I feel as though Step 2 can only be invoked as a consequence of Step 1. In particular, I believe this is an instance of existential instantiation As the color coding suggests, Step 2 is asserted in order to eventually produce the desired $C$.
Finally, Step 5 seems to be purely a labeling step. I don't believe this step corresponds to either an antecedent assumption or an existential instantiation. In fact, I have no idea what to refer to this step as in technical terms.
If someone could please provide their expertise on the distinction between these three different usages of the word "Let" (and comment on whether or not my initial attempt at describing them is correct), I would greatly appreciate it.
 A: The statement you're trying to prove is actually a special case of the following statement, where $A, B$ are sets and $f : A \to B$:
$$\exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y)) \implies \exists C \in B \forall x \in A (f(x) = C)$$
The semi-formal proof goes as follows:

*

*$\exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y))$ [assumption]

*$\exists a \in A$ [$\land$-elimination, 1]

*Introduce variable $a \in A$. [assumption]

*$\forall x \in A \forall y \in A (f(x) = f(y))$ [$\land$-elimination, 1]

*$\forall y \in A (f(a) = f(y))$ [$\forall$-elimination, 4, 3]

*Introduce variable $y \in A$. [assumption]

*$f(a) = f(y)$ [$\forall$-elimination, 5, 6]

*$f(y) = f(a)$ [symmetric property of equality]

*$\forall y \in A (f(y) = f(a))$ [$\forall$-introduction, 6-8 - discharge variable $y \in A$]

*$\exists C \in B \forall y \in A (f(y) = C)$ [$\exists$-introduction, 9]

*$\exists C \in B \forall y \in A (f(y) = C)$ [$\exists$-elimination, 2, 3-10, discharge variable $a \in A$]

*$\exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y)) \implies \exists C \in B \forall y \in A (f(y) = C)$ [$\implies$-introduction, 1-12, discharge assumption $\exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y))$]

We see that there are two places where we introduce a new variable, on lines 3 and 6. We use the variable introduction on line 6 to prove a universally quantified statement on line 9. We use the variable introduction on line 3 to utilize $\exists$-elimination.
There is a duality here between proving a statement that begins with $\forall$ and utilizing a statement that begins with $\exists$.
Using a more formal sequent calculus might help to clear up the confusion.
The assertion $\Gamma \vdash \phi$ means that in the context $\Gamma$, we can prove $\Phi$. The context includes all variables and their types (though for simplicity we won't include $A, B,$ or $f$ in $\Gamma$). It also includes all assumed statements.
The relevant rules of the sequent calculus are:
$$\begin{array}{c}
\hline
\Gamma, \Phi, \Delta \vdash \Phi
\end{array}$$ (where $\Phi$ is a statement and $\Gamma, \Phi, \Delta$ form a context)
$$\begin{array}{c}
\Gamma \vdash T \in A \\
\hline
\Gamma \vdash f(T) \in B
\end{array}$$
$$\begin{array}{c}
\Gamma \vdash \Phi \land \Psi \\
\hline
\Gamma \vdash \Phi
\end{array}$$
$$\begin{array}{c}
\Gamma \vdash \Phi \land \Psi \\
\hline
\Gamma \vdash \Psi
\end{array}$$
$$\begin{array}{c}
\Gamma, x \in X \vdash P(x) \\
\hline
\Gamma \vdash \forall x \in X (P(x))
\end{array}$$
$$\begin{array}{c}
\Gamma \vdash \forall x \in X P(x) \; \; \; \Gamma \vdash T \in X \\
\hline
\Gamma \vdash P(T)
\end{array}$$
$$\begin{array}{c}
\Gamma, x \in X, Q(x) \vdash P \; \; \; \Gamma \vdash \exists y \in X (Q(y)) \\
\hline
\Gamma \vdash P
\end{array}$$
$$\begin{array}{c}
\Gamma \vdash T \in X \;\;\; \Gamma \vdash P(T) \\
\hline
\Gamma \vdash \exists C \in X (P(C))
\end{array}$$
$$\begin{array}{c}
\Gamma, \Phi \vdash \Psi\\
\hline
\Gamma \vdash \Phi \implies \Psi
\end{array}$$
$$\begin{array}{c}
\Gamma \vdash T_1 \in X \; \; \Gamma \vdash T_2 \in X \; \; \Gamma \vdash T_1 = T_2\\
\hline
\Gamma \vdash T_2 = T_1
\end{array}$$
For brevity, let $\Phi$ abbreviate the statement $\exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y))$. The very formal proof for you is as follows:

*

*$\Phi \vdash \exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y))$

*$\Phi \vdash \exists a \in A$ [derived from line 1]

*$\Phi, a \in A, y \in A \vdash a \in A$

*$\Phi, a \in A, y \in A \vdash \exists a \in A \land \forall x \in A \forall y \in A (f(x) = f(y))$

*$\Phi, a \in A, y \in A \vdash \forall x \in A \forall y \in A (f(x) = f(y))$ [line 4]

*$\Phi, a \in A, y \in A \vdash \forall y \in A (f(a) = f(y))$ [lines 3, 5]

*$\Phi, a \in A, y \in A \vdash y \in A$

*$\Phi, a \in A, y \in A \vdash f(a) = f(y)$ [lines 6, 7]

*$\Phi, a \in A, y \in A \vdash f(y) = f(a)$ [line 8]

*$\Phi, a \in A \vdash \forall y \in A (f(y) = f(a))$ [line 9]

*$\Phi, a \in A \vdash a \in A$

*$\Phi, a \in A \vdash f(a) \in B$ [line 11]

*$\Phi, a \in A \vdash \exists C \in B \forall y \in A (f(y) = C)$ [lines 10, 12]

*$\Phi \vdash \exists C \in B \forall y \in A (f(y) = C)$ [lines 2, 13]

*$\vdash \Phi \implies \exists C \in B \forall y \in A (f(y) = C)$ [line 14]

Notice that we discharge the statement $y \in A$ from the context in order to prove the universally quantified statement $\forall y \in A (f(y) = f(a))$.
Notice that we discharge the statement $a \in A$ from the context in order to utilize the already proven $\exists a \in A$ and prove another statement.
Finally, the part where we say "Let $C = f(a)$" in the informal proof is best reflected on line 13, where we use the already proven $\forall y \in A (f(y) = f(a))$ to prove the statement $\exists C \in B \forall y \in A (f(y) = C)$.
These are three distinct uses of the English term "let".
