The ability to think has several degrees. The first degree is man's intellectual understanding of the things that exist in the outside world in a natural or arbitrary order, so that he may try to arrange them with the help of his own power. This kind of thinking mostly consists of perceptions. It is the discerning intellect, with the help of which man obtains the things that are useful for him and his livelihood, and repels the things that are harmful to him.
The second degree is the ability to think which provides man with the ideas and the behavior needed in dealing with his fellow men and in leading them. It mostly conveys apperceptions, which are obtained one by one through experience, until they have become really useful. This is called the experimental intellect.
The third degree is the ability to think which provides the knowledge, or hypothetical knowledge, of an object beyond sense perception without any practical activity (going with it). This is the speculative intellect. It consists of both perceptions and apperceptions. They are arranged according to a special order, following special conditions, and thus provide some other knowledge of the same kind, that is, either perceptive or apperceptive. Then, they are again combined with something else, and again provide some other knowledge. The end of the process is to be provided with the perception of existence as it is, with its various genera, differences, reasons, and causes. By thinking about these things, (man) achieves perfection in his reality and becomes pure intellect and perceptive soul. This is the meaning of human reality.
Ibn Khaldun, al-Muqaddimah (Franz Rosenthal, translator), chapter vi, section 1.