Let $expr$ be an algebraic expression involving natural numbers, addition operator and multiplication operator, e.g., $$(1+2)\cdot(3+4 \cdot 5)+6.$$ By iteratively applying the distributivity of multiplication over addition to $expr$, that is, transforming subexpressions of the form $(expr_1 + expr_2)\cdot expr_3$ into the form $(expr_1\cdot expr_3) + (expr_2 \cdot expr_3)$, until it is no longer possible, at each iteration applying the distribituvity rule to the first (the "leftmost" one) subexpression that it can be applied to, one obtains a sum of products. No other rules are applied, no addition and no multiplication is actually performed. For the above example, the result would be $$1\cdot 3 + 1\cdot 4 \cdot 5 + 2 \cdot 3 + 2\cdot 4 \cdot 5 + 6.$$
Is the obtained sum of products unique?
If yes (as I believe is the case), is there a general result that this fact follows from?
$\textbf{Edit:}$
- the distributivity rule $expr_1 \cdot (expr_2+ expr_3) \rightarrow (expr_1 \cdot expr_2 )+ (expr_1 \cdot expr_3)$ can also be applied
$\textbf{Solution:}$ By formalizing properly the reduction rules that I had in mind, I got a reduction system that is both locally confluent and terminating. Now the uniqueness of the normal form follows from the Newman's lemma.
And yes, I tried to make things easier by applying the rules to the leftmost patterns. I see that in such a case it is somewhat "obvious" that the result is unique, but I fail to provide even a simplest formal justification for that.
– abebebebahabe Aug 08 '19 at 16:37