Al-Muqadimah (Prolegomena), which is an extensive work on Philosophy of History, Political Theory, Sociology, Economics and Civiliation in general. In it he explains how societies and history works, and what the results of actions of people in history. He draws conclusions into laws of history.

Abd al-Rahman ibn Muhammad ibn Khaldun (May 27, 1332 AD/732 AH – March 19, 1406 AD/808 AH) was an Arab famous Muslim polymath: an historian, historiographer, demographer, economist, philosopher, political theorist, sociologist and statesman whose treatise, the "Muqaddima", in which he pioneered a general sociological theory of history, shows him as one of the most original thinkers of the Middle Ages. Abd al-Rahman Ibn Mohammad is generally known as Ibn Khaldun after a remote ancestor. He is considered the father of demography, cultural history, historiography, the philosophy of history, sociology, and the social sciences, and is viewed as one of the forerunners of modern economics.

1.1. The family
Ibn Khaldun’s - of southern Arabian origin - ancestors were from the Hadhramawt, now south eastern Yemen, and he relates that, in the eighth century, one Khaldun ibn ‘Uthman was with the Yemeni divisions that helped the Muslims colonize the Iberian Peninsula. Khaldun ibn ‘Uthman settled first at Carmona and then in Seville, where several of the family had distinguished careers as scholars and officials, they settled in Seville after the Moslem conquest of Spain and distinguished themselves in the political and intellectual life of the city. During the Christian recon quest of the Iberian Peninsula, the family immigrated to North Africa, probably about 1248, eventually settling in Tunis. Under the Tunisian Hafsid dynasty some of his family held political office; Ibn Khaldun’s father and grandfather however withdrew from political life and joined a mystical order. Ibn Khaldun always felt attached to the cultural tradition of Moslem Spain. However, the biographer Mohammad Enan questions his claim, suggesting that his family may have been Berbers who pretended to be of Arab origin in order to gain social status.

1.2. The beginning
Ibn Khaldun was born in Tunisia on May 27, 1332 (732 A.H.) into an upper-class Andalusian family. At the age of 17, the plague, or Black Death, reached Tunis. Ibn Khaldun lost both his parents to an epidemic of the plague which hit the city. His parents and several of his teachers died when the terrible epidemic that struck the Middle East, North Africa and Europe in 1347–1348, killing at least one-third of the population, had a traumatic effect on the survivors. Its impact showed in every aspect of life: art, literature, social structures and intellectual life. It was clearly one of the experiences that shaped Ibn Khaldun’s perception of the world.
1.3. Education
Growing up in Tunis, Ibn Khaldun studied the traditional religious sciences including law according to the Maliki school as well as the rational sciences. His family's high rank enabled Ibn Khaldun to study with the best North African teachers of the time. He received a classical Arabic education, studying the Qur'an and Arabic linguistics, the basis for an understanding of the Qur'an, hadith, and fiqh. The mystic, mathematician and philosopher Al-Abili introduced him to mathematics, logic and philosophy, where he above all studied the works of Averroes, Avicenna, Razi and al-Tusi. He also was trained in the arts necessary for a career in government. Among his teachers, he was most impressed by al-Abili, who came to Tunis in 1347 and introduced him to philosophy.
Following family tradition, Ibn Khaldun strove for a political career. In the face of a tumultuous political situation in North Africa, this required a high degree of skill developing and dropping alliances prudently, to avoid falling with the short-lived regimes of the time. Ibn Khaldun’s autobiography is the story of an adventure, in which he spends time in prison, reaches the highest offices and falls again into exile.

1.4. Youth
At the age of 20, he began his political career at the Chancellery of the Tunisian ruler Ibn Tafrakin with the position of Kātib al-'Alāmah, which consisted of writing in fine calligraphy the typical introductory notes of official documents. In 1352, the Sultan of Constantine, marched on Tunis and defeated it. Ibn Khaldun, in any case unhappy with his respected but politically meaningless position, followed his teacher Abili to Fez. Here the Marinid sultan appointed him as a writer of royal proclamations, which didn't prevent Ibn Khaldun from scheming against his employer. In 1357 this brought the 25-year-old a 22-month prison sentence. At the death of the sultan in 1358, the vizier granted him freedom and reinstated him in his rank and offices. Ibn Khaldun then schemed against the sultan successor, with Abu Salem's exiled uncle, Abu Salem. When Abu Salem came to power, he gave Ibn Khaldun a ministerial position, the first position which corresponded with Ibn Khaldun’s ambitions.

