  Ore operators with polynomial coefficients form a common algebraic
abstraction for representing D-finite functions. They form the Ore ring
$K(x)[D_x]$, where $K$ is the constant field. Suppose $K$ is the quotient field
of some principal ideal domain $R$. The ring $R[x][D_x]$ consists of elements
in $K(x)[D_x]$ without "denominator".
  Given $L \in K(x)[D_x]$, it generates a left ideal $I$ in $K(x)[D_x]$. We
call $I \cap R[x][D_x]$ the univariate contraction of $I$.
  When $L$ is a linear ordinary differential or difference operator, we design
a contraction algorithm for $L$ by using desingularized operators as proposed
by Chen, Jaroschek, Kauers and Singer. When $L$ is an ordinary differential
operator and $R = K$, our algorithm is more elementary than known algorithms.
In other cases, our results are new.
  We propose the notion of completely desingularized operators, study their
properties, and design an algorithm for computing them. Completely
desingularized operators have interesting applications such as certifying
integer sequences and checking special cases of a conjecture of Krattenthaler.
  A D-finite system is a finite set of linear homogeneous partial differential
equations in several variables, whose solution space is of finite dimension.
For such systems, we give the notion of a singularity in terms of the
polynomials appearing in them. We show that a point is a singularity of the
system unless it admits a basis of power series solutions in which the starting
monomials are as small as possible with respect to some term order. Then a
singularity is apparent if the system admits a full basis of power series
solutions, the starting terms of which are not as small as possible. We prove
that apparent singularities in the multivariate case can be removed like in the
univariate case by adding suitable additional solutions to the original system.
