Documentation

DescriptiveComplexity.Problems.CycleCover.Formulas

The formulas of the reduction of #1-in-SAT to #Cycle Cover #

The reduction draws, over the ordered expansion of a CNF formula, the ladder expansion (DescriptiveComplexity.ladder) of the base graph with Valiant's gadgets attached (DescriptiveComplexity.Site.flatAttach). This file names the tags and writes the first-order formulas the drawing is made of, each with its realization lemma; the drawing itself is in DescriptiveComplexity.Problems.CycleCover.Drawing.

Tags #

@[reducible, inline]

The tag of an occurrence: whether it is the dummy one, and its sign.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The tags of the nodes of the base graph: track nodes and spokes of an occurrence, and hubs, of a clause (true) or of a variable (false).

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The tags of the nodes of the attached graph: base nodes, and the four gadget nodes of an occurrence.

      Equations
      Instances For
        Dependency graph

        The tags of the levels: one per occurrence and index, and one more. A definition rather than an abbreviation, so that the only order on it is the one declared here.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph

          The level of an occurrence tag and an index.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The tags of the drawing: the nodes of the attached graph, and the rungs, tagged by their two nodes, their level and their index.

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

              Occurrences and nodes #

              x is a variable of the formula, as a formula.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.SatCover.occDomF {α : Type} (d s : Bool) (c x : α) :

                (c, x) is an occurrence of tag (d, s): the dummy occurrence (x, x) of a variable x when d, the occurrence of (x, s) in the clause c otherwise.

                Equations
                Instances For
                  Dependency graph
                  Dependency graph
                  noncomputable def DescriptiveComplexity.SatCover.vDomF {α : Type} (t : VTag) (c x : α) :

                  (c, x) is a node of the attached graph of tag t.

                  Equations
                  Instances For
                    Dependency graph
                    noncomputable def DescriptiveComplexity.SatCover.isMinF {α : Type} (c : α) :

                    c is the least element, as a formula.

                    Equations
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.SatCover.levelDomF {α : Type} (t : LevelTag) (c x : α) :

                      (c, x) is a level of tag t: an occurrence, or the pair of least elements.

                      Equations
                      Instances For
                        Dependency graph

                        The base edges and the entries of the attached matrix #

                        noncomputable def DescriptiveComplexity.SatCover.nextF {α : Type} (d d' s : Bool) (c x c' : α) :

                        (c', x) is the occurrence of the literal (x, s) next after (c, x), cyclically, the dummy occurrence first: the four cases according to whether each is the dummy one.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Dependency graph
                          noncomputable def DescriptiveComplexity.SatCover.baseEdgeF {α : Type} (t t' : NodeTag) (c x c' x' : α) :

                          The base edge from the node (c, x) of tag t to the node (c', x') of tag t'.

                          Equations
                          Instances For
                            Dependency graph
                            noncomputable def DescriptiveComplexity.SatCover.flatEntryF {α : Type} (v : ℤ) (t t' : VTag) (c x c' x' : α) :

                            The entry of the attached matrix between the node (c, x) of tag t and the node (c', x') of tag t' is v, for v ≠ 0.

                            Equations
                            Instances For
                              Dependency graph

                              The order of the levels #

                              noncomputable def DescriptiveComplexity.SatCover.levelLeF {α : Type} (t t' : LevelTag) (c x c' x' : α) :

                              The level (c, x) of tag t is at most the level (c', x') of tag t', in the lexicographic order: the tags are compared statically.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Dependency graph
                                noncomputable def DescriptiveComplexity.SatCover.levelLtF {α : Type} (t t' : LevelTag) (c x c' x' : α) :

                                Strictly below, among the levels.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.SatCover.levelMinF {α : Type} (t : LevelTag) (c x : α) :

                                  The level (c, x) of tag t is the least level.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.SatCover.levelMaxF {α : Type} (t : LevelTag) (c x : α) :

                                    The level (c, x) of tag t is the greatest level.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Dependency graph
                                      noncomputable def DescriptiveComplexity.SatCover.levelCovF {α : Type} (t t' : LevelTag) (c x c' x' : α) :

                                      The level (c', x') of tag t' is the one next after the level (c, x) of tag t.

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

                                        The widths #

                                        noncomputable def DescriptiveComplexity.SatCover.widthF {α : Type} (t t' : VTag) (l : LevelTag) (j : Fin 3) (c x c' x' c'' x'' : α) :

                                        The index j is below the width, at the level (c'', x'') of tag l, of the ladder from the node (c, x) of tag t to the node (c', x') of tag t': two rungs at every level for an entry -1, the entry at the least level and one rung elsewhere otherwise.

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

                                          Semantics of the tags #

                                          The pair (c, x) is an occurrence of tag (d, s).

                                          Equations
                                          Instances For
                                            Dependency graph

                                            The clause of an occurrence of tag d: ⊥ for the dummy one.

                                            Equations
                                            Instances For
                                              Dependency graph

                                              The occurrence a tagged pair denotes.

                                              Equations
                                              Instances For
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.SatCover.occOf_c {A : Type} [FirstOrder.Language.sat.Structure A] (d s : Bool) (c x : A) (h : OccDom d s c x) :
                                                (occOf d s c x h).c = occC d c
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.SatCover.occOf_x {A : Type} [FirstOrder.Language.sat.Structure A] (d s : Bool) (c x : A) (h : OccDom d s c x) :
                                                (occOf d s c x h).x = x
                                                Dependency graph
                                                @[simp]
                                                theorem DescriptiveComplexity.SatCover.occOf_s {A : Type} [FirstOrder.Language.sat.Structure A] (d s : Bool) (c x : A) (h : OccDom d s c x) :
                                                (occOf d s c x h).s = s
                                                Dependency graph
                                                Dependency graph

                                                The pair an occurrence is drawn as: (x, x) for a dummy one.

                                                Equations
                                                Instances For
                                                  Dependency graph
                                                  Dependency graph
                                                  Dependency graph
                                                  theorem DescriptiveComplexity.SatCover.occTag_occOf {A : Type} [FirstOrder.Language.sat.Structure A] (d s : Bool) (c x : A) (h : OccDom d s c x) :
                                                  occTag (occOf d s c x h) = (d, s)
                                                  Dependency graph
                                                  theorem DescriptiveComplexity.SatCover.occPair_occOf {A : Type} [FirstOrder.Language.sat.Structure A] (d s : Bool) (c x : A) (h : OccDom d s c x) :
                                                  occPair (occOf d s c x h) = (c, x)
                                                  Dependency graph
                                                  Dependency graph
                                                  Dependency graph
                                                  Dependency graph
                                                  Dependency graph
                                                  Dependency graph
                                                  Dependency graph

                                                  The node of the attached graph a tagged pair denotes.

                                                  Equations
                                                  Instances For
                                                    Dependency graph
                                                    Dependency graph
                                                    Dependency graph
                                                    Dependency graph
                                                    Dependency graph
                                                    theorem DescriptiveComplexity.SatCover.vTag_vOf {A : Type} [FirstOrder.Language.sat.Structure A] (t : VTag) (c x : A) (h : VDom t c x) :
                                                    vTag (vOf t c x h) = t
                                                    Dependency graph
                                                    theorem DescriptiveComplexity.SatCover.vPair_vOf {A : Type} [FirstOrder.Language.sat.Structure A] (t : VTag) (c x : A) (h : VDom t c x) :
                                                    vPair (vOf t c x h) = (c, x)
                                                    Dependency graph

                                                    The pair (c, x) is a level of tag t.

                                                    Equations
                                                    Instances For
                                                      Dependency graph

                                                      Realization #

                                                      theorem DescriptiveComplexity.SatCover.realize_occDomF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : α → A} {d s : Bool} {c x : α} :
                                                      (occDomF d s c x).Realize v ↔ OccDom d s (v c) (v x)
                                                      Dependency graph
                                                      theorem DescriptiveComplexity.SatCover.realize_levelDomF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : α → A} {t : LevelTag} {c x : α} :
                                                      (levelDomF t c x).Realize v ↔ LevelDom t (v c) (v x)
                                                      Dependency graph

                                                      The next occurrence #

                                                      The base edges #

                                                      Dependency graph
                                                      Dependency graph
                                                      Dependency graph

                                                      The entries of the attached matrix #

                                                      @[reducible, inline]

                                                      The attached matrix: the base matrix with Valiant's gadget attached at every site, on the flat node type.

                                                      Equations
                                                      Instances For
                                                        Dependency graph

                                                        The entries of the attached matrix are between -1 and 3.

                                                        Dependency graph
                                                        Dependency graph
                                                        theorem DescriptiveComplexity.SatCover.ite_one_eq_iff {k : ℤ} (_hk : k ≠ 0) (P : Prop) [Decidable P] :
                                                        (if P then 1 else 0) = k ↔ k = 1 ∧ P
                                                        Dependency graph
                                                        theorem DescriptiveComplexity.SatCover.ite_add_ite_eq_iff {k : ℤ} (_hk : k ≠ 0) (P Q : Prop) [Decidable P] [Decidable Q] (hPQ : ¬(P ∧ Q)) :
                                                        ((if P then 1 else 0) + if Q then 1 else 0) = k ↔ k = 1 ∧ (P ∨ Q)
                                                        Dependency graph
                                                        theorem DescriptiveComplexity.SatCover.ite_eq_iff_of_ne {k z : ℤ} (_hk : k ≠ 0) (P : Prop) [Decidable P] :
                                                        (if P then z else 0) = k ↔ P ∧ z = k
                                                        Dependency graph

                                                        The levels #

                                                        The levels of the ladders, as a relativized interpretation into the empty vocabulary: the number of levels is then a definable cardinality.

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

                                                          The levels: the universe of the interpretation of the levels, ordered lexicographically.

                                                          Equations
                                                          Instances For
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            theorem DescriptiveComplexity.SatCover.levelDom_of {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] (ℓ : Level A) :
                                                            LevelDom (↑ℓ).1 ((↑ℓ).2 0) ((↑ℓ).2 1)
                                                            Dependency graph

                                                            A level, from its tag and its pair.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              theorem DescriptiveComplexity.SatCover.mkLevel_eq {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] (ℓ : Level A) :
                                                              mkLevel (↑ℓ).1 ((↑ℓ).2 0) ((↑ℓ).2 1) ⋯ = ℓ
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              theorem DescriptiveComplexity.SatCover.tupLeLex_two {A : Type} [LinearOrder A] (c x c' x' : A) :
                                                              tupLeLex ![c, x] ![c', x'] ↔ c < c' ∨ c = c' ∧ x ≤ x'
                                                              Dependency graph

                                                              Realization of the level formulas and of the widths #

                                                              theorem DescriptiveComplexity.SatCover.realize_levelCovF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : α → A} {t t' : LevelTag} {c x c' x' : α} (h : LevelDom t (v c) (v x)) (h' : LevelDom t' (v c') (v x')) :
                                                              (levelCovF t t' c x c' x').Realize v ↔ mkLevel t (v c) (v x) h ⋖ mkLevel t' (v c') (v x') h'
                                                              Dependency graph