Abstract
The methods of Lie group analysis of differential equations are generalized so as to provide an infinitesimal formalism for calculating symmetries of difference equations. Several examples are analysed, one of them being a nonlinear difference equation. For the linear equations the symmetry algebra of the discrete equation is found to be isomorphic to that of its continuous limit.