1.5. Early years
The treatment Ibn Khaldun received after the fall of Abu Salem through Ibn-Amar Abdullah, a friend of Ibn Khaldun’s, was not to his liking, he received no significant official position. At the same time, Amar successfully prevented Ibn Khaldun - whose political skills he was well aware of - from allying with the sultan of Tlemcen. Ibn Khaldun therefore decided to move to Granada. He could be sure of a positive welcome there, since at Fez he had helped the Sultan of Granada, the Nasrid Muhammad V, who regain power from his temporary exile. In 1364 Muhammad entrusted him with a diplomatic mission to the King of Castile, Pedro the Cruel, to endorse a peace treaty. Ibn Khaldun successfully carried out this mission and politely declined Pedro's offer to remain at his court and have his family's Spanish possessions returned to him.
In Granada, Ibn Khaldun quickly came into competition with Muhammad's vizier, who saw the close relationship between Muhammad and Ibn Khaldun with increasing mistrust. Ibn Khaldun tried to shape the young Muhammad into his ideal of a wise ruler, an enterprise which Muhammad's vizier thought foolish and a danger to peace in the country - and history proved him right. At Muhammad's vizier instigation, Ibn Khaldun was forced to leave Granada, though with official honours, in 1365; he was eventually sent back to North Africa. Muhammad's vizier himself was later accused by Muhammad of having unorthodox philosophical views, and murdered, despite an attempt by Ibn Khaldun to intercede on behalf of his old rival.

1.6. Late years
Ibn Khaldun accepted an invitation from the Hafsid ruler of Bougie and became his minister. When the ruler was defeated and killed by his cousin a year later, Ibn Khaldun entered the service of the cousin but soon left as a result of court intrigue. The next 9 years were the most turbulent of his life. Thoroughly disappointed with his court experiences, he tried to keep away from politics and spent most of the time in research and teaching in Biskra, at the sanctuary of the saint Abu Madyan near Tlemcen, and in Fez. He felt, however, repeatedly obliged to assume political missions for various rulers among the Arab tribes in the area. In 1375 he briefly returned to Granada but was expelled.

1.7. Last years in Egypt
However, even in Egypt, where Ibn Khaldun lived out his days, he could not stay out of politics completely. In 1384 the Egyptian Sultan, al-Malik udh-Dhahir Barquq, made him Professor of the Qamhiyyah Madrasah, and grand Qadi (supreme judge) of the Maliki school of fiqh or religious law (one of four schools, the Maliki school was widespread primarily in West Africa). His efforts at reform encountered resistance, however, and within a year he had to resign his judgeship. A contributory factor to his decision to resign may have been the heavy personal blow that struck him in 1384, when a ship carrying his wife and children sank off the coast of Alexandria. Ibn Khaldun now decided to complete the pilgrimage to Mecca after all.
After his return in May 1388, Ibn Khaldun concentrated more strongly on a purely educational function at various Cairo madrasas. At court he fell out of favour for a time, as during revolts against Barquq he had - apparently under duress - together with other Cairo jurists issued a Fatwa against Barquq. Later relations with Barquq returned to normal, and he was once again named the Maliki qadi. Altogether he was called six times to this high office, which for various reasons he never held long.
In 1401, under Barquq's successor, his son Faraj, Ibn Khaldun took part in a military campaign against the Mongol conqueror Timur, who besieged Damascus. Ibn Khaldun cast doubt upon the viability of the venture and didn't really want to leave Egypt. His doubts were vindicated, as the young and inexperienced Faraj, concerned about a revolt in Egypt, left his army to its own devices in Syria and hurried home. Ibn Khaldun remained at the besieged city for seven weeks, being lowered over the city wall by ropes in order to negotiate with Timur, in a historic series of meetings which he reports extensively in his autobiography. Timur questioned him in detail about conditions in the lands of the Maghreb; at his request, Ibn Khaldun even wrote a long report about it. As he recognized the intentions behind this, he did not hesitate, on his return to Egypt, to compose an equally extensive report on the history of the Tartars, together with a character study of Timur, sending these to the Merinid rulers in Fez.
Ibn Khaldun spent the following five years in Cairo completing his autobiography and his history of the world and acting as teacher and judge. During this time he also formed an all male club named Rijal Hawa Rijal. Their activities attracted the attention of local religious authorities and he was placed under arrest. He died on 17 March 1406, one month after his sixth selection for the office of the Maliki qadi.

