Question: Who lived earlier, Ibn Khaldun or Muhammad Baqir Yazdi?
Context: Ayatullah Sayyid Muhammad Baqir Al-Mūsawī Al-Muhrī (Arabic: السيد محمد باقر الموسوي المهري‎ ‎ ; also spelled Al-Mohri; 25 December 1948 – 4 July 2015) was a Kuwaiti Ayatullah.  He studied in seminaries in Najaf, Iraq under Grand Ayatollah Abul-Qassim Khoei and Mohammad Baqir al-Sadr. `Asabiyya or asabiyyah (Arabic: عصبيّة) refers to social solidarity with an emphasis on unity, group consciousness and sense of shared purpose, and social cohesion, originally in a context of "tribalism" and "clanism".  It was a familiar term in the pre-Islamic era, but became popularized in Ibn Khaldun's "Muqaddimah" where it is described as the fundamental bond of human society and the basic motive force of history.  `Asabiyya is neither necessarily nomadic nor based on blood relations; rather, it resembles philosophy of classical republicanism.  In the modern period, the term is generally analogous to solidarity.  However, it is often negatively associated because it can sometimes suggest loyalty to one's group regardless of circumstances, or partisanship.  Ibn Khaldun also argued that `asabiyya is cyclical and directly related to the rise and fall of civilizations: it is most strong at the start of a civilization, declines as the civilization advances, and then another more compelling ʿasabiyyah eventually takes its place to help establish a different civilization. The Sha'baniyah Munajat (Persian: مناجات شعبانیه‎ ‎ ) is a supplication attributed to Ali ibn Abi Talib, the first Shia Imam, that invoked in the Sha'ban month.  The supplication was narrated by Ibn Khalawayh and is mentioned by Abbas Qumi in Mafatih al-Janan, Sayyed Ibn Tawus in Eqbal al-a’mal, and Muhammad Baqir Majlesi in Bihar al-Anwar.  In the Mafatih al-Janan, the Munajat mentioned at Sha'ban month prayers section.  This supplication known as a monologue of Ali ibn Abi Talib with his God, Allah.  In the supplication, Ali emphasizes on God's generosity and called Allah as creator and infinite of human.  Ali advised to recite the Du'a with presence of heart. Muhammad Baqir ibn Muhammad Akmal al-Wahid Bihbahani, also Vahid Behbahani, or also Waheed Behbahani (1706–1791), was a Twelver Shia Islamic scholar.  He is widely regarded as the founder or restorer of the "Usuli" school of Twelver Shi'a Islam and as playing a vital role in narrowing the field of orthodoxy in Twelver Shi'a Islam by expanding "the threat of "takfir"" against opposing scholars "into the central field of theology and jurisprudence". Muhammad Baqir Yazdi was an Iranian mathematician who lived in the 16th century.  He gave the pair of amicable numbers 9,363,584 and 9,437,056 many years before Euler's contribution to amicable numbers.  He was the last notable Islamic mathematician.  His major book is "Oyoun Alhesab" (Arabic:عيون الحساب). Azad was born in Delhi in a highly educated Persian immigrant family.  His mother died when he was four years old.  His father, Muhammad Baqir (c.1810-1857), was educated at the newly founded Delhi College.  His father Muhammad Baqir died by the punishment or summoned from the court because of his favour with Muslims.  Besides his many other activities he worked in the British administration.  In early 1837, Muhammad Baqir bought a press and launched the "Delhi He completed his studies in Mashhad, Qom and Najaf were sought and was awarded the degree of Ijtihad.  Muhammad Baqir Rizvi Madras, Mirza Javad Maleki Tabrizi, Sheikh Ali Shah Abadi and Abdul-Karim Ha'eri Yazdi, Abu al-Hasan Isfahani, Muhammad Hosein NĀʾĪNĪ and Sheikh Ziauddin Iraqi were his professors." The Muqaddimah, also known as the Muqaddimah of Ibn Khaldun (Arabic: مقدّمة ابن خلدون‎ ‎ ) or Ibn Khaldun's Prolegomena (Ancient Greek: Προλεγόμενα ), is a book written by the Arab historian Ibn Khaldun in 1377 which records an early view of universal history.  Some modern thinkers view it as the first work dealing with the philosophy of history or the social sciences of sociology, demography, historiography, cultural history, social Darwinism, ecology, Darwinism and economics.  The "Muqaddimah" also deals with Islamic theology, political theory and the natural sciences of biology and chemistry. Ibn Khaldun ( ; Arabic: أبو زيد عبد الرحمن بن محمد بن خلدون الحضرمي‎ ‎ , "Abū Zayd ‘Abd ar-Raḥmān ibn Muḥammad ibn Khaldūn al-Ḥaḍramī" ; 27 May 1332 – 17 March 1406) was a North African Arab historiographer and historian. Du'a Nudba is one of the major Shiite prayers about Muhammad al-Mahdi and his occultation.  Nudba means to cry and Shiites read the prayer for ask to help them during the occultation.  The supplication recite in Eid al-Fitr, Eid al-Adha, Eid al-Ghadeer, and in every Friday morning.  Mazar al-Kabir, Mazar al-Ghadim, and Mesbaho al-Zaer were narrated the supplication.  These books were written with authentic narrators such as Sayyed Ibn Tawus.  Muhammad Baqir Majlisi wrote this prayer in Zaad-ul-Maad from Imam Ja'far al-Sadiq.  Also, Albazofari, a person who lived in minor occultation, narrated from The Four Deputies of Imam Mahdi that Imam Mahdi said to read the prayer.
Answer: Ibn Khaldun