Documentation

MIPRE.Foundations.Introspection.DecisionPreparation

Preparing shared resources for the introspection decision kernel #

The uniform program receives cons (encode ((S,D),λ)) raw. It generates the single unary clock, exponential source index, canonical unary Pauli parameters and binary register bounds. The raw decision input and source metadata are retained verbatim. A fixed polynomial-time kernel then consumes these resources.

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

      The output format, before any kernel-specific conversion.

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

        The same prepared layout with canonically supplied source programs typed.

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

          Getters are total even on malformed output trees. Program metadata is retained as data; its canonical sampler/decider projections are named below.

          Equations
          Instances For
            theorem MIPRE.Introspection.DecisionPreparation.appendStage_runs (arg : Cost.PolyTimeFun Cost.Data Cost.Data) {p : Cost.Prog} (hp : Cost.Prog.WellScoped 1 p) (x r : Cost.Data) (t : ℕ) (hr : p.Runs (arg.toFun x) r t) :
            ∃ (time : ℕ), (appendStage arg p).Runs x (x.cons r) time
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Sequence closed programs, retaining the ambient input discipline.

                            Equations
                            Instances For
                              theorem MIPRE.Introspection.DecisionPreparation.sequence_runs {p q : Cost.Prog} (hq : Cost.Prog.WellScoped 1 q) {x y z : Cost.Data} {s t : ℕ} (hp : p.Runs x y s) (hr : q.Runs y z t) :
                              (sequence p q).Runs x z (s + t + 1)

                              The budget appears once in the program; all later stages only retain it.

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

                                        Exact resource preparation is total for every input tree, including zero parameters and malformed raw decision inputs.

                                        The compiler specializes only the binary source metadata.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          theorem MIPRE.Introspection.DecisionPreparation.compiler_runs (c : ℕ) (kernel : Cost.PolyTimeFun KernelInput Bool) (M : Metadata) (x : Cost.Data) :
                                          ∃ (time : ℕ), ((compiler c kernel).toFun M).Runs x (Cost.encode (kernel.toFun (kernelInput c M x))) time