The response is, first:
It is established in the two Sahīh collections that the Prophet—may Allah bless him and grant him peace—said:
“Among the nations before you were men who received inspiration. If there is anyone like them in my community, it is Umar.” (1)
He said nothing comparable about Alī.
It is also established that he said:
“I saw in a dream that I was brought a cup containing milk. I drank until I could see satiety flowing from my fingernails, then handed what remained to Umar.”
They asked, “How did you interpret it, O Messenger of Allah?”
He replied, “Knowledge.” (2)
Thus, Umar was the most knowledgeable Companion after Abū Bakr.
As for his belief that the Prophet—may Allah bless him and grant him peace—had not died, this lasted only a short time, after which his death became clear to him. Such things happen frequently: someone may doubt a person’s death for a while, or longer, before it becomes clear to him. Alī came to recognize that matters were contrary to his earlier beliefs on many more occasions than this. Indeed, he held mistaken views concerning numerous rulings and died still holding them. Yet this did not undermine his standing as an imam—for example, his ruling concerning a woman married without a specified dower who died before any dower had been fixed for her, and similar matters well known to scholars.
As for the pregnant woman, if he (3) did not know that she was pregnant, this falls into the same category. He may have ordered her to be stoned without knowing that she was pregnant, whereupon Alī informed him of her pregnancy. He then said, “Had Alī not informed me about her, I would have stoned her and thereby killed the unborn child.” That was what he feared.