Documentation

MIPRE.Foundations.SAT.Rename

Renaming formula inputs in polynomial time #

The padding construction changes the offsets of the five index blocks and their sign bits. Renaming scans the post-order serialization, applying an ambient program only at input nodes. renameBy uses a finite table and the binary-indexed lookup program, so its cost does not assume that all input indices are small.

@[simp]
theorem MIPRE.SAT.Fml.eval_rename (ρ : ℕ → ℕ) (f : Fml) (x : ℕ → Bool) :
eval x (rename ρ f) = eval (x ∘ ρ) f
@[simp]
theorem MIPRE.SAT.Fml.size_rename (ρ : ℕ → ℕ) (f : Fml) :
(rename ρ f).size = f.size
theorem MIPRE.SAT.Fml.eval_congr_of_inputsLt {n : ℕ} {f : Fml} (hf : InputsLt n f) (x y : ℕ → Bool) (hxy : ∀ i < n, x i = y i) :
eval x f = eval y f

Only the input positions used by a bounded formula affect its value.

theorem MIPRE.SAT.Fml.InputsLt.rename {n m : ℕ} {f : Fml} (hf : InputsLt n f) (ρ : ℕ → ℕ) (hρ : ∀ i < n, ρ i < m) :
theorem MIPRE.SAT.Fml.rpn_rename (ρ : ℕ → ℕ) (f : Fml) :
Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem MIPRE.SAT.Fml.renameNodeProg_apply {α : Type u_1} [Cost.SizedEncoding α] (R : Cost.PolyTimeFun (α × ℕ) ℕ) (a : α) (nd : Node) :
    (renameNodeProg R).toFun (a, nd) = Node.rename (fun (i : ℕ) => R.toFun (a, i)) nd

    Any polynomial-time index transformation gives a polynomial-time formula renaming.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[simp]
      theorem MIPRE.SAT.Fml.renameProg_apply {α : Type u_1} [Cost.SizedEncoding α] (R : Cost.PolyTimeFun (α × ℕ) ℕ) (p : α × Fml) :
      (renameProg R).toFun p = rename (fun (i : ℕ) => R.toFun (p.1, i)) p.2

      Rename inputs using the supplied table; an out-of-range index maps to zero.

      Equations
      Instances For
        @[simp]
        theorem MIPRE.SAT.Fml.renameBy_apply (ρ : List ℕ) (f : Fml) :
        renameBy.toFun (ρ, f) = rename (fun (i : ℕ) => ρ.getD i 0) f