The correctness of Newman s typability algorithm and some of its extensions

Size: px
Start display at page:

Download "The correctness of Newman s typability algorithm and some of its extensions"

Transcription

1 The coectness of Newman s typability algoithm an some of its extensions Heman Geuves a,b, Robbet Kebbes a a Institute fo Computing an Infomation Science Faculty of Science, Rabou Univesity Nijmegen, The Nethelans b Faculty of Mathematics an Compute Science Einhoven Univesity of Technology, The Nethelans Abstact We stuy Newman s typability algoithm [14] fo simple type theoy. The algoithm oiginates fom 1943, but was left unnotice until [14] was ecently eiscovee by Hinley [10]. The emakable thing is that it ecies typability without computing a type. We give a moen pesentation of the algoithm (also a gaphical one), pove its coectness an show that it implicitly oes compute the pincipal type. We also show how the typing algoithm can be extene to othe type constuctos. Finally we show that Newman s algoithm actually inclues a unification algoithm. Keywos: Simply type lamba calculus, Unification, Typing algoithms 1. Intouction A type checking algoithm fo simple type theoy solves the poblem whethe an untype λ-tem M can be given a type accoing to the ules of simple type theoy. As usual, we istinguish between the type checking poblem: M : σ (oes the tem M have type σ?) an the type synthesis poblem: M :? (compute a type fo the tem M). It is a classic esult that fo simple type theoy, these poblems ae both eciable [9, 12]. The solution amounts to computing the pincipal type of M an then to check whethe the given type σ is an instance of it. All known type checking algoithms fo λ-calculus compute a pincipal type, using a unification algoithm. It is ha to imagine that one coul o something funamentally iffeent. Howeve, thee is a (seemingly) iffeent way to ecie typing, ue to Newman, aleay in 1943 [14], an ecently eviewe by Hinley [10]. The stategy of Newman s algoithm is vey iffeent fom pesent ay algoithms, because it only ecies whethe a tem is typable an oes not compute its pincipal type. This looks stange, because the most common way to ecie whethe a λ-tem is typable is tying to assign a type to it. aesses: heman@cs.u.nl (Heman Geuves), mail@obbetkebbes.nl (Robbet Kebbes) Pepint submitte to Theoetical Compute Science June 22, 2011

2 In this pape, we escibe an analyze Newman s algoithm (Section 3) an we show that it (implicitly) oes compute a pincipal type. The way it computes it is actually quite close to othe constaint base typing algoithms fo simple type theoy, fo example Wan s algoithm [21]. We pove that Newman s algoithm is coect an iscuss the coesponence with Wan s algoithm (Section 4). Befoe oing that, we escibe Newman s algoithm iectly as a manipulation of the tem-gaph that epesents the λ-tem (Section 2). Following the metho escibe by Newman, we manipulate the tem-gaph using a sot of tem-gaph euction an if no futhe euctions ae possible, we check whethe a cetain elation on the noes is cyclic. The oiginal tem is typable if an only if the elation is acyclic. The coesponence between the gaphical esciption an Newman s is left implicit, but will be clea to the eae. It is moe inteesting to exten the gaphical esciption to inclue othe type constuctions, like pouct types an weakly polymophic types (Section 5). An impotant pat of a typing algoithm is to solve unification poblems. In the pesentation by Wan [21], this is nicely single out: one fist ceates a set of equations, which ae then solve by a (stana) unification algoithm (fo example Robinson s unification algoithm [19]). Looking back at Newman s algoithm, it can be obseve that Newman oes something simila: he ceates a set of equations, which is then moifie. To emphasize this, we also give a esciption of unification à la Newman (Section 6) Histoical backgoun Newman s stating point was Quine s poposal [18] fo a new logical system calle New Founations in Newman evelope an algoithm to ecie typability fo that system, but it was also able to ecie typability fo othe type systems, fo example the Pincipia Mathematica an Chuch s simply type λ-calculus [5]. The latte connection is not etaile in Newman s pape, maybe because Chuch s pape ha only appeae ecently an thee was moe inteest in Quine s New Founations at the time. To be pecise, Newman actually uses a system that is now bette known as λ-calculus à la Cuy [3], whee thee is no type infomation in the λ-tem; λ-calculus à la Chuch has type infomation in the tem an then the issue of typability is simple. In 1944 Chuch eviewe Newman s pape [6], but his eview was moe like a summay of Newman s pape concluing with: The eae s fist impession of Newman s pape may be that the machiney intouce is heavy in compaison with the esults obtaine. The value of the pape is in fact ifficult to estimate at pesent, as this will epen on the extent to which esults obtaine in the futue by Newman s methos justify the weight of machiney. We coul say that Newman was ahea of his time, since thee was no actual nee fo a typing algoithm until the 1950s an 1960s. But at that point type theoists seem to have ignoe o fogotten about Newman s wok an invente thei own algoithm [10]. 2

3 1.2. Simple type theoy an Newman s type system A type λ-calculus can be pesente à la Chuch o à la Cuy [3, 7]. In Chuch-style, a boun vaiable is type in the λ-abstaction, fo example λx : α.λy : α β.y x : α (α β) β. Futhemoe, a fee vaiable is type in the context, fo example x : α λy : α β.y x : (α β) β. Altenatives to this syntax ae foun in the liteatue, fo example whee fee vaiables cay thei type as an annotation instea of in the context, fo example λy : α β.y x α : (α β) β. O, if we also let boun vaiables cay thei type as an annotation: λy α β.y α β x α : (α β) β. The cucial point is that type infomation fo the vaiables is fixe an can be compute via a simple lookup. Theefoe, type checking an type-synthesis ae tivial: types can be simply ea off fom the tem. In this pape a system à la Cuy is stuie because most functional pogamming languages eal with this an that is also what Newman s algoithm is about. Now the vaiables o not cay any type infomation an the question is whethe, given an untype λ-tem M, we can ecie whethe M is typable (an then give a type fo M) o M is not typable. In this section we summaize the main efinitions an intouce notations fo the est of the pape. Fo an extensive iscussion concening these notions see, fo example [3, 7]. Definition 1.1. The tems in λ à la Cuy (typically N, M, P,... ) ae inuctively efine as follows. Λ ::= Va (ΛΛ) (λva.λ) Hee Va anges ove vaiables (typically x, y, z,... ). The types of λ (typically σ, τ, ϕ,... ) ae inuctively efine as follows. Type ::= TVa (Type Type) Hee TVa anges ove type vaiables (typically α, β, γ,... ). A context (typically Γ o ) is a finite set of vaiable eclaations x : σ (x Va, σ Type), whee all vaiables ae istinct. We wite (x) to enote the type that assigns to x. The notions of fee vaiables FV(M) of a tem M, an boun vaiables BV(M) of a tem M, ae efine as usual, whee λ bins vaiables. Similaly, we use the notion of fee type vaiables FTV(σ) of a type σ, to enote the set of type vaiables occuing in σ. We now give the euction ules fo assigning types to tems in simple type theoy. This is the moen way of inuctively escibing the set of well-type tems of a type. Newman oes not explicitly efine the well-type tems. Definition 1.2. A λ -typing jugment Γ M : ρ enotes that a λ-tem M has type ρ in context Γ. The eivation ules fo eiving such a jugment ae as follows. 3

4 x : σ Γ Γ x : σ (a) Vaiable Γ M : σ τ Γ N : σ Γ MN : τ (b) Application Γ, x : σ P : τ Γ λx.p : σ τ (c) Abstaction We wite M if no context Γ an type ρ exist such that Γ M : ρ. Definition 1.3. The Type Synthesis (TSP) o Type Assignment Poblem (TAP) is given a λ-tem M an a context Γ to fin a type ρ such that Γ M : ρ. Newman puts a estiction on the λ-tems: he only consies tems M fo which FV(M) BV(M) = an fo evey x BV(M) thee is exactly one λx-abstaction in M. So the boun an fee vaiables ae istinct an no vaiable has a uplicate bine. Nowaays, this estiction goes une the name of Baenegt convention [4] which states that, wheneve we consie a numbe of λ-tems, we may always assume that all fee vaiables ae iffeent fom the boun ones an that all boun vaiables ae istinct. We can safely assume this, because we can always ename boun vaiables to get a tem that is α-equivalent to it. In the time Newman wote his aticle, these issues ha not yet been claifie completely, so Newman simply only consiee tems that satisfy the Baenegt convention. It shoul be note, howeve that the way Newman pesente his algoithm, the actual names of vaiables o eally matte Pincipal types an most geneal unifies Well-known typing algoithms, like Hinley-Milne s [9, 12] o Wan s [21], ecie whethe a tem is typable by computing its pincipal type. Also, these algoithms ely on the computation of a most geneal unifie. While we postpone the iscussion of Wan s algoithm until Section 4.2, we will efine the notion of a most geneal unifie an a pincipal type now. Definition 1.4. Given a set of type equations E = {ρ 1 σ 1,..., ρ n σ n } an a substitution δ then δ is a unifie of E, notation δ = E, if δ(ρ) = δ(σ) fo each ρ σ E. We wite = E (E is not unifiable) if no substitution δ exists such that δ = E. A substitution δ is the most geneal unifie of E, notation δ = mgu E, if δ = E an fo all τ, if τ = E then thee exists a substitution ν such that τ = ν δ. (Any othe unifie of E is an instance of δ.) Definition 1.5. Given a λ-tem M, a context Γ an a type τ, then Γ, τ is a pincipal pai of M if: 1. Γ M : τ 2. M : ρ = ( σ : TVa Type. σ(γ) ρ = σ(τ)) Definition 1.6. Given a close λ-tem M an a type τ, then τ is a pincipal type of M iff, τ is a pincipal pai of M. 4

5 The goal of a typing algoithm is to compute a pincipal type fo a close tem an a pincipal pai fo an open tem. Fo λ, pincipal types (espectively pincipal pais) exist an can be compute. By efinition a pincipal pai (espectively pincipal type) is unique up to isomophism. Hee Γ, τ an, ρ ae isomophic, notation Γ, τ =, ρ, if thee exist substitutions σ 1 an σ 2 such that = σ 1 (Γ), ρ = σ 1 (τ), Γ = σ 2 ( ) an τ = σ 2 (ρ) Some basic notions fom ewiting In this pape we will be using the notions of confluence an stong nomalization, not so much fo the simple type theoy, but fo auxiliay elations that will be efine in what follows. We use the stana teminology of [20, 4, 1], which we ecall hee. Definition 1.7. Let be a binay elation on a set A an let enote the tansitive eflexive closue of. The elation satisfies the iamon popety if fo evey a, b, c A, if a b an a c, then thee is a A such that b an c. The elation is confluent if satisfies the iamon popety. It is locally confluent if fo evey a, b, c A, if a b an a c, then thee is a A such that b an c. An element a A is in -nomal fom if thee is no b A fo which a b. The elation is stongly nomalizing o teminating if fo evey element a A thee is no infinite -sequence stating fom a. Lemma 1.8. (Newman s Lemma fo abstact ewiting systems [13]). Let be a binay elation on a set A. If is stongly nomalizing an locally confluent, then is confluent. 2. Newman gaphs We efine Newman s algoithm fo λ. It is eive fom [14] an [10], although the pesentation is funamentally iffeent. Fist of all, we use a tem-gaph notation fo λ-tems as inicate in the following efinition. Definition 2.1. Given an untype λ-tem M, we efine the tem-gaph of M, Tgaph(M) in the usual way. We eplace an application by an a λ-abstaction λx.m by a λ-noe whee we also have a pointe to x as a shae leaf, as inicate in Figue 1 in the left an mile awing 1. 1 This is also known as a DAG (Diecte Acyclic Gaph) in which all occuences of vaiables ae shae [2]. 5

