Skip to content

Commit 98ef75a

Browse files
committed
introduces a function called multiplicity as a replacement for the notation 'card[Ω](μ)'; related to #108 (comment)
1 parent fc0566b commit 98ef75a

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

spec/index.html

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8942,15 +8942,15 @@ <h3>Basic Graph Patterns</h3>
89428942
<a href="https://en.wikipedia.org/w/index.php?title=Multiset">multiset</a>,
89438943
also known as a <i>bag</i>. A multiset is an
89448944
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>
89478947
<p>Write μ for solution mappings.</p>
89488948
<p>Write μ<sub>0</sub> for the mapping such that dom(μ<sub>0</sub>) is the empty set.</p>
89498949
<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>
89518951
<p>Write μ(x) for the solution mapping variable x to RDF term t : { (x, t) }</p>
89528952
<p>Write Ω(x) for the multiset consisting of exactly μ(?x-&gt;t), that is, { { (x, t) } }
8953-
with cardinality 1.</p>
8953+
with multiplicity 1.</p>
89548954
<div class="defn">
89558955
<p><b>Definition: <span id="defn_algCompatibleMapping">Compatible Mappings</span></b></p>
89568956
<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>
89628962
<p>If μ<sub>1</sub> and μ<sub>2</sub> are compatible then μ<sub>1</sub> ∪ μ<sub>2</sub> is
89638963
also a mapping. Write merge(μ<sub>1</sub>, μ<sub>2</sub>) for μ<sub>1</sub> ∪
89648964
μ<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&nbsp;Ω of solution mappings and a solution
8968+
mapping&nbsp;μ, we write multiplicity<sup>Ω</sup>(μ) to denote
8969+
the number of times μ appears in Ω.</p>
8970+
<p>Similarly, given a solution sequence&nbsp;Ψ and a solution
8971+
mapping&nbsp;μ, we write multiplicity<sup>Ψ</sup>(μ) to denote
8972+
the number of times μ appears in Ψ.</p>
8973+
</div>
89678974
<section id="BGPsparql">
89688975
<h4>SPARQL Basic Graph Pattern Matching</h4>
89698976
<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>
89868993
<p>μ is a <b>solution</b> for BGP from G when there is a pattern instance mapping P such
89878994
that P(BGP) is a subgraph of G and μ is the restriction of P to the query variables in
89888995
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>
89918998
</div>
89928999
<p>If a basic graph pattern is the empty set, then the solution is Ω<sub>0</sub>.</p>
89939000
</section>
@@ -9255,7 +9262,8 @@ <h3>SPARQL Algebra</h3>
92559262
<p>Let Ω be a multiset of solution mappings and expr be an expression. We define:</p>
92569263
<p>Filter(expr, Ω) = { μ | μ in Ω and expr(μ) is an expression that has an
92579264
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>
92599267
<blockquote>
92609268
Note that evaluating an <code>exists(pattern)</code> expression uses the dataset and
92619269
active graph, D(G). See the <a href="#defn_evalFilter">evaluation of filter</a>.

0 commit comments

Comments
 (0)