Umar did not know that she was pregnant, and Ali informed him of her pregnancy. There is no doubt that the default presumption is that he did not know. If the ruler is unaware that a woman liable to execution or stoning is pregnant, and someone informs him of her condition, this is simply one instance of informing him about circumstances concerning people that were unknown to him, just like testimony given before him by witnesses. This is unavoidable for everyone—prophets, rulers, and others alike—and it does not pertain to universal rulings of the Sacred Law.
Alternatively, Umar may have overlooked the fact that a pregnant woman is not to be stoned. When Ali reminded him, he recalled it, and therefore refrained. Had Umar held that a pregnant woman should be stoned, he would have stoned her and would not have deferred to another person’s opinion. The Prophet’s Sunnah—may Allah bless him and grant him peace—had already established this in the case of the Ghāmidī woman. When she said, “I am pregnant as a result of illicit intercourse,” the Prophet—may Allah bless him and grant him peace—said to her:
“Go until you have given birth to him.” (1)
Even supposing that this ruling had escaped Umar’s knowledge until he learned it, (2) that would not detract from him. Umar governed the Muslims and the protected non-Muslim subjects, rendered people their rights, enforced the prescribed penalties, and judged among all the people. During his time, Islam spread and attained a prominence unlike anything it had attained before. He was continually adjudicating cases and issuing legal opinions; had he not possessed vast knowledge, he could not have managed this. If, out of a hundred thousand cases, one case escaped his knowledge and he then learned its ruling, or if he had forgotten it and then recalled it, what fault is there in that?!