6 T( λx.m) = λ T(M N) λ T(M) T(M) T(N) x x Figue 1: Tanslating a tem to a tem-gaph. As an example of a tanslation of a tem to a tem-gaph, we have epicte the tem-gaph of λx.x(λy.x) on the ight in Figue 1. Now we tanslate the tem-gaph of the tem M, Tgaph(M), into the Newman gaph of M, Ngaph(M). Of couse, we coul have efine Ngaph(M) iectly fom M, but the pesent efinition moe clealy emphasizes the elation between the two. Definition 2.2. Given an untype λ-tem M with Tgaph(M), the Newman gaph of M, Ngaph(M) is efine as epicte in the figues below. In the tanslation we ignoe an λx infomation in the noes. Instea we give all noes a unique label (typically U, V, X, Y, Z,... ), except fo the vaiable noes fo which we use the vaiable name itself as a label. Futhemoe, we eplace eges by labele aows an emove othes. λ λw x V The intuitive meaning of the aows shoul be clea: X Y iff the omain of the type of X is the type of Y X Y iff the ange of the type of X is the type of Y 6

7 (In simple type theoy, when σ = ρ τ, then ρ is calle the omain of σ an τ the ange of σ.) We will now euce the Newman gaph. A euction step is pefome by joining two conguent noes, so we fist efine when two noes X an Y ae conguent. Definition 2.3. Given a Newman gaph G, the conguence elation X G Y between noes X an Y is inuctively efine as follows. (A1) If U X an U Y, then X G Y (A2) If U X an U Y, then X G Y (B) If X U, X V an Y U, Y V, then X G Y The intuitive meaning of X G Y is the tems epesente by X an Y have the same type. (To be pecise: the tems epesente by X an Y have the same type if the tem epesente by G is typable. In case the tem epesente by G is not typable, the tems epesente by X an Y may not be typable eithe. Note that in any case X G Y is well efine.) Combine with the intuitive unestaning of an, this claifies Definition 2.3. Fo example clause (A1) of Definition 2.3 then eas: if the omain of the type of U is both the type of X an the type of Y, then X an Y have the same type. When witing X G Y we will often suppess G, an wite X Y. The efinition can be epicte gaphically as follows. X (A1) U Y = X Y X (A2) U Y = X Y (B) X Y U an X Y V = X Y Remak 2.4. Although Newman also consies clause (B) in his efinition coesponing to X G Y, it shoul be note that fo type checking, only clauses (A1) an (A2) ae neee. So, Theoem 2.8 also hols if we estict to the euction steps that aise fom joining noes that ae equal accoing to clauses (A1) an (A2). This will be poven in Section 3, Coollay Definition 2.5. A euction step on Newman gaphs, G 1 G 2, is efine by joining two noes X an Y fom G 1 fo which we have X Y. So, if X Y, 7

8 we join the noes an all incoming an outgoing noes ae eiecte to the new joint noe, that we name eithe X o Y. We teat an example to show the efinitions at wok. Example 2.6. Consie the λ-tem M λx. (λy. y x) (x (λz. z)). We epict its tem-gaph Tgaph(M) an its Newman gaph Ngaph(M). λ V W λ Y x Z y x z y z We now join conguent noes, using the conguence elation as efine in Definition 2.3. In the fist step, we obseve the two conguent noes X an y, which we inicate by a box. We join them an then we obseve the conguent noes V an Y, that we join. The est of the example shoul be self-explanatoy: in evey step we join the conguent noes an we inicate the two conguent noes that we join in the next step. U U V V W X W Y y x Z z Y X x Z z 8

9 U W Y X x Z z W Y x Z U z In the final gaph of the example, no euction is possible anymoe. The cucial point is now that it contains a cycle an theefoe accoing to Newman the oiginal tem is not typable. Definition 2.7. Given a Newman gaph G, the gaph G is in nomal fom if no istinct noes X an Y of G ae conguent. Moeove the gaph G is statifie in case the tansitive closue of contains no cycles. The euction is stongly nomalizing, simply because the numbe of noes eceases, so we will always fin a nomal fom. That the nomal fom of a Newman gaph is unique, up to enaming of the labels, will be poven in Section 3. In Section 4 we will also pove that the nomal fom of Ngaph(M) is statifie if an only if M is typable in λ. This is poven by showing how the euction of Newman gaphs implicitly keeps tack of the type infomation of the tem an thus computes the pincipal type of a tem. Theoem 2.8. The euction is stongly nomalizing an confluent 2. Moeove, the nomal fom of the Newman gaph of M is statifie if an only if M is typable in λ. Poof. The fist is by Lemma 3.10 an 3.15, the secon by Theoem Newman s algoithm can be extene to othe type constuctions in simple type theoy, like pouct types an weakly polymophic types. This will be shown in Section 5. Fo now, we inicate how we can use Newman s algoithm to ea off the pincipal type of M fom the nomal fom of the Newman gaph of M. This will be etaile in the Section 4, but an example shoul be vey explanatoy. Example 2.9. Consie the λ-tem P λx.x(λy.x(λz.y)). If we euce the Newman gaph of P to nomal fom we obtain the gaph on the left, whee U coespons to the oot noe of the tem P. 2 See Definition 1.7 fo a pecise efinition of these notions. 9

10 x U V W ((α α) α) α U α V x (α α) α W α α The gaph contains no cycles. We compute the type at noe U by labeling all noes without outgoing eges by a type vaiable. In the gaph above this is just noe V that we label by α. Then we constuct the types at all noes in the obvious way: noe x has type (α α) α because points to a noe with label α α an points to a noe labele with α. So, the pincipal type of the tem P is ((α α) α) α. One may suspect that a nomal fom always has a simple cycle, involving only one o two noes. Howeve, this is not the case: if one consies the Newman gaph of the tem N λx.x(λy.y(λz.x)), one can obseve that only one euction step is possible an then a nomal fom is obtaine with a cycle of length 4 (hence N is not typable). 3. Newman s algoithm fo λ In this section we pesent Newman s algoithm in a way close to Newman s oiginal pesentation [14]. Newman has escibe his algoithm in a vey abstact an geneal way in oe to apply it to vaious type systems. Howeve, we ae meely inteeste in λ, theefoe we will specialize ou efinitions fo the case of λ. Ou esciption of Newman s algoithm has a lot in common with Hinley s [10], howeve ou esciption is moe extensive an we will pove some basic popeties. Newman s algoithm is basically a ewite system. It stats with a set of equations pesenting the gaph of a λ-tem. Fom this set of equations a elation is geneate which is use to ewite the equations. This pocess is iteate until no futhe ewiting steps ae possible. We pove that Newman s algoithm is stongly nomalizing an confluent fo the case of λ. Definition 3.1. A scheme of a λ-tem (typically S, S,... ) is a finite set of equations of the following shape. Name Name Name Name λname.name Hee Name anges ove tem names (typically U, V, X, Y, Z,... ) an vaiables (typically x, y, z,... ). Moeove, let TemNames(S) enote the set of tem names occuing in S an Names(S) the set of names occuing in S. 10

11 Definition 3.2. Given a λ-tem M, the scheme S(M) is compute simultaneously with the entance E(M) of the scheme using the following algoithm. M S(M) E(M) x x MN {Z E(M) E(N)} S(M) S(N) Z λx.p {Z λx.e(p )} S(P ) Z In the computation of S(M), the new tem names Z shoul be chosen in such a way that they ae fesh. That is, we have to make sue that: in the application case, Z / TemNames(S(M)) TemNames(S(N)), in the application case, TemNames(S(M)) TemNames(S(N)) =, in the λ case, Z / TemNames(S(P )). Example 3.3. The scheme S = S(M) of the λ-tem M λfx.f(fx) is: U λf.v V λx.w W fz Z fx Definition 3.4. Given a scheme S, the elations S, S Name Name ae inuctively efine as follows. 1. If Z MN then M S N an M S Z 2. If Z λx.p then Z S x an Z S P When witing X S Y o X S Y we will often suppess S, an wite X Y o X Y, espectively. Note that the equations coespon to the eges of the tem gaph an the elations an coespon to the eges an of the Newman gaph escibe in the Section 2. Example 3.5. The elations an fo the λ-tem λfx.f(fx) ae: U f U V V x V W f Z f W f x f Z Definition 3.6. Given a scheme S, a binay elation S Name Name is efine as S := S S. Definition 3.7. Given a scheme S, a binay elation S Name Name is inuctively efine as follows. (A1) If U X an U Y, then X S Y (A2) If U X an U Y, then X S Y (B) If X U, Y U, X V an Y V, then X S Y As usual, when witing X S Y o X S Y we will often suppess S, an wite X Y o X Y, espectively. Newman also inclue the following clauses in his efinition of X Y. 11

12 (C1) If X MN an Y MN, then X Y (C2) If X λx.p an Y λx.p, then X Y Howeve, as the following lemma inicates, these clauses can be omitte fo the specific case of λ. Lemma 3.8. If one of the following popeties hol we have X Y. 1. X MN an Y MN 2. X λx.p an Y λx.p Poof. Suppose that X MN an Y MN, then by clause (A): M N M X M N M Y = X Y Suppose that X λx.p an Y λx.p, then by clause (B): X x X P Y x Y P = X Y Newman infomally escibes the meaning of X Y as X has the same type as Y, which means that X an Y eceive the same type accoing to the typing ules of λ. He escibes the meaning of X Y as X has a highe type than Y, that means that the type that X eceives contains the type that Y eceives as a subtem. Definition 3.9. An η-euction step 3 X:=Y on schemes, S 1 S 2, is efine by eplacing X by Y in all equations of S 1 povie that X Y an X S Y. ν Multiple steps ae enote by S 1 S 2 whee ν is a substitution. A scheme S is in η-nomal fom if no η-euction steps ae possible. The following Lemma is also poven by Newman [14]. Lemma The notion of η-euction is stongly nomalizing. That is, any η-euction path leas to a nomal fom. Poof. The numbe of iffeent tem names euces at each η-euction step. Because a scheme consists of finitely many equations it is immeiate that η-euction leas to a nomal fom in finitely many steps. Definition A cycle in a scheme S is a sequence X 1,... X n Name fo which: X 1 X 2... X n 1 X n X n X 1 A scheme S is statifie if it contains no cycles. 3 This notion is something completely iffeent fom the well-known η-euction in the λ-calculus: λx.mx η M povie that x / FV(M). 12

