I have started to read some books about geometry. At the moment I've just started to read Hilbert's axioms and also some elementary books for highschool. From the basic perspective of an axiomatic system, the elementary books, I mean not necessarily for highschool but also not for mathematicians, start with some axioms that are not entirely independent. Most of them states the ruler postulate as an axiom, for example from Venema's approach:
For every pair of points $P$ and $Q$ there exists a real number $PQ$, called the distance from $P$ to $Q$. For each line there is a one-to-one correspondence from $l$ to $R$ such that if $P $ and $Q$ are points on the line that correspond to the real numbers $x$ and $y$, respectively, then $PQ=|x−y|$.
So, my question is more in the sense of the definition of "distance". With this postulate, for example, the definition is implicit. So I wanted to know, right from the Hilbert's system or some other system that is more basic, how do they define "distance". Also I'd like to know how to prove the ruler postulate.