Question: The gemara asks how there can be a case of someone obliged to bring 39 korbons according to Raish Lakesh, since if he had forgotten all the melachot it should be considered a shigegat shabbos. But considering that the gemara defined a period of forgetfulness as ending only when the person realizes he has sinned (top of 71a, explicitly in Rashi), why not say simply that he knew it was shabbos, and forgot the melachot one at a time. At any point in time he knew 38 melachot, so he knew about shabbos. At the end, he realizes at once that he has sinned 39 times, just like on 71a when he realizes his 2 sins at once.
Thanks, and be well!
The intent of Rashi on 71a is not that a Yedi'ah serves to divide his unintentional sin from the next time he sins unknowingly only when he has knowledge of his actual act of transgression . Rather, even if he does not become aware that he actually sinned, but he merely becomes aware that this particular action -- if he were to do it unintentionally and then become aware of his sin -- would make him Chayav to bring a Korban, this serves as sufficient Yedi'ah to be Mechalek. For this reason the Gemara does not propose the case that you suggested (since, whenever he does one Melachah, he knows that all of the others are forbidden. Even though he does not realize that he has committed the other Melachos, his knowledge that they are forbidden is sufficient to be Mechalek).
Rashi's intent on 71a is that a Yedi'ah does not serve to be Mechalek except when this Yedi'ah would make him fitting to bring a Korban Chatas and cause him to recognize the gravity of his action had he remembered his act of transgression (but not that he actually has to remember his act of sin), as is clear from the Sugya there.