Why are we allowed to cancel fractions in limits? For example:
$$\lim_{x\to 1} \frac{x^4-1}{x-1}$$
We could expand and simplify like so:
$$\lim_{x\to 1} \frac{(x-1)(x^3 + x^2 + x + 1)}{x-1} = \lim_{x\to 1} (x^3 + x^2 + x + 1) = (1^3 + 1^2 + 1^1 + 1) = 4$$
In this case we divided out $x-1$ on top and bottom even though technically, at $x=1$, we have $\frac{0}{0}$ that we're just tossing aside.
But what allows us to do this?

Algebraic Limit Theorem: Let the limits exist:
$$\lim_\limits{x\to a} f(x)=L \quad \text{and} \quad  \lim_\limits{x\to a} g(x)=M.$$
Then:
$$\begin{align}&1) \ \lim_\limits{x\to a} (f(x)\pm g(x))=\lim_\limits{x\to a} f(x)\pm \lim_\limits{x\to a} g(x)=L\pm M;\\
&2) \ \lim_\limits{x\to a} (f(x)\cdot g(x))=\lim_\limits{x\to a} f(x)\cdot \lim_\limits{x\to a} g(x)=L\cdot M;\\
&3) \ \lim_\limits{x\to a} (f(x)/ g(x))=\lim_\limits{x\to a} f(x)/ \lim_\limits{x\to a} g(x)=L/M; \quad (\text{provided:} \lim_\limits{x\to a} g(x)=M\ne 0). \\ \end{align}$$
Note that:
$$\begin{align}\lim_{x\to 1} \frac{x-1}{x-1} = \lim_{x\to 1} 1&=1;\\
\lim_{x\to 1} (x^3 + x^2 + x + 1) &= 4;\\
\lim_{x\to 1} \frac{x^4-1}{x-1}=\lim_{x\to 1} \frac{(x-1)(x^3 + x^2 + x + 1)}{x-1} &= \\
\lim_{x\to 1} \frac{x-1}{x-1}\cdot \lim_{x\to 1} (x^3 + x^2 + x + 1) &= 1\cdot 4=4.\end{align}$$
See also: Limit Theorems.
