The preceding inequality supplies the upper bound on the supremum. If has full support relative to , choose ; then and the objective equals . If at some symbols, use this choice on the support of and put elsewhere. Letting gives the same value. Finiteness of guarantees that is positive on the support of . This proves the Gibbs variational principle for relative entropy.
Writing for the laws of , respectively, and using Jensen inequality for the concave natural logarithm,
This is the lower-bound half of the Gibbs variational principle for relative entropy.
Let and define the exponentially tilted probability mass function
For this choice every ratio equals , so equality holds in the Jensen inequality used in part (d). Hence
and is the maximizer. This is the finite-alphabet Gibbs variational principle for relative entropy.