Explaining the meaning of equality

Solution 1:

I think you got the rough idea. We have symbolic expressions and objects, which are two different things. We cannot take the objects themselves and put them on paper, but we can write symbolic expressions that refer to objects, and the objects they refer to are called their values. We might have multiple symbolic expressions that refer to the same object, in which case we say that their values are equal, or that the expressions are equivalent. This is the model-theoretic view, where we have a model that specifies what the value of each expression is.

Based on this view, the properties of equality follow naturally. We write "$x = y$" to mean that the expression "$x$" and "$y$" are equivalent (have equal value). Obviously $x = y$ iff $y = x$. Also, $x = y$ and $y = z$ clearly imply $x = z$.

If your meta-system (the system in which you reason about the meaning of equality in a formal system) is strong enough to let you talk about binary relations, then indeed equivalence of expressions is just an equivalence relation on expressions (which are just a certain subtype of finite strings). There is a one-to-one correspondence between the equivalence classes of expressions and the actual objects to which they refer.

But note that this equivalence relation may not exist within the formal system you are analyzing itself. For example if you are analyzing equality between sets in ZFC, the equivalence relation on expressions (denoting sets) is not a relation in ZFC itself unless you like a contradiction. This issue may not arise in other formal systems, but that is a different topic.

Solution 2:

In first-order logic, equality is a binary relation for which these two statements are true:

  1. Any variable or constant is equal to itself. We call this the Reflexive property, and it can be written

$$\text{For all $x$, }x=x$$

or, more formally,

$$\forall x(x=x)$$

  1. If two items are equal, anything we can say about the first item in our logical system we can also say about the other item. If $\mathcal A(u,v)$ stands for any logical statement about items $u$ and $v$, then

$$x=y\implies \left[\mathcal A(x,x)\implies \mathcal A(x,y)\right]$$

I.e. If $x$ and $y$ are equal, and we know some truth about $x$, then we can replace some of the occurrences of $x$ in that truth with $y$ and the statement will still be true.

Equality does not mean that two items are exactly identical in every way, just that they are identical in all the statements we can say in our logical system. If our logical system does not allow us to say something, then the two identical items may act differently in that respect. For example, in our usual axioms of arithmetic, $-0=+0$, even though those two things look different. Most computer CPU's actually allow separate positive and negative zeros, and doing calculations with them can me meaningful in some contexts. However, when we do standard number theory, we have no way of even talking about how $-0$ "looks different from" $+0$. We could say the same about $+i$ and $-i$ in the complex number system being "isomorphic" to each other: in many ways of talking, the two behave just the same.


Equality can also be explained in other ways. The usual laws of equivalence properties, such as reflexitivity ($x=y\implies y=x$) and transitivity ($x=y\text{ and }y=z\implies x=z$) can also be said to be at the root of equality, but those can be proved from the two statements I gave above. There certainly is much more that can be said about equality, but the two statements imply all the rest. For details, see Introduction to Mathematical Logic by Elliot Mendelson, pages 75-82, as well as other parts of the book.

Solution 3:

It's known at least since Heraclitus $2,500$ years ago that sameness and difference are inseparable. He famously said "In the same river, ever different waters flow." Mathematically, Heraclitus' statement is encapsulated in the fact that equality of distinct things can only be conceived using projections. The projections we use to define two things as the same, define the differences we will overlook in doing so.

A projection is a translation from some set of properties to a subset of those properties, for example we can project some ordered pair $(x,y)$ down to $(x)$.

Two things are considered equal, when some projection of their properties down to a certain domain, coincides exactly. Equality of some equation in the conventional sense of $1+2=3$ states that these two sentences, projected down to the domain of numeric value, coincide exactly. This is an equivalence relation. Of course the string of characters $1+2$ isn't the same as the string $3$.

But even $3=3$ isn't an equality in the ideal sense we might imagine. No two distinct things are truly equal in the ideal sense of the word, because if they were identical in every way, they would be one thing. $3\neq3$ because one is the $3$ on the left, was typed first and comprises a certain set of pixels while the other is the $3$ on the right etc. But generally it's not helpful to maintain that degree of precision in our equality. But the crux of equality is this: Sameness and difference are one. The set of differences you are willing to overlook in order to consider two things the same, defines the nature of their equality.