Beta12, please let me know if and where I lose you in this.
Let Q[x] be your field of polynomials.
Given an element f(x) in Q[x] either f(x) is irreducible or it is not. If it is irreducible then we are done factorizing f(x). If not then f(x) = g(x)h(x) for some polynomials g(x), h(x) with deg(g(x)) < deg(f(x)) and deg(h(x)) < deg(f(x)). If both g(x) and h(x) are irreducible the f(x) = g(x)h(x) is our factorization of f(x) into irreducibles. If not then at least one of g(x), h(x) must be reducible. We may continue in this fashion. The process is guarenteed to stop at some point because the degree of the factor polynomials is less at each stage. In this fashion we may always factor the polynomial f(x) into irreducible polynomials in Q[x].
Now, say we have two factorizations of f(x) into irreducible polynomials:
We may assume and we may assume t > 1. (If t = 1 then f(x) was irreducible and, of course, both factorizations will be the same, up to a constant.)
Now, and we know that divides f(x) since it is a factor in the first list. Thus we know that divides . But all the q(x)'s are irreducible and so is . Thus and one of the q(x)'s must be the same up to a constant.
We may relabel the list of q(x)'s such that this particular q(x) is for convenience. Define . Thus
We may use the same process as above to find a q(x) such that shuffling the order of the q(x)'s as needed. Thus:
We may continue this process for all the p(x)'s:
Now, comparing the list of factors we see that the polynomial must be the same as the polynomial up to a constant. Thus by looking at the degrees of the p(x)'s and the remaining q(x)'s we see that . Thus all of the remaining q(x)'s can only have a degree of 0, ie they can only be constants.
In this manner we see that the two factorizations are the same, up to an overall constant.