A formal theory of the measurement system