Documentation

DescriptiveComplexity.Problems.CycleCover.Base

The base graph of a #1-in-SAT instance #

The reduction of #1-in-SAT to #Cycle Cover attaches Valiant's XOR gadget at one site per occurrence of a literal in a clause; this file builds the base graph the gadgets are attached to, and evaluates the terms of the XOR sum (DescriptiveComplexity.Site.xorSum) it leaves.

The graph #

An occurrence (DescriptiveComplexity.SatCover.Occ) is a real one, the literal (x, s) in the clause c, or a dummy one, the literal (x, s) in the tautological clause x ∨ ¬x added for every variable x; the dummy clause is written ⊥. Every occurrence o has a track node trk o and a spoke spk o, and every clause, dummy ones included, a hub. The base edges are:

The site of an occurrence pairs the self-loop at its track node with the self-loop at its spoke, so that exactly one of the two is used: the track loop when the literal is true and the spoke loop when it is false. A cycle cover of the base graph with the chosen loops forced is then unique when the choice is consistent (DescriptiveComplexity.SatCover.Consistent) – the track of a literal is used entirely or not at all, so the loops of a literal are all chosen or none, exactly one loop of the two dummy occurrences of a variable is chosen, so that each variable has one value, and exactly one spoke of each clause is free to close a cycle with its hub, so that each clause has exactly one true literal – and does not exist otherwise (DescriptiveComplexity.SatCover.pdel_base). The consistent choices are the exactly-one models (DescriptiveComplexity.SatCover.consistentEquiv).

Occurrences and nodes #

An occurrence is valid when it is a real one, (x, s) in the clause c, or the dummy one of a variable.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The occurrences: the real ones and the dummy ones.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The clause of an occurrence, ⊥ for a dummy one.

      Equations
      • o.c = (↑o).1
      Instances For
        Dependency graph
        @[reducible, inline]

        The variable of an occurrence.

        Equations
        • o.x = (↑o).2.1
        Instances For
          Dependency graph
          @[reducible, inline]

          The sign of an occurrence.

          Equations
          • o.s = (↑o).2.2
          Instances For
            Dependency graph
            theorem DescriptiveComplexity.SatCover.Occ.ext {A : Type} [FirstOrder.Language.sat.Structure A] {o o' : Occ A} (hc : o.c = o'.c) (hx : o.x = o'.x) (hs : o.s = o'.s) :
            o = o'
            Dependency graph

            The variable of an occurrence is a variable of the formula.

            Dependency graph
            Dependency graph

            The dummy occurrence of a variable.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              The hubs: one per clause, and one per variable for its dummy clause.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The nodes of the base graph: a track node and a spoke per occurrence, and the hubs.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The track node of an occurrence.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The spoke of an occurrence.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]

                      A hub, as a node.

                      Equations
                      Instances For
                        Dependency graph

                        The hub of the clause of an occurrence.

                        Equations
                        Instances For
                          Dependency graph

                          The tracks #

                          The clauses an occurrence of the literal (x, s) can be in, the dummy clause ⊥ first.

                          Equations
                          Instances For
                            Dependency graph
                            theorem DescriptiveComplexity.SatCover.mem_chain {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Fintype A] {x : A} {s : Bool} {c : WithBot A} :
                            c ∈ chain x s ↔ c = ⊥ ∨ ∃ (c' : A), c = ↑c' ∧ SatOcc.OccIn c' x s
                            Dependency graph
                            Dependency graph

                            The next occurrence of the same literal, cyclically.

                            Equations
                            Instances For
                              Dependency graph
                              Dependency graph
                              Dependency graph
                              Dependency graph

                              The base edges #

                              The edges of the base graph.

                              Instances For
                                Dependency graph

                                The base matrix: the adjacency matrix of the base graph.

                                Equations
                                Instances For
                                  Dependency graph

                                  The sites and the choices #

                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph
                                  Dependency graph

                                  The site of an occurrence: the self-loop at its track node, used when the literal is true, paired with the self-loop at its spoke, used when it is false.

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

                                    The rows deleted by the choice U of the occurrences whose track loop is used: their track nodes, and the spokes of the other occurrences.

                                    Equations
                                    Instances For
                                      Dependency graph

                                      A consistent choice: the track loops of a literal are all chosen or none (the track is then used entirely or not at all), and every hub has exactly one spoke whose loop is not chosen, to close a cycle with.

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

                                        The term of the XOR sum of a choice: 1 when the choice is consistent, 0 otherwise.

                                        Dependency graph

                                        The XOR sum over all the choices #

                                        Dependency graph
                                        Dependency graph
                                        Dependency graph
                                        Dependency graph