On a generalization of the ring theory