Documentation

MIPRE.Foundations.CL.DetypingProgFinite

Total finite query programs #

A fixed finite data table is an actual closed ambient program, total on every tree and polynomial in the size of that tree. The constants depend on the table; this lemma makes no uniform polynomial claim about its construction.

theorem MIPRE.Cost.PolyTimeFun.bits_prefix_unique (a b : Data) (xs ys : BitStr) (h : a.toBits ++ xs = b.toBits ++ ys) :
a = b ∧ xs = ys

Equality of arbitrary trees, through their injective serialization.

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

    A tree's right child, with a fixed default for a leaf.

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

      A tree's left child, with a fixed default for a leaf.

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

        First matching key, or nil. The function assigned to keys need not itself be computable: only its finitely many values become constants in the program.

        Equations
        Instances For
          theorem MIPRE.Cost.PolyTimeFun.finiteTable_apply_of_mem (f : Data → Data) (xs : List Data) (d : Data) (hd : d ∈ xs) :
          (finiteTable f xs).toFun d = f d
          noncomputable def MIPRE.Cost.PolyTimeFun.finiteFunction {α : Type u_1} {β : Type u_2} [Fintype α] [SizedEncoding α] [SizedEncoding β] (f : α → β) :

          Every fixed function on a finite, faithfully encoded domain has a concrete polynomial-time table program. No uniform bound in the domain's cardinality is asserted.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem MIPRE.Cost.PolyTimeFun.finiteFunction_apply {α : Type u_1} {β : Type u_2} [Fintype α] [SizedEncoding α] [SizedEncoding β] (f : α → β) (a : α) :