Translating linear orders to ℤ #
In this file we implement the translation of a problem in any linearly ordered type to a problem in
ℤ. This allows us to use the omega tactic to solve it.
While the core algorithm of the order tactic is complete for the theory of linear orders in the
signature (<, ≤),
it becomes incomplete in the signature with lattice operations ⊓ and ⊔. With these operations,
the problem becomes NP-hard, and the idea is to reuse a smart and efficient procedure, such as
omega.
TODO #
Migrate to grind when it is ready.
The main theorem asserting the existence of a translation.
We use Classical.chooose to turn this into a value for use in the order tactic,
see toInt.
Auxiliary definition used by the order tactic to transfer facts in a linear order to ℤ.
Equations
- Mathlib.Tactic.Order.ToInt.toInt val k = ⋯.choose k
Instances For
Given an array atoms : Array α, create an expression representing a function
f : Fin atoms.size → α such that f n is defeq to atoms[n] for n : Fin atoms.size.
Instances For
Translates a set of values in a linear ordered type to ℤ,
preserving all the facts except for .isTop and .isBot. These facts are filtered at the
preprocessing step.