Proofs of theorems that proved more or deeper results than what was first supposed or stated as the corresponding theorem Recently, I figured out that a colleague of mine has had published during recent years a proof of a theorem in which he was actually proving a deeper result which we both thought to be still open. After a closer look at his proof I found that, taking a bit more care and putting some additional emphasis in certain parts of his previous proof, he was actually proving the other still-thought-to-be-open problem: the construction was absolutely the same and therefore the proof of the previously published theorem was certainly a better argument than we first thought. I am curious now about this phenomenon happening more often. Do you know some other recent (let's say from 1700 to the current day) examples of this phenomenon of proofs being stronger than initially stated or proving more than thought at first?
 A: Here is an example of this happening in 2019.
This article describes what happened.

We had nearly given up on getting the last piece and solving the riddle. We thought we had a minor result, one that was interesting, but in no way solved the problem. We guessed that there would be another five years of work, at best, before we would be able to solve the puzzle


While reading our research article, we suddenly realized that the solution was before our eyes. Our next reaction was 'oh no – we’ve shot ourselves in the foot and given away the solution

A: Euler apparently discovered the formula for what we now call Fourier series, and thereby could have initiated Fourier analysis, without recognizing its significance.  I learned about this from Strichartz' book "The Way of Analysis", where he describes that Euler had an axe to grind due to a quarrel with Daniel Bernoulli over the best way to solve the wave equation, and he attacked Bernoulli's claim that you could decompose an arbitrary function as a sum of sines.  I can't tell the story better than Strichartz:

Bernoulli was not able to answer Euler well, except to repeat his lame argument that the equation $$f(x) = \sum_{k=1}^\infty a_k \sin \frac{k\pi}{L} x$$ was like an algebraic system of an infinite number of linear equations in an infinite number of unknowns.  One of the most significant weaknesses in his argument was that he could not produce a formula for the coefficients $a_k$ in terms of $f$.  This formula was actually first discovered by Euler several years later in the course of an unrelated investigation (Euler had cosines instead of sines), but as Euler was predisposed to reject Bernoulli's claim he never pointed out the possible relevance.  Thus, did the two of them botch the opportunity of developing Fourier series a full half century before Fourier.

Strichartz goes on to describe how history might have played out differently, and then concludes with this gem:

If there had been as many mathematicians in those days as there are today, no doubt some graduate student looking for a thesis topic would have observed this, which might have been enough to push Euler and Bernoulli onto the right track.

A: The example given by Wojowu in the comments seems worth posting as an answer.
In the NOVA special The Proof, Ken Ribet says the following.

I saw Barry Mazur on the campus, and I said, "Let's go for a cup of coffee." And we sat down for cappuccinos at this cafe, and I looked at Barry and I said, "You know, I'm trying to generalize what I've done so that we can prove the full strength of Serre's epsilon conjecture." And Barry looked at me and said, "But you've done it already. All you have to do is add on some extra $\Gamma_0(M)$ structure and run through your argument, and it still works, and that gives everything you need." And this had never occurred to me, as simple as it sounds. I looked at Barry, I looked at my cappuccino, I looked back at Barry, and I said, "My God. You're absolutely right."

He also talks about this story in this Numberphile video.
A: In theoretical computer science, an extractor is an algorithm that takes a weak source of randomness (i.e. a distribution that may be far from the uniform distribution) and produces a much stronger source of randomness (i.e. a distribution that is close to uniform). A pseudorandom generator is an algorithm that takes a very small amount of "pure" randomness (i.e. a small number of bits sampled from the uniform distribution) and produces a much larger amount of "pseudorandomness" (i.e. a much longer sequence of bits that no polynomial time algorithm can distinguish from bits sampled from the uniform distribution).
In 1999, Luca Trevisan showed that all pseudorandom generators of a certain sort can actually be seen as extractors. This was a surprising result since extractors are based on an information-theoretic definition of "randomness" while pseudorandom generators use a computational definition. Also the two concepts had different origins and had been studied using somewhat different techniques and applied in different ways. Trevisan's result was a major breakthrough not only for showing that two seemingly different concepts were actually (more-or-less) the same, but also because it showed that existing techniques for constructing pseudorandom generators gave extractors that were much better than those that had been constructed previously.
A few years ago, I learned that Trevisan originally thought he'd proved something much weaker until Oded Goldreich pointed out to him the full consequences of what he'd done. As he wrote on his blog:

Three years later, while I was a postdoc at MIT and Oded was there on sabbatical, he played a key role in the series of events that led me to prove that one can get extractors from pseudorandom generators, and it was him who explained to me that this was, in fact, what I had proved. (Initially, I thought my argument was just proving a much less consequential result.) For the most part, it was this result that got me a good job and that is paying my mortgage.

A: Henri Poincaré provides an example in mathematical physics, as discussed by Thibault Damour and Howard Stein.
Poincaré said in June 1905:

The essential point established by Lorentz is that the electromagnetic
field equations are not altered by a certain transformation (which I
shall call after the name of Lorentz), which has the following form:
\begin{align} x'&=kl(x+\epsilon t)\\ y'&=ly\\ z'&=lz\\
 t'&=kl(t+\epsilon x) \end{align} where $x,y,z$ are the coordinates and
$t$ the time before the transformation, and $x',y',z'$ and $t'$ after
the transformation. Moreover, $\epsilon$ is a constant which defines
the transformation $k=1/\sqrt {1-\epsilon ^2}$ and $l$ is an arbitrary
function of $\epsilon$.
One can see that in this transformation the $x$-axis plays a
particular role, but one can obviously construct a transformation in
which this role would be played by any straight line through the
origin. The sum of all these transformations, together with the set of
all rotations of space, must form a group.

In a longer version of this paper from July 1905, Poincaré added that this does not change the quadratic form written in different units as
$x^2+y^2+z^2-t^2$ and that we can regard $x,y,z,t\sqrt{-1}$ as the coordinates in a 4-dimensional space, with the Lorentz transformation as a rotation of that space around the origin. Poincaré regarded this as only completing Lorentz's work "in a few points of detail"; this led to Albert Einstein saying that "for all his acuteness, Poincaré showed little understanding of the situation."
When Einstein saw the same mathematical properties, also in June 1905, he created the theory of special relativity.
A: In his 1955 paper "Invariant of finite groups generated by reflections" Chevalley gave a uniform proof the the Chevalley-Shephard-Todd theorem which says that for a finite group $G$ acting on a complex vector space $V$, the following are equivalent:
(i) The algebra $S(V)^G$ of invariant polynomial functions on $V$ is a polynomial ring;
(ii) $G$ is generated by pseudoreflections.
Actually Chevalley only proved (ii) $\Rightarrow$ (i); the other implication already had a uniform proof in Shephard and Todd's original work, and anyways is not hard once you know (ii) $\Rightarrow$ (i).
However, Chevalley only stated his result for reflections (i.e., pseudoreflections of order 2) because he was mostly only interested in Weyl groups, and in fact as far as I can tell he was not aware of the work of Shephard and Todd.
Serre observed, in his 1967 paper "Groupes finis d’automorphismes d’anneaux locaux réguliers", that Chevalley's proof goes through verbatim in the case of pseudoreflections, because he only ever uses the fact that the reflections fix a hyperplane, and not that they have order 2.
(In that paper Serre also studies pseudoreflection groups over fields of positive characertistic, where (i) and (ii) are no longer necessarily equivalent.)
For more discussion of the history of the Chevalley-Shephard-Todd theorem, see this previous MO question: Chevalley–Shephard–Todd theorem.
A: In the paper P. Erdős and A. Hajnal, On the structure of set-mappings, Acta Math. Acad. Sci. Hungar. 9 (1958), 111-131, the authors came close to solving Ulam's measure problem by proving that the first uncountable inaccessible cardinal is not measurable, as they pointed out in their subsequent paper P. Erdős and A. Hajnal, Some remarks concerning our paper "On the structure of set-mappings" — non-existence of a two-valued $\sigma$-measure for the first uncountable inaccessible cardinal, Acta Math. Hungar. 13 (1962), 223-226:

In accordance with the notations of [4] we say that a cardinal $m$ possesses property $P_3$ if every two-valued measure $\mu(X)$ defined on all subsets of a set $S$ of power $m$ vanishes identically, provided $\mu(\{x\})=0$ for every $x\in S$ and $\mu(X)$ is $m$-additive.
It was well known that $\aleph_0$ fails to possess property $P_3$ and that every cardinal $m\lt t_1$ possesses property $P_3$ where $t_1$ denotes the first uncountable inaccessible cardinal.
Recently A. Tarski has proved, using a result of P. Hanf, that a certain wide class of strongly inaccessible cardinals possesses property $P_3$ (called strongly incompact cardinals). H. J. Keisler gave a purely set-theoretical proof of this result. After having seen these papers we observed that the special case of this result that $t_1$ possesses property $P_3$ follows almost trivially from some of our theorems proved in [1]. We are going to give this simple proof in §2. Our method for the proof is of purely combinatorial character, and although it is certainly weaker than that of A. Tarski and H. J. Keisler, we think that it is of interest to formulate how far one can go with these methods at present.

A: I hesitate to offer an example from two millennia earlier than you have requested, but perhaps it may qualify as surely having passed unnoticed by many thousands of students. Euclid's proof of the Pythagorean theorem (his 1.47) shows not only that the big square is the sum of the smaller squares, but also how it is divided into parts equal to those squares.
A: How about this? It's short, it's sweet and is happening now.

Jacob Holm was flipping through proofs from an October 2019 research paper he and colleague Eva Rotenberg—an associate professor in the department of applied mathematics and computer science at the Technical University of Denmark—had published online, when he discovered their findings had unwittingly given away a solution to a centuries-old graph problem.

The original paper: Worst-Case Polylog Incremental SPQR-trees: Embeddings, Planarity, and Triconnectivity
