This Is My Faith - Al-fatlawi, Ali - الصفحة ٢٤١ - What is the Imam’s Source of Knowledge?
To answer the first question, we need to know that the Imams’ (PBUT) source of knowledge is the Almighty Allah. At times, their knowledge comes from the Prophet (PBUH) himself and at other times from internal illumination and enlightenment and as well as from speaking to angels.
The Hadith from Imam Ali (PBUH) confirms this point: “The Messenger of Allah taught me a thousand doors each of which opens up to a thousand doors; that is a thousand by a thousand doors. Consequently, I have learned about what was and what is going to be till the Judgment Day. I learned about demise and affliction and sound judgment”. If we consider this Hadith carefully, we will see the references to the first two ways of earning knowledge.
Anwar: But if I can interrupt, Akhi Hasan, I have got to ask a question before we move to the third way. What is the significance of ‘thousand’ here? Is it a reference to the actual number?
Hasan: No, it just refers to large quantities. This Holy Verse is an example: