Documentation

Mathlib.Combinatorics.Optimization.ValuedCSP

General-Valued Constraint Satisfaction Problems #

General-Valued CSP is a very broad class of problems in discrete optimization. General-Valued CSP subsumes Min-Cost-Hom (including 3-SAT for example) and Finite-Valued CSP.

Main definitions #

References #

@[reducible, inline]
abbrev ValuedCSP (D : Type u_1) (C : Type u_2) [AddCommMonoid C] [PartialOrder C] [IsOrderedAddMonoid C] :
Type (max u_1 u_2)

A template for a valued CSP problem over a domain D with costs in C. Regarding C we want to support Bool, Nat, ENat, Int, Rat, NNRat, Real, NNReal, EReal, ENNReal, and tuples made of any of those types.

Instances For
    structure ValuedCSP.Term {D : Type u_1} {C : Type u_2} [AddCommMonoid C] [PartialOrder C] [IsOrderedAddMonoid C] (Ξ“ : ValuedCSP D C) (ΞΉ : Type u_3) :
    Type (max (max u_1 u_2) u_3)

    A term in a valued CSP instance over the template Ξ“.

    • n : β„•

      Arity of the function

    • f : (Fin self.n β†’ D) β†’ C

      Which cost function is instantiated

    • inΞ“ : ⟨self.n, self.f⟩ ∈ Ξ“

      The cost function comes from the template

    • app : Fin self.n β†’ ΞΉ

      Which variables are plugged as arguments to the cost function

    Instances For
      def ValuedCSP.Term.evalSolution {D : Type u_1} {C : Type u_2} [AddCommMonoid C] [PartialOrder C] [IsOrderedAddMonoid C] {Ξ“ : ValuedCSP D C} {ΞΉ : Type u_3} (t : Ξ“.Term ΞΉ) (x : ΞΉ β†’ D) :
      C

      Evaluation of a Ξ“ term t for given solution x.

      Instances For
        @[reducible, inline]
        abbrev ValuedCSP.Instance {D : Type u_1} {C : Type u_2} [AddCommMonoid C] [PartialOrder C] [IsOrderedAddMonoid C] (Ξ“ : ValuedCSP D C) (ΞΉ : Type u_3) :
        Type (max (max u_1 u_2) u_3)

        A valued CSP instance over the template Ξ“ with variables indexed by ΞΉ.

        Instances For
          def ValuedCSP.Instance.evalSolution {D : Type u_1} {C : Type u_2} [AddCommMonoid C] [PartialOrder C] [IsOrderedAddMonoid C] {Ξ“ : ValuedCSP D C} {ΞΉ : Type u_3} (I : Ξ“.Instance ΞΉ) (x : ΞΉ β†’ D) :
          C

          Evaluation of a Ξ“ instance I for given solution x.

          Instances For
            def ValuedCSP.Instance.IsOptimumSolution {D : Type u_1} {C : Type u_2} [AddCommMonoid C] [PartialOrder C] [IsOrderedAddMonoid C] {Ξ“ : ValuedCSP D C} {ΞΉ : Type u_3} (I : Ξ“.Instance ΞΉ) (x : ΞΉ β†’ D) :

            Condition for x being an optimum solution (min) to given Ξ“ instance I.

            Instances For
              def Function.HasMaxCutPropertyAt {D : Type u_1} {C : Type u_2} [PartialOrder C] (f : (Fin 2 β†’ D) β†’ C) (a b : D) :

              Function f has Max-Cut property at labels a and b when argmin f is exactly { ![a, b], ![b, a] }.

              Instances For
                def Function.HasMaxCutProperty {D : Type u_1} {C : Type u_2} [PartialOrder C] (f : (Fin 2 β†’ D) β†’ C) :

                Function f has Max-Cut property at some two non-identical labels.

                Instances For
                  @[reducible, inline]
                  abbrev FractionalOperation (D : Type u_3) (m : β„•) :
                  Type u_3

                  Fractional operation is a finite unordered collection of D^m β†’ D possibly with duplicates.

                  Instances For
                    def FractionalOperation.size {D : Type u_1} {m : β„•} (Ο‰ : FractionalOperation D m) :
                    β„•

                    Arity of the "output" of the fractional operation.

                    Instances For
                      def FractionalOperation.IsValid {D : Type u_1} {m : β„•} (Ο‰ : FractionalOperation D m) :

                      Fractional operation is valid iff nonempty.

                      Instances For
                        theorem FractionalOperation.IsValid.contains {D : Type u_1} {m : β„•} {Ο‰ : FractionalOperation D m} (valid : Ο‰.IsValid) :
                        βˆƒ (g : (Fin m β†’ D) β†’ D), g ∈ Ο‰

                        Valid fractional operation contains an operation.

                        def FractionalOperation.tt {D : Type u_1} {m : β„•} {ΞΉ : Type u_3} (Ο‰ : FractionalOperation D m) (x : Fin m β†’ ΞΉ β†’ D) :
                        Multiset (ΞΉ β†’ D)

                        Fractional operation applied to a transposed table of values.

                        Instances For
                          def Function.AdmitsFractional {D : Type u_1} {C : Type u_2} [AddCommMonoid C] [PartialOrder C] {m n : β„•} (f : (Fin n β†’ D) β†’ C) (Ο‰ : FractionalOperation D m) :

                          Cost function admits given fractional operation, i.e., Ο‰ improves f in the ≀ sense.

                          Instances For

                            Fractional operation is a fractional polymorphism for given VCSP template.

                            Instances For
                              def FractionalOperation.IsSymmetric {D : Type u_1} {m : β„•} (Ο‰ : FractionalOperation D m) :

                              Fractional operation is symmetric.

                              Instances For

                                Fractional operation is a symmetric fractional polymorphism for given VCSP template.

                                Instances For
                                  theorem Function.HasMaxCutPropertyAt.rows_lt_aux {D : Type u_1} {C : Type u_3} [PartialOrder C] {f : (Fin 2 β†’ D) β†’ C} {a b : D} (mcf : HasMaxCutPropertyAt f a b) (hab : a β‰  b) {Ο‰ : FractionalOperation D 2} (symmega : Ο‰.IsSymmetric) {r : Fin 2 β†’ D} (rin : r ∈ Ο‰.tt ![![a, b], ![b, a]]) :
                                  f ![a, b] < f r
                                  theorem Function.HasMaxCutProperty.forbids_commutativeFractionalPolymorphism {D : Type u_1} {C : Type u_3} [AddCommMonoid C] [PartialOrder C] [IsOrderedCancelAddMonoid C] {f : (Fin 2 β†’ D) β†’ C} (mcf : HasMaxCutProperty f) {Ο‰ : FractionalOperation D 2} (valid : Ο‰.IsValid) (symmega : Ο‰.IsSymmetric) :
                                  Β¬AdmitsFractional f Ο‰