everyone! I'm trying to develop a new kind of database which is axiomatic and completely based on set theory. I use ZFC as a foundation and understand it on a moderate level, but still unable to see how to derive a median from a set.
They usually define median with notations something like Median = D[n/2] (when n is odd), but we have neither a sorted set nor the [] array operation in the set theory.
Please, provide me with a series of derivations which are as rigorous and thorough as possible.
I need something like this:
- We have a set of observations (body temperatures), S = {(1, 36.5), (2, 33.6), (3, 36.5), (4, 36.9), ...}
- We need to sort this set somehow... How to apply a total order like "a >= b"? Does it create a new set like {(1, 33.6), (2, 36.5), (3, 36.5), (4, 36.9), ....} ? How to define it better?
- We can define the median function as a relation which is also a set {(a1,a2,a3,...,r) | ???}
- We need to apply the median function to S somehow to get a number