The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
48. (The possibility of) injunctions and prohibitions (results) from the connexion (of the Self) with bodies; as in the case of light and so on.
Passages such as 'He is to approach his wife at the proper time,' and 'he is not to approach the wife of his guru,' are examples of permissions (or injunctions) and prohibitions; or again passages such as 'He is to kill the animal devoted to Agnîshomau,' and 'He is not to hurt any being.' Corresponding examples from ordinary life are: 'A friend is to be served,' and 'Enemies are to be shunned.' Permissions and prohibitions of this kind are possible, because the Self although one only is connected with various bodies.--Of what kind then is that connexion?--It consists in the origination in the Self of the erroneous notion that the Self is the aggregate consisting of the body and so on. This erroneous notion is seen to prevail in all living beings, and finds its expression in thoughts such as the following: 'I go,' 'I come,' 'I am blind,' 'I am not blind,' 'I am confused,'
[paragraph continues] 'I am not confused.' That erroneous notion cannot be removed by anything but perfect knowledge, and before the latter supervenes, it remains spread among all living beings. And thus, although the Self must be admitted to be one only, injunctions and prohibitions are possible owing to the difference effected by its connexion with bodies and other limiting adjuncts, the products of Nescience.--It then follows that for him who has obtained perfect knowledge, injunctions and prohibitions are purportless.--No, we reply, (they are not purportless for him, but they do not refer to him), since to him who has obtained the highest aim no obligation can apply. For obligations are imposed with reference to things to be avoided or desired; how then should he, who sees nothing, either to be wished or avoided, beyond the universal Self, stand under any obligation? The Self certainly cannot be enjoined on the Self.--Should it be said that injunctions and prohibitions apply to all those who discern that the soul is something different from the body (and therefore also to him who possesses perfect knowledge), we reply that (such an assertion is too wide, since) obligation depends on a man's imagining his Self to be (actually) connected with the body. It is true that obligation exists for him only who views the soul as something different from the body; but fundamentally all obligation is an erroneous imagination existing in the case of him only who does not see that his Self is no more connected with a body than the ether is with jars and the like. For him, on the other hand, who does not see that connexion no obligation exists, much less, therefore, for him who discerns the unity of the Self.--Nor does it result from the absence of obligation, that he who has arrived at perfect knowledge can act as he likes; for in all cases it is only the wrong imagination (as to the Self's connexion with a body) that impels to action, and that imagination is absent in the case of him who has reached perfect knowledge.--From all this it follows that injunctions and prohibitions are based on the Self s connexion with the body; 'as in the case of light' The case under discussion is analogous to cases such as the following: Light is one only, and yet we shun
a fire which has consumed dead bodies, not any other fire. The sun is one only; yet we shun only that part of his light which shines on unholy places, not that part which falls on pure ground. Some things consisting of earth, are desired, e.g. diamonds and beryls; other things likewise consisting of earth are shunned, e.g. dead bodies. The urine and dung of cows are considered pure and used as such; those of other animals are shunned. And many similar cases.