@@ -8942,15 +8942,15 @@ <h3>Basic Graph Patterns</h3>
8942
8942
<a href="https://en.wikipedia.org/w/index.php?title=Multiset">multiset</a>,
8943
8943
also known as a <i>bag</i>. A multiset is an
8944
8944
unordered collection of elements in which each element may appear more than once. It is
8945
- described by a set of elements and a cardinality function giving the number of occurrences of
8946
- each element from the set in the multiset.</p>
8945
+ described by a set of elements and a function giving the multiplicity of each of these
8946
+ elements (i.e., the number of times the element is contained in the multiset) .</p>
8947
8947
<p>Write μ for solution mappings.</p>
8948
8948
<p>Write μ<sub>0</sub> for the mapping such that dom(μ<sub>0</sub>) is the empty set.</p>
8949
8949
<p>Write Ω<sub>0</sub> for the multiset consisting of exactly the empty mapping
8950
- μ<sub>0,</sub> with cardinality 1. This is the join identity.</p>
8950
+ μ<sub>0,</sub> with multiplicity 1. This is the join identity.</p>
8951
8951
<p>Write μ(x) for the solution mapping variable x to RDF term t : { (x, t) }</p>
8952
8952
<p>Write Ω(x) for the multiset consisting of exactly μ(?x->t), that is, { { (x, t) } }
8953
- with cardinality 1.</p>
8953
+ with multiplicity 1.</p>
8954
8954
<div class="defn">
8955
8955
<p><b>Definition: <span id="defn_algCompatibleMapping">Compatible Mappings</span></b></p>
8956
8956
<p>Two solution mappings μ<sub>1</sub> and μ<sub>2</sub> are compatible if, for every
@@ -8962,8 +8962,15 @@ <h3>Basic Graph Patterns</h3>
8962
8962
<p>If μ<sub>1</sub> and μ<sub>2</sub> are compatible then μ<sub>1</sub> ∪ μ<sub>2</sub> is
8963
8963
also a mapping. Write merge(μ<sub>1</sub>, μ<sub>2</sub>) for μ<sub>1</sub> ∪
8964
8964
μ<sub>2</sub></p>
8965
- <p>Write card[Ω](μ) for the cardinality of solution mapping μ in a multiset of mappings
8966
- Ω.</p>
8965
+ <div class="defn">
8966
+ <p><b>Definition: <span id="defn_Multiplicity">Multiplicity</span></b></p>
8967
+ <p>Given a multiset Ω of solution mappings and a solution
8968
+ mapping μ, we write multiplicity<sup>Ω</sup>(μ) to denote
8969
+ the number of times μ appears in Ω.</p>
8970
+ <p>Similarly, given a solution sequence Ψ and a solution
8971
+ mapping μ, we write multiplicity<sup>Ψ</sup>(μ) to denote
8972
+ the number of times μ appears in Ψ.</p>
8973
+ </div>
8967
8974
<section id="BGPsparql">
8968
8975
<h4>SPARQL Basic Graph Pattern Matching</h4>
8969
8976
<p>A basic graph pattern is matched against the active graph for that part of the query.
@@ -8986,8 +8993,8 @@ <h4>SPARQL Basic Graph Pattern Matching</h4>
8986
8993
<p>μ is a <b>solution</b> for BGP from G when there is a pattern instance mapping P such
8987
8994
that P(BGP) is a subgraph of G and μ is the restriction of P to the query variables in
8988
8995
BGP.</p>
8989
- <p>card[Ω] (μ) = card[Ω]( number of distinct RDF instance mappings, σ, such that P = μ(σ)
8990
- is a pattern instance mapping and P(BGP) is a subgraph of G). </p>
8996
+ <p><a href="#defn_Multiplicity">multiplicity</a><sup>Ω</sup> (μ) = number of distinct RDF instance mappings, σ, such that P = μ(σ)
8997
+ is a pattern instance mapping and P(BGP) is a subgraph of G</p>
8991
8998
</div>
8992
8999
<p>If a basic graph pattern is the empty set, then the solution is Ω<sub>0</sub>.</p>
8993
9000
</section>
@@ -9255,7 +9262,8 @@ <h3>SPARQL Algebra</h3>
9255
9262
<p>Let Ω be a multiset of solution mappings and expr be an expression. We define:</p>
9256
9263
<p>Filter(expr, Ω) = { μ | μ in Ω and expr(μ) is an expression that has an
9257
9264
effective boolean value of true }</p>
9258
- <p>card[Filter(expr, Ω)](μ) = card[Ω](μ)</p>
9265
+ <p><a href="#defn_Multiplicity">multiplicity</a><sup>Filter(expr, Ω)</sup>(μ)
9266
+ = <a href="#defn_Multiplicity">multiplicity</a><sup>Ω</sup>(μ)</p>
9259
9267
<blockquote>
9260
9268
Note that evaluating an <code>exists(pattern)</code> expression uses the dataset and
9261
9269
active graph, D(G). See the <a href="#defn_evalFilter">evaluation of filter</a>.
0 commit comments