Foundations of Non-stationary Dynamic Programming with Discrete Time Parameter