The Shaykh (Al-Mufid), may Allah سبحانه وتعالى support him, said: "If he is certain that he has invalidated his ablution and also certain that he performed purification but does not know which of them preceded the other, then it is obligatory for him to perform ablution to remove doubt and to enter the prayer with certainty of purity." This is supported by the principle that a person is obligated not to enter prayer except in a state of purity. Therefore, he should be certain of his purity to allow him to begin the prayer in that state. If someone does not know whether his purity preceded the state of invalidation, then he is not certain of his purity and is obligated to renew it, as we have explained. The Shaykh (Al-Mufid), may Allah سبحانه وتعالى support him, also said: "Whoever is certain of their purity and doubts whether it has been invalidated should act according to their certainty and disregard the doubt. There is no obligation for ablution unless the invalidation is certain." This is supported by (following hadith):
Commentary #54