Title: Theory of Substitutions and Its Application to Algebra