  A notion of implicit difference equation on a Lie groupoid is introduced and
an algorithm for extracting the integrable part (backward or/and forward) is
formulated. As an application, we prove that discrete Lagrangian dynamics on a
Lie groupoid $G$ may be described in terms of Lagrangian implicit difference
equations of the corresponding cotangent groupoid $T^*G$. Other situations
include finite difference methods for time-dependent linear
differential-algebraic equations and discrete nonholonomic Lagrangian systems,
as particular examples.
