Why $x=x$? Why $x=y$ and $y=z$ imply $x=z$? (Assume, $x$, $y$ and $z$ are reals.)

I recently have been studying the axiomatic construction of the set of real numbers through the Peano axioms for the natural numbers. It seems to me, the only things needed to proceed with this body of knowledge, is some basic set theory (ZFC axioms) plus the rules of mathematical logic. However, I noticed that from time to time one needs the facts mentioned in the title. Now, these are self-explanatory and self-evident of course but since I am so deep in the roots of modern mathematics, I thought I should inquire about those as well. After all, Euclid states a similar axiom in his Elements: «if each one of two line segments is equal to a third one, then they are equal.»

So, regarding real numbers, where did these rules come from?

• Are they axioms of some sort and if yes from which theory?
• Are they simply some statement formulas of boolean logic? If so, how is one to be convinced of their validity?

Thanks so much.

• Axioms 2-4 here explicitly assume this. – J.G. Mar 16 at 23:40
• The basic properties of $=$ (and other basic facts) are assumed at the level of first-order logic itself. We can of course consider alternate logical systems, but that's where those basic facts are "built in." – Noah Schweber Mar 16 at 23:42
• Since you're building up the real number system from the natural numbers, you must be using some set theory to provide the needed tools for that construction (Dedekind cuts, equivalence classes of Cauchy sequences, etc.). In most modern set theories, equality and its basic properties are taken as given in the underlying logic. In some older set theories, equality was defined: for example, some authors defined $x=y$ to mean $\forall z\,(z\in x\iff z\in y)$. Then the definition makes it easy to prove basic properties of equality like those you asked about. – Andreas Blass Mar 16 at 23:48
• Just to clarify, is your second question how we can rigorously see that these are theorems, or how one justifies them informally? – Malice Vidrine Mar 17 at 3:35
• @Malice Vidrine rigorously, thanks – Efthymios Tsakaleris Mar 17 at 15:05