The second condition says that a node α of the tree has exactly n children if the arity of its label is n.

Similar documents
The Matrix Exponential

The Matrix Exponential

On spanning trees and cycles of multicolored point sets with few intersections

cycle that does not cross any edges (including its own), then it has at least

Introduction to Arithmetic Geometry Fall 2013 Lecture #20 11/14/2013

First order differential equation Linear equation; Method of integrating factors

Week 3: Connected Subgraphs

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1

a 1and x is any real number.

64. A Conic Section from Five Elements.

EEO 401 Digital Signal Processing Prof. Mark Fowler

1 Minimum Cut Problem

Analysis of Algorithms - Elementary graphs algorithms -

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation.

PROBLEM SET Problem 1.

(Upside-Down o Direct Rotation) β - Numbers

Abstract Interpretation: concrete and abstract semantics

Addition of angular momentum

Homework #3. 1 x. dx. It therefore follows that a sum of the

Higher order derivatives

Examples and applications on SSSP and MST

Analysis of Algorithms - Elementary graphs algorithms -

Combinatorial Networks Week 1, March 11-12

Construction of asymmetric orthogonal arrays of strength three via a replacement method

On the irreducibility of some polynomials in two variables

Y 0. Standing Wave Interference between the incident & reflected waves Standing wave. A string with one end fixed on a wall

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES. 1. Statement of results

10. EXTENDING TRACTABILITY

Derangements and Applications

Minimum Spanning Trees

CS 361 Meeting 12 10/3/18

LR(0) Analysis. LR(0) Analysis

That is, we start with a general matrix: And end with a simpler matrix:

Chapter 10. The singular integral Introducing S(n) and J(n)

COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM

Addition of angular momentum

UNTYPED LAMBDA CALCULUS (II)

Section 11.6: Directional Derivatives and the Gradient Vector

Basic Polyhedral theory

Multiple Short Term Infusion Homework # 5 PHA 5127

SECTION where P (cos θ, sin θ) and Q(cos θ, sin θ) are polynomials in cos θ and sin θ, provided Q is never equal to zero.

u x v x dx u x v x v x u x dx d u x v x u x v x dx u x v x dx Integration by Parts Formula

The Equitable Dominating Graph

INCOMPLETE KLOOSTERMAN SUMS AND MULTIPLICATIVE INVERSES IN SHORT INTERVALS. xy 1 (mod p), (x, y) I (j)

ON RIGHT(LEFT) DUO PO-SEMIGROUPS. S. K. Lee and K. Y. Park

Einstein Equations for Tetrad Fields

Alpha and beta decay equation practice

Thomas Whitham Sixth Form

Kernels. ffl A kernel K is a function of two objects, for example, two sentence/tree pairs (x1; y1) and (x2; y2)

Hydrogen Atom and One Electron Ions

Lecture 37 (Schrödinger Equation) Physics Spring 2018 Douglas Fields

Deift/Zhou Steepest descent, Part I

SCHUR S THEOREM REU SUMMER 2005

(1) Then we could wave our hands over this and it would become:

COHORT MBA. Exponential function. MATH review (part2) by Lucian Mitroiu. The LOG and EXP functions. Properties: e e. lim.

CS 491 G Combinatorial Optimization

NEW APPLICATIONS OF THE ABEL-LIOUVILLE FORMULA

First derivative analysis

Equidistribution and Weyl s criterion

4. Money cannot be neutral in the short-run the neutrality of money is exclusively a medium run phenomenon.

Quasi-Classical States of the Simple Harmonic Oscillator

1 Isoparametric Concept

Pattern Queries for XML and Semistructured Data

From Elimination to Belief Propagation

Brief Introduction to Statistical Mechanics

1973 AP Calculus AB: Section I

Lie Groups HW7. Wang Shuai. November 2015

GEOMETRICAL PHENOMENA IN THE PHYSICS OF SUBATOMIC PARTICLES. Eduard N. Klenov* Rostov-on-Don, Russia

CPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming

A Propagating Wave Packet Group Velocity Dispersion

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

Chapter Finding Small Vertex Covers. Extending the Limits of Tractability. Coping With NP-Completeness. Vertex Cover

High Energy Physics. Lecture 5 The Passage of Particles through Matter

LINEAR DELAY DIFFERENTIAL EQUATION WITH A POSITIVE AND A NEGATIVE TERM