13 The situation with espect to the scheme an the elations efine fom it is as follows, whee an aow inicates the geneation of one entity fom anothe. λ-tem M Scheme S Relations S, S Relation S Afte an η-euction step, we obtain a new scheme S, fo which we eefine the elations S an S an theeby the elation S. Afte having epeate this pocess finitely many times we obtain a nomal fom S f by Lemma Accoing to Newman M is typable iff S f is statifie. In Section 2 we have efine euction on Newman gaphs athe than tem gaphs. Likewise, it is also possible to pefom η-euction on the elations S an S. This way we o not have to keep tack of the equations of the scheme. Howeve, this esults in loss of infomation because it is not possible to estoe an abitay scheme fom the elations S an S. Fo statification, as efine in Definition 3.11, this is howeve no poblem. Example Consie the scheme S = S(M) of the λ-tem M f(fx). W fz Z fx f Z f W f x f Z Afte one step of η-euction, S Z:=x S, the scheme S is obtaine. W fx x fx f x f W f x Finally a nomal fom S f is obtaine by S W :=x S f. f x x fx f x Thee ae no cycles, thus we conclue that S f is statifie. The following lemma coespons to what Newman calls an ae peseve une any homomophic change of lettes. Lemma If S ν S, then fo all X, Y Name we have: X S Y = νx S νy X S Y = νx S νy Poof. This lemma follows fom the obsevation that an epen meely on the elative positions of the tem names in a scheme S. 13

14 A := B S 1 B := C A := B S 1 C := B A := B S 1 B := C A := B S 1 C := D S S 3 = S4 A := C S 2 C := B S C := B S 3 S 2 A := B S B := C S 3 S 2 A := C S C := D S 3 S 2 A := B (a) (b) (c) () Figue 2: Cases consiee in the poof of Lemma Example Consie the scheme S = S(M) of the λ-tem M λx.xx. W λx.v V xx W x W V x x x V This scheme contains a cycle. By Lemma 3.13 we conclue that if we euce S to a nomal fom S f this scheme will contain a cycle as well, thus S f is not statifie eithe. Note that the pevious example oes not claim that S f is unique, but only that in whateve nomal fom S f we en up with, S f is not statifie. We now pove that S f is unique up to isomophism, whee S 1 an S 2 ae isomophic, notation S 1 = S2, if thee exist substitutions σ 1 an σ 2 such that S 2 = σ 1 (S 1 ) an S 1 = σ 1 (S 2 ). The following Lemma is also poven by Newman [14]. Lemma The notion of η-euction is locally confluent up to enaming of tem names. That is given a scheme S an euctions S ν S 1 an S δ S 2, ν thee ae schemes S 3 an S 4 an euctions S δ 1 S 3 an S 2 S 4 such that S 3 = S4. Poof. Consie the following cases. 1. If ν an δ ae equal then S 1 = S 2 an no futhe euction is neee. 2. If ν an δ ae each othe s invese (ν = [A := B] an δ = [B := A]) then S 1 = S2 an no futhe euction is neee. 3. If ν = [A := B] an δ = [A := C] then thee ae euctions S 1 S 3 an S 2 S 4 such that S 3 = S4 as shown in Figue 2a. These euctions ae vali accoing to Lemma Fo the othe cases thee ae euctions S 1 S 3 an S 2 S 3 as shown in Figue 2b-2. These euctions ae vali accoing to Lemma These ae all the possible cases because thee ae two cases with two iffeent tem names involve, thee cases with thee iffeent tem names involve an only one case with fou iffeent tem names involve. The following Theoem was also poven by Newman [14]. Theoem Each scheme S has a nomal fom (hencefoth S f ) which is unique up to isomophism. 14

15 Poof. The notion of η-euction is stongly nomalizing by Lemma 3.10 an locally confluent by Lemma 3.15, thus using Newman s Lemma fo abstact ewiting systems (Lemma 1.8) η-euction is confluent. Hence the nomal fom S f of S is unique up to isomophism. Coollay The following popeties hol fo each scheme S. 1. Whethe S f is statifie is inepenent of the oe of η-euction. 2. The numbe of steps in an η-euction path fom S to S f is fixe an moeove less o equal to the numbe of names in S. Anothe inteesting obsevation is that the (B) clause in Definition 3.7 can be omitte. That is, given a scheme S, in oe to etemine whethe S f is statifie we o not nee to pefom any euction steps by clause (B). We intouce the following efinition befoe we pove this esult. Definition Let S A S enote an η-euction step by clause (A1) o (A2) an let S B S enote an η-euction step by clause (B). Lemma If S 1 B S 2 A S 3 then S 1 A S 4 fo some S 4. Poof. Let X S1 U, Y S1 U, X S1 V, Y X:=Y S1 V an let S 1 B S 2 be the esulting B -step. Now we have to consie the following cases. 1. Thee exists a Z U such that X S1 Z o Y S1 Z. Then we can pefom an A -step in S 1, namely [U := Z]. 2. Thee exists a Z V such that X S1 Z o Y S1 Z. Then we can pefom an A -step in S 1, namely [V := Z]. 3. Thee oes not exist a Z as escibe in the peceing cases. Then the step S 2 A S 3 oes not epen on the substitution of Y fo X, so we can o the same A -step in S 1. Coollay We have the following popeties. 1. A B -step cannot ceate an A -step. That is, if S is in A -nomal fom an S B S, then S is in A -nomal fom. 2. The euction B can be postpone. That is, given a scheme S, we have S A S B S f fo some S. Poof. The fist follows immeiately fom Lemma Fo the secon: evey scheme S euces to a (unique) scheme in nomal fom S f (Theoem 3.16) with a euction sequence of fixe length (Coollay 3.17). By Lemma 3.19, we can move all A -steps to the beginning of the euction sequence. Lemma Given a scheme S that is in A -nomal fom an let S B S, then S contains a cycle if S contains a cycle. Poof. Let X S U, Y S U, X S V, Y S V an let S X:=Y B S be the esulting B -step. Let C be the cycle in S. We now exhibit a cycle in S by istinguishing the following cases. 15

16 1. The cycle C inclues Y. Since S is in A -nomal fom we know by Coollay 3.20 that S is in A -nomal fom. Hence thee is no Z U such that Y S Z o Z V such that Y S Z, theefoe C inclues W S Y S U o W S Y S V fo some name W. So in S we eithe have W S Y o W S X. In the fist case we ae finishe: C is also a cycle in S. In the secon case we have X S U o X S V, so we can eaange C into a cycle in S by passing though X instea of Y. 2. The cycle C oes not inclue Y. Then C aleay exists in S. Coollay Given a scheme S an let S A S such that S is in A -nomal fom, S f is statifie iff S is statifie. Poof. The nomal fom of scheme S is the same as the one of S, which is S f. Due to Coollay 3.20, we have S B S f an each scheme in this euction sequence is in A -nomal fom. By Lemma 3.21, we fin that fo each S 1 A S 2 in this euction sequence, S 1 contains a cycle iff S 2 contains a cycle. Thus, S f is statifie iff S is statifie. 4. Computing a type using Newman s algoithm In this section we pove that Newman s algoithm is coect an we exten it to esult in a pincipal type. Futhemoe, we compae it to Wan s algoithm an his coectness poof [21] Coectness of Newman s algoithm To pove sounness an completeness with espect to typing we efine a set of type equations fo each scheme. Fistly, we pove that the most geneal unifie of these equations gives ise to a pincipal type. Seconly, we pove that pefoming η-euction while keeping tack of the pefome substitutions coespons to computing a most geneal unifie. Definition 4.1. Given a scheme S, a set of type equations E(S) is inuctively efine as follows. 1. If Z MN then M N Z E(S) 2. If Z λx.p then Z x P E(S) Hee X is a fesh type vaiable fo each tem name X. Fact 4.2. Given a scheme S an X, Y, Z Name, we have: X Y X Z X Y Z E(S) Definition 4.3. Given a λ-tem M, efine Γ M := {x : x x FV(M)}. Lemma 4.4. Given a λ-tem M an a substitution σ such that σ = E(S(M)), we have σ(γ M ) M : σ(e(m)). Poof. This popety is poven by inuction on the stuctue of M. 16

17 (va) Now E(x) = x. The esult is immeiate because x : σ(x) x : σ(x) fo each substitution σ. (app) Now S(MN) = {E(MN) E(M) E(N)} S(M) S(N). So we have σ = E(S(M)) an σ = E(S(N)) an theefoe by the inuction hypothesis σ(γ M ) M : σ(e(m)) an σ(γ N ) N : σ(e(n)). Moeove we have σ(e(m)) = σ(e(n)) σ(e(m N)) hence by the application ule an weakening σ(γ MN ) MN : σ(e(mn)). (λ) Simila to the peceing case. Lemma 4.5. Given a eivable typing jugment M : ρ, thee exists a substitution σ such that σ = E(S(M)), σ(γ M ) an ρ = σ(e(m)). Poof. This popety is poven by inuction on the type eivation M : ρ. (va) Let x : ρ such that x : ρ. Now E(x) = x an S(x) =. Define σ = [x := ρ]. Then we have σ = E(S(x)). Also σ(γ x ) an ρ = σ(e(m)), so we ae one. (app) Let MN : ρ, then we have M : δ ρ an N : δ. Now E(MN) = Z an S(MN) = {Z E(M) E(N)} S(M) S(N). By the inuction hypothesis we obtain substitutions σ N an σ M. We efine σ as follows. σ(y ) = σ M (Y ) σ(y ) = σ N (Y ) σ(z) = ρ σ(α) = α if Y Names(S(M)) if Y Names(S(N)) othewise This substitution is well efine because (a) The tem M N satisfies the Baenegt convention an theefoe all boun vaiables in M an N ae fesh. (b) The tem names assigne to the subtems of M an N ae isjoint (by Definition 3.2). (c) By the inuction hypothesis we have σ M (x) = (x) fo all vaiables x FV(M) an σ N (x) = (x) fo all vaiables x FV(N). By the inuction hypothesis we have σ = E(S(M)), σ = E(S(N)) an σ(e(m)) = δ ρ = σ(e(n)) σ(z), so σ = E(S(MN)). Moeove, we have σ(γ MN ) an ρ = σ(e(mn)), so we ae one. (λ) Let λx.p : δ ρ, then we have, x : δ P : ρ. Now E(λx.P ) = Z an S(λx.P ) = {Z λx.e(p )} S(P ). By the inuction hypothesis we obtain a substitution σ P. We efine σ as follows. σ(y ) = σ P (Y ) if Y Names(S(P )) σ(x) = δ σ(z) = δ ρ σ(α) = α othewise 17

