The theory of regular events. I