Set-theoretical models of untyped -calculus Motivation for models: Better intuition about the formal theory. Consistency results follow by soundness. Completeness.

Slides:



Advertisements
Similar presentations
1 First order theories (Chapter 1, Sections 1.4 – 1.5)
Advertisements

Substitution & Evaluation Order cos 441 David Walker.
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
The lambda calculus David Walker CS 441. the lambda calculus Originally, the lambda calculus was developed as a logic by Alonzo Church in 1932 –Church.
Kripke: Outline …(1975) First improtant decision: the theory is about sentences, not about propositions. Like Tarski, not like Barwise & Etchemendy. ***
Elements of Lambda Calculus Functional Programming Academic Year Alessandro Cimatti
Recap 1.Programmer enters expression 2.ML checks if expression is “well-typed” Using a precise set of rules, ML tries to find a unique type for the expression.
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt.
1 CALCULUS Even more graphing problems
Foundations of Programming Languages: Introduction to Lambda Calculus
Denotational vs Operational Approaches COS 441 Princeton University Fall 2004.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Annotated RDF Octavian Udrea Diego Reforgiato Recupero V.S. Subrahmanian University of Maryland.
First of all …. Thanks to Janos Shakhar Smorodinsky Tel Aviv University Conflict-free coloring problems Part of this work is joint with Guy Even, Zvi.
Catriel Beeri Pls/Winter 2004/5 type reconstruction 1 Type Reconstruction & Parametric Polymorphism  Introduction  Unification and type reconstruction.
The lambda calculus David Walker CS 441. the lambda calculus Originally, the lambda calculus was developed as a logic by Alonzo Church in 1932 –Church.
Chair of Software Engineering 1 Concurrent Object-Oriented Programming Arnaud Bailly, Bertrand Meyer and Volkan Arslan.
Catriel Beeri Pls/Winter 2004/05 types 65  A type-checking algorithm The task: (since we start with empty H, why is the goal not just E?) The rule set.
Data Flow Analysis Compiler Design Nov. 8, 2005.
Theory and Applications
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
Sets, POSets, and Lattice © Marcelo d’Amorim 2010.
Relation, function 1 Mathematical logic Lesson 5 Relations, mappings, countable and uncountable sets.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
12 April 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Formal.
Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer Institut.
Math 3121 Abstract Algebra I Section 0: Sets. The axiomatic approach to Mathematics The notion of definition - from the text: "It is impossible to define.
Chapter 3 Functions Functions provide a means of expressing relationships between variables, which can be numbers or non-numerical objects.
CSE S. Tanimoto Lambda Calculus 1 Lambda Calculus What is the simplest functional language that is still Turing complete? Where do functional languages.
Freefinement Stephan van Staden, Cristiano Calcagno, Bertrand Meyer Chair of Software Engineering.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
CSE 230 The -Calculus. Background Developed in 1930’s by Alonzo Church Studied in logic and computer science Test bed for procedural and functional PLs.
1 Formal Semantics. 2 Why formalize? ML is tricky, particularly in corner cases generalizable type variables? polymorphic references? exceptions? Some.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Lambda Calculus Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 11.
Sets Goal: Introduce the basic terminology of set theory.
1 Finite Model Theory Lecture 1: Overview and Background.
Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Course 2D1453, Some material from B. Pierce: TAPL + some from.
1 CSE544 Monday April 26, Announcements Project Milestone –Due today Next paper: On the Unusual Effectiveness of Logic in Computer Science –Need.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
1 Section 8.3 Higher-Order Logic A logic is higher-order if it allows predicate names or function names to be quantified or to be arguments of a predicate.
Maximizing Symmetric Submodular Functions Moran Feldman EPFL.
CHAPTER 1: FUNCTIONS, GRAPHS, AND MODELS; LINEAR FUNCTIONS Section 1.1: Functions and Models 1.
Software Verification 1 Deductive Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität und Fraunhofer.
1 Iterative Program Analysis Abstract Interpretation Mooly Sagiv Tel Aviv University Textbook:
Sets and Size Basic Question: Compare the “size” of sets. First distinction finite or infinite. –What is a finite set? –How can one compare finite sets?
Data Flow Analysis II AModel Checking and Abstract Interpretation Feb. 2, 2011.
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
6/21/20161 Programming Languages and Compilers (CS 421) Reza Zamani Based in part on slides by Mattox Beckman,
Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L03-1 September 14, 2006http:// -calculus: A Basis for.
Lecture 9: Query Complexity Tuesday, January 30, 2001.
Identifying functions and using function notation
CSCE 411 Design and Analysis of Algorithms
Lesson 5 Relations, mappings, countable and uncountable sets
Programming Languages and Compilers (CS 421)
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
Grade Distribution 2nd 5th A 8 9 B 6 7 C 3 D 2 1 F 100+ Range
Lesson 5 Relations, mappings, countable and uncountable sets
Warm Up Given y = –x² – x + 2 and the x-value, find the y-value in each… 1. x = –3, y = ____ 2. x = 0, y = ____ 3. x = 1, y = ____ –4 – −3 2 –
Relations and Functions
Defining A Formal Semantics For The Rosetta Specification Language
Logics for Data and Knowledge Representation
Module #4.5, Topic #∞: Cardinality & Infinite Sets
CSE S. Tanimoto Lambda Calculus
Limits and Continuity.
CSE544 Wednesday, March 29, 2006.
Presentation transcript:

