if he has risen but has not yet stood fully upright; if he has stood fully upright but has not begun reciting; and if he has begun the recitation—he must perform the prostration of forgetfulness in all of these cases.
There remains a fourth case which he did not mention, because it does not require the prostration of forgetfulness: when he remembers before rising—that is, he has prepared to stand, but before he rises and his thighs separate from his calves, he remembers that he has not recited the tashahhud. In that case, he remains seated, and the prostration is not required of him, since there has been neither an addition nor an omission. There is no omission because he has recited the tashahhud, and there is no addition because he has not done anything extra.
Accordingly, there are four cases, and returning may be prohibited, disliked, obligatory, or unaddressed.
Returning is prohibited if he has begun the recitation. If he knowingly returns, his prayer is invalidated, because he has deliberately committed that which invalidates it.
It is disliked if he has stood fully upright but has not begun the recitation. If he returns, his prayer is not invalidated, because he has not done anything prohibited.
Some scholars (1) said: Returning is prohibited once he has stood fully upright, whether he has begun reciting or not, because he has completely left the position of the tashahhud. This is closer to what is correct.
Returning is obligatory if he has risen but has not yet stood fully upright, and then remembers while in the course of rising and returns. In these three cases, he must perform the prostration of forgetfulness.