'What kind of SPARQL patterns result in multisets (or sequences) of solution mappings
I am doing some SPARQL proofs where I use multisets to establish the proofs (instead of patterns). When applying the results in actual SPARQL queries, I need to make sure that every pattern used produces a multiset so that my proofs still hold.
EXAMPLE
Let JOIN be the SPARQL JOIN (aka AND) operator, and eval be the evaluation function.
Lemma A: Assume two multisets of solution mappings; M1 and M2: I made the proof that JOIN(M1, M2) = JOIN(M2, M1).
In order to apply this in an actual query (in algebraic form): JOIN(P1, P2) ≡ JOIN(P2, P1) which is correct if eval((JOIN(P1, P2)) = eval(JOIN(P2, P1)) which can be written as JOIN(eval(P1), eval(P2() ≡ JOIN(eval(P2), eval(P1)). In order to use Lemma A, it needs to hold that eval(P1) and eval(P2) yield multisets of solution mappings. However, not all SPARQL patterns yield multisets of solution mappings (I am not talking about sequences here as a sequence can be converted into a multiset). For example GROUP BY yields a set of mappings from solution mappings to multisets of solution mappings.
QUESTION
Which constraints on the structures of P1 and P2 I need to impose in order to ensure that, e.g., my Lemma A, is applicable?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
