In logic and mathematics, a formal system consists of two components, a formal language plus a set of inference rules or transformation rules. A formal system may be formulated purely abstractly, for its own sake, or it may be intended to serve as a description of some domain of real phenomena or some aspect of objective reality.