Relational signatures and their structure carriers (AHK umbrella #103, R0 design checkpoint) #
A deliberately small, dependency-light checkpoint (issue #110) that locks the carrier design for the generic Aldous–Hoover–Kallenberg program before R1/R2 build size vectors, sortwise embeddings, topology, and measure theory on top of it. There is no topology, no probability, no projective extension, and no extremality here — only the data design and the sortwise-map machinery that the later layers will reuse, so the carrier decision stays easy to revise.
Contents #
RelSignature— a purely relational, multi-sorted signature (no function symbols, no constants): a type of sort labels, a type of relation symbols, an arity, and the sort of each argument position;RelCoord/RelStructure— the coordinate type of a structure over a sort-indexed value family, and a Boolean-valued structure on those coordinates;NoNullary— the arity-positivity hypothesis, kept external (a predicate, not a field ofRelSignature) so nullary relations can be admitted later without redesigning the signature;Vfinite/Vinfinite— the finite (size-vector) and infinite (ℕ) value carriers;RelCoord.map/RelStructure.comap— the action of a sortwise family of maps∀ s, V s → W son coordinates and on structures (the exact machinery R1/R2 relabelling and consistency will rely on);- worked
Examples: the one-sort binary digraph signature, the two-sort binary bipartite signature, and a one-sort ternary signature with a repeated-coordinate tuple(i, i, j)— the latter exercises the equality-pattern design that is the genuinely new difficulty at arbitrary arity.
Design decisions locked here #
- Sort-label field name.
Sortis a reserved token in Lean 4, so the field is namedSrt(accessed asS.Srt). This is the only cosmetic deviation from theΣ.Sortnotation used in the issue discussion. - Universes. The sort-label type and the relation-symbol type share a single universe
Type u(RelSignature : Type (u+1)); the value carrierV : S.Srt → Type vuses an independent universev. A splitType u/Type u'for sorts vs. relations is possible but unnecessary (it only ever appears asmax u u') and trips thecheckUnivslinter, so it is deferred. The worked examples all live inType(universe0). - Boolean relations.
RelStructureisRelCoord → Bool. Finite-valued relations are a later extension; Boolean is already the full campaign. - Nullary relations. Admitted structurally (an
arity R = 0relation is legal data), but the intended theorems assumeNoNullary; the empty-tag / global-latentξ_∅behaviour is restored only in R5 (#108).
External representation theorem this program targets (R0 acceptance item) #
The functional representation formalized in R4 (#107) is the Aldous–Hoover–Kallenberg
theorem. In Kallenberg, Probabilistic Symmetries and Invariance Principles (Springer,
2005), §7.5: Theorem 7.22 is the jointly exchangeable representation of an array
X : ℕ^d → E as X_J = f((ξ_{J'})_{J' ⊆ J}) (measurable f, i.i.d. U[0,1] latents ξ
indexed by the subsets J' ⊆ J), and Corollary 7.23 is its separately
exchangeable, fixed-dimensional consequence. The general multi-sorted action here mixes
joint and separate symmetries, so it is not literally either single statement — R1/R2 make
the exact mixture explicit. For relational structures the latents are indexed by finite
subsets of tagged vertices Σ s : S.Srt, ℕ; R4 formalizes the dissociated
specialization without the empty-subset latent ξ_∅, and R5 (#108) restores the full
general-law form with ξ_∅. Locating and confirming these exact statements against the
printing is part of R0's acceptance.
A purely relational, multi-sorted signature: sort labels Srt, relation symbols
Rel, an arity for each relation, and the sort argSort R i of each argument position
i of R. No function symbols or constants. (The field is Srt because Sort is a
reserved token in Lean 4.)
- Srt : Type u
The type of sort labels.
- Rel : Type u
The type of relation symbols.
The arity of each relation symbol.
The sort of each argument position of each relation.
Instances For
A coordinate of a relational structure over the sort-indexed value family V: a
relation symbol R together with a value V (argSort R i) in each argument position i.
Instances For
A relational structure over the value family V: a Boolean value at every
coordinate (whether the tuple stands in the relation). Reducible so that it transparently
inherits the Boolean-product topology and measurable-space structure (R1b).
Equations
- S.RelStructure V = (S.RelCoord V → Bool)
Instances For
Arity positivity, kept as an external predicate rather than a field of
RelSignature, so nullary relations can be added later without changing the signature.
Instances For
The finite value carrier for a size vector n : S.Srt → ℕ: sort s has n s
vertices.
Equations
- RelSignature.Vfinite n s = Fin (n s)
Instances For
The infinite value carrier: every sort has vertex set ℕ.
Instances For
The action of a sortwise family of maps f : ∀ s, V s → W s on coordinates: relabel
each argument by the map for its sort, keeping the relation symbol. This is the coordinate
half of the relabelling / consistency machinery R1 and R2 will build on.
Equations
Instances For
The pullback of a structure along a sortwise family of maps: comap f g asks
whether the f-image tuple stands in g. (For a sortwise permutation this is the generic
relabelling action.)
Equations
- RelSignature.RelStructure.comap f g c = g (RelSignature.RelCoord.map f c)
Instances For
Worked examples #
The example signatures are abbrevs (reducible) so that the acceptance checks reduce by
rfl; R1 will introduce its own opaque definitions.
Directed graphs: one sort, one binary relation, ordered arguments, diagonal allowed (the R1 instance underlying #85).
Equations
Instances For
Bipartite / separately exchangeable: two sorts, one binary relation whose first argument is the first sort and second argument the second sort.
Equations
Instances For
A one-sort ternary relation — the smallest signature that exercises repeated argument coordinates (the equality-pattern design of R4/#107).
Equations
Instances For
A ternary coordinate (i, i, j) with the first two arguments equal — the design
admits repeated coordinates, and their equality pattern is intrinsic to the tuple.
Instances For
An example bipartite coordinate: the ordered pair (a, b) with a in the first sort
and b in the second.