Skip to content

Ternary Operation

A total three-input function—internally T:A³→A when defined on a set—that maps each ordered triple to one output, with any further identities stated separately.

Version
v1 · 2026-09-28 · History
Domain-specific #
12496
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomains
Universal Algebra, Finitary Operations → Mathematics
Aliases
Trinary operation, Three-ary operation, 3-ary operation

Core Idea

A ternary operation generalizes a binary operation by taking three ordered inputs. For an operation on A in universal algebra, every triple in A³ must receive exactly one output in A. Closure and totality belong to the formal definition; symmetry, associativity-like laws, or special meanings do not.

Different fields add structure. The affine expression a−b+c gives heaps and origin-free vector reasoning; planar ternary rings encode geometry; programming languages use three-operand operators such as conditional selection. These are examples because of arity, not because all share the same laws.

Structural Signature

Sig role-phrases:

  • Ordered input triple — Supplies three positions whose order may affect the result. It is required input. Counterfactual: Two or four arguments change the arity.
  • Input domain or sorts — States which values are admitted in each position. It is typing condition. Counterfactual: An expression with undefined triples is not a total operation without partial qualification.
  • Combination rule — Determines one output for every admissible triple. It is function condition. Counterfactual: Multiple or absent outputs violate ordinary functionhood.
  • Closure — Returns to A for an internal operation on A. It is algebraic condition. Counterfactual: Output in another set defines a ternary map, not an internal operation on A.
  • Identities or laws — Give special varieties such as heaps or majority algebras their structure. It is optional axioms. Counterfactual: Arity alone does not imply associativity, symmetry, or conditional semantics.
  • Notation and evaluation — Prevents ambiguity about grouping when ternary operations are iterated. It is usage control. Counterfactual: Unlike familiar binary operations, nesting conventions are rarely implicit.

What It Is Not

  • It is not every expression containing three written terms.
  • It is not a ternary relation, which returns a truth value about a triple unless specifically encoded as a function.
  • It need not be symmetric or associative.
  • The conditional operator is one example, not the definition of ternary operation.
  • Closest near-miss. A ternary relation classifies triples as related or not; a ternary operation assigns exactly one output to every admissible triple.

Scope of Application

  • Universal algebra. Studies sets equipped with three-ary operations and identities.
  • Geometry. Uses ternary laws in heaps, torsors, and coordinatization.
  • Logic and Boolean algebra. Represents majority or conditional-like connectives.
  • Programming languages. Classifies operators by three operands and typing behavior.

Clarity

Declare carrier sets, argument order, totality, output sort, and any identities. When nesting terms, use parentheses or a stated ternary associativity law rather than borrowing binary convention.

Manages Complexity

The abstraction isolates arity from semantics, letting diverse constructions share one formal type while preventing properties of a familiar example from being projected onto all ternary operations.

Abstract Reasoning

  1. Identify the three argument positions and their sorts.
  2. Verify a unique output for every admitted triple.
  3. Check closure for an internal algebraic operation.
  4. State any equations or invariances beyond arity.
  5. Analyze nested applications with explicit grouping.

Knowledge Transfer

Three-input function reasoning transfers across algebra and computing when typing is preserved. Domain-specific names such as heap or conditional require additional laws or semantics.

Examples

Canonical

On an abelian group, T(a,b,c)=a−b+c is an internal ternary operation and satisfies heap identities that forget the choice of origin.

Mapped back: inputs → ordered triple in A; rule → a minus b plus c; output → in A; extra laws → heap identities.

Applied / In Practice

The programming conditional c ? x : y consumes a condition and two alternatives and returns one selected value, so it is a ternary operator even though its arguments have different roles.

Mapped back: arguments → condition, then-value, else-value; rule → selection; output → one branch.

Structural Tensions

T1 — Arity Alone versus Algebraic Laws. Three inputs define the broad class while named ternary structures depend on stronger identities.

Diagnostic: Which conclusions follow only from arity, and which require axioms?

T2 — Uniform Carrier versus Many-Sorted Typing. Universal algebra emphasizes A cubed to A, whereas computing permits distinct argument sorts.

Diagnostic: Is operation being used internally or as a general three-argument operator?

Structural–Framed Character

Ternary Operation is strongly structural.

Structural Core vs. Domain Accent

The skeleton is a total function of arity three. Algebra and computing supply closure, identities, typing, notation, and examples.

This entry is a kind of Function (Mapping).

  • Approved root. No current parent entails this exact three-ary function class.

  • Related — n-ary operation, function, and algebraic signature. They provide superclass, formal carrier, and typed declaration.

Relationships to Other Abstractions

Local relationship map for Ternary OperationParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Ternary OperationDOMAINPrime abstraction: Function (Mapping) — is a kind ofFunction(Mapping)PRIME

Current abstraction Ternary Operation Domain-specific

Parents (1) — more general patterns this builds on

  • Ternary Operation is a kind of Function (Mapping) Prime

    A Ternary Operation is a Function Mapping from ordered triples to one output.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Ternary Operation sits in a crowded region of the domain-specific corpus (34th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Number & Formal Language Properties (7 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08

Not to Be Confused With

  • Ternary relation. Tell: Classifies triples instead of assigning a value.
  • Binary composition. Tell: May use three visible variables while remaining composition of two-input operations.
  • Conditional statement. Tell: Controls execution and may not itself be a value-returning operator.
  • Heap. Tell: A ternary algebra satisfying additional identities.

References

  • Frozen Wikipedia discovery revision: https://en.wikipedia.org/wiki/Ternary_operation (revision 1307950239).
  • Preserved source candidate: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator
  • Preserved source candidate: https://www.ams.org/journals/bull/1943-49-12/S0002-9904-1943-08042-1/S0002-9904-1943-08042-1.pdf
  • Preserved source candidate: https://www.cprogramming.com/reference/operators/ternary-operator.html
  • Preserved source candidate: https://docs.python.org/3/reference/expressions.html
  • Preserved source candidate: https://v2.ocaml.org/manual/expr.html

The frozen Wikipedia revision is discovery provenance. The retained source set was reviewed for identity, formal or operational relation, and scope. The encyclopedia's structural synthesis is bounded to those claims; a thin authority surface is recorded as a nonblocking source-strengthening repair rather than concealed.