"Indeed, Ali is with the Qur'an and the Qur'an is with Ali, the two will never separate even when they return to me at the poll [of kawthar in paradise]" - Prophet Mohammad (pbuh&hh).
The above hadith found in several authoritative works of almost all denominations of Islam, is not a stray or solitary reference to the relationship between the Holy Qur'an and its prime and perfect compiler as a mushaf (book) in the correct order of revelation, especially when one takes note of the widely-quoted Hadith al-Thaqalayn which the Prophet pronounced on several occasions concerning the legacy that he was leaving behind and the inseparability between the Book of Allah and his Ahl al-Bayt, whose most senior member was his cousin and son-in-law, Imam Ali bin Abi Talib (a.s.).
In addition, the Prophet's explicit explanation of certain ayahs of the Holy Book, such as ﴾...say: sufficient is Allah as witness between me and you and he with whom is the knowledge of the Book (13:43)﴿. that the witness other than God referred here, is Imam Ali (a.s.), is further proof of the fact that it was but natural for the Qur'an to be collected between two covers by the person who for twenty-three years had been the sole human witness to the revelation of the Divine Message to the Seal of Messengers (pbuh&hh).
All early sources of Islamic hadith and history have vouched the veracity of the words of Imam Ali (a.s.)- expressed on several occasions - that from among the Prophet's companions, other than him, no one was more knowledgeable of the Qur'an between the two covers, and in addition to the nasikh wa mansukh (abrogator and the abrogated), the muhkam wa mutashabih (clear and allegorical), and the khass wa 'amm (specific and general), he knew every single Qur'anic ayah, regarding whom it was revealed and where it was revealed, whether in the plain or on the mountain, in daytime or at night.
He not only had committed to memory the entire Qur'an but as the person most nearest to the Prophet, had also transcribed on parchment, leaf, cloth and papyrus whatever his cousin dictated, in addition to the sacred text.
Thus, it is clear that he possessed every single revelation and it was only a matter of time for him to give these fragmented folios the form of book (mushaf). This opportunity came to him after the passing away of the Prophet and his isolation by the conspirators who staged a coup at Saqifah Bani Sa'idah while he performed the last rites of the Divine Messenger.
Reports on Compilation of the Imam's Mushaf
There are numerous reports in both Sunni and Shi'ite texts that Imam Ali (a.s.) was the first-ever compiler of the Holy Qur'an as well as the manner of compilation of his mushaf. According to the prominent tabi'i, Mohammad bin Sirin (33-110 AH), the Imam's mushaf was in the order of revelation with due focus on ayahs pertaining to nasikh and mansukh. Ibn Sirin says that when Imam Ali (a.s.) stayed away from the new rulers and did not give allegiance to Abu Bakr, the latter felt concerned and visited his house to ask him the reason for not acknowledging his caliphate.
The Imam replied that he had pledged to Allah not to put a cloak on his shoulders except for the prayer until he complied the Qur'an between two covers (mushaf). Ibn Sirin regretted that this transcript has not passed into the hands of the Muslims (for reasons which will be mentioned later) and said: "If that transcript were in our hands, we would have found great knowledge in it." A similar report has been given by Ibn Munadi, who says that after the passing away of the Prophet, the Imam confined himself to his house for three days and compiled the whole Qur'an.
The famous bibliographer, Ibn Nadim, has called it the first ever mushaf and said the Imam compiled it with the help of his heart and memory. Ibn Jawzi al-Kalbi reports that during the lifetime of the Prophet, the Qur'an was in fragmented form, confined to parchments and the memory of reciters, until compiled as mushaf in the order of revelation by Imam Ali (a.s.) immediately after the passing away of the Noble Messenger. He says that if this mushaf were to be traced it would unravel bezels of wisdom.
Unfortunately, certain persons, while acknowledging the authenticity of these accounts have tried to cast doubts on the Imam's compilation being in book-form, by stating, rather unconvincingly, that the phrase jama'a al-Qur'an means that he memorized the Holy Scripture after the passing away of the crude attempt to credit others with the first compilation of the Qur'an but the fallacy of such biased claims are exposed when we diligently scrutinize the text of the above-quoted accounts where the word mushaf is clearly mentioned.
Moreover, only a written or transcribed document could be the quest of scholars who regret at not having access to it, and not the memory of a person. 'Allamah Majlisi in his note to the queries and answers given by the celebrated Shaykh Mufid in al-Masa'il al-Sarwiyyah, writes:
The commander of the Faithful, Imam Ali (a.s.) compiled the whole Qur'an from its beginning to its end and arranged it in order (of revelation) with the Makkan ayahs taking precedence over those revealed later in Madinah and placing the abrogated before the abrogator; everything in the Qur'an being in its right place.
For this reason Imam Ja'far al-Sadiq (a.s.) has said: "Yes, by Allah! If the Qur'an is to be recited as per its order of revelation, you will find us in it with names and references in the same manner as those before us have been mentioned by name."
source : abna