PREFIX :    <http://example/>
PREFIX  rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
# SPARQL 1.1
SELECT (?s1 AS ?subset) (?s2 AS ?superset)
WHERE
{
    # All pairs of sets except (S,S)
    ?s2 rdf:type :Set .
    ?s1 rdf:type :Set .
    FILTER(?s1 != ?s2)
    MINUS 
    {
    	# The MINUS RHS is (?s1, ?s2) where 
        # ?s1 has a member not in ?s2
        ?s1 rdf:type :Set .
        ?s2 rdf:type :Set .
        FILTER(?s1 != ?s2)

        ?s1 :member ?x .
        FILTER NOT EXISTS { ?s2 :member ?x . }
    }
}
