# Equality definition

In his book "Analysis 1", Terence Tao writes:

Thus, from the point of view of logic, we can define equality on a however we please, so long as it obeys the reflexive, symmetry, and transitive axioms, and it is consistent with all other operations on the class of objects under discussion in the sense that the substitution axiom was true for all of those operations.

So can one for example define that two functions $f, g\colon A\to B$ are equal if they agree almost everywhere? Intuitively, I would say that this contradicts the axiom of substitution: For example, consider the following functions of the type $\mathbb R\to\mathbb R$: $f(x) = x$ for all $x$ and $g(y) = y$ for every $y\not = 3$, $g(3) = 4$. Then we have $f=g$ because of our definition (there are only finitely many arguments on which the functions disagree (in fact there's only one: $3$), so they are equal). But by the axiom of substitution, the following should hold: $f(3) = g(3)$. Now I am a bit confused.

• The functions would not be equal because they wouldn't obey the transitive axiom for $x=3$. Sep 30, 2016 at 23:30
• What is the axiom of substitution? Sep 30, 2016 at 23:31
• If you have a set with only two elements then I think you can simply define a = b and that will never be a problem. Sep 30, 2016 at 23:34

Tao is saying that you can define equality however you want as long as it is an equivalence relation and satisfies the axiom of substitution (for all the operations you have in a given context). So since your definition does not satisfy the axiom of substitution (assuming you have evaluation at a point as one of your operations), it is not an appropriate definition of equality.

You could choose to define functions to be equal if they have the same value almost everywhere, but then what you've shown is that such "functions" cannot be evaluated at points. That is, if you define equality in this way, then you can't define what "$f(3)$" means. Usually we phrase this not in terms of defining "equality", but in terms of considering the set of equivalence classes with respect to an equivalence relation (namely, the relation of being the same almost everywhere).

• Actually, Terry defined equality as I proposed in an exam paper. That's why I was wondering. Sep 30, 2016 at 23:34
• Right, so that would only be valid in a context where you aren't allowed to evaluate functions at points. Sep 30, 2016 at 23:35
• Does that mean I could define an equivalence relation on R such that $x = y$ always? This would be boring in that essentially I'd only have one item and I can't do anything with it. But it would be a form of equality? Sep 30, 2016 at 23:39
• Sure that's a perfectly good (if boring) equivalence relation on any set. Sep 30, 2016 at 23:40

The Substitution axiom for equality in first-order logic says :

$x = y → (\phi → \phi')$

where $\phi$ is a formula and $\phi'$ is obtained by replacing any number of free occurrences of $x$ in $\phi$ with $y$.

Thus, in your example, the "objects" are the functions $f$ and $g$ and they play the role of value for the variables $x$ and $y$.

Thus, assuming that we express in formal terms the statement "$x \text { is countinuous}$", the axiom licences us to prove :

$f=g \to (f \text { is countinuous } \to g \text { is countinuous })$.

But the objects involved are the functions $f$ and $g$ and not the numbers $f(3)$ and $g(3)$.