 In consciousness studies, Al-Farabi (872–951) wrote the "On the Cause of Dreams", which appeared as chapter 24 of his "Book of Opinions of the people of the Ideal City".It was a treatise on dreams, in which he was the first to distinguish between dream interpretation and the nature and causes of dreams.In "The Canon of Medicine", Avicenna extended the theory of temperaments to encompass "emotional aspects, mental capacity, moral attitudes, self-awareness, movements and dreams."