Mathematics 1110H Calculus I: Limits, derivatives, and Integrals Trent University, Summer 2018 Solutions to the Actual Final Examination

Lecture 4: Parsing. Administrivia

Searching Linked Lists. Perfect Skip List. Building a Skip List. Skip List Analysis (1) Assume the list is sorted, but is stored in a linked list.

Supplementary Materials

Cramér-Rao Inequality: Let f(x; θ) be a probability density function with continuous parameter

Finite Element Analysis

SPH4U Electric Charges and Electric Fields Mr. LoRusso

Integration by Parts

The Transfer Function. The Transfer Function. The Transfer Function. The Transfer Function. The Transfer Function. The Transfer Function

Introduction to Condensed Matter Physics

Strongly Connected Components

Bifurcation Theory. , a stationary point, depends on the value of α. At certain values

Search sequence databases 3 10/25/2016

y = 2xe x + x 2 e x at (0, 3). solution: Since y is implicitly related to x we have to use implicit differentiation: 3 6y = 0 y = 1 2 x ln(b) ln(b)

CS 6353 Compiler Construction, Homework #1. 1. Write regular expressions for the following informally described languages:

Economics 201b Spring 2010 Solutions to Problem Set 3 John Zhu

Finding low cost TSP and 2-matching solutions using certain half integer subtour vertices

Mutually Independent Hamiltonian Cycles of Pancake Networks

ECE602 Exam 1 April 5, You must show ALL of your work for full credit.

Differentiation of Exponential Functions

Source code. where each α ij is a terminal or nonterminal symbol. We say that. α 1 α m 1 Bα m+1 α n α 1 α m 1 β 1 β p α m+1 α n

Unit 6: Solving Exponential Equations and More

Thus, because if either [G : H] or [H : K] is infinite, then [G : K] is infinite, then [G : K] = [G : H][H : K] for all infinite cases.

MA1506 Tutorial 2 Solutions. Question 1. (1a) 1 ) y x. e x. 1 exp (in general, Integrating factor is. ye dx. So ) (1b) e e. e c.

perm4 A cnt 0 for for if A i 1 A i cnt cnt 1 cnt i j. j k. k l. i k. j l. i l

Transcription:

CS 6110 S14 Hanout 2 Proof of Conflunc 27 January 2014 In this supplmntary lctur w prov that th λ-calculus is conflunt. This is rsult is u to lonzo Church (1903 1995) an J. arkly Rossr (1907 1989) an is known as th Church Rossr thorm. Th proof givn hr taks an altrnativ approach to th stanar proof u to Tait an Martin-Löf as givn for xampl in arnrgt [1] (s also [2, 3]). 1 Trms as Labl Trs In th proof of conflunc, w will n to talk about occurrncs of subtrms in a trm as signat by a path from th root. Thus w n to vlop notation for trms viw as labl trs. W will rfr to this viw of trms as th coalgbraic viw, although th rational for this trminology will only bcom clar much latr in th cours. 1.1 lgbraic Viw of Trms rank alphabt is a st Σ togthr with an arity function arity : Σ N. Th lttrs f Σ ar viw as oprator symbols, an arity f N nots th arity of f, or th numbr of inputs of f. Th symbol f is call unary, binary, trnary, or n-ary accoring as its arity is 1, 2, 3, or n, rspctivly. It is call a constant if its arity is 0. Finit trms ovr Σ can b fin by inuction: If t 0,..., t n 1 ar trms an f Σ with arity f = n, thn f t 0..., t n 1 is a trm. Not th bas cas n = 0 is inclu; th first prmis is vacuous in that cas. This fins trms in prfix notation, but rally w ar intrst in th abstract syntax. 1.2 Coalgbraic Viw of Trms ltrnativly, w can fin trms as labl trs. Trms rprsnt in this way ar call cotrms. Lt N not th st of finit-lngth strings of natural numbrs. subst t N is a tr if it is nonmpty an prfix-clos (that is, if αβ t, thn α t). ny tr must contain th mpty string, which is th root of th tr. cotrm is thn a partial function : N Σ such that om is a tr; if α om, thn α i om iff i < arity (α). Th scon conition says that a no α of th tr has xactly n chilrn if th arity of its labl is n. cotrm is finit if its omain is a finit st. Thus on avantag of this finition is that it amits infinit trms. 1 1 Infinit trms xist in OCaml. Typ th following at th intrprtr an s what happns: typ x = C of x;; lt rc x = C x;; 1

