he breaks his state of ritual purity or speaks, he should perform one additional unit and then make the prostration of forgetfulness. This is the narration of Ashhab and others regarding the person who forgets to recite the Mother of the Qur’an in a unit; it is the sound position, and it is the one I adopt.
If someone forgets to recite the Opening Chapter in the first unit until he has already bowed, and then remembers while still in the bowing position, he should raise his head, recite it, bow again, and prostrate. The first bowing and the standing that preceded it are not counted. After giving the salām he prostrates for forgetfulness. However, if he bowed and prostrated and then stood for the next unit before remembering, he makes that second unit his first, completes the prayer, and prostrates for forgetfulness after the salām.
If the imam is the one who errs while the follower does not, the follower still prostrates for forgetfulness with his imam, whether or not he actually witnessed the imam’s lapse, as long as he has caught one complete unit of the prayer with him.
When a follower has missed one or more units and the imam’s prostration of forgetfulness is due before the salām, he prostrates with the imam; once the imam has given the salām, he rises to make up what he owes. The same applies if the imam holds that all prostrations of forgetfulness are before the salām: the follower prostrates with him and then completes the remainder of his prayer.
If the imam gives the salām and then prostrates for forgetfulness afterward, the follower does not prostrate with him, for he himself has not yet given the salām. Instead he stands, completes what he owes, and when he gives the salām, he prostrates.
Anyone who was required to prostrate for forgetfulness before the salām because he stood up from the first two units inadvertently, but then forgot to prostrate until after giving the salām, should prostrate as long as he has not spoken, broken his ablution, or allowed a lengthy interval to pass. If any of these has occurred, he must repeat the prayer.
Apart from this particular situation, the prayer is not repeated merely for omitting the two prostrations of forgetfulness.