Documentation

DescriptiveComplexity.Exponential.Block

Independent copies of a second-order block #

An exponential expansion (DescriptiveComplexity.ExpExpansion) defines an n-ary relation on its universe – the assignments of a block B – by a first-order sentence that must read n assignments at once. The vocabulary it is written over is therefore n independent copies of B.lang, packaged here as a single block DescriptiveComplexity.SOBlock.replicate:

This is a product presentation of a quantifier prefix, as opposed to the iterated-merge presentation of DescriptiveComplexity.repMerged (DescriptiveComplexity.SecondOrderReplicate), which is built by recursion on k and whose index type is a nest of sums. The product presentation is what this development needs, for one reason: replication commutes with the pullback of a block through an interpretation definitionally (DescriptiveComplexity.SOBlock.homAssign_replicatePullHom), because both sides re-associate the same Σ-type over a product. Pulling an expansion back through an interpretation is exactly that re-association, so the commutation is the lemma DescriptiveComplexity.Exponential.Pull rests on, and is proved by rfl.

The replicated block #

n independent copies of a block: one relation variable per pair of a copy index and a relation variable of B, keeping its arity.

Equations
Instances For
    Dependency graph
    @[simp]
    Dependency graph

    The assignment of the replicated block determined by one assignment per copy. The index type being a plain product, this is currying and nothing more.

    Equations
    Instances For
      Dependency graph

      The relation symbol of the k-th copy corresponding to a symbol of the block's own vocabulary.

      Equations
      Instances For
        Dependency graph

        Reading back the relation variable of a copy.

        Dependency graph

        Replication commutes with the pullback through an interpretation #

        DescriptiveComplexity.SOBlock.pull turns an a-ary variable on the interpreted universe Tag × A^d into one (a · d)-ary variable on A per tuple of tags. Applied to the replicated block it produces variables indexed by Σ (k, i), Fin (B.arity i) → Tag; replicating the pulled block produces variables indexed by Fin n × Σ i, Fin (B.arity i) → Tag. These are the same data re-associated, with equal arities, so the induced block morphism is an arity-preserving bijection and the transported assignments agree by rfl.

        def DescriptiveComplexity.SOBlock.replicatePullHom (B : SOBlock) (T : Type) [Finite T] (d n : ) :
        (pull T d (B.replicate n)).ι((pull T d B).replicate n).ι

        The re-association of indices identifying the pullback of a replicated block with the replication of the pulled block.

        Equations
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.SOBlock.replicatePullHom_arity (B : SOBlock) (T : Type) [Finite T] (d n : ) (i : (pull T d (B.replicate n)).ι) :
          ((pull T d B).replicate n).arity (B.replicatePullHom T d n i) = (pull T d (B.replicate n)).arity i
          Dependency graph

          The vocabulary morphism reading a sentence over the pullback of the replicated block inside the replication of the pulled block.

          Equations
          Instances For
            Dependency graph
            theorem DescriptiveComplexity.SOBlock.homAssign_replicatePullHom (B : SOBlock) (T : Type) [Finite T] (d n : ) {A : Type} (ρs : Fin nB.Assignment (T × (Fin dA))) :
            homAssign (B.replicatePullHom T d n) ((pull T d B).replicateAssign fun (k : Fin n) => B.pullAssign (ρs k)) = (B.replicate n).pullAssign (B.replicateAssign ρs)

            The commutation DescriptiveComplexity.Exponential.Pull rests on: replicating the pulled assignments and transporting back along the re-association gives the pullback of the replicated assignment. Both sides read ρs k i at the same decoded arguments, so this is definitional.

            Dependency graph