  In this paper, time-independent Hamiltonian systems are investigated via a
Lie-group/algebra formalism. The (unknown) solution linked with the Hamiltonian
is considered to be a Lie-group transformation of the initial data, where the
group parameter acts as the time. The time-evolution generator (i.e. the Lie
algebra associated to the group transformation) is constructed at an algebraic
level, hence avoiding discretization of the time-derivatives for the discrete
case. This formalism makes it possible to investigate the continuous and
discrete versions of time for time-independent Hamiltonian systems and no
additional information on the system is required (besides the Hamiltonian
itself and the initial conditions of the solution). When the time-independent
Hamiltonian system is integrable in the sense of Liouville, one can use the
action-angle coordinates to straighten the time-evolution generator and
construct an exact scheme (i.e. a scheme without errors). In addition, a method
to analyse the errors of approximative/numerical schemes is provided. These
considerations are applied to well-known examples associated with the
one-dimensional harmonic oscillator.
