CS792 Notes Henkin Models, Soundness and Completeness

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

Unary PCF is Decidable

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

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

A Translation of Intersection and Union Types

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Characterisation of Strongly Normalising λµ-terms

CS 4110 Programming Languages and Logics Lecture #2: Introduction to Semantics. 1 Arithmetic Expressions

2 Deduction in Sentential Logic

Typed Lambda Calculi Lecture Notes

Notes on Natural Logic

Strong normalisation and the typed lambda calculus

arxiv: v1 [math.lo] 24 Feb 2014

5 Deduction in First-Order Logic

Gödel algebras free over finite distributive lattices

Development Separation in Lambda-Calculus

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

3 The Model Existence Theorem

Equivalence between Semimartingales and Itô Processes

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

Development Separation in Lambda-Calculus

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

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

Untyped Lambda Calculus

Game Theory: Normal Form Games

Computing Unsatisfiable k-sat Instances with Few Occurrences per Variable

Cut-free sequent calculi for algebras with adjoint modalities

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

First-Order Logic in Standard Notation Basics

CS 4110 Programming Languages & Logics. Lecture 2 Introduction to Semantics

Generalising the weak compactness of ω

Semantics with Applications 2b. Structural Operational Semantics

Yao s Minimax Principle

Closed Sets of Higher-Order Functions

Matching of Meta-Expressions with Recursive Bindings

An effective perfect-set theorem

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

How not to prove Strong Normalisation

α-structural Recursion and Induction

TABLEAU-BASED DECISION PROCEDURES FOR HYBRID LOGIC

Lecture Notes on Bidirectional Type Checking

Best response cycles in perfect information games

Lecture Notes on Type Checking

Conditional Rewriting

COMBINATORICS OF REDUCTIONS BETWEEN EQUIVALENCE RELATIONS

On the Number of Permutations Avoiding a Given Pattern

0.1 Equivalence between Natural Deduction and Axiomatic Systems

Type-safe cast does no harm

The Normal Distribution

Building Infinite Processes from Regular Conditional Probability Distributions

Chapter 4. Cardinal Arithmetic.

Matching [for] the Lambda Calculus of Objects

Syllogistic Logics with Verbs

Lecture 7: Bayesian approach to MAB - Gittins index

AUTOSUBST: Automation for de Bruijn Substitutions

4: SINGLE-PERIOD MARKET MODELS

Semantics and Verification of Software

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

Fiscal and Monetary Policies: Background

Computing Unsatisfiable k-sat Instances with Few Occurrences per Variable

MITCHELL S THEOREM REVISITED. Contents

The finite lattice representation problem and intervals in subgroup lattices of finite groups

Tableau Theorem Prover for Intuitionistic Propositional Logic

Tableau Theorem Prover for Intuitionistic Propositional Logic

Sy D. Friedman. August 28, 2001

UPWARD STABILITY TRANSFER FOR TAME ABSTRACT ELEMENTARY CLASSES

Structural Induction

arxiv: v1 [math.oc] 23 Dec 2010

Long Term Values in MDPs Second Workshop on Open Games

Laurence Boxer and Ismet KARACA

A No-Arbitrage Theorem for Uncertain Stock Model

SHORT-TERM RELATIVE ARBITRAGE IN VOLATILITY-STABILIZED MARKETS

Optimizing Portfolios

Full Abstraction for Nominal General References

Subgame Perfect Cooperation in an Extensive Game

The Limiting Distribution for the Number of Symbol Comparisons Used by QuickSort is Nondegenerate (Extended Abstract)

EXTENSIVE AND NORMAL FORM GAMES

4 Martingales in Discrete-Time

Syllogistic Logics with Verbs

Structural Resolution

Concurrency Semantics in Continuation-Passing Style The Companion Technical Report

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

Functional vs Banach space stochastic calculus & strong-viscosity solutions to semilinear parabolic path-dependent PDEs.

3.2 No-arbitrage theory and risk neutral probability measure

THE OPERATIONAL PERSPECTIVE

Strongly compact Magidor forcing.

The Binomial Theorem and Consequences

LARGE CARDINALS AND L-LIKE UNIVERSES

Convergence of trust-region methods based on probabilistic models

Optimal Stopping Rules of Discrete-Time Callable Financial Commodities with Two Stopping Boundaries

