I've been questioning some things about the use of variables that I hadn't paid much attention to. I'm sorry if this question is too obvious. I know how to use variables, I've worked with them many times. My question is on some logical concerns I have.
In mathematics we often state an identity using the variable $x$, for example: $(x+1)^2=x^2+2x+1$ $\forall x \in \mathbb{R}$ or we describe a set like $A=\{(\cos(t),\sin(t)) | t\in \mathbb{R} \}$. Why is it logically valid to use the same symbol for different numbers in the same context? The first identity is valid for $x=3$ and for $x=4$ and although both numbers are the same letter $x$, I certainly can't say $3=x=4$ because $x$ can't be 3 and 4 at the same "time".
Similarly in $A$, $t$ takes all the possible real values, so the same symbol is used for infinitely many objects.
When I describe the unit circle I say that it is the set of all the points $(x,y) \in \mathbb{R}^2$ that satisy $x^2+y^2=1$, Why can I use the same symbol "$(x,y)$" to refer to all those points and not imply an equality between them?
Another doubt I have concerning variables is: when I name an object with a letter (stating a definition) Is it the same "type" of equality as $1+1=2$ where the right hand side is the same as the left hand side? For example, in the previous example $A=\{(\cos(t),\sin(t)) | t\in \mathbb{R} \}$. An equality between sets happens when they both have the same elements, but how can A have the same elements as the right hand side when it isn't even defined before the equality. I know some people use $:=$ instead of $=$ to state a definition, so is there a mathematical distinction?
I apologize if this question is too elemental. I'm not sure how to tag this question, please correct me if I'm wrong.
These are expressions: $$ (x+1)^2\\ x^2+2x+1\\ \cos(t) $$ These are variables $$ x\\ t $$ These are values $$ 3\\ \pi $$
In an expression, you can evaluate any variable to any value you want. The symbol $|$ is used for this operation: $$ \left.(x+1)^2\right|_{x=3}=(3+1)^2=16\\ \left.x^2+2x+1\right|_{x=3}=3^2+2\cdot3+1=16\\ \left.\cos(t)\right|_{t=\pi}=\cos(\pi)=0 $$
An equality, inequality or any other proposition, can be true or false according the evaluation you do.
From here, several notations and objects can arise, which you must have to interprete one by one, as they appear in your route: