Characterisation of Strongly Normalising λµ-terms

Similar documents
A Translation of Intersection and Union Types

Characterisation of Strongly Normalising λµ-terms

Semantic Types for Classes and Mixins

AN ESTIMATION FOR THE LENGTHS OF REDUCTION SEQUENCES

CS792 Notes Henkin Models, Soundness and Completeness

How not to prove Strong Normalisation

Two Notions of Sub-behaviour for Session-based Client/Server Systems

Development Separation in Lambda-Calculus

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

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

Full Abstraction for Nominal General References

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

CHOICE THEORY, UTILITY FUNCTIONS AND RISK AVERSION

Unary PCF is Decidable

Development Separation in Lambda-Calculus

Silver type theorems for collapses.

Strong normalisation and the typed lambda calculus

The Semi-Weak Square Principle

Chapter 4. Cardinal Arithmetic.

UPWARD STABILITY TRANSFER FOR TAME ABSTRACT ELEMENTARY CLASSES

Characterising Strong Normalisation for Explicit Substitutions

THE OPERATIONAL PERSPECTIVE

δ j 1 (S j S j 1 ) (2.3) j=1

Interpolation of κ-compactness and PCF

Extender based forcings, fresh sets and Aronszajn trees

TABLEAU-BASED DECISION PROCEDURES FOR HYBRID LOGIC

MITCHELL S THEOREM REVISITED. Contents

0.1 Equivalence between Natural Deduction and Axiomatic Systems

Philipp Moritz Lücke

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

AUTOSUBST: Automation for de Bruijn Substitutions

The (λ, κ)-fn and the order theory of bases in boolean algebras

Strongly compact Magidor forcing.

Short Extenders Forcings II

Generalising the weak compactness of ω

2 Deduction in Sentential Logic

The rth moment of a real-valued random variable X with density f(x) is. x r f(x) dx

Monadic translation of sequent calculus for classical logic

PERFECT TREE FORCINGS FOR SINGULAR CARDINALS

arxiv: v1 [math.lo] 27 Mar 2009

Lecture IV Portfolio management: Efficient portfolios. Introduction to Finance Mathematics Fall Financial mathematics

Intersection-Types à la Church

arxiv:math/ v1 [math.lo] 9 Dec 2006

being saturated Lemma 0.2 Suppose V = L[E]. Every Woodin cardinal is Woodin with.

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

Logic and Artificial Intelligence Lecture 24

Retractable and Speculative Contracts

Cardinal arithmetic: The Silver and Galvin-Hajnal Theorems

Matching [for] the Lambda Calculus of Objects

Stability in geometric & functional inequalities

Hod up to AD R + Θ is measurable

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.

COMBINATORICS OF REDUCTIONS BETWEEN EQUIVALENCE RELATIONS

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

Non replication of options

Stock Loan Valuation Under Brownian-Motion Based and Markov Chain Stock Models

On almost precipitous ideals.

Gödel algebras free over finite distributive lattices

The tree property for supercompactness

arxiv:math/ v1 [math.lo] 15 Jan 1991

A semantics for concurrent permission logic. Stephen Brookes CMU

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

ADDING A LOT OF COHEN REALS BY ADDING A FEW II. 1. Introduction

Additional questions for chapter 3

Level by Level Inequivalence, Strong Compactness, and GCH

ALL LARGE-CARDINAL AXIOMS NOT KNOWN TO BE INCONSISTENT WITH ZFC ARE JUSTIFIED arxiv: v3 [math.lo] 30 Dec 2017

EXTENSIVE AND NORMAL FORM GAMES

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

Cut-free sequent calculi for algebras with adjoint modalities

Hints on Some of the Exercises

Model-independent bounds for Asian options

STRONGLY UNFOLDABLE CARDINALS MADE INDESTRUCTIBLE

Outline Introduction Game Representations Reductions Solution Concepts. Game Theory. Enrico Franchi. May 19, 2010

Sy D. Friedman. August 28, 2001

On the Splitting Number at Regular Cardinals

Estimating a Dynamic Oligopolistic Game with Serially Correlated Unobserved Production Costs. SS223B-Empirical IO

1 Dynamic programming

Two Stationary Sets with Different Gaps of the Power Function

Programming Languages

Exponential utility maximization under partial information

Comprehensive Exam. August 19, 2013

Untyped Lambda Calculus

SHORT EXTENDER FORCING

Matching of Meta-Expressions with Recursive Bindings

Building Infinite Processes from Regular Conditional Probability Distributions

AMH4 - ADVANCED OPTION PRICING. Contents

3 The Model Existence Theorem

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

Techniques for Calculating the Efficient Frontier

A Model of Financial Intermediation

Mathematics in Finance

A relation on 132-avoiding permutation patterns

Model-independent bounds for Asian options

5 Deduction in First-Order Logic

Characterizing large cardinals in terms of layered partial orders

