"His [(Hazrat Mahdi’s (as)] knowledge of fiqh (Islamic law) IS THE EQUIVALENT OF THAT OF TEN SCHOLARS."(Nuaim ibn Hammad, Kitab al-Fitan)
Imam Sadik (as) says:
“KNOWLEDGE IS DIVIDED INTO TWENTY-SEVEN SECTIONS. Humanity has so far only been able to acquire TWO SECTIONS. THE OTHER TWENTY-FIVE SECTION WILL EMERGE WHEN OUR QAIM [HAZRAT MAHDI (AS)] APPEARS and will spread among humanity.”(Bihar al-Anwar, Vol. 52, p. 336)
HAZRAT MAHDI (AS) WILL POSSES GREATER KNOWLEDGE AND FOREBEARANCE THAN ANYONE ELSE.Hazrat Mahdi (as) bears the name of the Prophet (saas) and his moral values are those of the Prophet Muhammad (saas). (Al-Mahdi al-Maw'ud, Vol. 1, pp. 281-282, 266, 300)
Allah has strengthened in mind and body all the prophets and messengers He has made instruments of salvation. This feature is particularly noticeable in the time of Hazrat Mahdi (as), chosen by Allah as a guide to salvation in the End Times. Through Allah’s blessing, Hazrat Mahdi (as) will possess much superior knowledge. But it would seem from the hadith and other accounts that this knowledge will consist more of wisdom, profundity, insight and foresight than of classic learning.
Because of this wisdom, insight, foresight, and the ability to interpret and draw conclusions from events possessed by Hazrat Mahdi (as), people will encounter a matchless intelligence in every question they put to him and on every matter for which they seek a solution. Through Hazrat Mahdi (as) they will learn and implement paths they had never thought of, solutions they had never seen and perspectives they had never imagined.