FOUNDATION #3proven

Sort Completeness

The four sorts (G, T, R, C) classify all well-formed expressions without overlap or gap. Every well-formed expression belongs to exactly one sort.
Every expression maps to exactly one sortExprEntity (e)Relation (r)Modifier (m)Transform (t)σ: Expr → { e, r, m, t }surjective + disjoint = complete partition
Visual diagram for the proof of sort completeness

Prerequisites

Intuition

Sort Completeness says that the four-sort system of Universal Language — Entity, Relation, Modifier, and Assertion — is a perfect classification. Every UL expression falls into exactly one of these four categories, with no gaps and no overlaps.

Think of it like the classification of matter into solid, liquid, gas, and plasma. Under standard conditions, every sample of matter is in exactly one phase. Sort Completeness provides the same guarantee for UL expressions: no expression is “between sorts” or “outside all sorts.”

Formal Statement

The sort function σ: WFF(Σ_UL) → { e, r, m, a } is a well-defined total function that partitions all well-formed expressions into exactly four disjoint classes:

∀ E ∈ WFF(Σ_UL), ∃! s ∈ {e, r, m, a} such that σ(E) = s

Equivalently: WFF(Σ_UL) = Sort_e ⊔ Sort_r ⊔ Sort_m ⊔ Sort_a (disjoint union)

The four sorts and their primitive sources:

  • Entity (e): Point (•), Enclosure (◯) — things that exist
  • Relation (r): Line (—), Curve (⌒) — connections between entities
  • Modifier (m): Angle (∠) — transformations that alter
  • Assertion (a): No primitive source — produced only by operations (predicate, conjoin, disjoin, negate, quantify)

Proof

Step 1 of 5Define the Sort Function
Define σ: WFF(Σ_UL) → {e, r, m, a} as follows. For primitives: σ(Point) = σ(Enclosure) = e (Entity), σ(Line) = σ(Curve) = r (Relation), σ(Angle) = m (Modifier). For compound expressions: σ is determined by the output sort of the outermost operation, as specified by each operation's signature.
Justification: Each of the 11 operations has a fixed signature of the form s₁ × … × sₙ → s_out. The output sort s_out is unambiguous for any given operation.

Significance

Sort Completeness is the type-safety theorem of Universal Language:

  • Type safety: Just as a well-typed program cannot produce type errors at runtime, a well-sorted UL expression cannot produce sort violations during interpretation.
  • Decidable classification: Given any well-formed expression, its sort can be computed in a single pass by inspecting the outermost operation's signature.
  • Enables Operation Closure: Knowing that every expression has exactly one sort allows us to verify that operation inputs match their expected sort signatures.
  • Semantic clarity: The four sorts correspond to four fundamental semantic roles — existence, connection, transformation, and assertion — covering all modes of meaning.

Connections

Sort Completeness sits between irreducibility and closure in the foundation chain:

Consequences

Related Sections