Development Separation in Lambda-Calculus

Similar documents
Development Separation in Lambda-Calculus

Untyped Lambda Calculus

AN ESTIMATION FOR THE LENGTHS OF REDUCTION SEQUENCES

A Translation of Intersection and Union Types

Strong normalisation and the typed lambda calculus

Unary PCF is Decidable

Maximally Consistent Extensions

Semantics with Applications 2b. Structural Operational Semantics

CS792 Notes Henkin Models, Soundness and Completeness

The Turing Definability of the Relation of Computably Enumerable In. S. Barry Cooper

Characterisation of Strongly Normalising λµ-terms

Sy D. Friedman. August 28, 2001

A relation on 132-avoiding permutation patterns

The Real Numbers. Here we show one way to explicitly construct the real numbers R. First we need a definition.

arxiv: v1 [math.lo] 24 Feb 2014

How not to prove Strong Normalisation

Matching [for] the Lambda Calculus of Objects

Notes on Natural Logic

Generalized Finite Developments

MITCHELL S THEOREM REVISITED. Contents

3 The Model Existence Theorem

Brief Notes on the Category Theoretic Semantics of Simply Typed Lambda Calculus

Lecture 2: The Simple Story of 2-SAT

Continuous images of closed sets in generalized Baire spaces ESI Workshop: Forcing and Large Cardinals

On the Number of Permutations Avoiding a Given Pattern

École normale supérieure, MPRI, M2 Year 2007/2008. Course 2-6 Abstract interpretation: application to verification and static analysis P.

Philipp Moritz Lücke

An effective perfect-set theorem

Introduction to Type Theory August 2007 Types Summer School Bertinoro, It. Herman Geuvers Nijmegen NL. Lecture 3: Polymorphic λ-calculus

Structural Induction

Equivalence between Semimartingales and Itô Processes

4 Martingales in Discrete-Time

Generalising the weak compactness of ω

Orthogonality to the value group is the same as generic stability in C-minimal expansions of ACVF

Decidability and Recursive Languages

Chapter 4. Cardinal Arithmetic.

10.1 Elimination of strictly dominated strategies

LECTURE 3: FREE CENTRAL LIMIT THEOREM AND FREE CUMULANTS

CIS 500 Software Foundations Fall October. CIS 500, 6 October 1

FORCING AND THE HALPERN-LÄUCHLI THEOREM. 1. Introduction This document is a continuation of [1]. It is intended to be part of a larger paper.

Gödel algebras free over finite distributive lattices

Non replication of options

In this lecture, we will use the semantics of our simple language of arithmetic expressions,

Game Theory: Normal Form Games

Subject Reduction and Minimal Types for Higher Order Subtyping

COMBINATORICS OF REDUCTIONS BETWEEN EQUIVALENCE RELATIONS

TABLEAU-BASED DECISION PROCEDURES FOR HYBRID LOGIC

Notes on the symmetric group

ONLY AVAILABLE IN ELECTRONIC FORM

The Binomial Theorem and Consequences

Interpolation of κ-compactness and PCF

arxiv: v2 [math.lo] 13 Feb 2014

Lecture 14: Basic Fixpoint Theorems (cont.)

INTERIM CORRELATED RATIONALIZABILITY IN INFINITE GAMES

Generalization by Collapse

STAT/MATH 395 PROBABILITY II

On Existence of Equilibria. Bayesian Allocation-Mechanisms

Computing Unsatisfiable k-sat Instances with Few Occurrences per Variable

Strongly compact Magidor forcing.

Chapter 3 Common Families of Distributions. Definition 3.4.1: A family of pmfs or pdfs is called exponential family if it can be expressed as

INTERIM CORRELATED RATIONALIZABILITY IN INFINITE GAMES

Introduction to Greedy Algorithms: Huffman Codes

Typed Lambda Calculi Lecture Notes

Hierarchical Exchange Rules and the Core in. Indivisible Objects Allocation

MULTIPLE ZETA VALUES 45

Extraction capacity and the optimal order of extraction. By: Stephen P. Holland

GUESSING MODELS IMPLY THE SINGULAR CARDINAL HYPOTHESIS arxiv: v1 [math.lo] 25 Mar 2019

A Syntactic Realization Theorem for Justification Logics

Fair semigroups. Valdis Laan. University of Tartu, Estonia. (Joint research with László Márki) 1/19

Semantic Types for Classes and Mixins

Best response cycles in perfect information games

