In the Imamate school...
In the Imamate school, the Imam possesses certain particularities, Among them that he must be infallible of all sin and error ("Masum" = infallible). Another is that he may only be appointed by God, the Prophet having no role in his appointment except for the propagation and proclamation of Gods command. 'The Almighty God" chooses, and the prophet relays the news of this divine appointment to the people.
Of these Imams, the first being Amirul Mu'meneen Ali (a.s) and the last being Hujjat ibn al-Hassan Mahdi (a.s), that which we know and recognize in relation to Ali is the same for Hujjat ibn al-Hassan. That which is proved for Ali; infallibility, divine appointment, divine inspiration, and knowledge of all the aspects of eternal Islam, exists for all of the Imams and is proved.
But in the Caliphate school, the people choose the Caliph and he comes to hold the position of Caliph by the peoples choice. Here, what is confirmed for Abu Bakr has been confirmed until the end of the Ottoman Caliphate. The Caliphate is determined by a vote and an oath of allegiance and this never differs. This discussion was only a very small introduction.
We will now see that in the Imamate school and based on its views, how Imam Ali (a.s) is seen and what the Holy Prophet (s.a.w) said on his behalf. A study of the Prophets life will clearly show that the propagation of divine law by him was not unrelated to the events of time and place. For instance, when something happened and the Prophet was consulted concerning it, Gabriel would reveal the related judgement by way of revelation.
In domestic or social matters, conflicts would arise, someone would ask a question, or an issue would be brought up by friend or foe with the Prophet (s.a.w). Following these situations a revelation would be revealed that solved the disagreement or answered the question. We will refer to a very important event in Islamic history and learn from it. In the eighth year of the Hejrat, the Prophet conquered Mecca and returned to Medina. Now the Muslims possess the mightiest power in Arabia.
However other scattered forces exist in Arabia which have not come under the banner of Islam, and a group of the pagan Arab tribes still loyal to the customs of the ignorant Arabs come to Mecca. These pagans circumambulate the "House of God" in Mecca and perform all of the other rites customary just as the Muslims. After Islam gained power and Mecca was conquered, all of these rites were performed by the Muslims.