Documentation

Complexitylib.DescriptiveComplexity.Circuit.Defs

Expanding first-order formulas into unbounded Boolean formulas #

For a fixed universe size, the input consists of relation truth tables and one-hot constant blocks. StructureInput assigns wires to those bits. The compiler supports arbitrary arities, constants, and open formulas. A quantifier becomes one unbounded gate over all possible values; atomic formulas select their arguments through the constant blocks.

This is the finite quantifier expansion underlying Immerman's Theorem 5.22, Section 5.4: https://people.cs.umass.edu/~immerman/book/ch5.pdf. The target is the existing AC0Formula tree representation. The surface module combines it with circuit realization. Circuit.Validity supplies encoding validation, and DescriptiveComplexity.AC0 packages the complete circuit family.

Positions of relation bits and one-hot constant bits in an input vector.

Instances For

    The assigned wires carry the relation tables and exact constant values of a structure.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Complexity.DescriptiveComplexity.StructureInput.termTest {V : Vocabulary} {card N n : ℕ} (L : StructureInput V card N) (σ : Env card n) :
      Term V n → Fin card → AC0Formula N

      Test whether a term has a given value using a constant leaf or one input literal.

      Equations
      Instances For
        def Complexity.DescriptiveComplexity.StructureInput.relationTest {V : Vocabulary} {card N n : ℕ} (L : StructureInput V card N) (σ : Env card n) (i : Fin V.numRels) (ts : Fin (V.relArity i) → Term V n) :

        Select a relation-table entry by testing all its argument values.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Complexity.DescriptiveComplexity.StructureInput.equalityTest {V : Vocabulary} {card N n : ℕ} (L : StructureInput V card N) (σ : Env card n) (t₁ t₂ : Term V n) :

          Equality holds when the two term selectors agree on some value.

          Equations
          Instances For
            def Complexity.DescriptiveComplexity.StructureInput.compile {V : Vocabulary} {card N : ℕ} (L : StructureInput V card N) {n : ℕ} :
            Formula V n → Env card n → AC0Formula N

            Expand a formula into an unbounded Boolean formula over the structure input.

            Equations
            Instances For