Simple theorems that are instances of deep mathematics So, this question asks about how useful computational tricks are to mathematics research, and several people's response was &quot;well, computational tricks are often super cool theorems in disguise.&quot; So what &quot;computational tricks&quot; or &quot;easy theorems&quot; or &quot;fun patterns&quot; turn out to be important theorems?
The ideal answer to this question would be a topic that can be understood at two different levels that have a great gulf in terms of sophistication between them, although the simplistic example doesn't have to be &quot;trivial.&quot;
For example, the unique prime factorization theorem is often proven from the division algorithm through Bezout's lemma and the fact that $p\mid ab\implies p\mid a$ or $p\mid b$. A virtually identical proof allows you to establish that every Euclidean Domain is a unique factorization domain, and the problem as a whole - once properly abstracted - gives rise to the notion of ideals and a significant amount of ring theory.
For another example, it's well known that finite dimensional vector spaces are uniquely  determined by their base field and their dimension. However, a far more general theorem in Model Theory basically lets you say &quot;given a set of objects that have a dimension-like parameter that are situated in the right manner, every object with finite &quot;dimension&quot; is uniquely determined by its minimal example and the &quot;dimension.&quot; I don't actually quite remember the precise statement of this theorem, so if someone wants to explain in detail how vector spaces are a particular example of $k$-categorical theories for every finite $k$ that would be great.
From the comments: In a certain sense I'm interested in the inverse question as this Math Overflow post. Instead of being interested in deep mathematics that produce horribly complicated proofs of simple ideas, I want simple ideas that contain within them, or generalize to, mathematics of startling depth.
In school they teach us that

$$\int\frac 1x\;\mathrm dx=\log\left|x\right|+C$$

But as Tom Leinster points out, this is an incomplete solution. The function $x\mapsto 1/x$ has more antiderivatives than just the ones of the above form. This is because the constant $C$ could be different on the positive and negative portions of the axis. So really we should write:

$$\int\frac 1x\;\mathrm dx=\log\left|x\right|+C\cdot1_{x&gt;0}+D\cdot1_{x&lt;0}$$

where $1_{x&gt;0}$ and $1_{x&lt;0}$ are the indicator functions for the positive and negative reals.

This means that the space of antiderivatives of the fuction $x\mapsto 1/x$ is two dimensional. Really what we have done is to calculate the zeroth de Rham cohomology of the manifold $\mathbb R-\{0\}$ (the domain on which $x\mapsto 1/x$ is defined). The fact that $\mathrm{H}^0_{\mathrm{dR}}\!\!\left(\mathbb R-\{0\}\right)=\mathbb R^2$ results from the fact that $\mathbb R-\{0\}$ has two components.
You learned the Taylor expansion of a smooth function. It tells you that there is a polynomial function "identical" to your starting function.

It also tells you that pretty much all the math you have learned up until that moment is fake, and can be thrown away. Be a little patient with me here while I explain.

So all properties of all functions you have seen is contained in its property at 0, all you need to represent a function is just a list of all derivatives at 0.

This is very different from any real function like the temperature outside. You can not study the weather at midnight, and then know the temperature for all time to come, and all time that was. Nothing in the real world behave like this

All the analysis of slopes, max, intersections, limits etc can be done by only looking at the function for x=0. No purpose in drawing a function in a diagram. That is just meaningless doodling.

For real functions like the temperature outside a graph and intersections make sense. Is the air warmer than the lake? etc. The weather is a real mathematical problem that a lot of math is used to solve.

Back to our smooth functions: it is all a charade. As you draw functions, and wonder when they will intersect or when they will reach a max, you are doing something useless. The answer is already in the functions property at 0, or at any other location for that matter. So instead of drawing a function across some interval, just draw it carefully around 0. Done. No more needed.

Example when does x^2 intersect e^x. You might as well ask

{0,0,2,0...} = {1,1,1,1...}.