18 By the inuction hypothesis we obtain that σ = E(S(P )) an σ(z) = δ ρ = σ(x) σ(e(p )), hence σ = E(S(λx.P )). Moeove, we have σ(γ λx.p ) an δ ρ = σ(e(λx.p )), so we ae one. Coollay 4.6. The equations à la Newman ae coect. That is, given a λ-tem M an its scheme S = S(M), we have 1. If σ = mgu E(S) then σ(e(m)), σ(γ M ) is a pincipal pai of M. 2. If = E(S) then M. Poof. Immeiate fom Lemma 4.4 an 4.5. Now that we have shown that the fist pat of Newman s algoithm actually consists of the geneation of type equations, we will pove that pefoming η-euction coespons to computing a most geneal unifie. Fist we efine a substitution Ŝ fo each scheme S that is statifie an in nomal fom. Also, we pove that this is in fact the most geneal unifie of E(S). Definition 4.7. Given a scheme S that is statifie an in A -nomal fom, the substitution Ŝ : TVa Type is efine as follows. Ŝ(α) = {Ŝ(β) Ŝ(γ) α if α β γ E(S) othewise Lemma 4.8. Given a scheme S that is statifie an in A -nomal fom, the substitution Ŝ is well efine. Poof. In oe to show that Ŝ is well efine we have to pove that the efinition of Ŝ is unambiguous an total. Fo the fist conition we have to show that fo each Z thee is at most one equation Z X Y E(S). Let us suppose the contay, Z X Y E(S) an Z A B E(S), now by Fact 4.2 we have X A an Y B. So a contaiction is obtaine because S is in A -nomal fom. Moeove by Fact 4.2 an statification we know that no cycles in the type equations exist, hence Ŝ is total. Lemma 4.9. Given a scheme S that is statifie an in A -nomal fom, we have Ŝ = mgu E(S). Poof. We have Ŝ(X) = Ŝ(A) Ŝ(B) fo each X A B E(S) by efinition, hence Ŝ = E(S). So it emains to pove that Ŝ is a most geneal unifie of E(S). Theefoe suppose that we have a substitution δ such that δ = E(S). Now we shoul efine a substitution σ such that σ Ŝ = δ. We efine σ := δ. We pove that δ(ŝ(x)) = δ(x) fo all X Name by well-foune inuction ove S (this is allowe because S is statifie). So suppose that we have δ(ŝ(y )) = δ(y ) fo all Y Name such that X Y. Now we pove that δ(ŝ(x)) = δ(x) by istinguishing the following cases. 18

19 1. X A B E(S). Then we have δ(ŝ(a)) = δ(a) an δ(ŝ(b)) = δ(b) by the hypothesis. Hence we have δ(ŝ(x)) = δ(x) as shown below. δ(ŝ(x)) = δ(ŝ(a)) δ(ŝ(b)) = δ(a) δ(b) = δ(x) 2. X A B / E(S). Then we have δ(ŝ(x)) = δ(x). Lemma Given a scheme S that is not statifie, we have = E(S). Poof. If S is not statifie, E(S) contains a cycle an theefoe = E(S). So fa we have poven two pats of the coectness of Newman s algoithm: the equations E(S) ae coect an Ŝf is the most geneal unifie of E(S f ). So it emains to show how we can use Newman s algoithm to compute a most geneal unifie of E(S). As intouce befoe, we will o this by keeping tack of the substitutions while pefoming η-euction. Because these substitutions eplace names fo names instea of types fo type vaiables we intouce the following efinition. Definition Given a substitution ν : Name Name, the substitution ν : TVa TVa is efine as ν(x) = ν(x). In the emaine of this section we will pove that if S ν S f then Ŝf ν is the most geneal unifie of E(S) iff S f is statifie. This finally leas to a coectness poof of Newman s algoithm. Lemma If S ν S an δ = E(S ) then δ ν = E(S). Poof. Immeiate because δ = ν(e(s)) implies δ ν = E(S). Lemma If S X:=Y S an δ = E(S) then δ(x) = δ(y ). Poof. We pove this esult by istinguishing the following cases. (A1) Z X V, Z Y W E(S). Now we have δ(z) = δ(x) δ(v ) an δ(z) = δ(y ) δ(w ). So δ(x) δ(v ) = δ(y ) δ(w ) an theefoe δ(x) = δ(y ). (A2) Simila to the peceing case. (B) X V W, Y V W E(S). Now we have δ(x) = δ(v ) δ(w ) an δ(y ) = δ(v ) δ(w ) an theefoe δ(x) = δ(y ). Coollay If S ν S an δ = E(S) then δ ν = δ. Poof. Immeiate fom Lemma Lemma If S ν S an δ = E(S) then δ = E(S ). Poof. We have to pove that we have δ(νx) δ(νa) δ(νb) fo each equation X A B E(S). By assumption we have δ(x) δ(a) δ(b) so by Coollay 4.14 we ae one. 19

20 Theoem Given a scheme S an let S ν S f, we have: 1. If S f is statifie then Ŝf ν = mgu E(S). 2. If S f is not statifie then = E(S). Poof. By Lemma 4.9 we have Ŝf = E(S f ) an by Lemma 4.12 we obtain that Ŝ f ν = E(S). So fo the fist popety it emains to pove that Ŝf ν is a most geneal unifie of E(S). Theefoe let us suppose that we have a substitution δ such that δ = E(S). By Lemma 4.15 we have δ = E(S f ) an by Lemma 4.9 we obtain a substitution σ such that δ = σ Ŝf. Now it emains to pove that δ = σ Ŝf ν, but by Coollay 4.14 we have δ = δ ν, so we ae one. To pove the secon popety let us suppose that we have a substitution δ such that δ = E(S), then by Lemma 4.15 we have δ = E(S f ). But now we obtain a contaiction with Lemma 4.10 because S f is not statifie. Theoem Newman s algoithm is soun an complete with espect to typing. That is, given a λ-tem M, its scheme S = S(M) an let S ν S f, we have: 1. If S f is statifie then σ(e(m)), σ(γ M ), whee σ = Ŝf ν, is a pincipal pai of M. 2. If S f is not statifie then M. Poof. Immeiate fom Coollay 4.6 an Theoem Compaison with the algoithm of Wan The geneation of type equations as efine in Definition 4.1 an the statements of Lemma 4.4 an 4.5 look quite simila to Wan s algoithm an his coectness poof [21], espectively. Howeve we show that thee ae some notable iffeences between Wan s metho an ous (boowe fom Newman). Wan escibes his algoithm with a skeleton an an action table. Given a close tem M one stats with an empty set of equations E an a set of goals G consisting of one initial goal (, M, α) whee α is a fesh type vaiable. While the set of goals G is non-empty one picks a goal g fom G, eletes it fom G, an uses the following action table to geneate new goals an equations. g SG(g) EQ(g) (Γ, x, τ) τ Γ(x) (Γ, λx.m, τ) (Γ; x : α 1, M, α 2 ) τ α 1 α 2 (Γ, M P, τ) (Γ, M, α τ), (Γ, P, α) The newly geneate goals SG(g) ae ae to the set of goals G an the newly geneate equations EQ(g) ae ae to the set of equations E. This pocess is epeate until the set of goals G is empty. The coectness of Wan s algoithm states that δ = mgu E iff δ(α) is a pincipal type of M. So we obseve at least the following impotant iffeences between Wan s metho an ous. 20

21 1. Wan s algoithm esults in a set of type equations of the shape σ τ whee σ, τ Type. In ou metho the geneate equations ae of the shape α β γ whee α, β, γ TVa. 2. Wan s algoithm woks fo tems that o not satisfy the Baenegt convention. Theefoe Wan s algoithm keeps tack of the fee vaiables explicitly by caying a context aoun. 3. Wan s algoithm takes a type vaiable α as its input. Fo the geneate equations E we have δ = mgu E iff δ(α) is a pincipal type of M. Ou algoithm esults in a type vaiable E(M) an a set of equations E(M) such that δ = mgu E(S(M)) iff δ(e(m)) is a pincipal type of M. So, Wan s algoithm geneates equations top-own while ou algoithm geneates equations bottom-up. One coul ty to moify Wan s action table in such a way that it esults in type equations of the equie shape 4 in the following way. g SG(g) EQ(g) (Γ, x, α) α Γ(x) (Γ, λx.m, α) (Γ; x : α 1, M, α 2 ) α α 1 α 2 (Γ, M P, α) (Γ, M, α 1 ), (Γ, P, α 2 ) α 1 α 2 α Howeve, in the case of a vaiable an equation of the shape α β is geneate. Unfotunately, ue to Wan s top-own appoach we cannot take these equations into account in the application an λ cases. 5. Extension with othe type constuctions The typing algoithm à la Newman can be extene to inclue othe type constuctos. Fist we show how to inclue pouct types. This is a pope extension of Newman s metho, because the algoithm shoul now also fail ue to conflicting type constuctos, a case Newman oes not eal with. This equies a efinement of the notion of being statifie. Othe simple extensions, like sum types can be ae in a simila way. Seconly, we show how to a weak polymophism, which involves univesal quantification ove type vaiables (but only on the top level). This is moe inteesting, because it is basically only elevant if we consie tems insie a context, in which the vaiables have weakly polymophic types Pouct types We fist look into pouct types, so we efine the ules of the system. 4 Fo claity of pesentation we geneate type equations instea of tem equations that have to be tanslate into type equations. 21

22 Definition 5.1. The system λ is extene with pouct types as follows. Fistly, we exten the tems to inclue paiing an the pojections. Λ ::= Va Λ, Λ π 1 Λ π 2 Λ (ΛΛ) (λva.λ) Seconly, we exten the simple types with pouct types. Type ::= TVa (Type Type) (Type Type) Thily, we exten Definition 1.2 to inclue the following ules. Γ M : σ Γ N : τ Γ M, N : σ τ (a) Paiing Γ M : σ τ Γ π 1 M : σ (b) Fist Pojection Γ M : σ τ Γ π 2 M : τ (c) Secon Pojection Now we exten the tee of a tem an the gaph of a tem to inclue paiing an pojection constuctions. Definition 5.2. We exten the tanslation of tems to tees an the tanslation of tees to Newman gaphs as epicte in the figue. We wite Tgaph(M) fo the tee we obtain an Ngaph(M) fo the Newman gaph we obtain. In the constuction of the Newman gaph, we again choose a fesh label fo each noe. T( π i M) = π i T(<M, N>) = <,> T(M) T(M) T(N) <,> V 1 2 π 1 W π 2 W 1 2 The intuition will be clea again: X 1 Y iff X is a pouct type whose fist component type is Y X 2 Y iff X is a pouct type whose secon component type is Y. 22

23 We now exten the notion of conguence between noes to inclue the new aows in the gaph. Definition 5.3. The notion of conguence G between noes in a Newman gaph of Definition 2.3 is extene by aing the following inuctive clauses. 1. If U 1 X an U 1 Y, then X G Y 2. If U 2 X an U 2 Y, then X G Y 3. If X 1 U, X 2 V an Y 1 U, Y 2 V, then X G Y The notion of euction of Definition 2.5 is immeiately extene: we can join noes X an Y in case X Y, whee the conguence elation X Y is now the one of Definition 5.3. A gaph is in nomal fom in case no futhe euctions ae possible. The only notion that eally changes is that of a gaph being statifie. Definition 5.4. Given a Newman gaph G in the system extene with poucts, then G is statifie in case the following conitions hol. 1. The elation 1 2 contains no cycles. 2. The elation 1 2 contains no conflict. Hee we efine a conflict as a noe X that has an outgoing aow l1 an an outgoing aow l2 such that l 1 {1, 2} an l 2 {, }. Note that the new case in the efinition of statifie coespons to the case of conflicting function symbols in the unification algoithm. In the type system with only, we have only one function symbol, so unification can only fail ue to the occus check (the cyclicity in the efinition of statifie). In the pesence of poucts, one can also fail ue to conflicting type constuctos. Lemma 5.5. The euction is stongly nomalizing an confluent. Moeove, the nomal fom of the Newman gaph of M is statifie if an only if M is typable in λ extene with poucts. Example 5.6. Consie the λ-tem M λx.x(π 1 x). The nomal fom of its Newman gaph is epicte below an one can obseve that it is not statifie, ue to a conflict in the noe x. x U V 1 W Just as we have one fo aow types in example 2.9, one can now a type infomation to the noes in a statifie Newman gaph, to compute the type of the oiginal tem. We will not etail that hee. 23

24 5.2. Weak polymophism In this section we teat the λ-calculus with weak polymophism (hencefoth λ2w) an give a typing algoithm à la Newman. The weak polymophism means that the types of ou system ae type schemes, of the fom α.σ, whee σ is a simple type. Definition 5.7. The weakly polymophic types ae of the following fom Type ω ::= TVa.Type ω Type The fee type vaiables, FTV(σ), of a weakly polymophic type ae inuctively efine as follows. FTV(α) = {α} FTV(σ τ) = FTV(σ) FTV(τ) FTV( α.σ) = FTV(σ)\{α} A context Γ is now a sequence of eclaations of the fom x : σ, whee σ is a weakly polymophic type. Definition 5.8. A λ2w-typing jugment Γ M : ρ enotes that a λ-tem M has type ρ in context Γ. The eivation ules fo eiving such a jugment ae as follows. x : σ Γ Γ x : σ (c) Vaiable Γ M : σ τ Γ N : σ Γ MN : τ () Application Γ, x : σ P : τ τ Type Γ λx.p : σ τ (e) Abstaction Γ M : σ α F T V (Γ) Γ M : α.σ (f) Genealization Γ M : α.σ τ Type Γ M : σ[α := τ] (g) Instantiation Example 5.9. Consie a eivation of x : β.β β xx : α.α α. We abbeviate Γ = x : β.β β. Γ x : β.β β Γ x : β.β β Γ x : (α α) α α Γ x : α α Γ xx : α α Γ xx : α.α α Note that we cannot abstact ove x, because it has a weakly polymophic type. So the tem λx.xx is not typable in λ2w. To exten the notion of Newman gaph to inclue tems of λ2w, we only have to look at the polymophic vaiables in the context, as the tem stuctue oes not change. So, we efine the tanslation of a eclaation x : α.σ into a Newman gaph. Fist we efine the tanslation of a simple type into a Newman gaph. (We coul o this via fist efining the tee of the type, but we skip that step now.) 24

25 T(σ τ) = U U V T(σ) T(τ) α β Figue 3: Tanslating a type to a Newman gaph. Definition Given a type σ Type, we efine the Newman gaph of this type, Ngaph(σ) by inuction as escibe in Figue 3, whee we choose a fesh label (U in the pictue) an we shae all ientical type vaiables in one leaf. As an example we inicate the tanslation of α β α in Figue 3. Hee we see the shaing of noe α. Definition Given a context Γ = x 1 : α 1.σ 1,..., x n : α n.σ n an an untype λ-tem M with FV(M) {x 1,..., x n }, we efine the Newman gaph of M as in Definition 2.2, with the poviso that: 1. Evey occuence of a fee vaiable x i is labele uniquely an eplace by the Newman gaph of its type, Ngaph(σ i [ α i := β]) whee x i : α i.σ i Γ an β consists of fesh type vaiables. 2. All occuences of fee type vaiables in the types of x 1,..., x n ae shae. To see what the efinition means exactly, we teat an example. Example Let us consie the λ-tem M x y x in the context Γ = x : α.(α β) α, y : γ.(β γ) γ. Then the Newman gaph of M in Γ is as follows. We see that the gaph of the type of x occus twice, because x occus twice in the tem M. Futhemoe, the fee type vaiable β is shae by all the thee type tees, of the fist occuence of x, of y, an of the secon occuence of x. 25

26 The conguence elation (Definition 2.3) oes not change, an neithe oes the euction on Newman gaphs (Definition 2.5). The nomal fom of the Newman gaph of a λ2w-tem is again unique up to enaming of labels an we have the following Lemma. Lemma The euction is stongly nomalizing an it is confluent. Moeove, the nomal fom of the Newman gaph of M is statifie if an only if M is typable in λ2w. We can also ea off the type fom the Newman gaph in nomal fom. As we ae in λ2w, we want to genealize as many type vaiables as possible. This can be one by keeping tack of the vaiables that ae fixe in the context, like β in the example context of Example To show this, we look at the tem Q (λy. y x) (x (λz. z)) in the context Γ = x : α.α α. Remak that this tem is closely elate to the tem M λx. (λy. y x) (x (λz. z)) that we have consiee in Example 2.6 an which is not typable in λ. Example Let us consie the λ-tem Q (λy. y x) (x (λz. z)) in the context Γ = x : α.α α. We aw its Newman gaph an euce it to nomal fom. In boxes an in cicles we inicate the conguent noes that we join in a couple of lage steps. V Y U y x x' α Z z V U Y α x' 26

27 The gaph in nomal fom contains no cycle, so we conclue that the tem is typable. We can again ea off the type by annotating the noes without outgoing eges with type vaiables an constucting the type fo the noe U. We conclue that the pincipal type of the tem in λ2w is: α.α α. 6. Unification à la Newman In the pevious sections we have seen that Newman s algoithm consists of the following steps. 1. Ceate a set of equations fom a tem. 2. Using these tem equations, efine elations coesponing to type constaints. Fom these elations a conguence elation is ceate. 3. Rewite the equations by eplacing a name by anothe conguent one; estat fom (2) until no moe ewites ae possible. Newman ewites the equations, but we have seen that we can also ewite the elations, an basically foget about the equations afte step (1). In ou gaphical epesentation we have efomulate Newman s algoithm as follows. 1. Ceate a set of equations fom a tem an fom that a set of elations coesponing to type constaints. 2. Define fom these elations a conguence elation on names. 3. Rewite the elations by eplacing a name by anothe conguent one; estat fom (2) until no moe ewites ae possible. Ou elations fo eciing typing ae an fo λ (Section 2) an, 1,, an 2 fo λ extene with poucts (Section 5.1). These elations coespon to type constaints of the shape α β γ an α β γ. As shown in Section 4, the phases of Newman s algoithm ae compaable to the typing algoithm of Wan, whee a set of equations is ceate, which is then solve by a unification algoithm. We have seen that the equations of Wan ae constucte top-own, while Newman ceates the elations bottomup. Howeve, on anothe tack, Newman s algoithm is vey close to what happens in Wan s algoithm, because the steps (2) an (3) in the esciption above actually o unification! In this section we will make this pecise an show that Newman s metho gives ise to a unification algoithm an actually a quite efficient one. It is in set-up vey close to what is calle unification of tem DAGs (Diecte Acyclic Gaphs) in [16, 2]. Befoe going into the efinitions we give an example that shoul claify the connection with unification. Example 6.1. Suppose we have a fist oe language with two function symbols: f of aity 2 an h of aity 1. Now we want to fin a unifie fo the one-membe set of equations E = {f(x, h(v)) f(h(y), x)}. We intouce names fo all subtems an eplace E by the equivalent set of equations E = {A f(x, B), B h(v), A f(c, x), C h(y)}. We now ewite E by eplacing a symbol X by Y in case the set of equations contains two equations of the shape U f(..., X,...) an U f(..., Y,...), whee X 27

28 x f1 f2 B h v A f2 f1 C h y A f2 f2 f2 f1 f1 [x:=c] [B:=C] [v:=y] B C C h h h h v y v y A A f1 C h y f2 Figue 4: Unification algoithm á la Newman gaphically. an Y ae in the same position in the agument list of f. The ewiting goes as follows. A f(x, B) B h(v) A f(c, x) C h(y) A f(c, C) C h(v) C h(y) [x:=c] [v:=y] A f(c, B) B h(v) A f(c, C) C h(y) { A f(c, C) C h(y) } [B:=C] If we collect the substitutions we have pefome along the way, we obtain the most geneal unifie [x := h(y), v := y] of E. In the example we see that we neve substitute a compoun tem, but only names fo names. This pevents a size blow up that one coul encounte in a simple-mine oinay unification algoithm. We also give a gaphical epesentation of the unification, base on the same example. Example 6.2. Let us consie the set of equations E = {f(x, h(v)) f(h(y), x)} again. We now eplace each tem by a Newman gaph, which is a DAG obtaine by ceating fo evey subtem f(t, q) a new noe U with f1 pointing to the noe of subtem t an f2 pointing to the noe of subtem q. We shae vaiable noes. Futhemoe, we epesent an equation s by joining the two top noes of the tems an s. Fo E, this pouces the Newman gaph epicte in Figue 4. We now efine pecisely how unification à la Newman woks. Let a signatue be given with function symbols with fixe aity (typically f, g,... ) an fist oe tems ove this signatue (typically t, q,... ). We fist efine fo evey tem t a set of equations of the fom U t, whee U is a tem name that names the subtem q of t. Definition 6.3. Given a fist oe tem t, the set of Newman equations Neqns(t) is efine as follows. 1. Ceate a fesh tem name (typically U, V, X, Y, Z) to name each nonvaiable subtem of t. 28

A Crash Course in (2 2) Matrices

A Crash Course in (2 2) Matrices A Cash Couse in ( ) Matices Seveal weeks woth of matix algeba in an hou (Relax, we will only stuy the simplest case, that of matices) Review topics: What is a matix (pl matices)? A matix is a ectangula

More information

A Bijective Approach to the Permutational Power of a Priority Queue

A Bijective Approach to the Permutational Power of a Priority Queue A Bijective Appoach to the Pemutational Powe of a Pioity Queue Ia M. Gessel Kuang-Yeh Wang Depatment of Mathematics Bandeis Univesity Waltham, MA 02254-9110 Abstact A pioity queue tansfoms an input pemutation

More information

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs Math 30: The Edős-Stone-Simonovitz Theoem and Extemal Numbes fo Bipatite Gaphs May Radcliffe The Edős-Stone-Simonovitz Theoem Recall, in class we poved Tuán s Gaph Theoem, namely Theoem Tuán s Theoem Let

More information

New problems in universal algebraic geometry illustrated by boolean equations

New problems in universal algebraic geometry illustrated by boolean equations New poblems in univesal algebaic geomety illustated by boolean equations axiv:1611.00152v2 [math.ra] 25 Nov 2016 Atem N. Shevlyakov Novembe 28, 2016 Abstact We discuss new poblems in univesal algebaic

More information

Chapter 3: Theory of Modular Arithmetic 38

Chapter 3: Theory of Modular Arithmetic 38 Chapte 3: Theoy of Modula Aithmetic 38 Section D Chinese Remainde Theoem By the end of this section you will be able to pove the Chinese Remainde Theoem apply this theoem to solve simultaneous linea conguences

More information

556: MATHEMATICAL STATISTICS I

556: MATHEMATICAL STATISTICS I 556: MATHEMATICAL STATISTICS I CHAPTER 5: STOCHASTIC CONVERGENCE The following efinitions ae state in tems of scala anom vaiables, but exten natually to vecto anom vaiables efine on the same obability

More information

Quantum Mechanics I - Session 5

Quantum Mechanics I - Session 5 Quantum Mechanics I - Session 5 Apil 7, 015 1 Commuting opeatos - an example Remine: You saw in class that Â, ˆB ae commuting opeatos iff they have a complete set of commuting obsevables. In aition you

More information

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0}, ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION E. J. IONASCU and A. A. STANCU Abstact. We ae inteested in constucting concete independent events in puely atomic pobability