Set-theoretical models of untyped -calculus Motivation for models: Better intuition about the formal theory. Consistency results follow by soundness. Completeness transfers results in the model back to the formal theory. Independence questions can be settled by exhibiting models.

Untyped -calculus Terms: (x 2 Var) T ::= x | x. T | T T  -reduction - contextual closure of: ( x. P) Q !  P[x:=Q]  -equality =  - transitive- reflexive closure of  - reduction

Untyped -calculus Intuition: x. T is a function.  -reduction - applying function to the argument.

Untyped -calculus So: I= x. x is a „function” which takes any x and returns it. K = x. y. x is another „function”.  = ( x. x x) ( x. x x) as well

Set theory A function F : A ! B is a set of ordered pairs such that: (a, b) 2 F ! a 2 A Æ b 2 B 8 a 2 A 9 !b 2 B. (a, b) 2 F

Interpretation Terms can have free variables. So the interpretation of a term will depend on valuation  assigning sets to variables:  : Var ! ZFC The meaning of -term T: [ T ]  In particular: [ x ]  =  (x)

Naive approach [x]  =  (x) [ x. T]  ={ (a, b) | b=[T]  [x:=a] } [P Q]  = APP([P] , [Q]  ) However: What’s the domain of [ x. T]  ? Does it even exist?

Naive approach We would like [ x. T]  to be a function which domain is „everything”, i.e.: [ x. x]  = {(a, a) | a is a set } Such object doesn’t exist in ZFC.

Naive approach Even assuming some model U of ZFC, so that: [ x. x]  = {(a, a) | a 2 U} Then: [ x. x]  cannot be in U, so in ( x. x) the interpretation of the left I can only use elements of the right I. In ZFC this „process” must end in a finite number of steps, due to Foundation.

Naive approach - moral It’s not that easy!

Let’s go formal The applicative structure is a pair (M, ± ), where ± : M £ M ! M ± models application A valuation v on M is a function v : Var ! M The meaning of a -term: [M] v

Lambda-interpretation (M, [.]. ) is a -interpretation if: [x] v = v(x) [PQ] v = [P] v ± [Q] v 8 m 2 M. [ x. P] v ± m = [P] v[x:=m] If v FV(P) = u FV(P), then [P] v = [P] u

How to build it? Roughly, we want: (M ! M) µ M Impossible due to cardinality issues. But maybe we don’t need all functions from M to M

PP M = P( N ) Let Fin B ={A| A µ B, A finite},for B µ N Let Fin=Fin N Let f : Fin ! M monotone wrt. µ : A µ B ) f(A) µ f(B) Then f extends uniquely to f’ : M ! M f’(A) =  Fin A

PP Let [M ! M] be the set of all such extensions. Then |[M ! M]| = |Fin ! M| = 0 = c = |M|

PP Let (m, n) be a pairing function, (m, n) 2 N Let e n encode n-th element of Fin in some canonical order Then we can define: graph : [ P  ! P  ] ! P  fun : P  ! [ P  ! P  ] s.t. 8 x. fun(graph(x)) = x

Literature Henk Barendregt “The lambda calculus: its syntax and semantics”