I am sorry but "solve it" automatically refers to the theorem, not the proof. You solve a theorem and FIND a proof, you don't solve a proof. That would be nonsense.
Yes, what you are saying is certainly nonsense, alas.
A "theorem" cannot be "solved". This doesn't compute grammatically or logically. Fermat's theorem involves an equation that can be solved, trivially so outside the parameters specified by Fermat to make the equation be of any interest, but this solution is uninteresting in the terms of the theorem, and if
that is what some people try to solve for 800 years without success, we're talking about seriously disturbed people. The theorem is in no need of a solution, but of deductive proof, which is a completely different thing.
In comparison, the mystery of Fermat's theorem can be solved, grammatically speaking.
And logically speaking, and although there again a trivial solution (Fermat never had any proof) readily presents itself, it is not the only solution this time around.
Now, there are obvious three layers to this: writer intent, writer output, and interpretation. It's very seldom that the first survives till the third, and here there are two major issues. One, the writer may or may not have been thinking that the theorem lacked proof as of the 2360s because it did as of the 1980s, and two, the writer (or, rather, the rewriter) may not have been all that good with English (or with understanding what the original writer wanted to say). But the sum total seen in the output nicely eliminates the need to ponder whether there's proof or not, because nothing in the dialogue refers to the search for proof as such, while specific elements of grammar and mathematical terminology steer the dialogue away from the issue of proof. All that
remains is the search for Fermat's proof and the associated mystery, whether the writer intended that or not. Which of course is for the best.
Equally obvious alternatives, from the in-universe point of view, involve Picard and Riker being no good at English, or at least fumbling it every now and then (a good assumption with all real people, but perhaps less so for characters in drama); or them having a poor understanding of the theorem and the general issue at hand; or there having been no Wiles and no proof in their reality so far. Some may find one of those the most satisfactory one. I'd rather ditch the first two, for the love of the characters, and DS9 forces me to ditch the third. What remains is the grammatically consistent bit that (thanks to TrekCore and its preference for penultimate scripts rather than transcripts) we also know was the writer intent, FWIW.
Timo Saloniemi