Equality patterns, supports, and subset latent indices (R4 design checkpoint, #107) #
The design layer of the functional Aldous–Hoover–Kallenberg representation: the vocabulary in which the dissociated representation's sampler and representation theorem will be stated. This file deliberately contains no sampler and no representation theorem — it fixes the interface (a review checkpoint) before those are built.
Design decisions, made explicit:
- Sort-tagging. The atom of the design is
RelCoord.taggedValue c i : Σ s, V s— the value at positionitagged with its sort. All downstream notions factor through it, so equality of raw vertex values across different sorts never counts: vertex3of sortAand vertex3of sortBare distinct tagged values. - The equality pattern is a kernel.
RelCoord.pattern c := Setoid.ker c.taggedValue— positions are equivalent exactly when they carry the same sort-tagged value. No choice of canonical representative is made; the pattern's blocks are canonically the support (patternQuotientEquivSupport). - The support is a finset of tagged values,
RelCoord.support c ⊆ Σ s, V s— the "vertices the coordinate actually reads", abstractly (not positions). - Latent indices are nonempty finite sets of tagged values:
LatentIndex S V. The eventual dissociated representation reads the coordinate atcoff latentsU_AforA ⊆ c.supportnonempty; one latent source indexed byLatentIndex S (Vinfinite S)will serve every coordinate. Nonemptiness excludes a global (U_∅) latent — the dissociated normal form. - Patterns are bundled independently of coordinates.
EqualityPattern S rpackages a setoid on the positions ofrtogether with sort compatibility (equivalent positions have equalargSort), so an abstract patternπexists without any labeled coordinate;RelCoord.equalityPatternextracts the bundled pattern of a coordinate, andEqualityPattern.blockSortis the induced sort of each block — per-sort counts are derived, never stored (no coherence obligations). - Local latent indices are bundled per pattern and per coordinate.
PatternLatentIndex π(nonempty finite subsets of the blocks) is the label-free, order-free domain the representing kernelf_{r,π}will consume;CoordLatentIndex c(nonempty subsets of the support) is its labeled avatar, with the canonical equivalencepatternLatentIndexEquivCoordand the two-way relabeling equivalenceCoordLatentIndex.congrMapalong sortwise injections. - Transport is by
Sigma.map id. A sortwise mapf : ∀ s, V s → W sacts on tagged values, supports, and latent indices throughSigma.map id f; all equivariance statements are phrased through this single action. Sortwise injective maps preserve patterns (pattern_map), act injectively on latent indices, and carry subset-latents of a support to subset-latents of the image support — the equivariance the representation theorem needs so that exchangeability can be checked coordinatewise.
The examples section instantiates a local one-sort binary signature (off-diagonal and diagonal coordinates), a ternary signature with a repeated entry, and a two-sort bipartite signature where equal raw values in different sorts are not identified — all namespaced, with no dependency on the directed development.
Sort-tagged values, patterns, and supports #
The sort-tagged value at a position of a coordinate: the value together with its sort. The atom through which patterns, supports, and latent indices all factor.
Instances For
The equality pattern of a coordinate: the kernel of the sort-tagged value map — positions are equivalent exactly when they carry the same value of the same sort.
Equations
Instances For
The support of a coordinate: the finite set of sort-tagged values it reads.
Equations
Instances For
The support is no larger than the arity: it is the image of the finitely many positions.
Stated over an abstract carrier, where no natural DecidableEq competes with the classical
instance used to form the image.
The pattern's blocks are the support: the quotient by the equality pattern is canonically the set of sort-tagged values read — the "abstract support blocks".
Equations
- c.patternQuotientEquivSupport = (Setoid.quotientKerEquivRange c.taggedValue).trans ((Equiv.refl ((s : S.Srt) × V s)).subtypeEquiv ⋯)
Instances For
Subset latent indices #
A latent index: a nonempty finite set of sort-tagged vertices. The dissociated
functional representation attaches one uniform latent to every such index; the coordinate at
c reads only the latents indexed by nonempty subsets of c.support.
Instances For
The action of a sortwise map on latent indices, through Sigma.map id.
Equations
- RelSignature.LatentIndex.map f A = ⟨Finset.image (Sigma.map id f) ↑A, ⋯⟩
Instances For
Transport and equivariance #
Patterns are invariant under sortwise injections: relabeling by an injective sortwise map neither merges nor splits equality-pattern blocks.
Supports transport covariantly: the support of the relabeled coordinate is the image of the support.
The latent-index action is functorial: composition.
The latent-index action is functorial: identity.
Sortwise injections act injectively on latent indices — the equivariance that lets the eventual sampler pull one latent source back along any relabeling.
Subset-latents transport into subset-latents: a nonempty subset of the support of
c maps to a nonempty subset of the support of the relabeled coordinate.
The relabeling equivalence of latent indices along a sortwise family of equivalences:
LatentIndex.map packaged as an Equiv, with inverse the action of the sortwise inverses —
the bijectivity the latent source's exchangeability pulls back along.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sortwise-disjoint ranges give disjoint latent-index images: latent indices are nonempty, so images under sortwise maps whose ranges are disjoint in every sort can never coincide — the combinatorial heart of dissociation of the evaluated law.
Bundled patterns #
An abstract equality pattern for the relation symbol r: a setoid on the positions
together with sort compatibility — equivalent positions carry the same sort. This is the
label-free datum the representing kernel f_{r,π} is indexed by; a labeled coordinate only
ever enters through RelCoord.equalityPattern.
The equivalence of positions.
Equivalent positions have equal sorts.
Instances For
The bundled equality pattern of a labeled coordinate.
Equations
- c.equalityPattern = { toSetoid := c.pattern, sort_eq := ⋯ }
Instances For
Bundled patterns are invariant under sortwise injections.
The sort of a block: argSort descends to the pattern's quotient by sort
compatibility. Per-sort block counts or multisets are derived from this, not stored.
Equations
- π.blockSort = Quotient.lift (S.argSort r) ⋯
Instances For
Local latent indices #
The pattern-local latent indices: nonempty finite subsets of the blocks of an
abstract pattern — the label-free, order-free argument domain of the representing kernel
f_{r,π} : (PatternLatentIndex π → I) → ….
Instances For
The blocks of a pattern form a finite type (positions are Fin; classical
decidability of the setoid).
Pattern-local latent indices form a finite type — the local latent source of a single coordinate is a finite product, as the evaluator layer requires.
The coordinate-local latent indices: nonempty subsets of the support — the labeled
avatar of PatternLatentIndex, and the sub-collection of the global LatentIndex a single
coordinate reads (canonical projection CoordLatentIndex.toLatentIndex).
Equations
Instances For
The canonical projection into the global latent indices: forget the support bound.
Equations
- A.toLatentIndex = ⟨↑A, ⋯⟩
Instances For
The canonical equivalence between pattern-local and coordinate-local latent
indices, through patternQuotientEquivSupport: the kernel's order-free domain is the
labeled coordinate's subset-latent collection.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Transport of pattern-local indices along an equality of patterns.
Equations
Instances For
The two-way relabeling equivalence of coordinate-local latent indices along a
sortwise injection — not merely the one-way map_subset_support: the forward direction is
the image under Sigma.map id (so it agrees with the global LatentIndex.map,
CoordLatentIndex.congrMap_toLatentIndex), and the inverse is the preimage, well-defined
because the image support bounds the target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Coherence with the global action: the local relabeling equivalence projects to the
global LatentIndex.map — the two transports never disagree.
Examples: binary, diagonal, ternary, bipartite #
A local one-sort binary signature (kept local so this generic file does not depend on
the directed development; the directed digraphSig has the same shape).
Equations
Instances For
A one-sort ternary signature.
Equations
Instances For
The running ternary coordinate (0, 1, 0): a repeated entry.
Instances For
A two-sort bipartite binary signature: position 0 is a left vertex, position 1 a
right vertex.
Equations
Instances For
The running bipartite coordinate with equal raw values in both positions.