In this work, the problem of learning Koopman operator of a discrete-time autonomous system is considered. The learning problem is formulated as a constrained regularized empirical loss minimization in the infinite-dimensional space of linear operators. We show that under certain but general conditions, a representer theorem holds for the learning problem. This allows reformulating the problem in a finite-dimensional space without any approximation and loss of precision. Following this, we consider various cases of regularization and constraints in the learning problem, including the operator norm, the Frobenius norm, rank, nuclear norm, and stability. Subsequently, we derive the corresponding finite-dimensional problem. Furthermore, we discuss the connection between the proposed formulation and the extended dynamic mode decomposition. Finally, we provide an illustrative numerical example.