  In this paper we show that the depth and the Stanley depth of the factor of
two monomial ideals is invariant under taking a so called canonical form. It
follows easily that the Stanley Conjecture holds for the factor if and only if
it holds for its canonical form. In particular, we construct an algorithm which
simplifies the depth computation and using the canonical form we massively
reduce the run time for the sdepth computation.