Notes on the symmetric group

Finite Additivity in Dubins-Savage Gambling and Stochastic Games. Bill Sudderth University of Minnesota

Information aggregation for timing decision making.

More On λ κ closed sets in generalized topological spaces

A class of coherent risk measures based on one-sided moments

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

Algorithmic Game Theory and Applications. Lecture 11: Games of Perfect Information

ExpTime Tableau Decision Procedures for Regular Grammar Logics with Converse

GPD-POT and GEV block maxima

Transcription:

CS792 Notes Henkin Models, Soundness and Completeness Arranged by Alexandra Stefan March 24, 2005 These notes are a summary of chapters 4.5.1-4.5.5 from [1]. 1 Review indexed family of sets: A s, where s is an index from a given set of indexes S. signature: Σ = (S, F) where S is a set of sorts and F is a collection of pairs f : s 1... s k s with s 1,..., s k, s S. Note that in the collection F, no f occurs in two distinct pairs. λ signature Σ (with the notations used in our chapter) Σ = (B, C) where B is the set of base types (or type constants ) and C is a collection of pairs c : σ. c is called a term constant of type σ. Note that σ needs to be correct. well-formed contexts Γ (each variable occurs at most one in the context) We will refer to the following inference rules. Note that in every such rule, we assume the context is well-formed. Γ M : σ (add var) Γ, x : τ M : σ axioms: Γ, x : σ M : τ Γ λx : σ.m : σ τ Γ (λx : σ.m)n = [N/x]M : τ ( Intro) (β) Γ λx : σ.mx = M : σ τ (η) What is the difference between an algebra and a model? 1

2 General models and the meanings of terms Goal we are looking for a model that: gives meaning to each type and term constant, makes sense of applications and lambda abstractions. If f A σ τ and a A σ then we must be able to apply f to x. Every lambda abstraction must have an interpretation in our model : Take A σ τ to be the set of all functions from A σ to A τ. : You wish it was that simple! Why can t you do it? Remember the major goal. We want a model for PCF (program computable functions). Recursive functions are central to computation. Fixed points are needed to interpret recursive definitions. In order to deal with this we have the fix operator. this operator returns the fixed point of the function it is applied to, therefore it each function in its domain must have a fixed point. fix σ : (σ σ) σ and fix σ M = M(fix σ M). In our setting the fix operator will be a term constant and it needs to have a value in some set. (For the above example it would be in A (σ σ) σ ). But if a set A σ has at least two elements, then there exists at least one function f : A σ A σ that does not have a fixed point. Therefore we need to define a more complex model the Henkin model. Such a model must respect three conditions: it must be an applicative structure it must be extensional it must respect the environment model condition 3 Applicative structures and extensionality Definition 3.1. A typed applicative structure A for λ signature Σ is a tuple {A σ }, {App σ,τ }, Const of families of sets and mappings indexed by type expressions over the type constants from Σ. For each σ and τ we assume the following conditions. A σ is a set, App σ,τ is a map App σ,τ : A σ τ (A σ A τ ), Const is a map from term constants of Σ to elements of the union of all the A σ s such that if c : σ, then Const(c) A σ 2