2. HIS WORKS

Ibn Khaldun’s works can be classified in the categories of historical, and religious. Of his works on history, only his Universal History has survived to our day. Another work that is lost is the history that was written specifically for Tamerlane, as Ibn Khaldun mentioned in his autobiography. His religious books are: Lubab al-Mahsul (Summary of the Result); a commentary on an usul al-fiqh poem, and a few works which are of questionable attribute to him, namely a sufi tract “Shifa’ as-Sail” (Healing of the Inquirer).His most important work was Kitab al-‘Ibar, and of that the most significant section was the Muqaddimah. Such “introductions” were a recognized literary form at the time, and it is thus not surprising that the Muqaddimah is both long—three volumes in the standard translation—and the repository of its author’s most original thoughts. Kitab al-‘Ibar, which follows, is much more conventional in both content and organization, although it is one of the most important surviving sources for the history of medieval North Africa, the Berbers and, to a lesser extent, Muslim Spain.
Ibn Khaldun wrote a number of other books on purely academic subjects, as well as early works which have vanished. His Autobiography, although lacking personal details, contains extremely interesting information about the world in which he lived and, of course, about his meetings with Pedro and Timur. Ibn Khaldun’s strength was thus not as a historian in the traditional sense of a compiler of chronicles. He was the creator of a new discipline, ‘umran, or social science, which treated human civilization and social facts as an interconnected whole and would help to change the way history was perceived, as well as written. Of his early works, which were scholastic exercises in various fields of learning, only two are known to be extant.

2.1. The magnum opus “al muqaddima”
Ibn Khaldun's chief contribution lies in philosophy of history and sociology. He sought to write a world history preamble by a first volume aimed at an analysis of historical events. This volume, commonly known as Muqaddimah or 'Prolegomena', was based on Ibn Khaldun's unique approach and original contribution and became a masterpiece in literature on philosophy of history and sociology. The chief concern of this monumental work was to identify psychological, economic, environmental and social facts that contribute to the advancement of human civilization and the currents of history. In this context, he analysed the dynamics of group relationships and showed how group-feelings, al-'Asabiyya, give rise to the ascent of a new civilisation and political power and how, later on, its diffusion into a more general civilization invites the advent of a still new 'Asabiyya in its pristine form. He identified an almost rhythmic repetition of rise and fall in human civilization, and analysed factors contributing to it. His contribution to history is marked by the fact that, unlike earlier writers interpreting history largely in a political context, he emphasised environmental, sociological, psychological and economic factors governing the apparent events. This revolutionized the science of history and also laid the foundation of Umraniyat (Sociology).
Ibn Khaldun’s magnum opus, “al-Muqaddimah” can be divided into three parts. The first part is the introduction, the second part is the Universal History, and the third part is the history of the Maghrib. He wrote his Introduction to his book of universal history in a span of five months. This impressive document is a gist of his wisdom and hard earned experience, in it he used his political and first had knowledge of the people of Maghrib to formulate many of his ideas.

3. HIS THEORIES

