Skip to content

Commit 90da7fc

Browse files
committed
Clarify distributive aggregates and correctness semantics
1 parent 2bfd40c commit 90da7fc

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

reduce.pdf

1.81 KB
Binary file not shown.

reduce.tex

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ \subsection{Reducers}
187187
\]
188188
\end{definition}
189189

190-
In database terminology, a well-formed reducer defines an \emph{invertible distributive aggregate}: the fold can be computed over partitions independently (distributive), and individual values can be removed from the accumulated result (invertible).
190+
In database terminology, a well-formed reducer defines an \emph{invertible distributive aggregate} (see Section~\ref{subsec:distributive-aggregates}): the fold can be computed over partitions independently (distributive), and individual values can be removed from the accumulated result (invertible).
191191

192192
\begin{remark}[Remove-Add Commutativity]
193193
For well-formed reducers where $\oplus$ and $\ominus$ arise from an abelian group action on $A$, the following property holds automatically:
@@ -198,6 +198,22 @@ \subsection{Reducers}
198198
All practical reducers (sum, count, product over commutative groups) satisfy this.
199199
\end{remark}
200200

201+
\subsection{Distributive Aggregates}\label{subsec:distributive-aggregates}
202+
203+
The database literature~\cite{viewmaintenance} classifies aggregates as \emph{distributive}, \emph{algebraic}, or \emph{holistic}.
204+
In our setting, a pair $(\iota, \oplus)$ defines a \emph{distributive aggregate} when folding over a union of multisets can be decomposed into folds over the parts.
205+
206+
\begin{definition}[Distributive Aggregate]
207+
Let $\oplus : A \times V \to A$ be pairwise commutative and $\iota \in A$.
208+
We say that $(\iota, \oplus)$ is a \emph{distributive aggregate} if for all finite multisets $M, N \in \mathcal{M}(V)$:
209+
\[
210+
\mathsf{fold}_\oplus(\iota, M \uplus N) = \mathsf{fold}_\oplus\big(\mathsf{fold}_\oplus(\iota, M), N\big).
211+
\]
212+
\end{definition}
213+
214+
By Lemma~1, any pair $(\iota, \oplus)$ with pairwise commutative $\oplus$ is a distributive aggregate in this sense.
215+
Moreover, a well-formed reducer $R = (\iota, \oplus, \ominus)$ (Definition~\ref{def:well-formed-reducer}) is precisely an \emph{invertible distributive aggregate}: the aggregate is distributive over partitions of the multiset, and individual contributions can be removed using $\ominus$.
216+
201217
\subsection{Deltas}
202218

203219
We model updates to collections as deltas.

0 commit comments

Comments
 (0)