Title: Theory of Substitutions and Its Applications to Algebra