Proof, pedagogy, and the practice of mathematics in medieval Islam