Lagrange's theorem in Elementary Number Theory Can someone please explain it to me like you would explain to an idiot?
tried to read about it in Burton's, watch videos and read answer's from here on questions about the subject and I don't get it yet.
Here's a document presenting the proof I found on the internet: 
https://people.maths.bris.ac.uk/~mazag/nt/lecture6.pdf
we try to prove by induction that any function $f(x)$ in some degree n has n solutions or less mod p, when p is a prime. its easy to prove it for the 1st degree. 
then we assume solution a for the polynomial $f(x)$ and we define $f(x)-f(a)=(x-a)g(x)$ , where starts the part that really confuses me. how is $-ag(x)=-f(a)\,$? shouldn't it be $g(a)$ instead?... 
 the reasoning behind our choice to proceed through this idea is really unintuitive for me. 
Thanks a lot!

A few things:


*

*not all functions are polynomials, it applies to polynomials.

*by division by $x-a$ we have $g(x)=\frac{f(x)-f(a)}{x-a}$ 

*$f(x)=a_nx^
n + a_{n−1}x
^{n−1} +\cdots + a_0$ which evaluated at a is $f(a)=a_na^
n + a_{n−1}a
^{n−1} +\cdots + a_0$ 

*This makes their difference, the coefficients times a difference of relevant powers termwise.

*those power differences have $x-a$ as a factor. factoring it out, leaves a polynomial with smaller degree.

*We've assumed that all lower degrees work.

*Therefore, our next higher degree is proven. 

