In those days...
In those days, Islam did not exist in any house except that of the Messenger of Allah - peace and blessing of Allah be upon him and his Descendants - and Khadijah, while I was the third after these two. I used to see and watch the effulgence of divine revelation and message, and breathed the scent of prophet hood. When the revelation descended on the Messenger of Allah - peace and blessing of Allah be upon him and his Descendants - I heard the scream of Satan.
I said, "O Messenger of Allah, what is this scream?" And he replied, "This is Satan who has lost all hope of being worshipped.
O 'Ali, you see all that I see and you hear all that I hear, except that you are not a prophet, but you are a vicegerent and you are surely on (the path of) virtue."38 It has also been narrated from Sulayman al-'A`mash that 'Ali (A) said: ما نزلت آية إلا عَلِمتُ فيما أُنزلت و أين نزلت وعلى من نزلت، إن ربي وهب لي قلباً عقولاً و لساناً طلقاً No verse has been revealed without my knowing about its subject, place of revelation, and against whom it has been revealed.
Certainly, God has granted me a perceptive heart and a fluent tongue.39 He has been reported to have said: سلوني عن كتاب الله فإنه ليس من آية إلا و قد عرفت بليل نزلت أم بنهار، في سهل أم في جبل Question me regarding the Book of God, for surely there is no verse except that I know whether it was revealed at night or during daytime, in a plain or on hilly ground.40 Sulayman ibn Qays reports 'Ali (A) to have said: ما نزلت على رسول الله صلى الله عليه و آله آية من القرآن إلا أقرأنيها "ع" و أملاها علي، فكتبتها بخطي، و علمني تأويلها و تفسيرها، و ناسخها و منسوخها، و محكمها و متشابهما، و خاصها و عامها، و دعا الله أن يعطيني فهمها و حفظها، فما نسيت آية من كتاب الله، و لا علما أملاه علي و كتبته Not a verse of the Qur'an was revealed to the Messenger of God (S) without his reciting and dictating it to me, and without my writing it in my own hand.
He taught me its (the Qur'an's) interpretation and exposition, its nasikh and manasukeh, and its muhkam and mutashabih. He prayed to God Almighty to teach me to comprehend and memorize it.
Hence I neither forgot a verse from the Book of God Almighty nor any knowledge that he dictated to me and which I wrote.41 Now when the Imam (A) had a complete knowledge of all the verses and the contexts of their revelation (sha'n al-nuzul)as per the foregoing tradition, he must have written his mushaf in accordance with the revelation and what the Prophet (S) had ordered him (A).