Infrastructure · Primitives

Aggregate

Reduce a set to a summary statistic

Definition

Mechanism

A deterministic function that maps a Vector of inputs to a single Scalar Value. Implements standard statistical operations (Mean, Mode, Median) to compress signal bandwidth. When the caller supplies Vector alongside the vector, the reduction becomes a weighted one. It serves as the computational backbone for consensus mechanisms.

Preconditions

  1. All elements in list share a comparable type
  2. Input list is non-empty

Postconditions

  1. Single summary value returned

Invariants

  1. Determinism: F(Input) always yields the same Output.
  2. Yields one scalar Value whatever the input length, including length one.

Risks

Failure modes

  1. Type Mismatch

    Input list contains incomparable types (e.g., Integers mixed with Strings).

  2. Empty Set

    Attempting to aggregate a list with length 0 (Undefined for Mean/Mode).

  3. Overflow

    Sum of inputs exceeds maximum integer size (if strictly typed).

Relationships

Builds on

Accepts

References

Mode

A discrete configuration of agency

Yields

Value

A measure of utility

Used by

References

Society

DriftWatch

Reputation scoring via behavioral deviation from baseline (2-sigma alert)

Society

Vote

Provide standard decision mechanism with integrity guarantees

Composes with

Mind

Parallelize

Run subtasks simultaneously and aggregate

Reference

Parameters

function Enum, {Mean, Median, Mode, Sum, Min, Max, Variance, StdDev}
Default: Mean

Identity

Ref
Aggregate#2db6
Sema ID
sema:Aggregate#mh:SHA-256:2db6858c061515fa2257c96f4a6e4392164e9a118adc6874c69cf2279b877077
Ring
0
Tier
1
Updated
2026-11-11
Supersedes
  • sema:Aggregate#mh:SHA-256:af54a8a31d6e7ed0c6d7bdfb51935655b0a66d299bddb352dbff9f4a789e7486
  • sema:Aggregate#mh:SHA-256:4861bd34b2e422951e42b0fd804dab73daa2753ea746c0141927c3e5c6ea8f4b
  • sema:Aggregate#mh:SHA-256:d1d523ccf371305ebfbd971b5b6630a517bfcb0217ff4639d2db12a01bc181a8