Guarded association-list sampler caches for word-oracle simulations #
Runs a single-channel WordOracleComp against an association-list cache (memoize) that draws
independent replies from a word sampler on valid queries (valid query = true) and answers invalid
queries with [] without modifying the cache.
Main definitions #
Cslib.Probability.cachedSamplerOracle: closed stateful word-oracle handler memoizing aProbComp (List Bool)sampler on valid queries and returning[]on invalid queries.Cslib.Probability.cachedDistOracle: distribution-level (PMF) counterpart ofcachedSamplerOracle.
Main results #
Cslib.Probability.eval_cachedSamplerOracle:ProbComp.evalidentifiescachedSamplerOraclewithcachedDistOracle.Cslib.Probability.cachedSamplerOracle_cache_of_mem_support,Cslib.Probability.cachedSamplerOracle_support: per-call cache characterization (hit/invalid retention or fresh-query prepend), length growth (≤ +1), and key-validity preservation.Cslib.Probability.valid_of_mem_runState_cachedSamplerOracle: every key stored in the final cache of a run from[]satisfiesvalid.Cslib.Probability.isPPTOn_cachedSamplerOracle,Cslib.Probability.isPPTOn_runState_cachedSamplerOracle: per-call (@[fun_prop]) and whole-run uniform strict-PPT certificates forcachedSamplerOracle.Cslib.Probability.closeTo_cachedDistOracle: per-call statistical distance preservation forcachedDistOracle.
Evaluating cachedSamplerOracle yields cachedDistOracle on ProbComp.eval sampleReply.
A call to cachedSamplerOracle either leaves the cache untouched or prepends the reply to a
fresh valid query.
A call to cachedSamplerOracle adds at most one entry and preserves validity of cached keys.
Every key recorded in the final cache of a runState execution against cachedSamplerOracle
from [] satisfies valid.
Each call to cachedSamplerOracle charges the validity test, sampling, query and complete
input/output cache.
Running a strict oracle-PPT word program against cachedSamplerOracle from [] is uniform
strict PPT when prepare and valid are computable in polynomial time and sampleReply is
uniform strict PPT.