What to do if you forgot some proofs while writing your thesis?
This is not a genuine problem. Everyone forgets things. A true scholar may nor may not be blessed with an exceptional memory, but the operational issue is about having personal resources that accommodate one's limitations, and sufficiently point to the relevant resources. So: self-management.

It is true that having a good memory, or an exceptionally-good memory, is generally an advantage in knowledge-based enterprises, obviously, but things are more complicated than memory-per-se.

And, in any case, being able to reproduce fluently all the basic things on a moment's notice is irrelevant. True, a certain fraction of more-senior people happen to have the sort of memory that allows them to reproduce certain things on-the-spot, but this is really not relevant to professional practice.

Yes, the most conflict-laden point is that faculty teaching graduate-level courses, and who've had the misfortune to have either a deterioration of memory, or have always had some memory problems, have difficulties with teaching. Not that they don't "know math", but that the details are not easily present in their minds. The other point is that this does not mean that their critical/critique-ing faculties have deteriorated. An awkward state...

But/and, after all that "too much information", the point is that no one (no professional mathematician) is required to be able to reproduce everything upon command at every possible moment. 

(The whole "final exam" or "contest" concept of mathematics greatly and sadly corrupts our collective concept of that the thing is.)