Assume you have many documents in LaTeX (for example, Math word problems) and don't want to write the same formulas once and again. Instead, you would prefer to write something like
\pythagoreantheorem and expect that this term is replaced by the right expression when rendering, expression that you have defined somewhere else.
Does LaTeX provide with such a mechanism to define system formulas that can be invoked from any document?
(Same question for graphics: any way to define system graphic objects that can be invoked in a document? - you write
\cube and it gets replaced by the corresponding TikZ code).