Knowledge, politics and heresy in the Medieval Islamic West