PERFECT TREE FORCINGS FOR SINGULAR CARDINALS

On Packing Densities of Set Partitions

Optimizing Portfolios

Introduction to Probability Theory and Stochastic Processes for Finance Lecture Notes

}w!"#$%&'()+,-./012345<ya FI MU. A Calculus of Coercive Subtyping. Faculty of Informatics Masaryk University Brno

Department of Social Systems and Management. Discussion Paper Series

arxiv: v1 [math.co] 31 Mar 2009

Value of Flexibility in Managing R&D Projects Revisited

2 Deduction in Sentential Logic

Cardinal arithmetic: The Silver and Galvin-Hajnal Theorems

0.1 Equivalence between Natural Deduction and Axiomatic Systems

No-arbitrage theorem for multi-factor uncertain stock model with floating interest rate

Level by Level Inequivalence, Strong Compactness, and GCH

Essays on Some Combinatorial Optimization Problems with Interval Data

Abstract Algebra Solution of Assignment-1

A Property Equivalent to n-permutability for Infinite Groups

PARTITIONS OF 2 ω AND COMPLETELY ULTRAMETRIZABLE SPACES

Application of the Collateralized Debt Obligation (CDO) Approach for Managing Inventory Risk in the Classical Newsboy Problem

Full Abstraction for Nominal General References

NOTES ON FIBONACCI TREES AND THEIR OPTIMALITY* YASUICHI HORIBE INTRODUCTION 1. FIBONACCI TREES

Best-Reply Sets. Jonathan Weinstein Washington University in St. Louis. This version: May 2015

Conditional Rewriting

Characterisation of Strongly Normalising λµ-terms

Chain conditions, layered partial orders and weak compactness

Generating all nite modular lattices of a given size

Virtual Demand and Stable Mechanisms

Markov Decision Processes II

Characterizing large cardinals in terms of layered partial orders

THE NUMBER OF UNARY CLONES CONTAINING THE PERMUTATIONS ON AN INFINITE SET

Transcription:

Development Separation in Lambda-Calculus Hongwei Xi Boston University Work partly funded by NSF grant CCR-0229480 Development Separation in Lambda-Calculus p.1/26

Motivation for the Research To facilitate inductive reasoning on λ-terms To facilitate the encoding of λ-calculus in proof systems Proofs based on structural induction on λ-terms are often amenable to such encoding Development Separation in Lambda-Calculus p.2/26

Some Notations (1) λ-terms M, N ::= x λx.m M(N) FV(M) denotes the set of free variables in M. A β-redex R is a λ-term of the form (λx.m 1 )(M 2 ) and its contractum is M 1 [x := M 2 ]. M 1 β M 2 stands for 1-step β-reduction: M 2 is obtained from replacing a β-redex in M 1 with its contractum. M 1 n β M 2 stands for n-step β-reduction (n 0). M 1 β M 2 stands for multi-step β-reduction. R M 1 β M 2 stands for 1-step β-reduction where a particular occurrence of the redex R in M 1 is reduced. Development Separation in Lambda-Calculus p.3/26

Some Notations (2) Given a finite β-reduction sequence σ : M β N, we use σ(m) for N and σ for the number be β-reduction steps in σ. Given σ 1 : M 1 β M 2 and σ 2 : M 2 β M 3, we use σ 1 + σ 2 for the concatenation of σ 1 and σ 2. [R 1 ] + [R 2 ] +... + [R n ] stands for a β-reduction sequence of the following form: R M 1 R 1 β M 2 2 β Rn β M n+1 So each finite σ is always of the form [R 1 ] + [R 2 ] +... + [R n ]. Development Separation in Lambda-Calculus p.4/26

Residuals of β-redexes (1) R Let R be a set of β-redexes in M 1. Assume M 1 β M 2 for R = (λx.m)(n). Then this β-reduction step affects β-redexes R in R in the following ways: R is R. Then R has no residual in M 2. R is in N. Then all copies of R in M[x := N] are residuals of R. R is in M. Then the λ-term R [x := N] in M 2 is the residual be R. R contains R. Then the residual of R in M 2 is the term obtained from replacing R with its contractum in R. R and R are disjoint. Then R is not affected and is its own residual. Development Separation in Lambda-Calculus p.5/26

