Documentation

CslibFrontier.Computability.Probabilistic.PPT.AuxClock.Basic

Public primary-input clock contracts #

IsPPTWithAux and IsOraclePPTWithAux clock a machine in the primary encoded input alone, independently of its arbitrary auxiliary suffix. Basic machine introduction and semantic congruence facts accompany the definitions. Prefix-truncation machines and their proofs are internal implementations exported through the PPT.AuxClock facade.

def Cslib.Probability.IsPPTWithAux {α β : Type} (input : α ↪ List Bool) (output : β ↪ List Bool) (program : α → List Bool → ProbComp β) :

Closed uniform strict PPT clocked in the primary input. One finite fair-coin machine runs on the pair encoding encPair input encBits (a, z) = frame (input a) ++ z, clocked by a polynomial c * ((input a).length + 1) ^ d in the primary input length (input a).length alone.

def Cslib.Probability.IsOraclePPTWithAux {Operation α β : Type} [DecidableEq Operation] (input : α ↪ List Bool) (output : β ↪ List Bool) (program : α → List Bool → WordOracleComp Operation β) :

Oracle uniform strict PPT clocked in the primary input. One finite oracle fair-coin machine runs on encPair input encBits (a, z) = frame (input a) ++ z, clocked by a polynomial c * ((input a).length + 1) ^ d in (input a).length alone, preserving the full joint output and external oracle state for every stateful handler.

theorem Cslib.Probability.IsPPTWithAux.of_machine {α : Type} {input : α ↪ List Bool} {k : ℕ} {State : Type} [Finite State] (machine : Turing.MultiTapePTM k Bool State) (c d : ℕ) :
IsPPTWithAux input Turing.MultiTapeTM.encBits fun (a : α) (z : List Bool) => machine.runClosed (c * ((input a).length + 1) ^ d) ((Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encBits) (a, z))

A fixed finite-control closed machine and polynomial clock in the primary input supply an IsPPTWithAux certificate directly.

theorem Cslib.Probability.IsPPTWithAux.congr {α β : Type} {input : α ↪ List Bool} {output : β ↪ List Bool} {program program' : α → List Bool → ProbComp β} (h : IsPPTWithAux input output program) (heq : ∀ (a : α) (z : List Bool), (program a z).eval = (program' a z).eval) :
IsPPTWithAux input output program'

Distributional equality preserves IsPPTWithAux.

theorem Cslib.Probability.IsOraclePPTWithAux.of_machine {Operation α : Type} [DecidableEq Operation] {input : α ↪ List Bool} [Finite Operation] {k : ℕ} {Control : Type} [Finite Control] (machine : Turing.MultiTapePTM k Bool Control Operation) (c d : ℕ) :

A fixed finite-control oracle machine and polynomial clock in the primary input supply an IsOraclePPTWithAux certificate directly.

theorem Cslib.Probability.IsOraclePPTWithAux.congr {Operation α β : Type} [DecidableEq Operation] {input : α ↪ List Bool} {output : β ↪ List Bool} {program program' : α → List Bool → WordOracleComp Operation β} (h : IsOraclePPTWithAux input output program) (heq : ∀ (a : α) (z : List Bool) (State : Type) (oracle : Operation × List Bool → StateT State PMF (List Bool)) (s : State), ProbOracleComp.runWith oracle (program a z) s = ProbOracleComp.runWith oracle (program' a z) s) :
IsOraclePPTWithAux input output program'

Equality of the complete stateful semantics preserves IsOraclePPTWithAux.