α α λx c c x x Figur 1: β-ruction at α If α om, th subtrm of root at α is th cotrm α = λβ. (αβ). 2 {β αβ om }. Not that if α is a prfix of β, thn β is a subtrm of α. Th omain of α is 1.3 Substitution nothr avantag of th coalgbraic viw is that w hav a mor gnral notion of substitution. W can spak of substituting a trm for a singl occurrnc of a subtrm of as spcifi by its location in th tr. Formally, if α om an is a trm, fin { (γ), if β = αγ, [/α] = λβ. (β), if α is not a prfix of β. This is not saf substitution, but raw substitution; w mrly rplac th subtrm of at α with. 2 λ-cotrms λ-cotrm is just a labl tr as scrib in th prcing sction ovr a rank alphabt consisting of variabls x of arity 0, unary bining oprators λx, an th binary application oprator. Orinary λ-trms ar just finit λ-cotrms. Now th β-ruction rul taks th following form. Suppos α is a rx in, say α = (λx. c). Th corrsponing contractum obtain by applying th β-ruction rul is c{/x}, which w substitut for th rx at α. Th nw trm is [c{/x}/α]. This is illustrat in Fig. 1. 2.1 ccptabl Orrings If α an β ar both rxs in an α is a propr prfix of β, thn β is a propr subtrm of α. If w ruc α bfor rucing β, thn β will in gnral no longr b a rx; in, it may no longr vn xist in th rsulting tr. Howvr, if w ruc β first, thn α is still a rx in th rsulting tr (although th subtrm root at α may hav chang), an w can ruc it. Mor gnrally, if om is a st of rxs in, an w ruc th rxs in in som orr consistnt with th subtrm rlation that is, w ruc α only if all propr xtnsions αβ hav alray bn ruc thn vry rx in will still b availabl whn it is tim to ruc it, an it will b possibl to ruc all of thm. Morovr, th actual orr os not mattr, as long as it is consistnt with th subtrm rlation. 2 Hr w ar using λ as a mta-oprator. Thus λβ. (αβ) is th function that on input β N rturns th valu of appli to αβ. 2

Formally, w say that a linar orring α 1,..., α n of th lmnts of is accptabl if α i = α j β implis i j. In othr wors, th squnc α 1,..., α n is a subsqunc of som total xtnsion of th partial orr {(αβ, α) α, β N } (or, if you lik, a topological sort of with rspct to th gs (αβ, α)). ccptabl orrings of a givn st of rxs ar not uniqu. Howvr, it os not mattr which on w pick. On can asily prov inuctivly that for all accptabl orrings of, th lngth of th ruction squnc will b th sam, namly th carinality of, an th rsulting trms will b intical. Lt us call this trm θ (), as it pns only on th starting trm an th st of rxs, not on th orr of th ructions. For α N, lt α = {αβ β N }. If α om, thn α om rprsnts th st of subtrms of α. For, X N, writ X if thr xists an α such that α an α X =. If X, thn an X ar isjoint, an thr xists an accptabl orring of X such that all lmnts of com bfor all lmnts of X. 3 Conflunc W start by proving conflunc in som spcial cass, builing up to th gnral rsult. Lmma 1. Lt an b two sts of rxs of such that all lmnts of ar prfix-incomparabl to all lmnts of. Thn θ (θ ()) an θ (θ ()) both xist an ar qual. This givs th conflunt iagram illustrat in Fig. 2. Proof. oth θ (θ ()) an θ (θ ()) rprsnt th ruction of th rxs in in iffrnt accptabl orrs, thus both trms ar qual to θ (). Lmma 2. Lt α b a rx of, an lt b a st of rxs of such that α. Thn thr xists a st of rxs of θ α () such that α an θ C (θ ()) = θ (θ α ()), θ () θ (θ ()) = θ (θ ()) Figur 2 whr C = {α} if α an C = if α. This givs th conflunt iagram illustrat in Fig. 3. θ () θ () C θ C(θ ()) = θ (θ α()) Figur 3 α θ α() Proof. Suppos first that α. Lt α = (λx. c). Th st may contain rxs in c an. Rucing α first, a copy of rplacs ach fr occurrnc of x in c (s Fig. 1). If w thn ruc th rxs in ths copis of in som accptabl orr, thn ruc th rmaining rxs in c in som accptabl orr, this yils th sam rsult as rucing th rxs in an c in som accptabl orr bfor rucing α, thn rucing α. Formally, tak = {αγ i 1 i m} {αδ i β j 1 i k, 1 j n}, whr = {α00γ i 1 i m} {α1β j 1 j n} an th fr occurrncs of x in c ar locat at {α00δ 1,..., α00δ k }. Th lmnts of of th form α00γ i rprsnt th rxs in c, which aftr rucing α bcom th lmnts of of th form αγ i. Th lmnts of of th form α1β j rprsnt th rxs in, which aftr rucing α bcom th lmnts of of th form αδ i β j rprsnting th corrsponing rxs in th copis of that rplac th fr occurrncs of x in c. Fig. 1 illustrats th cas k = 2. 3

If α, thn it must appar last in any accptabl orring of. y th prvious argumnt, thr xists α such that θ α (θ {α} ()) = θ (θ α ()), thrfor θ (θ ()) = θ α (θ {α} ()) = θ (θ α ()). Lmma 3. Lt an X b sts of rxs of such that X. Thr xists a st of rxs of θ X () such that θ X (θ ()) = θ (θ X ()). = 0 β 1 1 β 2 θ () X 0 = X X 1 Proof. This follows asily by inuction on th carinality of X using Lmmas 1 an 2. Starting with X 0 = X an 0 =, construct a squnc of sts X i an i by taking th lmnts of X on at a tim in som accptabl orr, maintaining th invariant i X i. Fig. 4 illustrats th cas X = {β 1, β 2, β 3 }. Lmma 4. Lt b an arbitrary st of rxs of, an lt α b a rx of. Thn thr xist rx sts C of θ () an of θ α () such that θ C (θ ()) = θ (θ α ()). β 1 β 2 β 3 2 β 3 3 θ X(θ ()) = θ (θ X()) Figur 4 This givs th conflunt iagram illustrat in Fig. 3 (th sam iagram as for Lmma 2, but with a iffrnt intrprtation of th symbols.) θ X() Proof. Partition into 1 = α an 2 = 1. Thn 1 2. y Lmma 2, thr xist a st 1 α of rxs of θ α () an C 1 {α} such that θ C1 (θ 1 ()) = θ 1 (θ α ()). (1) Tak = 1 2. Sinc 1 α, C 1 α, an α 2 =, w hav 1 2 an C 1 2. y Lmma 3, thr xists a st C of rxs of θ 2 (θ 1 ()) = θ () such that Thn θ C (θ 2 (θ 1 ())) = θ 2 (θ C1 (θ 1 ())). (2) θ C (θ ()) = θ C (θ 2 (θ 1 ())) sinc 1 2 = θ 2 (θ C1 (θ 1 ())) by (2) = θ 2 (θ 1 (θ α ())) by (1) = θ (θ α ()) sinc 1 2. Lmma 5. Lt by som arbitrary squnc of ructions, an lt b a st of rxs of. Thn thr xists a st of rxs of such that θ () θ ( ). Proof. This follows in a straightforwar fashion by inuction on th lngth of th ruction by composing th ructions of Lmma 4. Thorm 6 (Church Rossr Thorm). Lt 1 an 2 by som arbitrary squncs of ructions. Thn thr xists an 3 such that 1 3 an 2 3. Proof. Dcompos th ruction squnc 1 into maximal sgmnts such that th orring of rxs is accptabl in ach sgmnt. Lmma 5 givs a conflunt iagram for ach sgmnt, an ths can b compos to gt a conflunt iagram for th ntir ruction squnc 1. 4

Rfrncs [1] H. P. arnrgt. Th Lamba Calculus, Its Syntax an Smantics. North-Hollan, 2n ition, 1984. [2] Robrt Pollack. Polishing up th Tait Martin-Löf proof of th Church Rossr thorm. In Proc. D Wintrmöt 95. Dpartmnt of Computing Scinc, Chalmrs Univrsity, Götborg, Swn, January 1995. [3] Masako Takahashi. Paralll ructions in λ-calculus (rvis vrsion). Information an Computation, 118(1):120 127, pril 1995. 5