Understanding the law of identity in logic In logic, the 'law of identity' classically says: 'Every thing that exists' has a specific nature. More abstractly,  For all $x, x=x$. In a mathematical perspective, "For all $x$" is sensible to me when $x$ is contained in a universal set $U$ which is already been defined in a 'context'.
What does it mean by "For all $x$" or 'every thing that exists' or 'every being that exists' mathematically or logically? Is it a primitive notion? Also, what about 'existence'?, Some body argue that mathematically 'existence' is purely contextual.
 A: In logic, there is a (in)famous 'proof' of the existence of God:
$ 1.\ \forall x \ x=x$ (your 'Law of Identity')
$2. \ god = god$ (Universal Elimination on $1$)
$3. \ \exists x \ x=god$ (Existential Introduction on $2$)
So there you go: there is something that is God: God exists!
OK, we all understand that this is of course not a proof of God's existence at all. So what is going on?
Well, 'existence' in mathematics and logic is merely existence-in-some-logically-possible-world.
For example, '$2$' exists in the world of natural numbers, but '$\pi$' does not.  '$\pi$' does exist in the world of real numbers. In the former world, there does not exist any number between $1$ and $2$, but in the latter world such numbers do exist.
So, it is all about the world or 'domain' that you specify. Once you specify a certain domain, then anything from that domain exists in that domain. That sounds rather trivial and uninteresting, but note that it actually can lead to some interesting results. For example, mathematicians typically specify a domain by laying out certain axioms. The Peano axioms, for example, specify the domain of the natural numbers and some basic operations therein. With these axioms, you can then prove things that are not immediately obvious, such as 'there exist perfect numbers' or 'there does not exist a greatest prime number'.
So this is what you read or heard when you say that 'existence is purely contextual': logical and mathematical existence is merely existence relative to some imagined world or domain.  I could, for example, simply define a world in which unicorns exist, and bam: unicorns exist! ... though not necessarily in the world that you and I inhabit.
Of course, most mathematicians and logicians do aim for their work to be applicable to the world we live in, and therefore most logical and mathematical principles are defined as such. Indeed, logic and math 'works' quite well in our world.  But again, it would be a mistake to say that just because something logically or mathematically exist, it therefore exists in our world.
Finally, let's go back to the 'proof' of God's existence I started out with.
Line 1 seems unproblematic: yes, everything 'has a specific nature': nothing can be different from what its nature, i.e. nothing can be different from what it is: $\neg \exists x \ x \neq x$ or, what is logically the same thing: $\forall x \ x=x$
Line 2 is more tricky. Suddenly I introduce 'god'. Where does that come from?  Well, pleas note that in logic, 'god' is a well-defined constant symbol and, as such, we can certainly use it in logic statements and proofs. However, whenever we do use a constant symbol, we also need to provide an interpretation for that symbol: an object from our domain that that symbol refers to or denotes. So, I must have in mind some object in my domain that 'god' refers to.
This could of course be our very notion of God ... but once I do that, I am committing myself to talking about a world where such a God exist. But again, that may not be our world at all: it is simply some world that I contemplate. Moreover, I could also say that my use of 'god' refers to the number $42$, in which case it is not referring to our typical notion of God at all. In sum, whatever the 'god' in this proof refers to may not be something that we typically understand as God, let alone that it exists in the world we currently inhabit.
With that understanding, we now get line $3$: yes, in whatever world I am contemplating, there exists something that is identical to the object in that very world that I specified as being referred to as 'god': namely that very same object that is being referred to with 'god'!
So everything makes perfect sense logically and mathematically, but we have learned nothing about the nature of our world.
A: It refers to all $x$ in some particular universe. The statement $\forall x, x= x$ can be interpreted to mean that, for all $x$ that exist in the universe, $x = x$. Depending on the context, a logician may be discussing one of many different universes.
Unfortunately, I'm not qualified to answer questions about the meaning of existence.
A: (Submitted after a previous answer was accepted)
(1) In mathematical proofs, each quantifier is usually explicitly restricted to some domain (e.g. to the elements of a particular set). These domains may be empty. Different quantifiers can be restricted to different domains even within the same statement.
(2) In a statement of the form  $x=x$ (by reflexivity), the $x$ would usually be a free variable or constant that was previously introduced by either an axiom, premise or existential specification. The free variable or constant $x$ would usually not appear for the first time as $x=x$.
