and to perfect His favor upon you so that you may be grateful.” [al-Mā’idah: 6]; and His words: “In retribution there is life for you, O people of insight” [al-Baqarah: 179]; as well as his ﷺ statement, “I had forbidden you to visit graves; now visit them, for they remind you of the Hereafter,” and other texts of the same tenor.
The earliest scholars to author independent works on this topic appear to have been al-Ghazali, with his Shifā’ al-Ghalīl fī Masālik al-Ta‘līl; al-‘Izz ibn ‘Abd al-Salām, with his Qawāʿid al-Aḥkām; and Ibn al-Qayyim, who devoted excellent chapters to it in his celebrated Iʿlām al-Muwaqqiʿīn, clarifying Allah’s wisdom and secrets in many rulings—especially those issues about which some objectors claimed, “They run counter to legal analogy.”
As for Abū Isḥāq al-Shāṭibī, he excelled in the field and gave it its due share of scrutiny and precision in his magnificent al-Muwāfaqāt. This moved me to distill from that work a sufficient summary for the student of knowledge, selecting beneficial passages that will train him to widen his scope in this noble science. Allah alone grants success.