More information

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies

Supplementary information Efficient Enumeration of Monocyclic Chemical Graphs with Given Path Frequencies Supplementay infomation Efficient Enumeation of Monocyclic Chemical Gaphs with Given Path Fequencies Masaki Suzuki, Hioshi Nagamochi Gaduate School of Infomatics, Kyoto Univesity {m suzuki,nag}@amp.i.kyoto-u.ac.jp

More information

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi

ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS. D.A. Mojdeh and B. Samadi Opuscula Math. 37, no. 3 (017), 447 456 http://dx.doi.og/10.7494/opmath.017.37.3.447 Opuscula Mathematica ON THE INVERSE SIGNED TOTAL DOMINATION NUMBER IN GRAPHS D.A. Mojdeh and B. Samadi Communicated

More information

The Substring Search Problem

The Substring Search Problem The Substing Seach Poblem One algoithm which is used in a vaiety of applications is the family of substing seach algoithms. These algoithms allow a use to detemine if, given two chaacte stings, one is

More information

CHAPTER 2 DERIVATION OF STATE EQUATIONS AND PARAMETER DETERMINATION OF AN IPM MACHINE. 2.1 Derivation of Machine Equations

CHAPTER 2 DERIVATION OF STATE EQUATIONS AND PARAMETER DETERMINATION OF AN IPM MACHINE. 2.1 Derivation of Machine Equations 1 CHAPTER DERIVATION OF STATE EQUATIONS AND PARAMETER DETERMINATION OF AN IPM MACHINE 1 Deivation of Machine Equations A moel of a phase PM machine is shown in Figue 1 Both the abc an the q axes ae shown

