Documentation

Lean.Meta.Tactic.Grind.Arith.Cutsat.ReorderVars

Collect variable information

  • maxLowerCoeff : Nat
  • maxUpperCoeff : Nat
  • maxDvdCoeff : Nat
Instances For

    We order variables in decreasing order of "cost". We use the lexicographical order of two different costs. The first one is the max (min lowerCoeff upperCoeff) dvdCoeff. Recall that we use cooper-left if the coefficient of the lower bound is smaller, and cooper-right otherwise. This is way we use the min lowerCoeff upperCoeff. The coefficient of the divisibility constraint also impacts the size of the search space. Then, we break ties using the max of all of them, and then the variable original order.

    def Lean.Meta.Grind.Arith.Cutsat.reorderVarMap {α : Type u_1} [Inhabited α] (m : PArray α) (new2old : Array Var) :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Reorders the variables according to cmp when it pays off. Variables created after a reordering (e.g., by later E-matching rounds) are appended to the order, so an expensive one may end up after the cheap ones it appears with, and the Cooper case splits that eliminate it enumerate its coefficient. The first reordering applies the full order; a later one is performed only when a variable with cost₁ > 1 is out of place, so that cheap problems do not accumulate epochs (see State.varsHistory).

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