Residuals of β-redexes (2) We use R/[R] for the set of residuals of all β-redexes in R after R is reduced. The residual relation is transitive. Given a β-reduction sequence σ = [R 1 ] + [R 2 ] +... + [R n ], we use R/σ for the residuals of all the β-redexes in R under σ, which is formally defined as: R/σ = (... ((R/[R 1 ])/[R 2 ])...)/[R n ] Development Separation in Lambda-Calculus p.6/26

Involvement Given M β M 1 and σ : M 1 β M 2 β, we say that a redex R in M is involved in σ if a residual of R in M 1 is reduced in σ. Development Separation in Lambda-Calculus p.7/26

Developments Let R be a set β-redexes in M. A β-reduction sequence σ from M is a development of R if each β-redex reduced in σ is either in R or a residual of some β-redex in R. Furthermore, σ is a complete development of R if R/σ is empty. Development Separation in Lambda-Calculus p.8/26

Development Separation Given a λ-term M, M[x..., x] x is a representation of M in which all the free occurrences of x in M are enumerated from left to right in [x,..., x]. We write M[N 1,..., N n ] x for the λ-term obtained by substituting N i for the ith free occurrence of x in M for i = 1,..., n. Let M = (λx.m 1 )(M 2 ), R 1 be a set of β-redexes in M 1, R 2 be a set of β-redexes in M 2 and R = {M} R 1 R 2. For every development σ of R in which M is involved, σ(m) is of the following form: σ 1 (M 1 )[σ 2,1 (M 2 ),..., σ 2,n (M 2 )] x, where σ 1 is a development of R 1 from M 1 and σ 2,i are developments of R 2 from M 2 for i = 1 i n. Development Separation in Lambda-Calculus p.9/26

anonical and Standard Developments Let σ = [R 1 ] +... + [R n ] be a development of R. If R j are not residuals of any β-redexes containing R i for all 1 i < j n, then σ is a canonical development. Furthermore, if R j are not residuals of any β-redexes to the left of R i for all 1 i < j n, then σ is a standard development. Development Separation in Lambda-Calculus p.10/26

Canonicalization of Developments For every development σ : M β N of R, there exists a canonical development cad(σ) : M β N such that for every R R, R is involved in σ if it is involved in cad(σ). Development Separation in Lambda-Calculus p.11/26

Proof of Canonicalization of Developments The proof is by structural induction on M. We present an interesting case where M = (λx.m 1 )(M 2 ) and M is involved in σ. By Development Separation, sep(σ) is of the following form: [M] + σ 1 [x := N] + σ 2,1 +... + σ 2,n where σ 1 is a development from M 1 and σ 2,i are developments from M 2 for 1 i n. By induction hypothesis, we can define cad(σ) as follows: cad(σ) = [M] + cad(σ 1 )[x := N] + cad(σ 2,1 ) +... + cad(σ 2,n ) Clearly, cad(σ) is canonical since both cad(σ 1 ) and cad(σ 2,i ) are canonical for 1 i n. Assume that R R is involved in cad(σ). Then it can be readily verified that R is involved in sep(σ). Hence, R is also involved in σ. Development Separation in Lambda-Calculus p.12/26

Standardization of Developments For every development σ : M β N of R, there exists a standard development std(σ) : M β N such that for every R R, R is involved in σ if it is involved in std(σ). Proof: This follows from canonicalization of developments immediately: std(σ) is obtained by a proper reshuffling of cad(σ). Development Separation in Lambda-Calculus p.13/26

Standardization Lemma Given σ = σ 1 + σ 2, where σ 1 is a standard development of R and σ 2 is a standard β-reduction sequence, we can construct a β-reduction sequence std 2 (σ 1, σ 2 ) which standardizes σ. Development Separation in Lambda-Calculus p.14/26

Proof of Standardization Lemma (1) By Development Separation, we have that the function std is defined on all developments. Let us define std 2 (σ 1, σ 2 ) and prove that std 2 (σ 1, σ 2 ) standardizes σ 1 + σ 2 by induction on σ 2, σ 1, lexicographically ordered. Clearly, for σ 1, σ 2, std(σ 1, ) and std(, σ 2 ) can be defined as σ 1 and σ 2, respectively. We now assume σ 1 = [R 1 ] + σ 1 and σ 2 = [R 2 ] + σ 2, and we have two cases. Development Separation in Lambda-Calculus p.15/26

