论文标题
关于开放逻辑关系的多功能性:连续性,自动分化和遏制定理
On the Versatility of Open Logical Relations: Continuity, Automatic Differentiation, and a Containment Theorem
论文作者
论文摘要
逻辑关系是编程语言理论中最强大的技术之一,并且已广泛用于证明各种高阶计算的属性。但是,有些属性不能立即通过逻辑关系来证明,例如程序的连续性和以实值函数扩展的高阶语言中的不同属性。从非正式的角度来看,问题源于以下事实:这些属性自然是根据非地面类型(或等效地,按基本类型的开放条件)表示,并且对于基本情况(即,对于地面类型的封闭条款)没有明显的良好定义。为了克服这个问题,我们研究了逻辑关系的概念的概括,称为\ emph {开放逻辑关系},并证明它可以在感兴趣的属性上是关于一阶类型的表达的多种情况下的效率应用。我们的设置是一个简单的$λ$ -CALCULUS,具有来自给定集合的实数和实现的一阶功能,例如连续或可区分的功能之一。我们首先证明了一个遏制定理,该定理表明,对于任何此类功能的集合,包括投影功能和函数组成下的封闭功能,任何一阶类型的任何术语术语表示属于该集合的函数。然后,我们通过开放逻辑关系显示了最近发表的算法的核心,用于远期自动分化。最后,我们定义了一种基于改进的类型系统,用于局部连续性,以通过有条件的条件扩展我们的微积分,并使用开放的逻辑关系证明类型系统的健全性。
Logical relations are one of the most powerful techniques in the theory of programming languages, and have been used extensively for proving properties of a variety of higher-order calculi. However, there are properties that cannot be immediately proved by means of logical relations, for instance program continuity and differentiability in higher-order languages extended with real-valued functions. Informally, the problem stems from the fact that these properties are naturally expressed on terms of non-ground type (or, equivalently, on open terms of base type), and there is no apparent good definition for a base case (i.e. for closed terms of ground types). To overcome this issue, we study a generalization of the concept of a logical relation, called \emph{open logical relation}, and prove that it can be fruitfully applied in several contexts in which the property of interest is about expressions of first-order type. Our setting is a simply-typed $λ$-calculus enriched with real numbers and real-valued first-order functions from a given set, such as the one of continuous or differentiable functions. We first prove a containment theorem stating that for any such a collection of functions including projection functions and closed under function composition, any well-typed term of first-order type denotes a function belonging to that collection. Then, we show by way of open logical relations the correctness of the core of a recently published algorithm for forward automatic differentiation. Finally, we define a refinement-based type system for local continuity in an extension of our calculus with conditionals, and prove the soundness of the type system using open logical relations.