That is not at all clear to me, on two grounds. Indeed 35 U.S.C. 102(a) does say that a prior patent or non-recent application (which would naturally be the case for an issued patent, whether the patent was invalidated or not -- it clearly had an application) count as prior art. However if the patent is invalidated does it count as issued? I'm not sure under _Stalego_ that it does. As for the applications, regardless of the text of the US code, also under _Stalgeo_
cancelled matter in the application (but weirdly, not in the wrapper!) is inadmissible, and presumably the subject of the application is itself cancelled, per code, rather than abandoned.
Patent law is super arcane and I do not practice in that area specifically but I would be surprised if the people who down voted my comment (to which you are replying) are really steeped in the peculiar minutiae of the operation of the PTO.