DocumentationMathematicaThe Mathematica BookMathematica Reference GuidePatterns and Transformation Rules
A.5.5 Transformation Rules
The two basic types of transformation rules in Mathematica.
Replacements for pattern variables that appear in transformation rules are effectively done using ReplaceAll (the /. operator).