Immanuel Kant's Fundamental Principles of the Metaphysics of Morals: Second Section and Third Section

Freedom must be presupposed as a Property of the Will of all Rational Beings

It is not enough to predicate freedom of our own will, from Whatever reason, if we have not sufficient grounds for predicating the same of all rational beings. For as morality serves as a law for us only because we are rational beings, it must also hold for all rational beings; and as it must be deduced simply from the property of freedom, it must be shown that freedom also is a property of all rational beings. It is not enough, then, to prove it from certain supposed experiences of human nature (which indeed is quite impossible, and it can only be shown a priori), but we must show that it belongs to the activity of all rational beings endowed with a will. Now I say every being that cannot act except under the idea of freedom is just for that reason in a practical point of view really free, that is to say, all laws which are inseparably connected with freedom have the same force for him as if his will had been shown to be free in itself by a proof theoretically conclusive. * Now I affirm that we must attribute to every rational being which has a will that it has also the idea of freedom and acts entirely under this idea. For in such a being we conceive a reason that is practical, that is, has causality in reference to its objects. Now we cannot possibly conceive a reason consciously receiving a bias from any other quarter with respect to its judgements, for then the subject would ascribe the determination of its judgement not to its own reason, but to an impulse. It must regard itself as the author of its principles independent of foreign influences. Consequently as practical reason or as the will of a rational being it must regard itself as free, that is to say, the will of such a being cannot be a will of its own except under the idea of freedom. This idea must therefore in a practical point of view be ascribed to every rational being.

     * I adopt this method of assuming freedom merely as an idea
     which rational beings suppose in their actions, in order to
     avoid the necessity of proving it in its theoretical aspect
     also. The former is sufficient for my purpose; for even
     though the speculative proof should not be made out, yet a
     being that cannot act except with the idea of freedom is
     bound by the same laws that would oblige a being who was
     actually free. Thus we can escape here from the onus which
     presses on the theory.