Documentation

DescriptiveComplexity.Counting.KernelPair

The sum of two witness counts, as one witness count #

Two kernels over two blocks are combined into one kernel over one block with a selector, a relation variable of arity zero (DescriptiveComplexity.boolBlock): when the selector holds, the first kernel must hold of the first block and the second block must be empty; otherwise the second kernel must hold of the second block and the first block must be empty (DescriptiveComplexity.pairKernel). The witnesses of the pair kernel are, bijectively, the witnesses of one kernel or the other (DescriptiveComplexity.pairWitnessEquiv), so

The first is what adding a constant to a witness count takes – the second kernel being ⊤ over the block without variables, with exactly one witness (DescriptiveComplexity.witnessCount_trivial_top) – and so what the closure under complement of ⊕P and PP rests on. The second is what the completeness of a problem comparing two counts rests on: a single formula, whose models are told apart by the value of the selector's variable.

The selector block and the lifting of kernels #

@[reducible]

The block with one relation variable of arity zero: a Boolean.

Equations
Instances For
    Dependency graph

    The Boolean an assignment of the selector block holds.

    Equations
    Instances For
      Dependency graph

      Assignments of a merged block are pairs of assignments.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        noncomputable def DescriptiveComplexity.liftFst {L : FirstOrder.Language} (B M : SOBlock) (φ : (L.sum B.lang).Sentence) :
        (L.sum (B.cons M).lang).Sentence

        A sentence over the expansion by B, read over the expansion by the merged block SOBlock.cons B M.

        Equations
        Instances For
          Dependency graph
          noncomputable def DescriptiveComplexity.liftSnd {L : FirstOrder.Language} (B M : SOBlock) (φ : (L.sum M.lang).Sentence) :
          (L.sum (B.cons M).lang).Sentence

          A sentence over the expansion by M, read over the expansion by the merged block SOBlock.cons B M.

          Equations
          Instances For
            Dependency graph

            “Every relation variable of the block is empty.”

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Dependency graph
              Dependency graph

              The pair kernel #

              @[reducible, inline]

              The block of a pair of kernels: the two blocks and the selector.

              Equations
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.pairKernel {L : FirstOrder.Language} (B B' : SOBlock) (φ : (L.sum B.lang).Sentence) (φ' : (L.sum B'.lang).Sentence) :

                The pair kernel: the first kernel of the first block when the selector holds, the second block being empty; the second kernel of the second block otherwise, the first block being empty.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The witnesses of a kernel.

                  Equations
                  Instances For
                    Dependency graph

                    The empty assignment of a block.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]
                      abbrev DescriptiveComplexity.pairFst {B B' : SOBlock} {A : Type} (ρ : (pairBlock B B').Assignment A) :

                      The first component of an assignment of the pair block.

                      Equations
                      Instances For
                        Dependency graph
                        @[reducible, inline]
                        abbrev DescriptiveComplexity.pairSnd {B B' : SOBlock} {A : Type} (ρ : (pairBlock B B').Assignment A) :

                        The second component of an assignment of the pair block.

                        Equations
                        Instances For
                          Dependency graph
                          @[reducible, inline]
                          abbrev DescriptiveComplexity.pairSel {B B' : SOBlock} {A : Type} (ρ : (pairBlock B B').Assignment A) :

                          The selector of an assignment of the pair block.

                          Equations
                          Instances For
                            Dependency graph
                            theorem DescriptiveComplexity.witnessCount_pairKernel {L : FirstOrder.Language} {B B' : SOBlock} {φ : (L.sum B.lang).Sentence} {φ' : (L.sum B'.lang).Sentence} {A : Type} [L.Structure A] [Finite A] :
                            witnessCount (pairBlock B B') (pairKernel B B' φ φ') A = witnessCount B φ A + witnessCount B' φ' A

                            The witness count of the pair kernel is the sum of the two witness counts.

                            Dependency graph

                            The left summands of a sum type.

                            Equations
                            Instances For
                              Dependency graph

                              The right summands of a sum type.

                              Equations
                              Instances For
                                Dependency graph
                                theorem DescriptiveComplexity.card_pairWitness_sel {L : FirstOrder.Language} {B B' : SOBlock} {φ : (L.sum B.lang).Sentence} {φ' : (L.sum B'.lang).Sentence} {A : Type} [L.Structure A] :
                                Nat.card { w : Witness (pairBlock B B') (pairKernel B B' φ φ') A // pairSel ↑w } = witnessCount B φ A

                                The witnesses of the pair kernel with the selector are the witnesses of the first kernel.

                                Dependency graph
                                theorem DescriptiveComplexity.card_pairWitness_not_sel {L : FirstOrder.Language} {B B' : SOBlock} {φ : (L.sum B.lang).Sentence} {φ' : (L.sum B'.lang).Sentence} {A : Type} [L.Structure A] :
                                Nat.card { w : Witness (pairBlock B B') (pairKernel B B' φ φ') A // ¬pairSel ↑w } = witnessCount B' φ' A

                                The witnesses of the pair kernel without the selector are the witnesses of the second kernel.

                                Dependency graph

                                The kernel ⊤ over the block without variables has exactly one witness.

                                Dependency graph