Documentation

CslibFrontier.Computability.Complexity.Classes.Promise.Time

Bounded-error promise computation at a prescribed time #

PromiseBPTIME enc T fixes a native fair-coin machine and an affine clock c₁ * T n + c₂ before the input. Every run halts within that clock, including off-promise runs. On yes-instances the output is [true] with probability at least 2/3, and on no-instances it is [false] with probability at least 2/3. No probability gap or answer is required outside the promise.

This is the library's time-indexed native-machine convention, extending BPTIME to partial promises: a decision problem is in PromiseBPTIME exactly when it is in BPTIME. It does not define the class through bounded-error total completions. A strict-majority completion belongs to PPTIME at the same caller-supplied clock, with ties rejecting; this is not a bounded-error completion in BPTIME.

The characterization by sample-and-verify and coin replay at the same clock, up to constant factors, is in CslibFrontier.Computability.Complexity.Classes.Promise.Time.Verifier.

Main definitions #

Main results #

def Turing.MultiTapePTM.SolvesPromiseWithBoundedErrorInTime {α : Type u_1} {k : ℕ} {State : Type} (machine : MultiTapePTM k Bool State) (enc : α ↪ List Bool) (Q : Cslib.Complexity.PromiseProblem α) (t : α → ℕ) :

Every run halts by t; bounded error is required only on the two sides of the promise.

Instances For
    theorem Turing.MultiTapePTM.SolvesPromiseWithBoundedErrorInTime.mono {α : Type u_1} {k : ℕ} {State : Type} {machine : MultiTapePTM k Bool State} {enc : α ↪ List Bool} {Q : Cslib.Complexity.PromiseProblem α} {t t' : α → ℕ} (h : machine.SolvesPromiseWithBoundedErrorInTime enc Q t) (ht : ∀ (a : α), t a ≤ t' a) :

    A sufficiently long clock may be enlarged without changing the output law.

    theorem Turing.MultiTapePTM.SolvesPromiseWithBoundedErrorInTime.of_subset {α : Type u_1} {k : ℕ} {State : Type} {machine : MultiTapePTM k Bool State} {enc : α ↪ List Bool} {Q Q' : Cslib.Complexity.PromiseProblem α} {t : α → ℕ} (h : machine.SolvesPromiseWithBoundedErrorInTime enc Q t) (hyes : Q'.yes ⊆ Q.yes) (hno : Q'.no ⊆ Q.no) :

    A machine solving a promise problem solves every promise problem with fewer yes-instances and fewer no-instances.

    On a decision problem, solving with bounded error is deciding with bounded error.

    def Cslib.Complexity.PromiseBPTIME {α : Type u_1} (enc : α ↪ List Bool) (T : ℕ → ℕ) :

    Native bounded-error promise problems with fixed machine parameters and affine time T. All encoded inputs terminate, but the error conditions only constrain promised inputs.

    Instances For
      theorem Cslib.Complexity.PromiseBPTIME_mono {α : Type u_1} {enc : α ↪ List Bool} {T₁ T₂ : ℕ → ℕ} (h : ∀ (n : ℕ), T₁ n ≤ T₂ n) :
      PromiseBPTIME enc T₁ ⊆ PromiseBPTIME enc T₂

      Membership is monotone in the caller's time bound.

      theorem Cslib.Complexity.mem_PromiseBPTIME_of_subset {α : Type u_1} {enc : α ↪ List Bool} {T : ℕ → ℕ} {Q Q' : PromiseProblem α} (hQ : Q ∈ PromiseBPTIME enc T) (hyes : Q'.yes ⊆ Q.yes) (hno : Q'.no ⊆ Q.no) :

      A promise problem with fewer yes-instances and fewer no-instances than one in PromiseBPTIME is in PromiseBPTIME.

      @[simp]
      theorem Cslib.Complexity.ofSet_mem_PromiseBPTIME {α : Type u_1} {enc : α ↪ List Bool} {T : ℕ → ℕ} {A : Set α} :

      A decision problem, as a promise problem, is in PromiseBPTIME exactly when it is in BPTIME.

      A bounded-error total completion supplies a native bounded-error promise solver.

      Accepting by strict majority completes the promise in PPTIME without changing its clock. The completion may have an exact tie outside the promise; it need not belong to BPTIME.