Financial Economics 4: Portfolio Theory

Tall, Strong, and Strongly Compact Cardinals

Comparing Goal-Oriented and Procedural Service Orchestration

A HIERARCHY OF RAMSEY-LIKE CARDINALS

Riemannian Geometry, Key to Homework #1

Transcription:

Characterisation of Strongly Normalising λµ-terms Ugo de Liguoro joint work with Steffen van Bakel and Franco Barbanera ITRS - June 2012, Dubrovnik

Introduction Parigot s λµ-calculus is an extension of the pure λ-calculus to compute with classical proofs Parigot proved that all typeable λµ-terms (both in first and second order logic) are strongly normalizing, but the larger set of SN terms in his calculus was not considered based on the domain-theoretic model by Streicher and Reus, we have proposed an intersection type assignment system which is invariant under reduction and expansion (TLCA 11) we prove here that Pottinger s characterisation of SN λ-terms extends to λµ by suitably restricting our system

Parigot s λµ-calculus λµ syntax: M, N ::= x λx.m MN µα.q (terms) Q ::= [α]m (commands) Structural substitution: T[α L] the replacement of all [α]n by [α]nl in T Reduction: (β) : (λx.m)n M[N/x] (µ) : (µβ.q)n µβ.q[β N] Example (where α M, N): (µα.[α](m(µβ.[α]n)))l µα.[α](m(µβ.[α]nl)l)

Continuation Semantics (Streicher-Reus) Continuation domain equations R results D = [C R] denotations C = (D C) continuations If (R,D,C) are a solution then D is an extensional λ-model: D [C R] [(D C) R] [D [C R]] [D D] while C is the infinite product: C D D

Term Interpretation Env = (Var D) + (Name C) [[ ]] D : Trm Env D [[ ]] C : Cmd Env C [[x]] D e k = e x k [[λx.m]] D e k = [[M]] D e[x := d]k d,k = k [[MN]] D e k = [[M]] D e [[N]] D e,k [[µα.q]] D e k = d k d,k = [[Q]] C e[α := k] [[[α]m]] C e = [[M]] D e,e α where e Env, d D and k,k C.

Types and type inclusion L R : ρ ::= ν ρ ρ ω L C : κ ::= δ κ κ κ ω L D : δ ::= ρ κ ρ δ δ ω Some axioms for the preorders C and D (= is 1 ): ω ω = C ω, ω ω = D ω, ρ = D ω ρ Filter Domains solving Continuation Equations Let F A = Filt(L A / A ) for A = R,D,C: F D [F C F R ] and F C F D F C

Typing judgements Typing judgements are triples of a basis, a term/command judgement and a context: basis: Γ = {x 1 : δ 1,...,x n : δ n }, with x i Var, δ i L D judgement: term: M : δ with M Trm, δ L D command: Q : κ with Q Cmd, κ L C context: = {α 1 : κ 1,..., α m : κ m }, with α i Name, κ i L C A typing judgement has either forms: Γ M : δ or Γ Q : κ

The full type assignment system (TLCA 11) (Var) Γ,x : δ x : δ Γ,x : δ M : κ ρ ( I) Γ λx.m : δ κ ρ Γ M : δ α : κ, ( ) Γ [α]m : δ κ α : κ, Γ M : δ κ ρ Γ N : δ ( E) Γ MN : κ ρ Γ Q : (κ ρ) κ α : κ, (µ) Γ µα.q : κ ρ (ω) Γ M : ω Γ M : δ Γ M : δ ( ) Γ M : δ δ Γ M : δ Γ M : δ δ δ ( )

Pottinger s Theorem Theorem (Pottinger) A λ-term M is strongly normalisable if and only if there exist Γ,σ such that Γ M : σ is derivable in an intersection type system without the type ω. Can we get rid of ω in the system for λµ? Of course we have to abandon rule: (ω) Γ M : ω but what about the types?

The meaning of ω The type κ = δ 1 δ k ω L C is semantically inhabited by any infinite tuple: d 1,...,d k,d k+1,... C such that d i [[δ i ]] D for i = 1,...,k. We then restrict the occurrences of ω to the end of a product type κ and add the axiom: δ 1 δ 2 ω δ 1 ω By eliminating rule (ω) the meaning of ω changes: lack of information partial information about a total object

The computability interpretation of types L ω R L ω C L ω D : ρ ::= ν ρ ρ ω : κ ::= δ ω δ κ κ κ ω : δ ::= ρ ω ρ κ ρ δ δ ω

The computability interpretation of types L ω R L ω C L ω D : ρ ::= ν ρ ρ : κ ::= δ ω δ κ κ κ : δ ::= ρ ω ρ κ ρ δ δ A stack is a tuple L 1 :: :: L k for some k N. SN is the set of stacks of terms in SN. [[ω ρ]] = [[ρ]] = SN [[κ ρ]] = {M Trm L [[κ]]. M L [[ρ]]} [[δ ω]] = {N :: L N [[δ]], L SN } [[δ κ]] = {N :: L N [[δ]], L [[κ]]} [[σ τ]] = [[σ]] [[τ]] where L is a vector or a stack according to the context.

