A (real) polynomial function can be defined as a function $f : \mathbb{R} \rightarrow \mathbb{R}$ such that there exists a sequence $a : \mathbb{N} \rightarrow \mathbb{R}$ such that the terms of $a$ are ultimately zero, and for all $x \in \mathbb{R}$ it holds that $$f(x)=\sum_{i=0}^{\infty}a_ix^i.$$
We can also define a root-finding function $\rho$ that takes polynomial functions to multisets. For any polynomial function $f$, define that $\rho(f)$ is the multiset of all $x$ such that $f(x)=0$. However, this last statement is hideously imprecise. It makes sense to speak of, "The set of all $x$ such that ---condition---," but the multiset?
How might one go about defining it rigorously?
The root multiset arises naturally from the factorization of the polynomial
$$\rm f(x) = (x-r)^j \cdots (x-s)^k g(x)\ \to\ \{\, j\cdot r,\:\ldots,\: k\cdot s\,\}$$
where $\rm\:g(x)\:$ has no roots over the coefficient ring.
More precisely, define $\rm\ e_r(f(x)) := max\{n\in\Bbb N\ :\ (x\!−\!r)^n\!\mid f(x)\,\ in\,\ \Bbb R[x]\}.\:$ Then the root multiset is $\rm\ \{e_r(f)\cdot r\ :\ r\in roots(f)\},\:$ where $\rm\:n\cdot r\:$ denotes an element $\rm\:r\:$ of multiplicity $\rm\:n\:$ in a multiset.
Note that, over a domain, these linear factors are unique, being products of primes $\rm\,x-r.\:$ This uniqueness implies that the root multiset is well-defined. It also implies that any two (correct) root-finding algorithms will compute the same multiset of roots. The answer does not depend on what order the algorithm discovers the roots (as it generally does in nonunique factorization domains).