Documentation

DescriptiveComplexity.Counting.QSOQuantifiers

First-order sums and products of witness counts #

The two first-order quantifiers of ΣQSO(FO) keep witness counts witness counts.

The sum over tuples #

@[reducible]

n unary relation variables.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The i-th unary relation variable, beside the block B.

    Equations
    Instances For
      Dependency graph
      noncomputable def DescriptiveComplexity.WCount.exactlyOneF {M : FirstOrder.Language} {α : Type} (B : SOBlock) (n : ℕ) (i : Fin n) :
      (M.sum (B.cons (tupleBlock n)).lang).Formula α

      “The i-th unary relation variable holds of exactly one element.”

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        noncomputable def DescriptiveComplexity.WCount.sumKernel {M : FirstOrder.Language} {α : Type} (B : SOBlock) (n : ℕ) (φ : (M.sum B.lang).Formula (α ⊕ Fin n)) :
        (M.sum (B.cons (tupleBlock n)).lang).Formula α

        The kernel of a sum over tuples: each unary relation variable holds of exactly one element, and the tuple of these elements satisfies the formula.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.WCount.realize_sumKernel {M : FirstOrder.Language} {α : Type} {B : SOBlock} {n : ℕ} {A : Type} [M.Structure A] (φ : (M.sum B.lang).Formula (α ⊕ Fin n)) (ρ : B.Assignment A) (μ : (tupleBlock n).Assignment A) (v : α → A) :
          (sumKernel B n φ).Realize v ↔ (∀ (i : (tupleBlock n).ι), ∃ (y : A), μ i ![y] ∧ ∀ (z : A), μ i ![z] → z = y) ∧ ∃ (w : Fin n → A), (∀ (i : (tupleBlock n).ι), μ i ![w i]) ∧ φ.Realize (Sum.elim v w)
          Dependency graph
          noncomputable def DescriptiveComplexity.WCount.pickOf {n : ℕ} {A : Type} (μ : (tupleBlock n).Assignment A) (h : ∀ (i : (tupleBlock n).ι), ∃ (y : A), μ i ![y] ∧ ∀ (z : A), μ i ![z] → z = y) (i : Fin n) :
          A

          The element a unary relation variable holding of exactly one element holds of.

          Equations
          Instances For
            Dependency graph

            The unary relation variables holding of the elements of a tuple.

            Equations
            Instances For
              Dependency graph
              theorem DescriptiveComplexity.WCount.tupleAssign_spec {n : ℕ} {A : Type} (w : Fin n → A) (i : Fin n) :
              ∃ (y : A), tupleAssign w i ![y] ∧ ∀ (z : A), tupleAssign w i ![z] → z = y
              Dependency graph
              noncomputable def DescriptiveComplexity.WCount.sumEquiv' {M : FirstOrder.Language} {α : Type} {B : SOBlock} {n : ℕ} {A : Type} [M.Structure A] (φ : (M.sum B.lang).Formula (α ⊕ Fin n)) (v : α → A) :
              FWit M (B.cons (tupleBlock n)) (sumKernel B n φ) A v ≃ (w : Fin n → A) × FWit M B φ A (Sum.elim v w)

              The witnesses of a sum over tuples are a tuple and a witness for it.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                theorem DescriptiveComplexity.WCount.sum {M : FirstOrder.Language} {α : Type} (n : ℕ) {f : (A : Type) → [M.Structure A] → (α ⊕ Fin n → A) → ℕ} (hf : WCount M (α ⊕ Fin n) f) :
                WCount M α fun (A : Type) (x : M.Structure A) (v : α → A) => ∑ᶠ (w : Fin n → A), f A (Sum.elim v w)

                The sum of a witness count over the tuples is a witness count.

                Dependency graph

                The product over tuples #

                @[reducible]

                Every relation variable of the block takes n more arguments.

                Equations
                Instances For
                  Dependency graph

                  The assignments of the extended block are the families of assignments indexed by the n-tuples.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    theorem DescriptiveComplexity.WCount.prod {M : FirstOrder.Language} {α : Type} (n : ℕ) {f : (A : Type) → [M.Structure A] → (α ⊕ Fin n → A) → ℕ} (hf : WCount M (α ⊕ Fin n) f) :
                    WCount M α fun (A : Type) (x : M.Structure A) (v : α → A) => ∏ᶠ (w : Fin n → A), f A (Sum.elim v w)

                    The product of a witness count over the tuples is a witness count: one witness per tuple, read off the extended block.

                    Dependency graph