RewriteThe term for replacement of strings, terms, trees, or other forms of expression according to logical rules, particularly as a form of evaluation semantics.
- The basic algebraic law (or axiom) that
a + b = b + a
is a bi-directional rewrite rule. You can replace the first expression with the second, and the second with the first, assuming matching has taken place. So there are two directional rewrite rules there, which are conveniently thought of as the same thing. That's what constitutes an equation.
- Evaluation rules that define functions are a kind of rewrite. The term
F(a,b,c) = b^2 - 4*a*c
defining function F as a kind of discriminant. Evaluating
is an application of this rule.