Their curriculum began with memorization of the Arabic alphabet and the later, shorter suras of the Qur'an; if a student was sufficiently interested or apt, it progressed to law (fiqh), theology, Arabic grammar (usually taught with ibn Adjurrum's famous summary), mathematics (mainly as it pertained to the complex legal system of inheritance distribution), and sometimes astronomy.