This document summarized Ibn Khaldun’s ideas about every field of knowledge during his day. He discussed a variety of topics like History and Historiography; he also rebuked some of the historical claims with a calculated logic, and discussed the current sciences of his days. He would talk about astronomy, astrology, and numerology, discussed Chemistry, alchemy and Magic in a scientific way, also he freely offered his opinions and document well the "facts" of the other point of view. His discussion of Tribal societies and social forces would be the most interesting part of his thesis. He illuminated the world with deep insight into the workings and makings of kingdoms and civilizations. His thesis that the conquered race will always emulate the conqueror in every way. His theory about Asbyiah (group feeling) and the role that it plays in Bedouin societies is insightful. His theories of the science of Umran (sociology) are all pearls of wisdom. His Introduction is his greatest legacy that he left for all of humanity and the generations to come.

3.1. Theory of civilization
Ibn Khaldun's fame rests on his Muqaddima, in which he set forth the earliest general theory of the nature of civilization and the conditions for its development, intending it as a tool for understanding and writing history. He considered the permanent conflict between primitive Bedouin and highly developed urban society as a crucial factor in history. Civilization is for him an urban phenomenon to be realized only by local concentration and cooperation of men united under a strong dynastic rule. He saw group solidarity (as abiyya) as the driving force for this cooperation and the establishment of dynastic rule. The group with the strongest feeling of solidarity establishes its predominance and the rule of its leading family. The division of labour resulting from cooperation makes possible the production of conveniences and luxuries beyond the elementary necessities of life and the development of sciences. Indulgence in luxuries, however, causes degeneration and loss of group solidarity and thus results in the disintegration of the state and the group supporting the civilization. Another, less civilized group with an unspoiled sense of solidarity takes over and becomes heir to the earlier civilization.
Ibn Khaldun's history of the Maghreb, written with the insight of an active participant, presents a penetrating description of the rise and fall of dynasties and the role of Berber and Arab tribes. It is an invaluable source for the medieval history of North Africa. The other parts of his universal history generally lack such insight and source value. His autobiography, the most detailed one in medieval Muslim literature, offers a perspicacious description of his life until 1405.
3.2. View on science
Ibn Khaldun’s view on science followed the traditional division of sciences, which involves a division into religious sciences and non-religious sciences. The non-religious sciences are further divided into useful and non-useful sciences (mainly the occult sciences such as magic, alchemy and astrology). In the Muqaddimah, Ibn Khaldun reports on all the sciences up to his time, with examples and quotations. He makes it a point to refute magic, alchemy, astrology, and philosophy in his book. His work became a record of the development of sciences in his day.

3.3. View on philosophy
Ibn Khaldun's view on philosophy is similar to that of al-Ghazali, in the sense that he attempted to reconcile mysticism and theology. In fact, Ibn Khaldun, according to Issawi, “…goes further than the latter [al-Ghazali] in bringing mysticism completely within the purview of the jurisprudent (faqih) and in developing a model of the Sufi shaykh, or master, as rather similar to the theologian. Philosophy was regarded as going beyond its appropriate level of discourse, in that 'the intellect should not be used to weigh such matters as the oneness of God, the other world, the truth of prophecy, the real character of the divine attributes, or anything else that lies beyond the level of the intellect” (Muqaddima 3, 38). Ibn Khaldun criticized Neoplatonic philosophy, and asserted that the hierarchy of being and its progression toward the Necessary Being, or God, is not possible without revelation.
4. Conclusion

Ibn Khaldun's influence on the subject of history, philosophy of history, sociology, political science and education has remained paramount down to our times. He is also recognized as the leader in the art of autobiography, a renovator in the fields of education and educational psychology and in Arabic writing stylistics. His books have been translated into many languages, both in the East and the West, and have inspired subsequent development of these sciences.

REFERENCES

1. Ibn Khaldun's The Muqaddimah: An Introduction to History, edited and translated by Franz Rosenthal (3 vols., 1958; 2d ed. 1967), contains a complete translation of the Muqaddima with a detailed introduction to Ibn Khaldun's life and work.

2. Muhsin Mahdi, Ibn Khaldun's Philosophy of History (1957), is a penetrating study. The reports concerning Ibn Khaldun's meeting with Tamerlane were translated and edited by Walter J. Fischel in Ibn Khaldun and Tamerlane (1952).