ELI5: Explain Like I'm 5

Term rewriting system

Imagine you have a bunch of letters that you can use to make words. Now, you have some rules that tell you how you can change one word to another word. These rules are like a recipe for making a new word out of an old word.

That is sort of what a term rewriting system is like. Instead of letters, we have symbols or expressions that represent something, like numbers or equations or even programming code. And instead of rules, we have these things called rewrite rules, which tell us how we can change one expression into another expression.

So, say we have the expression "2 + 3". We can use rewrite rules to change it to "5". One example of a rewrite rule might be "If you see '2 + 3', replace it with '5'".

That's the basic idea behind a term rewriting system. It's a way of taking one expression and changing it to another expression. It's like having a big set of instructions that tells you how to rearrange symbols to get new symbols.