  Tool SPECS implements an efficient automated approach for reasoning about the
SPARQL query containment problem. In this paper, we prove the correctness of
this approach. We give precise semantics of the core subset of SPARQL language.
We briefly discuss the procedure used for reducing the query containment
problem into a formal logical framework. We prove that such reduction is both
sound and complete for conjunctive queries, and also for some important cases
of non-conjunctive queries containing operator union, operator optional, and
subqueries. Soundness and completeness proofs are considered in both
containment and subsumption forms.
