accepted Plato's ideas of the deterioration of the ideal state. He cites examples from Islamic history when the Rashidun caliphate—which in Sunni tradition represented the ideal state led by "rightly guided caliphs"—became a dynastic state under Muawiyah, founder of the Umayyad dynasty. He also says the Almoravid and the Almohad empires started as ideal, shariah-based states but then deteriorated into timocracy, oligarchy, democracy and tyranny. Diversity of Islamic law In his tenure as judge and jurist, Averroes for the most part ruled and gave fatwas according to the Maliki school of Islamic law which was dominant in Al-Andalus and the western Islamic world during his time. However, he frequently acted as "his own man", including sometimes rejecting the "consensus of the people of Medina" argument that is one of the traditional Maliki position. In Bidāyat al-Mujtahid, one of his major contributions to the field of Islamic law, he not only describes the differences between various school of Islamic laws but also tries to theoretically explain the reasons for the difference and why they are inevitable. Even though all the schools of Islamic law are ultimately rooted in the Quran and hadith, there are "causes that necessitate differences" (al-asbab al-lati awjabat al-ikhtilaf). They include differences in interpreting scripture in a general or specific sense, in interpreting scriptural commands as obligatory or merely recommended, or prohibitions as discouragement or total prohibition, as well as ambiguities in the meaning of words or expressions. Averroes also writes that the application of qiyas (reasoning by analogy) could give rise to different legal opinion because jurists might disagree on the applicability of certain analogies and different analogies might contradict each other. Natural philosophy Astronomy As did Avempace and Ibn Tufail, Averroes criticizes the Ptolemaic system using philosophical arguments and rejects the use of eccentrics and epicycles to explain the apparent motions of the moon, the sun and the planets. He argued that those objects move uniformly in a strictly circular motion around the earth, following Aristotelian principles. He postulates that there are three type of planetary motions; those that can be seen with the naked eye, those that requires instruments to observe and those that can only be known by philosophical reasoning. Averroes argues that the occasional opaque colors of the moon are caused by variations in its thickness; the thicker parts receive more light from the Sun—and therefore emit more light—than the thinner parts. This