Skip to content

Commit 54e3a12

Browse files
committed
fixes a mistake in the definition of the Dedup function that is used within the definition of the Aggregation operator
1 parent ef0ad55 commit 54e3a12

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

spec/index.html

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9573,17 +9573,31 @@ <h4>Aggregate Algebra</h4>
95739573
&nbsp;&nbsp;M(Ψ) = [ ListEval(exprlist, μ) | μ in Ψ ]<br>
95749574
&nbsp;&nbsp;F(Ψ) = func(M(Ψ), scalarvals), for non-<code>DISTINCT</code><br>
95759575
&nbsp;&nbsp;F(Ψ) = func(Dedup(M(Ψ)), scalarvals), for <code>DISTINCT</code></p>
9576-
<p>with Dedup(M(Ψ)) being an order-preserving, duplicate-free version of the sequence M(Ψ); that is, Dedup(M(Ψ)) is a sequence of RDF terms that has the following four properties.</p>
9576+
<p>with Dedup(M(Ψ)) being an order-preserving, duplicate-free version of the sequence M(Ψ); that is, Dedup(M(Ψ)) is a sequence of lists that has the following four properties
9577+
(where each such list in this sequence may contain RDF terms and
9578+
errors, as it is produced by the ListEval function).</p>
95779579
<ol>
9578-
<li>Every unique element in M(Ψ) is contained in Dedup(M(Ψ)).</li>
9579-
<li>Every element in Dedup(M(Ψ)) is contained in M(Ψ).</li>
9580-
<li>Dedup(M(Ψ)) is free of duplicates. That is, the element at the |i|-th position in Dedup(M(Ψ)) is not the same term as the element at the |j|-th position in Dedup(M(Ψ)) for every two natural numbers |i| and |j| such that |i| &ne; |j|.</li>
9581-
<li>For any two elements <var>e<sub>1</sub></var> and <var>e<sub>2</sub></var> in Dedup(M(Ψ)), the relative order of their first occurrences in M(Ψ) is preserved in Dedup(M(Ψ)). That is, if <var>i<sub>1</sub></var>&nbsp;&lt;&nbsp;<var>i<sub>2</sub></var>, then <var>j<sub>1</sub></var>&nbsp;&lt;&nbsp;<var>j<sub>2</sub></var>, where
9580+
<li>Every unique list in M(Ψ) is contained in Dedup(M(Ψ)).</li>
9581+
<li>Every list in Dedup(M(Ψ)) is contained in M(Ψ).</li>
9582+
<li>Dedup(M(Ψ)) is free of duplicates. That is, the list at the |i|-th position in Dedup(M(Ψ)) is not the same list as the list at the |j|-th position in Dedup(M(Ψ)) for every two natural numbers |i| and |j| such that |i| &ne; |j|.
9583+
<br/>
9584+
Two lists <var>L</var> and <var>L'</var> from M(Ψ) are
9585+
considered the same iff they have the same number of elements
9586+
and, for every position&nbsp;<var>k</var> within the two lists,
9587+
the element at the <var>k</var>-th position of <var>L</var> is
9588+
an RDF term, the element at the <var>k</var>-th position of
9589+
<var>L'</var> is an RDF term, and these two RDF terms are the
9590+
<a href="#func-sameTerm">same term</a> (as a consequence of
9591+
this definition, if any of the two lists, <var>L</var> or
9592+
<var>L'</var>, contains an error, then the two lists cannot
9593+
be the same list, no matter what RDF terms they contain in
9594+
other positions).</li>
9595+
<li>For any two lists <var>L<sub>1</sub></var> and <var>L<sub>2</sub></var> in Dedup(M(Ψ)), the relative order of their first occurrences in M(Ψ) is preserved in Dedup(M(Ψ)). That is, if <var>i<sub>1</sub></var>&nbsp;&lt;&nbsp;<var>i<sub>2</sub></var>, then <var>j<sub>1</sub></var>&nbsp;&lt;&nbsp;<var>j<sub>2</sub></var>, where
95829596
<ul>
9583-
<li><var>i<sub>1</sub></var> is the smallest natural number such that <var>e<sub>1</sub></var> is at the <var>i<sub>1</sub></var>-th position in M(Ψ),</li>
9584-
<li><var>i<sub>2</sub></var> is the smallest natural number such that <var>e<sub>2</sub></var> is at the <var>i<sub>2</sub></var>-th position in M(Ψ),</li>
9585-
<li><var>j<sub>1</sub></var> is the position of <var>e<sub>1</sub></var> in Dedup(M(Ψ)), and</li>
9586-
<li><var>j<sub>2</sub></var> is the position of <var>e<sub>2</sub></var> in Dedup(M(Ψ)).</li>
9597+
<li><var>i<sub>1</sub></var> is the smallest natural number such that <var>L<sub>1</sub></var> is at the <var>i<sub>1</sub></var>-th position in M(Ψ),</li>
9598+
<li><var>i<sub>2</sub></var> is the smallest natural number such that <var>L<sub>2</sub></var> is at the <var>i<sub>2</sub></var>-th position in M(Ψ),</li>
9599+
<li><var>j<sub>1</sub></var> is the position of <var>L<sub>1</sub></var> in Dedup(M(Ψ)), and</li>
9600+
<li><var>j<sub>2</sub></var> is the position of <var>L<sub>2</sub></var> in Dedup(M(Ψ)).</li>
95879601
</ul>
95889602
</li>
95899603
</ol>
@@ -9599,7 +9613,7 @@ <h4>Aggregate Algebra</h4>
95999613
<code>GROUP_CONCAT(?x ; separator="|")</code> has a scalarvals argument of { "separator"
96009614
→ "|" }.</p>
96019615
<p>All aggregates may have the <code>DISTINCT</code> keyword as the first token in their
9602-
argument list. If this keyword is present then first argument to func is Distinct(M).</p>
9616+
argument list. If this keyword is present, then first argument to func is Dedup(M(Ψ)).</p>
96039617
<p>Example</p>
96049618
<p>Given a solution sequence Ψ with the following values:</p>
96059619
<table>

0 commit comments

Comments
 (0)