Averroes states his political philosophy in his commentary of Plato's Republic. He combines his ideas with Plato's and with Islamic tradition; he considers the ideal state to be one based on the Islamic law (shariah). His interpretation of Plato's philosopher-king followed that of Al-Farabi, which equates the philosopher-king with the imam, caliph and lawgiver of the state. Averroes's description of the characteristics of a philosopher-king are similar to those given by Al-Farabi; they include love of knowledge, good memory, love of learning, love of truth, dislike for sensual pleasures, dislike for amassing wealth, magnanimity, courage, steadfastness, eloquence and the ability to "light quickly on the middle term ". Averroes writes that if philosophers cannot rule—as was the case in the Almoravid and Almohad empires around his lifetime—philosophers must still try to influence the rulers towards implementing the ideal state.