Documentation

Complexitylib.Circuits.Frontier.Decomposable

Threshold counting for decomposable representations #

A smooth decomposable DAG has unions on a common scope and binary products on disjoint scopes. Leaves have at most one assignment. Its denotations satisfy the usual local semantics; a decreasing rank rules out cycles. Unions need not be disjoint, and different branches may use different partitions.

An occurrence in an accepting certificate supplies an outside context. Substituting any assignment accepted by that node preserves acceptance at the root. Thus a node and all its contexts form a rectangle. Descending a certificate to the cardinality threshold charges at most (K - 1)^2 inputs to a union edge and (K - 1)^3 to a product node.

The certificate-context rectangle construction is standard in the DNNF literature; see Bova, Capelli, Mengel and Slivovsky, IJCAI 2016. The threshold estimate here does not require deterministic unions or a single tree of coordinate partitions.

The three node types of a smooth decomposable representation.

Instances For
    structure Complexity.Frontier.Decomposable (ι : Type u_1) (U : Type u_2) (N : Type u_3) :
    Type (max (max u_1 u_2) u_3)

    A finite acyclic union/product representation, with its local denotational semantics. Literal leaves and constants satisfy leaf_small; arbitrary predicates are not free leaves. Finiteness of the node type is needed only for the size bound.

    Instances For
      def Complexity.Frontier.Decomposable.accepts {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) (v : N) :
      Set (ι → U)

      Acceptance by a node, viewed on full inputs.

      Equations
      Instances For
        def Complexity.Frontier.Decomposable.accepted {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) :
        Set (ι → U)

        The set represented by the root.

        Equations
        Instances For
          theorem Complexity.Frontier.Decomposable.accepts_congr {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) {v : N} {x y : ι → U} (h : Set.EqOn x y (P.scope v)) :
          x ∈ P.accepts v ↔ y ∈ P.accepts v
          inductive Complexity.Frontier.Decomposable.Occurs {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) (x : ι → U) :
          N → Prop

          A node occurs on an accepting certificate for x. At a union, any accepting child can be selected. At a product, both children occur.

          Instances For
            theorem Complexity.Frontier.Decomposable.Occurs.accepts {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) {x : ι → U} {v : N} (h : P.Occurs x v) :
            x ∈ P.accepts v
            theorem Complexity.Frontier.Decomposable.Occurs.substitute {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) {x : ι → U} {v : N} (h : P.Occurs x v) {y : ι → U} (hy : y ∈ P.accepts v) (hout : Set.EqOn y x (P.scope v)ᶜ) :

            The substitution property follows from the syntax and decomposability.

            def Complexity.Frontier.Decomposable.contexts {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) (v : N) :
            Set (↑(P.scope v)ᶜ → U)

            Outside assignments supplied by accepting certificates through a node.

            Equations
            Instances For
              theorem Complexity.Frontier.Decomposable.rectangle_subset {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) (v : N) :
              rectangle (P.scope v) (P.values v) (P.contexts v) ⊆ P.accepted
              theorem Complexity.Frontier.Decomposable.contexts_small {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) {K : ℕ} (hS : RectangleFree P.accepted K) {v : N} (hv : K ≤ (P.values v).ncard) :
              (P.contexts v).ncard ≤ K - 1
              def Complexity.Frontier.Decomposable.stops {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) (K : ℕ) (v : N) :
              Set (ι → U)

              Inputs for which threshold descent can stop at this node.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Complexity.Frontier.Decomposable.exists_stop {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) [Finite ι] [Finite U] {K : ℕ} (hK : 1 < K) (hS : K ≤ P.accepted.ncard) {x : ι → U} (hx : x ∈ P.accepted) :
                ∃ (v : N), x ∈ P.stops K v

                Every accepted input has a stopping node. Rank makes the descent finite even with sharing.

                def Complexity.Frontier.Decomposable.budget {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) (K : ℕ) (v : N) :

                The local threshold budget of a node.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Complexity.Frontier.Decomposable.ncard_stops_le {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) [Finite ι] [Finite U] {K : ℕ} (hS : RectangleFree P.accepted K) (v : N) :
                  (P.stops K v).ncard ≤ P.budget K v
                  def Complexity.Frontier.Decomposable.unionEdges {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) [Fintype N] :

                  Count outgoing union edges, including shared children once for each parent.

                  Equations
                  Instances For
                    def Complexity.Frontier.Decomposable.products {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) [Fintype N] :

                    Count binary product nodes.

                    Equations
                    Instances For
                      theorem Complexity.Frontier.Decomposable.ncard_le {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) [Finite ι] [Finite U] {K : ℕ} [Fintype N] (hK : 1 < K) (hS : K ≤ P.accepted.ncard) (hrect : RectangleFree P.accepted K) :
                      P.accepted.ncard ≤ (K - 1) ^ 2 * P.unionEdges + (K - 1) ^ 3 * P.products

                      Decomposable threshold counting. The denotation of a smooth decomposable DAG cannot be both large and rectangle-free unless the DAG has many nodes or edges.

                      theorem Complexity.Frontier.Decomposable.ncard_le_size {ι : Type u_1} {U : Type u_2} {N : Type u_3} (P : Decomposable ι U N) [Finite ι] [Finite U] {K : ℕ} [Fintype N] (hK : 1 < K) (hS : K ≤ P.accepted.ncard) (hrect : RectangleFree P.accepted K) :

                      A simpler bound charging the same cubic budget to each union edge or product node.