Types are saturated sets Properties of the computability interpretation of types: [[δ]] SN and [[κ]] SN for δ L ω D and κ L ω C M[N/x] L [[δ]] & N [[δ ]] (λx.m)n L [[δ]] (µα[α](m[α N]N)) L [[δ]] (µα[α]m)n L [[δ]] (µα[β](m[α N])) L [[δ]] & N [[δ ]] (µα[β]m)n L [[δ]] if α β σ τ [[σ]] [[τ]]

Typing judgements for commands are problematic Toward soundness, for ξ (Var Trm) + (Name Trm ) we set: M ξ = M [ξ(x 1 )/x 1,...,ξ(x h )/x h,[α 1 ξ(α 1 )],...,[α k ξ(α k )]] We expect that if ξ(x) [[Γ(x)]] and ξ(α) [[ (α)]] for all x dom(γ) and α dom( ) then: Γ M : δ M ξ [[δ]] How should we interpret a statement like [α]m : κ? Γ M : δ α : κ, ( ) Γ [α]m : δ κ α : κ, Γ Q : (κ ρ) κ α : κ, (µ) Γ µα.q : κ ρ

First solution: two derived rules We replace the rules: Γ M : δ α : κ, ( ) Γ [α]m : δ κ α : κ, Γ Q : (κ ρ) κ α : κ, (µ) Γ µα.q : κ ρ by the admissible rules: Γ M : κ ρ α : κ, (µ1 ) Γ µα.[α]m : κ ρ Γ M : κ ρ α : κ,β : κ, (µ2 ) Γ µα.[β]m : κ ρ β : κ,

First solution: the restricted system with (µ 1 ) and (µ 2 ) (Var) Γ,x : δ x : δ Γ,x : δ M : κ ρ ( I) Γ λx.m : δ κ ρ Γ M : κ ρ α : κ, (µ 1) Γ µα.[α]m : κ ρ Γ M : δ κ ρ Γ N : δ ( E) Γ MN : κ ρ Γ M : κ ρ α : κ, β : κ, (µ 2) Γ µα.[β]m : κ ρ β : κ, Γ M : δ Γ M : δ ( ) Γ M : δ δ Γ M : δ Γ M : δ δ δ ( ) where types are in L ω = L ω R L ω D L ω C and is restricted to L ω.

Second solution: distinct interpretation of judgments For ξ (Var Trm) + (Name Trm ) we set ξ = Γ, iff x dom(γ), α dom( ). ξ(x) [[Γ(x)]] & ξ(α) [[ (α)]] hence we define: Γ = M : δ ξ. ξ = Γ, M ξ [[δ]] Γ = [α]m : κ ξ. ξ = Γ, M ξ :: ξ(α) [[κ]] where N :: L is just the stack obtained by pushing N in front of L and recall that M ξ = M [ξ(x 1 )/x 1,...,ξ(x h )/x h,[α 1 ξ(α 1 )],...,[α k ξ(α k )]]

Second solution: the restricted system with ( ) and (µ) (Var) Γ,x : δ x : δ Γ,x : δ M : κ ρ ( I) Γ λx.m : δ κ ρ Γ M : δ α : κ, ( ) Γ [α]m : δ κ α : κ, Γ M : δ κ ρ Γ N : δ ( E) Γ MN : κ ρ Γ Q : (κ ρ) κ α : κ, (µ) Γ µα.q : κ ρ Γ M : δ Γ M : δ ( ) Γ M : δ δ Γ M : δ Γ M : δ δ δ ( ) where types are in L ω = L ω R L ω D L ω C and is restricted to L ω.

The characterisation theorem Theorem: soundness 1 Γ ω M : δ Γ = M : δ 2 Γ ω Q : κ Γ = Q : κ Therefore if Γ ω M : δ then M SN. Proof. By simultaneous induction on derivation. Finally take ξ 0 s.t. ξ 0 (x) = x and ξ 0 (α) = y. If Γ ω M : δ then: ξ 0 = Γ, so that M ξ0 [[δ]] SN M ξ0 SN M SN Theorem: completeness If M SN then Γ ω M : δ for some Γ,δ and. Proof. Similar to the proof for the λ-calculus.

Final remarks we have a type characterisation of SN-terms of λµ-calculus, that should extend smoothly to De Groote-Saurin variant, and also to Fellaisen s λc-calculus we plan to compare the present proof with Berger s semantic proof of strong normalisation for extended λ-calculi we think that intersection type machinery can be used to obtain elegant analysis of continuations as well as of other non functional aspects of extended λ-calculi, often studied by means of e.g. effect systems