Documentation

Graphon.RelEqualityPattern

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:

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 #

def RelSignature.RelCoord.taggedValue {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) (i : Fin (S.arity c.fst)) :
(s : S.Srt) × V s

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.

Equations
Instances For
    def RelSignature.RelCoord.pattern {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) :

    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
      theorem RelSignature.RelCoord.pattern_iff {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) (i j : Fin (S.arity c.fst)) :
      noncomputable def RelSignature.RelCoord.support {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) :
      Finset ((s : S.Srt) × V s)

      The support of a coordinate: the finite set of sort-tagged values it reads.

      Equations
      Instances For
        theorem RelSignature.RelCoord.mem_support_iff {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) (v : (s : S.Srt) × V s) :
        v c.support ∃ (i : Fin (S.arity c.fst)), c.taggedValue i = v

        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.

        theorem RelSignature.RelCoord.support_nonempty {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) (h : 0 < S.arity c.fst) :

        A coordinate of a positive-arity relation has nonempty support.

        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
        Instances For

          Subset latent indices #

          @[reducible, inline]
          abbrev RelSignature.LatentIndex (S : RelSignature) (V : S.SrtType u_4) :
          Type (max u_4 u_5)

          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.

          Equations
          Instances For
            noncomputable def RelSignature.LatentIndex.map {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (f : (s : S.Srt) → V sW s) (A : S.LatentIndex V) :

            The action of a sortwise map on latent indices, through Sigma.map id.

            Equations
            Instances For
              @[simp]
              theorem RelSignature.LatentIndex.map_coe {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (f : (s : S.Srt) → V sW s) (A : S.LatentIndex V) :
              (map f A) = Finset.image (Sigma.map id f) A

              Transport and equivariance #

              theorem RelSignature.RelCoord.taggedValue_map {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (f : (s : S.Srt) → V sW s) (c : S.RelCoord V) (i : Fin (S.arity c.fst)) :
              (map f c).taggedValue i = Sigma.map id (fun (s : S.Srt) => f s) (c.taggedValue i)

              Tagged values transport along sortwise maps through Sigma.map id (definitional).

              theorem RelSignature.injective_sigmaMap_of_sortwise {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} (hf : ∀ (s : S.Srt), Function.Injective (f s)) :
              Function.Injective (Sigma.map id fun (s : S.Srt) => f s)

              Sigma.map id of a sortwise injective family is injective.

              theorem RelSignature.RelCoord.pattern_map {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} (hf : ∀ (s : S.Srt), Function.Injective (f s)) (c : S.RelCoord V) :

              Patterns are invariant under sortwise injections: relabeling by an injective sortwise map neither merges nor splits equality-pattern blocks.

              theorem RelSignature.RelCoord.support_map {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (f : (s : S.Srt) → V sW s) (c : S.RelCoord V) :
              (map f c).support = Finset.image (Sigma.map id fun (s : S.Srt) => f s) c.support

              Supports transport covariantly: the support of the relabeled coordinate is the image of the support.

              theorem RelSignature.LatentIndex.map_map {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {X : S.SrtType u_3} (f : (s : S.Srt) → V sW s) (g : (s : S.Srt) → W sX s) (A : S.LatentIndex V) :
              map g (map f A) = map (fun (s : S.Srt) => g s f s) A

              The latent-index action is functorial: composition.

              theorem RelSignature.LatentIndex.map_id {S : RelSignature} {V : S.SrtType u_1} (A : S.LatentIndex V) :
              map (fun (x : S.Srt) => id) A = A

              The latent-index action is functorial: identity.

              theorem RelSignature.LatentIndex.map_injective {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} (hf : ∀ (s : S.Srt), Function.Injective (f s)) :

              Sortwise injections act injectively on latent indices — the equivariance that lets the eventual sampler pull one latent source back along any relabeling.

              theorem RelSignature.LatentIndex.map_subset_support {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} {c : S.RelCoord V} {A : S.LatentIndex V} (hA : Ac.support) :
              (map f A)(RelCoord.map f c).support

              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.

              noncomputable def RelSignature.LatentIndex.relabelEquiv {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (σ : (s : S.Srt) → V s W s) :

              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
                @[simp]
                theorem RelSignature.LatentIndex.relabelEquiv_apply {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (σ : (s : S.Srt) → V s W s) (A : S.LatentIndex V) :
                (relabelEquiv σ) A = map (fun (s : S.Srt) => (σ s)) A
                @[simp]
                theorem RelSignature.LatentIndex.relabelEquiv_symm_apply {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} (σ : (s : S.Srt) → V s W s) (A : S.LatentIndex W) :
                (relabelEquiv σ).symm A = map (fun (s : S.Srt) => (σ s).symm) A
                theorem RelSignature.LatentIndex.map_ne_map_of_disjoint {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {U : S.SrtType u_4} {f : (s : S.Srt) → V sW s} {g : (s : S.Srt) → U sW s} (hd : ∀ (s : S.Srt) (x : V s) (y : U s), f s x g s y) (A : S.LatentIndex V) (B : S.LatentIndex U) :
                map f A map g B

                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.

                Instances For
                  theorem RelSignature.EqualityPattern.ext {S : RelSignature} {r : S.Rel} {x y : S.EqualityPattern r} (toSetoid : x.toSetoid = y.toSetoid) :
                  x = y

                  The bundled equality pattern of a labeled coordinate.

                  Equations
                  Instances For
                    theorem RelSignature.RelCoord.equalityPattern_map {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} (hf : ∀ (s : S.Srt), Function.Injective (f s)) (c : S.RelCoord V) :

                    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
                    Instances For
                      @[simp]

                      Local latent indices #

                      @[reducible, inline]

                      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) → ….

                      Equations
                      Instances For
                        @[implicit_reducible]

                        The blocks of a pattern form a finite type (positions are Fin; classical decidability of the setoid).

                        Equations
                        @[implicit_reducible]

                        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.

                        Equations
                        @[reducible, inline]
                        abbrev RelSignature.CoordLatentIndex {S : RelSignature} {V : S.SrtType u_1} (c : S.RelCoord V) :
                        Type (max u_1 u_4)

                        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
                          Instances For
                            @[simp]

                            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
                                noncomputable def RelSignature.CoordLatentIndex.congrMap {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} (hf : ∀ (s : S.Srt), Function.Injective (f s)) (c : S.RelCoord V) :

                                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
                                  @[simp]
                                  theorem RelSignature.CoordLatentIndex.congrMap_toLatentIndex {S : RelSignature} {V : S.SrtType u_1} {W : S.SrtType u_2} {f : (s : S.Srt) → V sW s} (hf : ∀ (s : S.Srt), Function.Injective (f s)) (c : S.RelCoord V) (A : CoordLatentIndex c) :

                                  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 #

                                  @[reducible, inline]

                                  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
                                    @[reducible]

                                    The binary coordinate at an ordered pair.

                                    Equations
                                    Instances For
                                      @[reducible, inline]

                                      A one-sort ternary signature.

                                      Equations
                                      Instances For
                                        @[reducible]

                                        The running ternary coordinate (0, 1, 0): a repeated entry.

                                        Equations
                                        Instances For
                                          @[reducible, inline]

                                          A two-sort bipartite binary signature: position 0 is a left vertex, position 1 a right vertex.

                                          Equations
                                          Instances For
                                            @[reducible]

                                            The running bipartite coordinate with equal raw values in both positions.

                                            Equations
                                            Instances For