The map App σ,τ allows us to use every element of A σ τ as a function from A σ A τ. Const gives meaning for the term constants. The extensionality condition is equivalent to saying that the interpretation of a function type must be some set of functions. Definition 3.2. An applicative structure is extensional if it satisfies the condition: For all f, g A σ τ, if for all d A σ,app σ,τ f d = App σ,τ g d then f = g. This condition says that function App σ,τ must be one-to-one from A σ τ into the set of functions from A σ to A τ. The following is an example of a non-extensional applicative structure. (Example 4.5.1. in [1]) Let Σ be a signature and H be a (possibly infinite) type assignment H = {x 1 : σ 1, x 2 : σ 2,... }. We can define an applicative structure as follows: T = {T σ }, {App σ,τ }, Const T σ = {M Γ M : σ for some finite Γ H} App σ,τ MN = MN for every M A σ τ and N A σ, Const(c) = c. If for every type σ, there is an assignment x : σ in H for some variable x then T is extensional. Otherwise, if there exists σ such that T σ is empty, then any two elements of T σ τ will be extensionally equal(vacuously), so extensionality will fail if T σ τ has at least two elements. 4 Environment model condition We need to give meaning/interpretation to variables. For this we define an environment: Definition 4.1. An environment η for an applicative structure is a mapping from variables to the union of all A σ. If Γ is a type environment we say that η satisfies Γ, written η = Γ, if η(x) A σ for every x : σ Γ. If η is any environment for A, and d A σ, then η[x d] is the mapping: { d if y = x, η[x d](y) = η(y) otherwise. Definition 4.2. An applicative structure A satisfies the environment model condition if the following clauses define a meaning function A on terms Γ M : σ and environments η such that η = Γ. This function must be total. A c : σ η = Const(c) A x : σ x : σ η = η(x) A Γ, x : σ M : τ η = A Γ M : τ η A Γ MN : τ η = App σ,τ (A Γ M : σ τ η)(a Γ N : σ η) A Γ, x : σ M : σ τ η = the unique f A σ τ such that d A σ.app σ,τ fd = A Γ, x : σ M : τ η[x d]. When can the last clause fail? Remember the current setting. The main reason for using induction on typing derivations is that in defining the meaning of a lambda abstraction Γ λx : σ.m : σ τ, we ned to refer to the meaning of M in typing context Γ, x : σ. if we know that Γ λx : σ.m : σ τ is typed according to rule ( Intro), then we are guaranteed that Γ, x : σ is well-formed. Note that otherwise we would have a problem when the bounded variable occurs free in the body of the lambda abstraction, e.g., term x : σ λx : τ.x. 3

Example [the full set-theoretic function hierarchy over the natural numbers]: Define a Henkin model for the signature with only one base type nat as follows: A nat is the set of natural numbers, A σ τ be the set of all functions from A σ to A τ, App σ,τ f x = f(x). Work out the meaning of λx : nat nat, λy : nat.xy. Notation:In the following, if the model A is not important or known, we will not specify it in the meaning function. We will write Γ M : σ η instead of Γ M : σ η. Since we have used typing derivations in defining our meaning function, we need to show that the meaning of a well-typed term, does not depend on what typing derivation. We have a coherence problem here because we interpret syntactic expressions, using some extra information that is not uniquely determined by the expressions themselves. In our case, this information is the typing derivation. The following is an example of a coherence theorem. It will prove that our meaning function does not depend on the typing derivation. Lemma 4.1. Suppose that and are derivations of typings Γ M : σ and Γ M : σ, respectively, and that Γ and Γ give the same type to every x free in M. Then Γ M : σ η = Γ M : σ η where the meanings are defined using and respectively. 5 Type and equational soundness Since there are two proof systems, one for proving typing assertions and one for equations, there are two forms of soundness for λ and other typed lambda calculi. Theorem 5.1 (Type Soundness). If Γ M : σ is a provable typing assertion, then for every Henkin model A and every environment η for A s.t. η = Γ, it holds that A Γ M : σ η A σ. This lemma says that well-typed λ terms, do not contain type errors. Example: a signature that gives addition the type + : nat nat nat and a Henkin model that interprets + as a binary function on A nat. Definition 5.1. A Henkin model A and environment η, such that η = Γ, satisfy an equation Γ M = N : σ, written: A, η = Γ M = N : σ if A Γ M : σ η = A Γ M : σ η. We say that model A satisfies an equation Γ M = N : σ if for all environments η satisfying Γ, model A and environment η satisfy this equation. Definition 5.2. A set of typed equations E semantically implies another typed equation Γ M = N : σ if every Henkin model A that satisfies E (every equation in E) also satisfies Γ M = N : σ. We use the following notation for semantic implication: E = Γ M = N : σ. Theorem 5.2 (Soundness). For every set E of typed equations, if E Γ M = N : σ, then E = Γ M = N : σ. 4

6 Completeness for Henkin models without empty types We do not have completeness for Henkin models without extending the proof system. We add the following inference rule for reasoning about nonempty types: Γ, x : σ M = N : τ Γ M = N : τ x not free in M, N (nonempty) Theorem 6.1. Let E be any lambda theory closed under the rule (nonempty). Then there is a Henkin model A, with no A σ =, satisfying precisely the equations belonging to E. Proof. The theorem can be proved directly using a term model construction. References [1] John C. Mitchell : Foundations of Programming Languages. 5