What was a subject that Avicenna studied, and developed a theory on