Are there examples of originally widely accepted proofs that were later discovered to be wrong by attempting to formalize them using a proof assistant (e.g. Coq, Agda, Lean, Isabelle, HOL, Metamath, Mizar)?



Proofs shown to be wrong after formalization with proof assistant
Since this question was asked in January there have been some developments. I would like to argue that the scenario raised in the question has now actually happened. Indeed, Sébastien Gouëzel, when formalising Vladimir Shchur's work on bounds for the Morse Lemma for Gromov-hyperbolic spaces, found an actual inequality which was transposed at some point causing the proof (which [had been published](https://doi.org/10.1016/j.jfa.2012.11.014) in 2013 in J. Funct. Anal., a good journal) to collapse. Gouëzel then worked with Shchur to find a new and correct (and in places far more complex) argument, which they wrote up as a joint paper.


<http://www.math.sciences.univ-nantes.fr/~gouezel/articles/morse_lemma.pdf>


The details are in the introduction. Anyone who reads it will see that this is not a "mistake" in the literature in the weak sense defined by 
Manuel Eberl's very clear answer -- this was an actual error which was discovered because of a formalization process.