More information

PH126 Exam I Solutions

PH126 Exam I Solutions PH6 Exam I Solutions q Q Q q. Fou positively chage boies, two with chage Q an two with chage q, ae connecte by fou unstetchable stings of equal length. In the absence of extenal foces they assume the equilibium

More information

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland)

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland) Syntactical content of nite appoximations of patial algebas 1 Wikto Batol Inst. Matematyki, Uniw. Waszawski, 02-097 Waszawa (Poland) batol@mimuw.edu.pl Xavie Caicedo Dep. Matematicas, Univ. de los Andes,

More information

Surveillance Points in High Dimensional Spaces

Surveillance Points in High Dimensional Spaces Société de Calcul Mathématique SA Tools fo decision help since 995 Suveillance Points in High Dimensional Spaces by Benad Beauzamy Januay 06 Abstact Let us conside any compute softwae, elying upon a lage

More information

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012 Stanfod Univesity CS59Q: Quantum Computing Handout 8 Luca Tevisan Octobe 8, 0 Lectue 8 In which we use the quantum Fouie tansfom to solve the peiod-finding poblem. The Peiod Finding Poblem Let f : {0,...,

More information

ON A CLASS OF SKEWED DISTRIBUTIONS GENERATED BY A MIXING MECHANISM

ON A CLASS OF SKEWED DISTRIBUTIONS GENERATED BY A MIXING MECHANISM Fa East Jounal of Mathematical Sciences (FJMS) 5 Pushpa Publishing House, Allahaba, Inia Publishe Online: Novembe 5 http://x.oi.og/.7654/fjmsdec5_857_87 Volume 98, Numbe 7, 5, Pages 857-87 ISSN: 97-87

More information

Double sequences of interval numbers defined by Orlicz functions

Double sequences of interval numbers defined by Orlicz functions ACTA ET COENTATIONES UNIVERSITATIS TARTUENSIS DE ATHEATICA Volume 7, Numbe, June 203 Available online at www.math.ut.ee/acta/ Double sequences of inteval numbes efine by Olicz functions Ayhan Esi Abstact.

More information

Pushdown Automata (PDAs)

Pushdown Automata (PDAs) CHAPTER 2 Context-Fee Languages Contents Context-Fee Gammas definitions, examples, designing, ambiguity, Chomsky nomal fom Pushdown Automata definitions, examples, euivalence with context-fee gammas Non-Context-Fee

More information

Exploration of the three-person duel

Exploration of the three-person duel Exploation of the thee-peson duel Andy Paish 15 August 2006 1 The duel Pictue a duel: two shootes facing one anothe, taking tuns fiing at one anothe, each with a fixed pobability of hitting his opponent.

More information

Lecture 28: Convergence of Random Variables and Related Theorems

Lecture 28: Convergence of Random Variables and Related Theorems EE50: Pobability Foundations fo Electical Enginees July-Novembe 205 Lectue 28: Convegence of Random Vaiables and Related Theoems Lectue:. Kishna Jagannathan Scibe: Gopal, Sudhasan, Ajay, Swamy, Kolla An

More information

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations

MATH 415, WEEK 3: Parameter-Dependence and Bifurcations MATH 415, WEEK 3: Paamete-Dependence and Bifucations 1 A Note on Paamete Dependence We should pause to make a bief note about the ole played in the study of dynamical systems by the system s paametes.

More information

Online Appendix Appendix A: Numerical Examples

Online Appendix Appendix A: Numerical Examples Aticle submitte to Management Science; manuscipt no. MS-15-2369 1 Online Appenix Appenix A: Numeical Examples We constuct two instances of the ecycling netwok (RN) base on the EPR implementation in Washington

More information

Cascading Methods for Runlength-Limited Arrays

Cascading Methods for Runlength-Limited Arrays IEEE TRANSACTIONS ON INFORMATION THEORY, VOL. 43, NO. 1, JANUARY 1997 319 REFERENCES [1] E. F. Assmus, J., an V. S. Pless, On the coveing aius of extemal self-ual coes, IEEE Tans. Infom. Theoy, vol. IT-29,

More information

Section 5: Magnetostatics

Section 5: Magnetostatics ection 5: Magnetostatics In electostatics, electic fiels constant in time ae pouce by stationay chages. In magnetostatics magnetic fiels constant in time ae pouces by steay cuents. Electic cuents The electic

More information

ON THE TWO-BODY PROBLEM IN QUANTUM MECHANICS

ON THE TWO-BODY PROBLEM IN QUANTUM MECHANICS ON THE TWO-BODY PROBLEM IN QUANTUM MECHANICS L. MICU Hoia Hulubei National Institute fo Physics and Nuclea Engineeing, P.O. Box MG-6, RO-0775 Buchaest-Maguele, Romania, E-mail: lmicu@theoy.nipne.o (Received

More information

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE

ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE THE p-adic VALUATION OF STIRLING NUMBERS ANA BERRIZBEITIA, LUIS A. MEDINA, ALEXANDER C. MOLL, VICTOR H. MOLL, AND LAINE NOBLE Abstact. Let p > 2 be a pime. The p-adic valuation of Stiling numbes of the

More information

arxiv: v1 [math.co] 4 May 2017

arxiv: v1 [math.co] 4 May 2017 On The Numbe Of Unlabeled Bipatite Gaphs Abdullah Atmaca and A Yavuz Ouç axiv:7050800v [mathco] 4 May 207 Abstact This pape solves a poblem that was stated by M A Haison in 973 [] This poblem, that has

More information

On decompositions of complete multipartite graphs into the union of two even cycles

On decompositions of complete multipartite graphs into the union of two even cycles On decompositions of complete multipatite gaphs into the union of two even cycles A. Su, J. Buchanan, R. C. Bunge, S. I. El-Zanati, E. Pelttai, G. Rasmuson, E. Spaks, S. Tagais Depatment of Mathematics

More information

Classical Worm algorithms (WA)

Classical Worm algorithms (WA) Classical Wom algoithms (WA) WA was oiginally intoduced fo quantum statistical models by Pokof ev, Svistunov and Tupitsyn (997), and late genealized to classical models by Pokof ev and Svistunov (200).

More information

The second hope is that by tanslating between inteaction nets and tem ewiting systems we can chaacteise new classes of each fomalism with good popetie

The second hope is that by tanslating between inteaction nets and tem ewiting systems we can chaacteise new classes of each fomalism with good popetie Inteaction Nets and Tem Rewiting Systems Maibel Fenandez DMI - LIENS (CNRS URA 1327) Ecole Nomale Supeieue 45 Rue d'ulm, 75005 Pais, Fance maibeldmi.ens.f Ian Mackie LIX (CNRS URA 1439) Ecole Polytechnique

More information

3.1 Random variables

3.1 Random variables 3 Chapte III Random Vaiables 3 Random vaiables A sample space S may be difficult to descibe if the elements of S ae not numbes discuss how we can use a ule by which an element s of S may be associated

More information

Supplementary Information for On characterizing protein spatial clusters with correlation approaches

Supplementary Information for On characterizing protein spatial clusters with correlation approaches Supplementay Infomation fo On chaacteizing potein spatial clustes with coelation appoaches A. Shivananan, J. Unnikishnan, A. Raenovic Supplementay Notes Contents Deivation of expessions fo p = a t................................

More information

Tree-structured Data Regeneration in Distributed Storage Systems with Regenerating Codes

Tree-structured Data Regeneration in Distributed Storage Systems with Regenerating Codes Tee-stuctue Data Regeneation in Distibute Stoage Systems with Regeneating Coes Jun Li, Shuang Yang, Xin Wang School of Compute Science Fuan Univesity, China {0572222, 06300720227, xinw}@fuaneucn Baochun

More information

On the integration of the equations of hydrodynamics

On the integration of the equations of hydrodynamics Uebe die Integation de hydodynamischen Gleichungen J f eine u angew Math 56 (859) -0 On the integation of the equations of hydodynamics (By A Clebsch at Calsuhe) Tanslated by D H Delphenich In a pevious

More information

Fractional Zero Forcing via Three-color Forcing Games

Fractional Zero Forcing via Three-color Forcing Games Factional Zeo Focing via Thee-colo Focing Games Leslie Hogben Kevin F. Palmowski David E. Robeson Michael Young May 13, 2015 Abstact An -fold analogue of the positive semidefinite zeo focing pocess that

More information

On a quantity that is analogous to potential and a theorem that relates to it

On a quantity that is analogous to potential and a theorem that relates to it Su une quantité analogue au potential et su un théoème y elatif C R Acad Sci 7 (87) 34-39 On a quantity that is analogous to potential and a theoem that elates to it By R CLAUSIUS Tanslated by D H Delphenich

More information

Solutions to Problems : Chapter 19 Problems appeared on the end of chapter 19 of the Textbook

Solutions to Problems : Chapter 19 Problems appeared on the end of chapter 19 of the Textbook Solutions to Poblems Chapte 9 Poblems appeae on the en of chapte 9 of the Textbook 8. Pictue the Poblem Two point chages exet an electostatic foce on each othe. Stategy Solve Coulomb s law (equation 9-5)

More information

Solution to HW 3, Ma 1a Fall 2016

Solution to HW 3, Ma 1a Fall 2016 Solution to HW 3, Ma a Fall 206 Section 2. Execise 2: Let C be a subset of the eal numbes consisting of those eal numbes x having the popety that evey digit in the decimal expansion of x is, 3, 5, o 7.

More information

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany

Relating Branching Program Size and. Formula Size over the Full Binary Basis. FB Informatik, LS II, Univ. Dortmund, Dortmund, Germany Relating Banching Pogam Size and omula Size ove the ull Binay Basis Matin Saueho y Ingo Wegene y Ralph Wechne z y B Infomatik, LS II, Univ. Dotmund, 44 Dotmund, Gemany z ankfut, Gemany sauehof/wegene@ls.cs.uni-dotmund.de

More information

COLLAPSING WALLS THEOREM

COLLAPSING WALLS THEOREM COLLAPSING WALLS THEOREM IGOR PAK AND ROM PINCHASI Abstact. Let P R 3 be a pyamid with the base a convex polygon Q. We show that when othe faces ae collapsed (otated aound the edges onto the plane spanned

More information

Journal of Inequalities in Pure and Applied Mathematics

Journal of Inequalities in Pure and Applied Mathematics Jounal of Inequalities in Pue and Applied Mathematics COEFFICIENT INEQUALITY FOR A FUNCTION WHOSE DERIVATIVE HAS A POSITIVE REAL PART S. ABRAMOVICH, M. KLARIČIĆ BAKULA AND S. BANIĆ Depatment of Mathematics

More information

Equilibria of a cylindrical plasma

Equilibria of a cylindrical plasma // Miscellaneous Execises Cylinical equilibia Equilibia of a cylinical plasma Consie a infinitely long cyline of plasma with a stong axial magnetic fiel (a geat fusion evice) Plasma pessue will cause the

More information

Notes for the standard central, single mass metric in Kruskal coordinates

Notes for the standard central, single mass metric in Kruskal coordinates Notes fo the stana cental, single mass metic in Kuskal cooinates I. Relation to Schwazschil cooinates One oiginally elates the Kuskal cooinates to the Schwazschil cooinates in the following way: u = /2m

More information

Matrix Colorings of P 4 -sparse Graphs

Matrix Colorings of P 4 -sparse Graphs Diplomabeit Matix Coloings of P 4 -spase Gaphs Chistoph Hannnebaue Januay 23, 2010 Beteue: Pof. D. Winfied Hochstättle FenUnivesität in Hagen Fakultät fü Mathematik und Infomatik Contents Intoduction iii

More information

THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX. Jaejin Lee

THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX. Jaejin Lee Koean J. Math. 23 (2015), No. 3, pp. 427 438 http://dx.doi.og/10.11568/kjm.2015.23.3.427 THE JEU DE TAQUIN ON THE SHIFTED RIM HOOK TABLEAUX Jaejin Lee Abstact. The Schensted algoithm fist descibed by Robinson

More information

The Chromatic Villainy of Complete Multipartite Graphs

The Chromatic Villainy of Complete Multipartite Graphs Rocheste Institute of Technology RIT Schola Wos Theses Thesis/Dissetation Collections 8--08 The Chomatic Villainy of Complete Multipatite Gaphs Anna Raleigh an9@it.edu Follow this and additional wos at:

More information

Encapsulation theory: radial encapsulation. Edmund Kirwan *

Encapsulation theory: radial encapsulation. Edmund Kirwan * Encapsulation theoy: adial encapsulation. Edmund Kiwan * www.edmundkiwan.com Abstact This pape intoduces the concept of adial encapsulation, wheeby dependencies ae constained to act fom subsets towads

More information

Probablistically Checkable Proofs

Probablistically Checkable Proofs Lectue 12 Pobablistically Checkable Poofs May 13, 2004 Lectue: Paul Beame Notes: Chis Re 12.1 Pobablisitically Checkable Poofs Oveview We know that IP = PSPACE. This means thee is an inteactive potocol

More information

Electric Potential and Gauss s Law, Configuration Energy Challenge Problem Solutions

Electric Potential and Gauss s Law, Configuration Energy Challenge Problem Solutions Poblem 1: Electic Potential an Gauss s Law, Configuation Enegy Challenge Poblem Solutions Consie a vey long o, aius an chage to a unifom linea chage ensity λ a) Calculate the electic fiel eveywhee outsie

More information

Stability of a Discrete-Time Predator-Prey System with Allee Effect

Stability of a Discrete-Time Predator-Prey System with Allee Effect Nonlinea Analsis an Diffeential Equations, Vol. 4, 6, no. 5, 5-33 HIKARI Lt, www.m-hikai.com http://.oi.og/.988/nae.6.633 Stabilit of a Discete-Time Peato-Pe Sstem with Allee Effect Ming Zhao an Yunfei

More information

Much that has already been said about changes of variable relates to transformations between different coordinate systems.

Much that has already been said about changes of variable relates to transformations between different coordinate systems. MULTIPLE INTEGRLS I P Calculus Cooinate Sstems Much that has alea been sai about changes of vaiable elates to tansfomations between iffeent cooinate sstems. The main cooinate sstems use in the solution

More information

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic.

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic. Chapte 9 Pimitive Roots 9.1 The multiplicative goup of a finite fld Theoem 9.1. The multiplicative goup F of a finite fld is cyclic. Remak: In paticula, if p is a pime then (Z/p) is cyclic. In fact, this

More information

10/04/18. P [P(x)] 1 negl(n).

10/04/18. P [P(x)] 1 negl(n). Mastemath, Sping 208 Into to Lattice lgs & Cypto Lectue 0 0/04/8 Lectues: D. Dadush, L. Ducas Scibe: K. de Boe Intoduction In this lectue, we will teat two main pats. Duing the fist pat we continue the

More information

Vanishing lines in generalized Adams spectral sequences are generic

Vanishing lines in generalized Adams spectral sequences are generic ISSN 364-0380 (on line) 465-3060 (pinted) 55 Geomety & Topology Volume 3 (999) 55 65 Published: 2 July 999 G G G G T T T G T T T G T G T GG TT G G G G GG T T T TT Vanishing lines in genealized Adams spectal

More information

arxiv: v1 [physics.gen-ph] 18 Aug 2018

arxiv: v1 [physics.gen-ph] 18 Aug 2018 Path integal and Sommefeld quantization axiv:1809.04416v1 [physics.gen-ph] 18 Aug 018 Mikoto Matsuda 1, and Takehisa Fujita, 1 Japan Health and Medical technological college, Tokyo, Japan College of Science

More information

Exploiting Equality Generating Dependencies in Checking Chase Termination

Exploiting Equality Generating Dependencies in Checking Chase Termination Exploiting Equality Geneating Dependencies in Checking Chase Temination Maco Calautti Univesity of Calabia 87036 Rende, Italy calautti@dimes.unical.it Segio Geco Univesity of Calabia 87036 Rende, Italy

More information

Multiple Criteria Secretary Problem: A New Approach

Multiple Criteria Secretary Problem: A New Approach J. Stat. Appl. Po. 3, o., 9-38 (04 9 Jounal of Statistics Applications & Pobability An Intenational Jounal http://dx.doi.og/0.785/jsap/0303 Multiple Citeia Secetay Poblem: A ew Appoach Alaka Padhye, and

More information

On the Davenport-Mahler bound

On the Davenport-Mahler bound On the Davenpot-Mahle boun Paula Escocielo Daniel Peucci Depatamento e Matemática, FCEN, Univesia e Buenos Aies, Agentina IMAS, CONICET UBA, Agentina Decembe 22, 206 Abstact We pove that the Davenpot-Mahle

More information

arxiv: v1 [math.nt] 12 May 2017

arxiv: v1 [math.nt] 12 May 2017 SEQUENCES OF CONSECUTIVE HAPPY NUMBERS IN NEGATIVE BASES HELEN G. GRUNDMAN AND PAMELA E. HARRIS axiv:1705.04648v1 [math.nt] 12 May 2017 ABSTRACT. Fo b 2 and e 2, let S e,b : Z Z 0 be the function taking

More information

ASTR415: Problem Set #6

ASTR415: Problem Set #6 ASTR45: Poblem Set #6 Cuan D. Muhlbege Univesity of Mayland (Dated: May 7, 27) Using existing implementations of the leapfog and Runge-Kutta methods fo solving coupled odinay diffeential equations, seveal

More information

SPECTRAL SEQUENCES. im(er

SPECTRAL SEQUENCES. im(er SPECTRAL SEQUENCES MATTHEW GREENBERG. Intoduction Definition. Let a. An a-th stage spectal (cohomological) sequence consists of the following data: bigaded objects E = p,q Z Ep,q, a diffeentials d : E

More information

Jerk and Hyperjerk in a Rotating Frame of Reference

Jerk and Hyperjerk in a Rotating Frame of Reference Jek an Hypejek in a Rotating Fame of Refeence Amelia Caolina Spaavigna Depatment of Applie Science an Technology, Politecnico i Toino, Italy. Abstact: Jek is the eivative of acceleation with espect to

More information

A THREE CRITICAL POINTS THEOREM AND ITS APPLICATIONS TO THE ORDINARY DIRICHLET PROBLEM

A THREE CRITICAL POINTS THEOREM AND ITS APPLICATIONS TO THE ORDINARY DIRICHLET PROBLEM A THREE CRITICAL POINTS THEOREM AND ITS APPLICATIONS TO THE ORDINARY DIRICHLET PROBLEM DIEGO AVERNA AND GABRIELE BONANNO Abstact. The aim of this pape is twofold. On one hand we establish a thee citical

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department Physics 8.07: Electromagnetism II September 15, 2012 Prof. Alan Guth PROBLEM SET 2

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department Physics 8.07: Electromagnetism II September 15, 2012 Prof. Alan Guth PROBLEM SET 2 MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Depatment Physics 8.07: Electomagnetism II Septembe 5, 202 Pof. Alan Guth PROBLEM SET 2 DUE DATE: Monday, Septembe 24, 202. Eithe hand it in at the lectue,

More information

Sesqui-pushout rewriting

Sesqui-pushout rewriting Sesqui-pushout ewiting Andea Coadini Dipatimento di Infomatica, Pisa, Italy IFIP WG 1.3 - La Roche en Adennes, June 6, 2006. Joint wok with Tobias Heindel Fank Hemann Babaa König Univesität Stuttgat, Gemany

More information

L p Theory for the Multidimensional Aggregation Equation

L p Theory for the Multidimensional Aggregation Equation L p Theoy fo the Multiimensional Aggegation Equation Anea L. Betozzi, Thomas Lauent* & Jesus Rosao Novembe 19, 29 Abstact We consie well-poseness of the aggegation equation tu + iv(uv) =, v = K u with

More information

6 PROBABILITY GENERATING FUNCTIONS

6 PROBABILITY GENERATING FUNCTIONS 6 PROBABILITY GENERATING FUNCTIONS Cetain deivations pesented in this couse have been somewhat heavy on algeba. Fo example, detemining the expectation of the Binomial distibution (page 5.1 tuned out to

More information

Answering Queries Using Views with Arithmetic. comparisons.

Answering Queries Using Views with Arithmetic. comparisons. Answeing Queies Using Views with Aithmetic Compaisons Foto Afati Electical and Computing Engineeing National Technical Univesity 157 73 Athens, Geece afati@cs.ece.ntua.g Chen Li Infomation and Compute

More information

3.6 Applied Optimization

3.6 Applied Optimization .6 Applied Optimization Section.6 Notes Page In this section we will be looking at wod poblems whee it asks us to maimize o minimize something. Fo all the poblems in this section you will be taking the

More information

EM Boundary Value Problems

EM Boundary Value Problems EM Bounday Value Poblems 10/ 9 11/ By Ilekta chistidi & Lee, Seung-Hyun A. Geneal Desciption : Maxwell Equations & Loentz Foce We want to find the equations of motion of chaged paticles. The way to do

More information

Compactly Supported Radial Basis Functions

Compactly Supported Radial Basis Functions Chapte 4 Compactly Suppoted Radial Basis Functions As we saw ealie, compactly suppoted functions Φ that ae tuly stictly conditionally positive definite of ode m > do not exist The compact suppot automatically

More information

Do Managers Do Good With Other People s Money? Online Appendix

Do Managers Do Good With Other People s Money? Online Appendix Do Manages Do Good With Othe People s Money? Online Appendix Ing-Haw Cheng Haison Hong Kelly Shue Abstact This is the Online Appendix fo Cheng, Hong and Shue 2013) containing details of the model. Datmouth

More information

Bridging the Gap Between Underspecification Formalisms: Hole Semantics as Dominance Constraints

Bridging the Gap Between Underspecification Formalisms: Hole Semantics as Dominance Constraints Bidging the Gap Between Undespecification Fomalisms: Hole Semantics as Dominance Constaints Alexande Kolle Joachim Niehen Stefan Thate kolle@coli.uni-sb.de niehen@ps.uni-sb.de stth@coli.uni-sb.de Saaland

More information

Sensitivity Analysis of SAW Technique: the Impact of Changing the Decision Making Matrix Elements on the Final Ranking of Alternatives

Sensitivity Analysis of SAW Technique: the Impact of Changing the Decision Making Matrix Elements on the Final Ranking of Alternatives Ianian Jounal of Opeations Reseach Vol. 5, No. 1, 2014, pp. 82-94 Sensitivity Analysis of SAW Technique: the Impact of Changing the Decision Maing Matix Elements on the Final Raning of Altenatives A. Alinezha

More information

15. SIMPLE MHD EQUILIBRIA

15. SIMPLE MHD EQUILIBRIA 15. SIMPLE MHD EQUILIBRIA In this Section we will examine some simple examples of MHD equilibium configuations. These will all be in cylinical geomety. They fom the basis fo moe the complicate equilibium

More information

Tableaux Based Decision Procedures for Modal. Logics of Conuence and Density

Tableaux Based Decision Procedures for Modal. Logics of Conuence and Density Tableaux Based Decision ocedues fo Modal Logics of Conuence and Density Luis Fai~nas del Ceo Olivie Gasquet 1 Intoduction and backgound In [Castilho et al. 1997], a geneal completeness poof based in tableaux

More information

Secret Exponent Attacks on RSA-type Schemes with Moduli N = p r q

Secret Exponent Attacks on RSA-type Schemes with Moduli N = p r q Secet Exponent Attacks on RSA-type Schemes with Moduli N = p q Alexande May Faculty of Compute Science, Electical Engineeing and Mathematics Univesity of Padebon 33102 Padebon, Gemany alexx@uni-padebon.de

More information

Section 8.2 Polar Coordinates

Section 8.2 Polar Coordinates Section 8. Pola Coodinates 467 Section 8. Pola Coodinates The coodinate system we ae most familia with is called the Catesian coodinate system, a ectangula plane divided into fou quadants by the hoizontal

More information

This aticle was oiginally published in a jounal published by Elsevie, the attached copy is povided by Elsevie fo the autho s benefit fo the benefit of the autho s institution, fo non-commecial eseach educational

More information

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis Bief summay of functional analysis APPM 5440 Fall 014 Applied Analysis Stephen Becke, stephen.becke@coloado.edu Standad theoems. When necessay, I used Royden s and Keyzsig s books as a efeence. Vesion

More information

Deterministic vs Non-deterministic Graph Property Testing

Deterministic vs Non-deterministic Graph Property Testing Deteministic vs Non-deteministic Gaph Popety Testing Lio Gishboline Asaf Shapia Abstact A gaph popety P is said to be testable if one can check whethe a gaph is close o fa fom satisfying P using few andom

More information

A Relativistic Electron in a Coulomb Potential

A Relativistic Electron in a Coulomb Potential A Relativistic Electon in a Coulomb Potential Alfed Whitehead Physics 518, Fall 009 The Poblem Solve the Diac Equation fo an electon in a Coulomb potential. Identify the conseved quantum numbes. Specify

More information

THE CONE THEOREM JOEL A. TROPP. Abstract. We prove a fixed point theorem for functions which are positive with respect to a cone in a Banach space.

THE CONE THEOREM JOEL A. TROPP. Abstract. We prove a fixed point theorem for functions which are positive with respect to a cone in a Banach space. THE ONE THEOEM JOEL A. TOPP Abstact. We pove a fixed point theoem fo functions which ae positive with espect to a cone in a Banach space. 1. Definitions Definition 1. Let X be a eal Banach space. A subset

More information

Functions Defined on Fuzzy Real Numbers According to Zadeh s Extension

Functions Defined on Fuzzy Real Numbers According to Zadeh s Extension Intenational Mathematical Foum, 3, 2008, no. 16, 763-776 Functions Defined on Fuzzy Real Numbes Accoding to Zadeh s Extension Oma A. AbuAaqob, Nabil T. Shawagfeh and Oma A. AbuGhneim 1 Mathematics Depatment,

More information

Geometry of the homogeneous and isotropic spaces

Geometry of the homogeneous and isotropic spaces Geomety of the homogeneous and isotopic spaces H. Sonoda Septembe 2000; last evised Octobe 2009 Abstact We summaize the aspects of the geomety of the homogeneous and isotopic spaces which ae most elevant

More information

Quasi-Randomness and the Distribution of Copies of a Fixed Graph

Quasi-Randomness and the Distribution of Copies of a Fixed Graph Quasi-Randomness and the Distibution of Copies of a Fixed Gaph Asaf Shapia Abstact We show that if a gaph G has the popety that all subsets of vetices of size n/4 contain the coect numbe of tiangles one

More information

On the Structure of Linear Programs with Overlapping Cardinality Constraints

On the Structure of Linear Programs with Overlapping Cardinality Constraints On the Stuctue of Linea Pogams with Ovelapping Cadinality Constaints Tobias Fische and Mac E. Pfetsch Depatment of Mathematics, TU Damstadt, Gemany tfische,pfetsch}@mathematik.tu-damstadt.de Januay 25,

More information

Rigid Body Dynamics 2. CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018

Rigid Body Dynamics 2. CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018 Rigid Body Dynamics 2 CSE169: Compute Animation nstucto: Steve Rotenbeg UCSD, Winte 2018 Coss Poduct & Hat Opeato Deivative of a Rotating Vecto Let s say that vecto is otating aound the oigin, maintaining

More information

SOME SOLVABILITY THEOREMS FOR NONLINEAR EQUATIONS

SOME SOLVABILITY THEOREMS FOR NONLINEAR EQUATIONS Fixed Point Theoy, Volume 5, No. 1, 2004, 71-80 http://www.math.ubbcluj.o/ nodeacj/sfptcj.htm SOME SOLVABILITY THEOREMS FOR NONLINEAR EQUATIONS G. ISAC 1 AND C. AVRAMESCU 2 1 Depatment of Mathematics Royal

More information

Markscheme May 2017 Calculus Higher level Paper 3

Markscheme May 2017 Calculus Higher level Paper 3 M7/5/MATHL/HP3/ENG/TZ0/SE/M Makscheme May 07 Calculus Highe level Pape 3 pages M7/5/MATHL/HP3/ENG/TZ0/SE/M This makscheme is the popety of the Intenational Baccalaueate and must not be epoduced o distibuted

More information

Graphs of Sine and Cosine Functions

Graphs of Sine and Cosine Functions Gaphs of Sine and Cosine Functions In pevious sections, we defined the tigonometic o cicula functions in tems of the movement of a point aound the cicumfeence of a unit cicle, o the angle fomed by the

More information

arxiv:gr-qc/ v2 14 Aug 2006

arxiv:gr-qc/ v2 14 Aug 2006 Semilinea wave equations on the Schwazschil manifol I: Local Decay Estimates. P. Blue Mathematics ept., Rutges Univesity Piscataway, NJ 8854, USA A. Soffe Mathematics ept., Institute fo Avance Stuies Pinceton,

More information

Data Flow Anomaly Analysis

Data Flow Anomaly Analysis Pof. D. Liggesmeye, 1 Contents Data flows an ata flow anomalies State machine fo ata flow anomaly analysis Example withot loops Example with loops Data Flow Anomaly Analysis Softwae Qality Assance Softwae

More information

Chapter 5 Linear Equations: Basic Theory and Practice

Chapter 5 Linear Equations: Basic Theory and Practice Chapte 5 inea Equations: Basic Theoy and actice In this chapte and the next, we ae inteested in the linea algebaic equation AX = b, (5-1) whee A is an m n matix, X is an n 1 vecto to be solved fo, and

More information

Lecture 18: Graph Isomorphisms

Lecture 18: Graph Isomorphisms INFR11102: Computational Complexity 22/11/2018 Lectue: Heng Guo Lectue 18: Gaph Isomophisms 1 An Athu-Melin potocol fo GNI Last time we gave a simple inteactive potocol fo GNI with pivate coins. We will

More information

Conjugate Gradient (CG) Method

Conjugate Gradient (CG) Method Optimization II Conugate Gaient CG Metho Anothe metho oes not equie explicit secon eivatives, an oes not even stoe appoximation to Hessian matix CG geneates sequence of conugate seach iections, implicitly

More information

Conspiracy and Information Flow in the Take-Grant Protection Model

Conspiracy and Information Flow in the Take-Grant Protection Model Conspiacy and Infomation Flow in the Take-Gant Potection Model Matt Bishop Depatment of Compute Science Univesity of Califonia at Davis Davis, CA 95616-8562 ABSTRACT The Take Gant Potection Model is a

More information

Journal of Number Theory

Journal of Number Theory Jounal of umbe Theoy 3 2 2259 227 Contents lists available at ScienceDiect Jounal of umbe Theoy www.elsevie.com/locate/jnt Sums of poducts of hypegeometic Benoulli numbes Ken Kamano Depatment of Geneal

More information

C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22

C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22 C/CS/Phys C9 Sho s ode (peiod) finding algoithm and factoing /2/4 Fall 204 Lectue 22 With a fast algoithm fo the uantum Fouie Tansfom in hand, it is clea that many useful applications should be possible.

More information