Proof of Standardization Lemma (2) R 2 is a residual of some β-redex in R that is to the left of R 1. Hence, σ 1 + [R 2 ] is a development. We define std 2 (σ 1, σ 2 ) as follows: std 2 (σ 1, σ 2 ) = std 2 (std(σ 1 + [R 2 ]), σ 2) Assume that R R is involved in std 2 (σ 1, σ 2 ). Then by induction hypothesis, R is involved in std(σ 1 + [R 2 ]) + σ 2. This implies that R is involved in σ 1 + [R 2 ] + σ 2 = σ 1 + σ 2 = σ. R 2 is not a residual of any β-redex in R that is to the left of R 1. Then we define std 2 (σ 1, σ 2 ) as follows: std 2 (σ 1, σ 2 ) = [R 1 ] + std 2 (σ 1, σ 2 ) Development Separation in Lambda-Calculus p.16/26

Standard β-reduction Sequences Given a β-reduction sequence σ of the following form: M 1 R 1 β M 2 R 2 β R n β M n+1 we say that σ is standard if for all 1 i < j n, R j is not a residual of some β-redex to the left of R i. We say that σ s : M β N standardizes σ if σ s is a standard β-reduction sequence and for every R in M that is involved in σ s, R is also involved in σ. Development Separation in Lambda-Calculus p.17/26

Standardization Theorem For every β-reduction sequence σ, we can construct a β-reduction sequence std 1 (σ) that standardizes σ. Proof: Let us define std 1 as follows: std 1 ( ) = std 1 ([R] + σ) = std 2 ([R], std 1 (σ)) By Standardization Lemma, std 1 (σ) standardizes σ. Development Separation in Lambda-Calculus p.18/26

µ(m) If M is strongly normalizing, let µ(m) be the least natural number such that σ µ(m) holds for each β-reduction sequence from M. Otherwise, let µ(m) =. Development Separation in Lambda-Calculus p.19/26

Proposition on µ Assume M R β M, where R = (λx.n 1 )(N 2 ) is the leftmost β-redex in M. Then µ(m) µ(m ) + µ(n 2 ) holds. The proof is straightforward. Development Separation in Lambda-Calculus p.20/26

Normalization Lemma Given a λ-term M, let Λ(M) be the longest leftmost β-reduction sequence from M, which may be of infinite length. Assume that σ : M β M is a standard development. If Λ(M ) <, then Λ(M ) Λ(M) < holds. Development Separation in Lambda-Calculus p.21/26

Proof of Normalization Lemma (1) The proof proceeds by induction on Λ(M ), σ, lexicographically ordered. If M is in β-normal form, then M = M and we are done. We now assume M R l β M l, where R l is the leftmost β-redex in M. Then Λ(M) = [R l ] + Λ(M l ). We have two cases as follows. Development Separation in Lambda-Calculus p.22/26

Proof of Normalization Lemma (2) R l is involved in σ. Since σ is standard, σ is of the form M R σ l β M l β M for some standard development σ. Since σ < σ holds, we have Λ(M ) Λ(M l ) < by induction hypothesis. Hence Λ(M ) Λ(M) < holds. R l is not involved in σ. Then R l has a residual R l in M, which also happens to be the leftmost β-redex in M. Then σ + [R l ] is a development of R {R l }. Hence std(σ + [R l ]) = R l + σ for some σ : M l β M l, which is a standard development of R/[R l]. Assume M R l β M l. Then Λ(M l ) < Λ(M ) holds. By induction hypothesis, we have Λ(M l ) Λ(M l) <. This yields that Λ(M ) = 1 + Λ(M l ) 1 + Λ(M l) = Λ(M) <. Development Separation in Lambda-Calculus p.23/26

Normalization Theorem If M can be reduced to a normal form, then Λ(M) < holds. Proof: By Normalization Lemma, the theorem follows from straightforward induction on the length of σ. Development Separation in Lambda-Calculus p.24/26

Related Work Parallel β-reductions are complete developments. Therefore, it is not surprising that the work in [Takahashi] can also be done in our setting. On the other hand, Takahashi s method can clearly be used to establish various lemmas in this paper (after they are properly formulated in terms of parallel β-reductions). This can probably described as separating parallel β-reductions (from other β-reductions). Development Separation in Lambda-Calculus p.25/26

Conclusion We have demonstrated some interesting uses of the development separation lemma, proving by structural induction on λ-terms that developments are Church-Rosser and can be standardized. The Church-Rosser theorem in λ-calculus follows immediately. Also, we have employed the technique of development separation in establishing structurally inductive proofs for the standardization theorem, the conservation theorem and the normalization theorem. Development Separation in Lambda-Calculus p.26/26