The definition of distance and how to prove the ruler postulate in Euclidean geometry 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.  

From Hilbert's axioms, I know two ways to define a distance function:


*

*Assuming continuity axioms and not the parallel axiom (Hilbert's axioms Groups I,II,III,V), one can define measurement of segments (See theorem 9 page 228 of http://math2.uncc.edu/~frothe/3181all.pdf).

*Assuming no continuity axioms but the parallel axiom (Hilbert Groups I,II,III,IV), one can define addition and multiplication geometrically and prove that we have an ordered pythagorean field as shown by Hilbert in Foundations of Geometry (See Chapter 18, page 401 of http://math2.uncc.edu/~frothe/3181all.pdf), then you can define the distance AB using the usual formula: 
$$\sqrt{(x_B-x_A)^2+(y_B-y_A)^2}$$ As the field is pythagorean we know that $(x_B-x_A)^2+(y_B-y_A)^2$ is a square.  
