Documentation

DescriptiveComplexity.OccurrenceFormulas

First-order formulas for literal occurrences, over the ordered expansion #

First-order counterpart of DescriptiveComplexity.OccurrenceOrder, shared by the reductions from SAT (to 3-colorability, to 3SAT…): parameterized formula builders over the ordered expansion Language.sat.sum Language.order (DescriptiveComplexity.SatOcc.satOrd) mirroring the semantic predicates on literal occurrences – occF for OccIn, minOccF/maxOccF for MinOcc/MaxOcc, succOccF for SuccOcc, chainedF for Chained, emptyClF for EmptyCl, … – together with their realization lemmas (realize_occF…).

All builders are parameterized by the indices of their free variables, so that they can be instantiated at any variable type (in particular under quantifiers). Occurrence signs are static (Lean-level) Bool parameters: a quantification over signs becomes a finite conjunction or disjunction of formulas.

@[reducible, inline]

The ordered expansion of the language of CNF instances.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The symbol for “is a clause” in the ordered expansion.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The symbol for “occurs positively in” in the ordered expansion.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The symbol for “occurs negatively in” in the ordered expansion.

        Equations
        Instances For
          Dependency graph

          Formula builders #

          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          def DescriptiveComplexity.SatOcc.occF {α : Type} (s : Bool) (c x : α) :

          The literal (x, s) occurs in the clause c, as a formula.

          Equations
          Instances For
            Dependency graph
            def DescriptiveComplexity.SatOcc.occLtF {α : Type} (s t : Bool) (x y : α) :

            The occurrence position (x, s) precedes (y, t), as a formula (the signs are fixed parameters, so this is just or < on the variables).

            Equations
            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.SatOcc.existsEarlierF {α : Type} (s : Bool) (c x : α) :

              Some occurrence of c lies strictly before (x, s), as a formula.

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

                Some occurrence of c lies strictly after (x, s), as a formula.

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

                  (x, s) is the first occurrence of c, as a formula.

                  Equations
                  Instances For
                    Dependency graph
                    noncomputable def DescriptiveComplexity.SatOcc.maxOccF {α : Type} (s : Bool) (c x : α) :

                    (x, s) is the last occurrence of c, as a formula.

                    Equations
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.SatOcc.chainedF {α : Type} (s : Bool) (c x : α) :

                      (x, s) is a non-first occurrence of c, as a formula.

                      Equations
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.SatOcc.succOccF {α : Type} (t s : Bool) (c y x : α) :

                        (x, s) is an occurrence of c immediately preceded by the occurrence (y, t), as a formula.

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

                          (x, s) is the unique literal of some clause, as a formula.

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

                            c is an empty clause, as a formula.

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

                              Some clause is empty, as a (closed) formula: the standard spoiler condition of reductions from SAT, making the whole CNF unsatisfiable.

                              Equations
                              Instances For
                                Dependency graph

                                Realization lemmas #

                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_clF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {c : α} :
                                (clF c).Realize v IsCl (v c)
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_posF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {c x : α} :
                                (posF c x).Realize v PosIn (v c) (v x)
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_negF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {c x : α} :
                                (negF c x).Realize v NegIn (v c) (v x)
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_leF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {x y : α} :
                                (leF x y).Realize v v x v y
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_eqF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {x y : α} :
                                (eqF x y).Realize v v x = v y
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_ltF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {x y : α} :
                                (ltF x y).Realize v v x < v y
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_occF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {c x : α} :
                                (occF s c x).Realize v OccIn (v c) (v x) s
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_occLtF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s t : Bool} {x y : α} :
                                (occLtF s t x y).Realize v occLt (v x) s (v y) t
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_existsEarlierF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {c x : α} :
                                (existsEarlierF s c x).Realize v ∃ (y : A) (t : Bool), OccIn (v c) y t occLt y t (v x) s
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_existsLaterF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {c x : α} :
                                (existsLaterF s c x).Realize v ∃ (y : A) (t : Bool), OccIn (v c) y t occLt (v x) s y t
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_minOccF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {c x : α} :
                                (minOccF s c x).Realize v MinOcc (v c) (v x) s
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_maxOccF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {c x : α} :
                                (maxOccF s c x).Realize v MaxOcc (v c) (v x) s
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_chainedF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {c x : α} :
                                (chainedF s c x).Realize v Chained (v c) (v x) s
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_succOccF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {t s : Bool} {c y x : α} :
                                (succOccF t s c y x).Realize v SuccOcc (v c) (v y) t (v x) s
                                Dependency graph
                                @[simp]
                                theorem DescriptiveComplexity.SatOcc.realize_unitLitF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {s : Bool} {x : α} :
                                (unitLitF s x).Realize v ∃ (c : A), MinOcc c (v x) s MaxOcc c (v x) s
                                Dependency graph
                                Dependency graph
                                Dependency graph