Documentation

MIPRE.Foundations.Halting.Paper.Build

Building the decider 𝒟^halt from (M, λ), in polynomial time #

The class verifier of the polynomial-time halting reduction runs, on input z, the verifier 𝒱^halt M λ of Paper/Decider.lean for the machine M = R z at the parameter λ = Λ₀ + 4|M|; so it must compute the description of dec M λ from M and λ. That description is a fixed tree with M's and λ's encodings at two positions (Paper/Size.lean computed its size): dec M λ = hardcode K (encode K) for K = kleeneProg univ F, and F's code holds body, M and λ as constants. decBuild assembles the tree with pair and const over Data (kleeneData, fcodeData, fixData are the three shapes) and is a PolyTimeFun (Prog × ℕ) Prog. Beside it, lamF computes the parameter Λ₀ + 4|M| and cutF K D the answer cutoff 2 ^ (K + D · |λ|) that the class decider applies before running 𝒱^halt's decider — a power of two so that it can be computed from |λ| in unary (expBits), and polynomial in λ since 2 ^ |λ| ≤ 32 λ ^ 4.

The three shapes #

The description of F.code from those of body, M and λ.

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

    The description of kleeneProg univ F from those of univ and F.code.

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

      The description of hardcode K (encode K) from that of K.

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

        The shapes as polynomial-time functions #

        fcodeData bodyD on (M, λ), as nested pairs of Data.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem MIPRE.Halting.fcodeF_apply (bodyD : Cost.Data) (p : Cost.Prog × ℕ) :
          (fcodeF bodyD).toFun p = fcodeData bodyD p.1.toData (Cost.encode p.2)

          kleeneData univD on fD, as nested pairs of Data.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem MIPRE.Halting.kleeneF_apply (univD fD : Cost.Data) :
            (kleeneF univD).toFun fD = kleeneData univD fD

            fixData on kD, as nested pairs of Data.

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

              The decider's description from (M, λ), in polynomial time.

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

                The parameter and the cutoff #

                noncomputable def MIPRE.Halting.lamF (Λ₀ : ℕ) :

                M ↦ Λ₀ + 4|M|: the size of M in unary, four copies, plus the constant, read in binary.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  theorem MIPRE.Halting.lamF_apply (Λ₀ : ℕ) (M : Cost.Prog) :
                  (lamF Λ₀).toFun M = Λ₀ + 4 * Cost.esize M
                  noncomputable def MIPRE.Halting.cutF (K D : ℕ) :

                  λ ↦ 2 ^ (K + D · |λ|): the answer cutoff of the class decider.

                  Equations
                  Instances For
                    @[simp]
                    theorem MIPRE.Halting.cutF_apply (K D lam : ℕ) :
                    (cutF K D).toFun lam = 2 ^ (K + D * Cost.esize lam)

                    A bit string of length k encodes to at least 2k + 1 nodes.

                    A bit string of length k encodes to at most 4k + 1 nodes.

                    The binary length of n is at most the size of its encoding.

                    A polynomial with natural coefficients is at most A · (x + 1) ^ D, for A the sum of its coefficients and D its degree.

                    theorem MIPRE.Halting.exists_cut_ge (G : GapCompression) :
                    ∃ (K : ℕ), ∀ (lam : ℕ), Polynomial.eval (C G + lam) G.bound ≤ 2 ^ (K + G.bound.natDegree * Cost.esize lam)

                    The cutoff dominates the compressor's bound: for K large enough in terms of G and C, poly(C, λ) ≤ 2 ^ (K + deg · |λ|) for every λ, where deg is the degree of G.bound.