I'm studying Hilbert's axiomatization of Euclidean geometry, and I'm trying to combine my current understanding into my knowledge on mathematical logic (not very much).
At the beginning of this axiomatic system, it states the undefined terms are 'point', 'line', 'plane', 'lie', 'between', and 'congruence'. Therefore it seems that all later definitions should be based on these primitive notions. However, in the definition of 'segment', it states that a segment $AB$ is a set of two points on the same line. (or another variation where the segment contains also all points between two endpoints.)
My question is: how does 'set' come into play here? There is no notion of 'set' defined in this system, how is it valid to use the notion of set (or notions about sets like equivalent class) here? More generally, how does set relate to a specific mathematical theory?
Being a beginner on foundation related topics, I would appreciate if you can explain different concepts in a slow pace. In my understanding, Hilbert's system is a purely syntactic system with some undefined terms. It might be helpful if you can show me how the definitions (like segment) can be produced by FOL language.
Without further context, it seems that saying "a segment $AB$ is a set of points" is not meant to be a formal statement, only to give you intuition. In the axiomatic system you indeed cannot talk about sets directly. However, there are some sets you can describe indirectly: the phrase "$C$ lies on the line segment $AB$" is another way of saying "$C$ is between $A$ and $B$". That is, the definition of a segment, which is just "two distinct points", is based on your primitive notion: namely the primitive notion of a point.
Similarly, you will likely at some point define a circle, as "the set of points which are as far away from $A$ as $B$ is" -- but really, that will just be a way of talking about the actual definition. The phrase "$C$ lies on the circle defined by $A$, $B$" will be an abbreviation for "$AC$ is congruent to $AB$". Or something like that.