The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.Order.ToInt

12 declarations. Mathlib docs · Source

theorem Mathlib.Tactic.Order.ToInt.exists_translation E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α), ∃ tr, ∀ (i j : Fin n), val i ≤ val j ↔ tr i ≤ tr j

The main theorem asserting the existence of a translation. We use Classical.choose to turn this into a value for use in the order tactic, see toInt.

def Mathlib.Tactic.Order.ToInt.toInt E1 #

{α : Type u_1} → [LinearOrder α] → {n : ℕ} → (Fin n → α) → Fin n → ℤ

Auxiliary definition used by the order tactic to transfer facts in a linear order to ℤ.

theorem Mathlib.Tactic.Order.ToInt.toInt_le_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j : Fin n),
  Mathlib.Tactic.Order.ToInt.toInt val i ≤ Mathlib.Tactic.Order.ToInt.toInt val j ↔ val i ≤ val j

theorem Mathlib.Tactic.Order.ToInt.toInt_lt_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j : Fin n),
  Mathlib.Tactic.Order.ToInt.toInt val i < Mathlib.Tactic.Order.ToInt.toInt val j ↔ val i < val j

theorem Mathlib.Tactic.Order.ToInt.toInt_eq_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j : Fin n),
  Mathlib.Tactic.Order.ToInt.toInt val i = Mathlib.Tactic.Order.ToInt.toInt val j ↔ val i = val j

theorem Mathlib.Tactic.Order.ToInt.toInt_ne_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j : Fin n),
  Mathlib.Tactic.Order.ToInt.toInt val i ≠ Mathlib.Tactic.Order.ToInt.toInt val j ↔ val i ≠ val j

theorem Mathlib.Tactic.Order.ToInt.toInt_nle_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j : Fin n),
  ¬Mathlib.Tactic.Order.ToInt.toInt val i ≤ Mathlib.Tactic.Order.ToInt.toInt val j ↔ ¬val i ≤ val j

theorem Mathlib.Tactic.Order.ToInt.toInt_nlt_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j : Fin n),
  ¬Mathlib.Tactic.Order.ToInt.toInt val i < Mathlib.Tactic.Order.ToInt.toInt val j ↔ ¬val i < val j

theorem Mathlib.Tactic.Order.ToInt.toInt_sup_toInt_eq_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j k : Fin n),
  max (Mathlib.Tactic.Order.ToInt.toInt val i) (Mathlib.Tactic.Order.ToInt.toInt val j) =
      Mathlib.Tactic.Order.ToInt.toInt val k ↔
    max (val i) (val j) = val k

theorem Mathlib.Tactic.Order.ToInt.toInt_inf_toInt_eq_toInt E1 #

∀ {α : Type u_1} [inst : LinearOrder α] {n : ℕ} (val : Fin n → α) (i j k : Fin n),
  min (Mathlib.Tactic.Order.ToInt.toInt val i) (Mathlib.Tactic.Order.ToInt.toInt val j) =
      Mathlib.Tactic.Order.ToInt.toInt val k ↔
    min (val i) (val j) = val k

def Mathlib.Tactic.Order.ToInt.mkFinFun E1 #

{u : Lean.Level} →
  {α :
      have u := u;
      Q(Type u)} →
    Array Q(«$α») → Lean.MetaM Lean.Expr

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.

def Mathlib.Tactic.Order.ToInt.translateToInt E1 #

{u : Lean.Level} →
  (type : Q(Type u)) →
    Q(LinearOrder «$type») →
      Array Mathlib.Tactic.Order.AtomicFact →
        Mathlib.Tactic.AtomM (Std.HashMap ℕ Q(ℤ) × Array Mathlib.Tactic.Order.AtomicFact)

Translates a set of values in a linear ordered type to ℤ, preserving all the facts except for .isTop and .isBot. We assume that these facts are filtered at the preprocessing step.