Accordingly, it is established that the previously mentioned analogy is inadmissible, so another proof is required to justify prostration for omitted sunnah elements. Ṣiddīq Khān, in al-Rawḍah, argued for this by citing the ḥadīth, “For every act of forgetfulness there are two prostrations.” In my assessment it is a sound ḥadīth, transmitted by Abū Dāwūd, Aḥmad, and others.
He then concluded that, as far as legislation is concerned, there is no difference between what is called sunnah and what is called mandūb; see 1/129–130. al-Shawkānī had preceded him in this in al-Sayl al-Jarār 1/274–275, yet he explicitly distinguishes: when a compulsory element is left out the prostration is obligatory, whereas when a sunnah is left out it is recommended. Consult his words, for they are important.
After quoting two reports that instruct the doubter to build on what is certain, he said: “These two ḥadīths are evidence for the view of the majority that, when a worshipper doubts the number of rakʿahs, he should build on the lesser number of which he is sure and then perform the prostration of forgetfulness.”
I reply: material has come from the Prophet ﷺ indicating that these two ḥadīths are not absolute; rather, they are restricted to the person whose mind is not inclined to either side. Such a person builds on the lesser number. As for the one to whom the correct number becomes apparent—even if it is the greater—he follows that and builds upon it. This is indicated by the Prophet’s statement:
“If any one of you is uncertain about his prayer, let him seek out what is correct.” In another wording: “let him look for what is most likely to be correct.” In another: “let him consider what he believes to be correct.” In yet another: “let him strive for what is nearest to correctness, then complete his prayer on that basis, give salām, and then prostrate twice.”
This was recorded by the Two Shaykhs and by Abū ʿAwānah in their collections of sound reports; the second and third versions are theirs except for al-Bukhārī, and the fourth belongs to al-Nasāʾī. All of them transmit it through the narration of Ibn Masʿūd.
al-Nawawī conceded that the ḥadīth clearly supports acting on what one deems most probable rather than limiting oneself to the lesser number, as is the view of Abū Ḥanīfah. But al-Nawawī, may Allah have mercy on him,