how to check decomposition is lossless and dependency preserving