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.  
 A: It's preferable not to have a definition of "distance", which is dependent measuring units and so forth, but to rather have a definition of "equal length". You want to be able to say when line segments are of equal length, and for this we have the Congruence Axioms 1-3, which says that there should exist a congruence relation so that 
1) for any line segment AB, point C and ray from that point, there is a uniquely determined point D on that ray so that AB is congruent to CD.
2) This is an equivalence relation.
3) If B is on the line between A and C, B' is on the line between A' and C', AB is congruent to A'B' and BC is congruent to B'C', then AC is congruent to A'C'
With a distance, we'd then define that AB was congruent to CD if the distance between A and B is equal to the distance between C and D, which will fulfil all three axioms. It seems to me that the ruler postulate would be equivalent to saying that given a line, all the points on it can be mapped to the real numbers, since then you could define the distance by |x - y|, as in the postulate. A good start here seems to be the Axiom of Archimedes, but I'm not sure exactly what to do from here.
A: 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.  
