The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
4. (Not altogether) for it (the dream) is indicative (of the future), according to null; the experts also declare this.
Well then, as dreams are mere illusion, they do not contain a particle of reality?--Not so, we reply; for dreams are prophetic of future good and bad fortune. For scripture teaches as follows, 'When a man engaged in some work undertaken for a special wish sees in his dreams a woman, he may infer success from that dream-vision.' Other scriptural passages declare that certain dreams indicate speedy death, so, e.g. 'If he sees a black man with black teeth, that man will kill him.'--Those also who understand the science of dreams hold the opinion that to dream of riding on an elephant and the like is lucky; while it is unlucky to dream of riding on a donkey, &c.; and that certain other dreams also caused by special mantras or devatâs or substances contain a particle of truth.--In all
these cases the thing indicated may be real; the indicating dream, however, remains unreal as it is refuted by the waking state. The doctrine that the dream itself is mere illusion thus remains uncontradicted.--On this account the Vedic passage to which the first Sûtra of this pâda refers is to be explained metaphorically. When we say 'the plough bears, i.e. supports the bullocks,' we say so because the plough is the indirect cause of the bullocks being kept 1, not because we mean that the plough directly supports the bullocks. Analogously scripture says that the dreaming person creates chariots, &c., and is their maker, not because he creates them directly but because he is the cause of their creation. By his being their cause we have to understand that he is that one who performs the good and evil deeds which are the cause of the delight and fear produced by the apparition, in his dream, of chariots and other things 2.--Moreover, as in the waking state, owing to the contact of the senses and their objects and the resulting interference of the light of the sun, &c., the self-luminousness of the Self is, for the beholder, difficult to discriminate, scripture gives the description of the dreaming state for the purpose of that discrimination. If then the statements about the creation of chariots, &c., were taken as they stand (i.e. literally) we could not ascertain that the Self is self-luminous 3. Hence we have to explain the passage relative to the creation of chariots, &c., in a metaphorical sense, so as to make it agree with the statement about the non-existence of chariots, &c. This explains also the scriptural passage about the shaping (III, 2, 2). The statement made above that in the Kâthaka the highest Self is spoken of as the shaper
of dreams is untrue; for another scriptural passage ascribes that activity to the individual soul, 'He himself destroying, he himself shaping dreams with his own splendour, with his own light' (Bri. Up. IV, 3, 9) 1. And in the Kâthaka Upanishad itself also we infer from the form of the sentence, 'That one who wakes in us while we are asleep,'--which is an anuvâda, i.e. an additional statement about something well known--that he who is there proclaimed as the shaper of lovely things is nobody else than the (well-known) individual soul. The other passage which forms the complementary continuation of the one just quoted ('That indeed is the Bright, that is Brahman') discards the notion of the separate existence of the individual soul and teaches that it is nothing but Brahman, analogously to the passage 'That art thou.' And this interpretation does not conflict with Brahman being the general subject-matter.--Nor do we thereby deny altogether that the highest (prâgña) Self is active in dreams; for as being the Lord of all it may be considered as the guide and ruler of the soul in all its states. We only maintain that the world connected with the intermediate state (i.e. the world of dreams) is not real in the same sense as the world consisting of ether and so on is real. On the other hand we must remember that also the so-called real creation with its ether, air, &c., is not absolutely real; for as we have proved before (II, 1, 14) the entire expanse of things is mere illusion. The world consisting of ether, &c., remains fixed and distinct up to the moment when the soul cognizes that Brahman is the Self of all; the world of dreams on the other hand is daily sublated by the waking state. That the latter is mere illusion has, therefore, to be understood with a distinction.
137:1 Bullocks have to be kept because the fields must be tilled.
137:2 The dreams have the purpose of either cheering or saddening and frightening the sleeper; so as to requite him for his good and evil works. His adrishta thus furnishes the efficient cause of the dreams.
137:3 Because then there would be no difference between the dreaming and the waking state.