Barani was a contemporary of Muhammad bin Tughlaq and Firuz Shah Tughlaq both. He wrote a number of renowned texts, such as the Fatwa-i-Jahandari, which elaborates on the principles to be followed by Muslim rulers to attain merit.
Some of the causes of Ibrahim Lodhi’s defeat in First Battle of Panipat were: 1. Babur used Artillery in the battle and Indian soldiers were not familiar with the use of artillery.2. The army of Babur was better disciplined and fully trained and well equipped.3. The country was divided into petty states and small principalities.