At one place He says: وَأَمَّا الَّذِينَ فَسَقُوا فَمَأْوَاهُمْ النَّارُ.
(Sura Munafiqoon 63:6) So when it is proved that Infallibility is a condition for an Imam then the Imamate of the first caliph became invalid because all agree that he was not infallible and the Imamate of Amirul Momineen is proved correct indirectly because the entire Ummah agrees that, after the Holy Prophet (S), Imamate was disputed between Amirul Momineen and Abu Bakr and if that of one is not proved, necessarily that of the other is confirmed.
It must be known that those who believe in Infallibility have disputed whether the Infallible has control over his act of Infallibility or not. So those who believe that the Imam has no control, some of them say these is a speciality in the body or spirit of the Imam which demands that it is impossible for the Imam to sin. Some say that to be able to obey and not to be able to disobey (sin) is Infallibility.
Most of the scholars believe that Imam can sin (is able to sin) and some of them have defined Infallibility saying that it is a favor of Allah which brings a servant near obedience because of which a servant cannot go forward in sinning, provided that it does not extend to the extent of atheism and compulsion and coercion and some have said that it is a spiritual power and that whosever attains it cannot commit a sin and some have said that it is a Divine favor on a servant because of which he cannot entertain a wish to disobey and to sin and that there are four reasons for it: First : There is such a speciality in his heart or body which gives him power that prevents him from sinning and committing offences.
Second : He gets knowledge of the harms of sinning and blessings of obedience. Third : Being subordinate to Wahy (revelation) and Ilhaam (inspiration) this knowledge becomes more effective.