Documentation

Complexitylib.Circuits.AC0.Switching.Defs

Switching-lemma substrate -- definitions #

Two decision-tree constructions are provided. The elementary canonical tree queries one variable at a time. The switching tree instead queries every currently free variable of the first surviving term before it either accepts or continues. This complete-block construction is the one needed by the standard switching-lemma encoding.

The explicit fuel is a proof-engineering device. The public construction starts with the number of variables in the DNF, and its correctness proof shows that each recursive query removes its variable from support.

@[reducible, inline]
abbrev Complexity.Switching.PathCode (N queryCount : ) :

Auxiliary information carried by the elementary deepest-path encoding: the queried input coordinate and chosen branch bit at each path position.

Equations
Instances For
    @[reducible, inline]
    abbrev Complexity.Switching.WidthPathCode (width queryCount : ) :

    Per-query advice for a width-sensitive switching encoding: a bounded literal position, the original path bit, and an end-of-phase marker.

    Equations
    Instances For

      A term is consistent when repeated occurrences of one variable always have the same polarity. Contradictory terms must be removed or excluded before using their polarities as a satisfying assignment.

      Equations
      Instances For
        def Complexity.DNF.Consistent {N : } (formula : DNF N) :

        Every term in the DNF is internally consistent.

        Equations
        Instances For
          noncomputable def Complexity.DNF.consistentPart {N : } (formula : DNF N) :
          DNF N

          Remove contradictory DNF terms. Such terms are identically false, so this semantic cleanup does not change the represented function.

          Equations
          Instances For
            def Complexity.DNF.firstLiveTerm {N : } (formula : DNF N) (restriction : Restriction.On N) :

            The first original term that survives a restriction, paired with its reduced list of free literals. Keeping the original term supplies the provenance needed by width-sensitive switching encodings.

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

              Fuelled canonical decision tree for a DNF.

              Equations
              Instances For

                The canonical finite decision tree for a DNF.

                Equations
                Instances For

                  Fuelled block decision tree used by the switching lemma.

                  For the first surviving term, this tree queries every distinct variable in one complete block. A satisfying block ends at true; every other block restricts the DNF and continues with one less unit of fuel.

                  Equations
                  Instances For
                    noncomputable def Complexity.DNF.switchingDecisionTree {N : } (formula : DNF N) :

                    The canonical complete-block tree used in switching arguments.

                    Equations
                    Instances For

                      Fuelled complete-block switching tree that retains the original DNF and accumulates a restriction separately. This is extensionally the same tree as first simplifying the DNF, but it preserves original-term provenance.

                      Equations
                      Instances For
                        noncomputable def Complexity.DNF.switchingDecisionTreeUnder {N : } (formula : DNF N) (restriction : Restriction.On N) :

                        Complete-block switching tree for an original DNF under an accumulated restriction, with enough fuel for every surviving variable.

                        Equations
                        Instances For
                          noncomputable def Complexity.DNF.switchingBad {N : } (formula : DNF N) (queryCount : ) (restriction : Restriction.On N) :

                          The bad event bounded by the switching lemma: after applying the decoded random restriction, the complete-block DNF switching tree still has depth at least queryCount.

                          Equations
                          Instances For
                            @[implicit_reducible]
                            noncomputable instance Complexity.DNF.switchingBadDecidable {N : } (formula : DNF N) (queryCount : ) :
                            DecidablePred (formula.switchingBad queryCount)
                            Equations
                            def Complexity.CNF.Consistent {N : } (formula : CNF N) :

                            A CNF is consistent when no clause is tautological. Equivalently, every term in its De Morgan dual DNF is internally consistent.

                            Equations
                            Instances For
                              noncomputable def Complexity.CNF.consistentPart {N : } (formula : CNF N) :
                              CNF N

                              Delete tautological CNF clauses by cleaning the contradictory terms in the De Morgan dual. This preserves the represented function.

                              Equations
                              Instances For

                                The canonical decision tree for a CNF, obtained by the De Morgan dual DNF and leaf complementation.

                                Equations
                                Instances For
                                  noncomputable def Complexity.CNF.switchingDecisionTree {N : } (formula : CNF N) :

                                  The complete-block switching tree for a CNF, obtained from its De Morgan dual DNF by complementing the leaves.

                                  Equations
                                  Instances For
                                    noncomputable def Complexity.CNF.switchingDecisionTreeUnder {N : } (formula : CNF N) (restriction : Restriction.On N) :

                                    Complete-block switching tree for a CNF under an accumulated restriction, obtained by dualizing the provenance-preserving DNF construction.

                                    Equations
                                    Instances For
                                      noncomputable def Complexity.CNF.switchingBad {N : } (formula : CNF N) (queryCount : ) (restriction : Restriction.On N) :

                                      The CNF bad event for the switching lemma.

                                      Equations
                                      Instances For
                                        @[implicit_reducible]
                                        noncomputable instance Complexity.CNF.switchingBadDecidable {N : } (formula : CNF N) (queryCount : ) :
                                        DecidablePred (formula.switchingBad queryCount)
                                        Equations