Sheaves as oracle computations
2026-02-25 • Logic in Computer Science
Logic in Computer Science
AI summaryⓘ
The authors study oracles in type theory, which can be seen as a way to ask questions and get answers during reasoning. They show that every modality (a way to control what is known) corresponds to such an oracle setup. They also explore how these oracle ideas relate to sheaves, which are structured collections of data, and describe how to build and understand them using special kinds of computation trees. Finally, they apply their findings to describe certain logical topologies in a mathematical framework called a realizability topos.
type theoryoraclemodalitypredicatesheafmonadLawvere-Tierney topologyrealizability toposadjoint functorcontainer
Authors
Danel Ahman, Andrej Bauer
Abstract
In type theory, an oracle may be specified abstractly by a predicate whose domain is the type of queries asked of the oracle, and whose proofs are the oracle answers. Such a specification induces an oracle modality that captures a computational intuition about oracles: at each step of reasoning we either know the result, or we ask the oracle a query and proceed upon receiving an answer. We characterize an oracle modality as the least one forcing the given predicate. We establish an adjoint retraction between modalities and propositional containers, from which it follows that every modality is an oracle modality. The left adjoint maps sums to suprema, which makes suprema of modalities easy to compute when they are given in terms of oracle modalities. We also study sheaves for oracle modalities. We describe sheafification in terms of a quotient-inductive type of computation trees, and describe sheaves as algebras for the corresponding monad. We also introduce equifoliate trees, an intensional notion of oracle computation given by a (non-propositional) container. Equifoliate trees descend to sheaves, and lift from sheaves in case the container is projective. As an application, we give a concrete description of all Lawvere-Tierney topologies in a realizability topos, closely related to a game-theoretic characterization by Takayuki Kihara.