Krivine Machine and Taylor Expansion in a Non-uniform Setting AntoineAllioux InstitutdeRechercheenInformatiqueFondamentale Paris,France [email protected] TheKrivinemachineisanabstractmachineimplementingthe linearheadreductionofl -calculus. Ehrhard and Regnier gave a resource sensitive version returning the annotated form of a l -term accountingfortheresourcesusedbythelinearheadreduction. Theseannotationstaketheformof termsintheresourcel -calculus. Wegeneralizethisresource-drivenKrivinemachinetothecaseofthealgebraicl -calculus.The latter is an extension of the pure l -calculus allowing for the linear combination of l -terms with coefficientstakenfromasemiring. Ourmachineassociatesal -termM andaresourceannotationt withascalara inthesemiringdescribingsomequantitativepropertiesofthelinearheadreduction ofM. Intheparticularcaseofnon-negativerealnumbersandofalgebraictermsMrepresentingprob- ability distributions, the coefficient a gives the probability that the linear head reduction actually usesexactlytheresourcesannotatedbyt. Inthegeneralcase,weprovethatthecoefficienta canbe recoveredfromthecoefficientoft intheTaylorexpansionofMandfromthenormalformoft. 1 Introduction The Krivine machine is an abstract machine implementing the linear head reduction [1] on the pure l - calculus. Ehrhard and Regnier gave a resource sensitive version [3] returning the annotated form of a l -term accounting forthe resources used by thelinear head reduction. Theseannotations take theform oftermsintheresource l -calculus. Asanexample, theordinary term((l x.(x)x)l x.x)c whichreduces 0 totheconstantc isannotatedbythefollowingresourcetermhhl x.hxix1i(l x.x)2ic1. Thisresourceterm 0 0 informsusthatl x.xisusedtwiceduringthereduction andxandc areusedonce. 0 Wegeneralizethisresource-drivenKrivinemachinetothecaseofthealgebraicl -calculus1. Thelat- terisanextensionofthepurel -calculusallowingforthelinearcombinationofl -termswithcoefficients taken from asemiring. Someproperties enjoyed bythe ordinary l -calculus donot hold anymore in the case of the algebraic l -calculus and some results become nontrivial. Our machine associates a l -term M andaresource annotationt withascalara inthesemiring describing somequantitative properties of the linear head reduction ofM. Wewillonly consider termsreducing toamultiple ofaconstant for the sakeofconvenience. In the particular case of non-negative real numbers and of terms M representing probability distri- butions, the coefficient a gives the probability that the linear head reduction actually uses exactly the resources annotated byt. Inthegeneral case, weprove that thecoefficient a can berecovered from the coefficient of t in the Taylor expansion of M and from the normal form of t. A more detailed report concerning thisworkcanbefoundathttp://allioux.iiens.net/taylor/report.pdf. 1Thismachinehasbeenimplementedandisavailableonlineathttp://allioux.iiens.net/taylor/. I.CervesatoandM.Ferna´ndez(Eds):FourthInternationalWorkshop (cid:13)c A.Allioux onLinearity2016(LINEARITY’16) Thisworkislicensedunderthe EPTCS238,2017,pp.24–32,doi:10.4204/EPTCS.238.3 CreativeCommonsAttributionLicense. A.Allioux 25 Algebraicequalities oftheS-module M+0≡ M (M+N)+P≡ M+(N+P) M+N≡ N+M alg alg alg a (M+N)≡ a M+a N a M+b M≡ (a +b )M a (b M)≡ (ab )M alg alg alg 1M≡ M 0M≡ 0 a 0≡ 0 alg alg alg Linearproperties l x.(M+N)≡ l x.M+l x.N l x.(a M)≡ a (l x.M) l x.0≡ 0 alg alg alg (0)M≡ 0 (a M)N ≡ a (M)N (M+N)P≡ (M)P+(N)P alg alg alg Table1: Algebraicequalities ofthealgebraic l -calculus 2 Algebraic lambda calculus The algebraic l -calculus is an extension of the pure l -calculus allowing for the linear combination of l -terms. Moreprecisely, weendow itwithastructure ofleftS-modulewhereSisasemiring. Weshall followthepresentation ofthealgebraic l -calculus givenin[5]. 2.1 Grammar Let x be a variable in V , the set of variables, and let a be a scalar in S. The grammar of the algebraic l -calculus isthefollowing: L :M,N ::=x|l x.M |(M)N |a M |M+N |0 (1) S Wedenote≡ theequivalencerelationdescribedinTable1makingL intoaleftS-moduleandpro- alg S viding linearproperties toterms. Weconsider thetermsofthequotient setL /≡ uptoa -conversion S alg andwecallthemalgebraicterms. Wedefinefreevariablesanda -conversion asin[5]. 2.2 Algebraicstates The behaviour of the Krivine machine is defined on some structures we call states with which we can associate a unique algebraic term rather than on algebraic terms directly. A state is a snapshot of the abstract machineatagiventimeandrepresents thedissection ofauniquel -term. Algebraicenvironment An algebraic environment is a finite partial function E mapping variables to closures. We introduce the notation Ex7→G to refer to the environment which behaves like E for variablesotherthanxandwhichmapsxtoG . Algebraicclosure An algebraic closure G is a pair (M,E)composed of an algebraic term M ∈L and S of an environment E such that FV(M)⊆Dom(E) where FV(M) denotes the free variables of M andDom(E)denotesthedomainofE. Algebraicstate Analgebraicstateisanonemptystackofclosures. Wechoosetodenotestatesastriples (M,E,P )where(M,E)isthefirstclosureofthestackandP isthestackoftheremainingclosures. Indeed, our Krivine machine implementing the linear head reduction, wereduce according to the structure of the first closure and we give it a special status. We refer to the set of the algebraic statesbyS(L ). S 26 KrivineMachineandTaylorExpansioninaNon-uniformSetting Theintuition behindalgebraic statescanbemadeexplicitbydefiningthefunctionT:S(L )→L S S whichgivenanalgebraic statereturnsitsuniqueassociated algebraic term. Givenanyalgebraicclosure(M,E)andanystackofalgebraicclosuresG ,...,G withn≥0,wefirst 1 n defineTonclosures andthenextendittostatesasfollows: T(M,E)=M[T(E(x))/x] x∈Dom(E) T(M,E,(G ,...,G ))=(...(T(M,E))T(G )...)T(G ) 1 n 1 n 2.3 Krivinemachine Inthisparticular sectionthesemiringSiscomplete—itssumisinfinitary. We give a description of the Krivine machine as the limit K of the sequence (K ) defined by n n∈N induction on (n,M) lexicographically ordered where n is a non-negative integer and M is an algebraic term. Theinduction onn turns the reduction of M into afinite process evenfor non-normalizing terms. We also enrich the grammar of the algebraic l -calculus with the constant c as werestrict our study to 0 closedtermsreducing tothisconstant. • K (M,E,P )=0, 0 • K (c ,E,0/)=c , n+1 0 0 • K (x,E,P )=K (E(x),P )ifx∈Dom(E), n+1 n • Kn+1(l x.M,E,G ::P )=Kn(M,Ex7→G ,P )assumingx∈/ Dom(E), • K ((M)N,E,P )=K (M,E,(N,E)::P ). n+1 n These rules, excluding the first two ones, are the ones of the original Krivine machine. As the algebraic l -calculus isjust an extension of the ordinary l -calculus, it suffices to add the twofollowing rulestothedescription oftheKrivinemachinetohandleit: • K (a M,E,P )=a K (M,E,P ), n+1 n+1 • K (M+N,E,P )=K (M,E,P )+K (N,E,P ). n+1 n+1 n+1 FinallywesetK =limn→¥ Kn. 3 Resource lambda calculus Werecallthesyntaxandthereduction oftheresourcel -calculus whichhasbeendefinedin[4]. Indeed, wewilldefinetheTaylorexpansion ofanalgebraic termintermsofasumofresource terms. 3.1 Grammar Theresourcel -calculus sharesitssyntaxwiththeordinary l -calculuswiththeexceptionthattheappli- cationtakesmultisetsoftermsasargument. Weusethemultiplicativenotationtodenotemultisetssothe multiplicative unit1istheemptymultiset. Forexamples2t isthemultisetformedoftwooccurrences of sandoneoccurrence oft. Multisetsarecommutative. ThemultisetunionofSandT isdenotedST. The multiplicity of an elementt in amultiset T is given by T(t). The support ofT, denoted supp(T), is the setofelementsofT whosemultiplicity isnonzero. A.Allioux 27 Thegrammarofsimpletermsintheresource l -calculus is: D :s,t,u::=x|l x.t |htiS (2) where x,y,···∈V, the set of variables and where S is a finite multiset of simple terms. We denote the set of simple terms D and we refer to its elements using lower case letters s,t,.... The set of finite multisets of simple terms is denoted D !. We call its elements simple poly-terms and we refer to them usinguppercaselettersS,T,.... Whenatermt caneitherbeasimpletermorasimplepoly-termwesay itisinD (!)=D ∪D !. When denoting an application, we use the Krivine notation which we recall: for any simple term t and any simple poly-terms S ,...,S , we denote the application h...htiS ...iS by the simplified form 1 n 1 n htiS ...S . 1 n The module ShD (!)i is the set of linear combinations of simple (poly-)terms with coefficients in S. We call its elements (poly-)terms in opposition to simple (poly-)terms which are not part of a linear combination. Thesecombinationscannotbeexpressedinthesyntaxoftheresourcel -calculuscontrarily to the algebraic l -calculus. We refer to (poly-)terms using the letters S,T ,.... We denote S the s coefficient of the (poly-)term s in S. Finally we extend the grammar of the resource l -calculus to all (poly-)terms by multilinearity so that: l x.(t+u)=l x.t+l x.u, hs+tiT =hsiT +htiT and (s+t)T = sT+tT. 3.2 Linear substitution andreduction The reduction of the resource l -calculus is based on a particular notion of linear substitution. What distinguishes linearsubstitutions fromclassicalsubstitutionsisthat,intheformercase,substitutedterms havetobeusedonceandonlyoncewhereasthisrestriction doesnotapplyinthelattercase. Foravariablexandaterms,wedefinedeg (s)tobethenumberofoccurrences ofxinsandwecall x itthedegreeinxofs. Letsˆbetheresourcetermobtainedfromaresourcetermsbyrenamingitsdifferentoccurrences ofx tox ,...,x withn=deg (s). sˆissuchthatforalli∈J1,nK,deg (sˆ)=1ands=sˆ[x/x ,...,x ]. 1 n x xi 1 n Letsbeasimpletermandlett ...t beanypoly-termwithnbeinganon-negativeinteger,thelinear 1 n substitution ofsbyt ...t isdefinedasfollows: 1 n (cid:229) sˆ[t /x ,...,t /x ] ifdeg (s)=n f(1) 1 f(n) n x ¶ x(s,t1...tn)= f∈Sn (3) 0∈ShD i ifdeg (s)6=n x with Sn being the group of permutations on the set {1,...,n}. This construction can be extended to simple(poly-)terms. We extend this notation to the linear substitution of several variables. For all poly-terms T ,...,T 1 n withnbeinganon-negative integer, ¶ (s,T ,...,T )=¶ (...¶ (s,T ),...,T ) (4) x1,...,xn 1 n xn x1 1 n Thissubstitution doesnotdepend ontheorderoftheiterated substitutions asthevariables x ,...,x 1 2 arepairwisedistincts. Wederivetheb -reduction relation fortheresource l -calculus fromthislinearsubstitution. Aredex intheresourcel -calculus isoftheformhl x.siT andreducesasfollows: hl x.siT →b ¶ x(s,T). 28 KrivineMachineandTaylorExpansioninaNon-uniformSetting Weextend thisrelation toShD (!)i×ShD (!)ibydefiningitasbeingtheleastrelation closed underthe followingrules,assuming s→b S withs∈D andS ∈ShD i: hsiT →b hSiT huisT →b huiST l x.s→b l x.S s+u→b S +u Thisrelation isconfluentandstrongly normalizing forS=Nasprovedin[2]andwederiveNF,the uniquenormalization mapNhD (!)i→NhD (!)i,whereD standsforthesetofnormalsimpleterms. 0 0 3.3 Resource states Similarlytothecaseofthealgebraicl -calculus,wedefineresourceclosures,resourceenvironmentsand resource statesinamutuallyrecursivefashion. Resourceenvironment A resource environment is a total function from the set of variables V to re- source closures. e is the empty environment mapping any variable in V to the empty closure 1. 0 We use the notation [x7→c] to refer to the environment which maps the variable x to the closure c and all the other variables to the closure 1. Given two environments e′ and e′′, we define their pointwiseconcatenation e′e′′ suchthatforallvariablesx,e′e′′(x)=e′(x)e′′(x). Resourceclosure A resource closure is defined as a pair c=(T,e) where T is asimple poly-term and e is a resource environment. A resource closure is said to be elementary when its multiset T is a singleton. The empty closure is 1=(1,e ). Weuse letters c,c ,... for general resource closures 0 1 andg ,g ,... forelementary resourceclosures. 1 Resourcestate A resource state is a triple (t,e,p ) where (t,e) is an elementary resource closure and wherep isastackofresourceclosures. Wedenotethesetofresource statesS(D ). 4 Quantitative Krivine machine and Taylor expansion 4.1 QuantitativeKrivinemachine InturnwedefineourquantitativeKrivinemachine(qKAM)K2whichdrawsitsinspirationfromtheone described in[3]. Thisdefinition isthemaincontribution ofthispaper. Itisimportanttonotethatforthe sakeofconvenience wewillonlyconsiderclosedalgebraictermswhichreducetotheconstantc . From 0 nowon,wetherefore enrichthesyntaxoftheresource l -calculus withthissameconstant c . 0 Thefollowingmachinecomputesacoefficientassociatedwithanalgebraicstateandaresourcestate. We remind that an algebraic state corresponds to a unique l -term and a resource state corresponds to a unique sum of resource terms. Therefore, in the case of algebraic terms whose sums correspond to probability distributions, this coefficient will be the sum of the probabilities that each resource term in thesumdescribe aresource usageofthereduction ofthealgebraic termtoc . 0 Definition 4.1. (Quantitative Krivine machine) Thequantitative Krivine machine isdefined asamatrix K ∈SS(L S)×S(D ). It is defined by induction on the pair (size(t,e,p ),size(M,E,P ))3 lexicographically ordered. K(M,E,P )(t,e,p ) denotes thecoefficient inK associated withthepair((M,E,P ),(t,e,p )). • K(c ,E,0/) =1, 0 (c0,e0,0/) • K(x,E,P )(x,e,p ) =K(E(x),P )(e(x),p ) ifx∈Dom(E)andeissuchthat∀y6=x,e(y)=1, • K(l x.M,E,G ::P )(l x.u,e,c::p ) =K(M,Ex7→G ,P )(u,ex7→c,p ) ife(x)=1andwherew.l.o.gx∈/Dom(E), 2Thismachinehasbeenimplementedandisavailableonlineathttp://allioux.iiens.net/taylor/. 3Thesizeofatermisitsnumberofsymbols. A.Allioux 29 • K((M)N,E,P )(htiT,e,p )=(cid:229) (e′,e′′)K(M,E,(N,E)::P )(t,e′,(T,e′′)::p ), e′e′′=e Themajordifference withthecaseoftheordinary l -calculus appearsinthefollowingtwocases: • K(a M,E,P )(t,e,p ) =a K(M,E,P )(t,e,p ), • K(M+N,E,P )(t,e,p ) =K(M,E,P )(t,e,p )+K(N,E,P )(t,e,p ), • OtherwiseK(M,E,P )(t,e,p ) =0. Aswedonotwanttodealwithstatesdirectly,wehidethembydefiningKˆ whichtakestermsinstead ofstates. Definition4.2. Foranyalgebraic termM andanyresource termt, Kˆ(M) =K(M,0/,0/) (5) t (t,e0,0/) Thismachineisdefinedforallsemirings andintheparticular caseofQ+ computes acoefficient we shallcharacterize inTheorem4.5. We shall give some examples of execution. Let D =l x.(x)x,I =l x.x,T =l xy.x and F =l xy.y. Considerthetwoexamples(D )Ic and(D )(pI+qF)c ,where p,q∈S. 0 0 hhl x.hxixi(l x.x)2ic 7→1 Kˆ((D )Ic )= 0 0 ( 7→0 Table 2 exposes the succession of states taken by the machine which are associated with a nonzero coefficientduringtheexecutionofthisexample. Infact,inthisverycaseallthestateshavethecoefficient 1inK. Weshalldetailthetransition fromthe4th tothe5th stateasthisistheonlyonewhichinvolves a sumwithseveralsummandseventhoughonlyoneofthesesummandsisnonzero. LetS bethealgebraicstate((x)x,{x7→(l x.x,0/)},[(c ,0/)])andletS bethealgebraicstate(x,{x7→ 1 0 2 (l x.x,0/)},[(x,{x 7→(l x.x,0/)});(c ,0/)]). 0 Thenthetransition fromthe4th tothe5th stateinTable2givenbyDefinition4.1is: K(S1)(hxix,{x7→((l x.x)2,e0)},[(c0,e0)])=K(S2)(x,{x7→(l x.x,e0)},[(x,{x7→(l x.x,e0)});(c0,e0)]) +K(S2)(x,{x7→1},[(x,{x7→((l x.x)2,e0)});(c0,e0)]) +K(S2)(x,{x7→((l x.x)2,e0)},[(x,{x7→1});(c0,e0)]) But both K(S2)(x,{x7→1},[(x,{x7→((l x.x)2,e0)});(c0,e0)]) and K(S2)(x,{x7→((l x.x)2,e0)},[(x,{x7→1});(c0,e0)]) are equal to0according toDefinition4.1. Thatiswhyweonlyshowthepairofstates(S ,(x,{x7→(l x.x,e )},[(x,{x7→(l x.x,e )});(c ,e )])) 2 0 0 0 0 inTable2. Wewillnotgivethefullbreakdownoftheexecution ofthemachineforthenextexample. hl x.hxixiI2ic 7→ p2 0 Kˆ((D )(pI+qF)c )= hl x.hxi1iFic 7→q 0 0 7→0 There are two non-deterministic reductions of(D )(pI+qF)c0 which lead to c0. The first one with multiplicity p2 and the second one with multiplicity q which correspond to the two non-deterministic choices inducedbythesum pI+qF. 30 KrivineMachineandTaylorExpansioninaNon-uniformSetting Algebraicstate Resourcestate Term Env. Stack Term Env. Stack ((l x.(x)x)l x.x)c0 0/ [] hhl x.hxixi(l x.x)2ic0 e0 [] (l x.(x)x)l x.x 0/ [(c0,0/)] hl x.hxixi(l x.x)2 e0 [(c0,e0)] l x.(x)x 0/ [(l x.x,0/);(c0,0/)] l x.hxix e0 [((l x.x)2,e0);(c0,e0)] (x)x {x7→(l x.x,0/)} [(c0,0/)] hxix {x7→((l x.x)2,e0)} [(c0,e0)] x {x7→(l x.x,0/)} [(x,{x7→(l x.x,0/)});(c0,0/)] x {x7→(l x.x,e0)} [(x,{x7→(l x.x,e0)});(c0,e0)] l x.x 0/ [(x,{x7→(l x.x,0/)});(c0,0/)] l x.x e0 [(x,{x7→(l x.x,e0)});(c0,e0)] x {x7→(x,{x7→(l x.x,0/)})} [(c0,0/)] x {x7→(x,{x7→(l x.x,e0)})} [(c0,e0)] x {x7→(l x.x,0/)} [(c0,0/)] x {x7→(l x.x,e0)} [(c0,e0)] l x.x 0/ [(c0,0/)] l x.x e0 [(c0,e0)] x {x7→(c0,0/)} [] x {x7→(c0,e0)} [] c0 0/ [] c0 e0 [] Table2: BreakdownoftheexecutionoftheKrivinemachine 4.2 Taylorexpansion InthissettingwechoosetorestrictS,thesemiringoverwhichisdefinedouralgebraicl -calculus,toany semiring having a multiplicative inverse such as Q+. Taylor expanding an algebraic term then comes downtoexpanding itsapplications according tothefollowingformula: ¥ ((P)Q)∗= (cid:229) 1hP∗iQ∗n (6) n! n=0 where M∗ denotes the Taylor expansion of the algebraic term M and where Q∗n is the sum of multisets of cardinality n whose elements are inthe support ofQ∗ associated withacoefficient wewill not detail herebutwhichcanbefoundinthereport. We justify the terminology “Taylor expansion” by pointing out that in analysis the Taylor series of an infinitely differentiable function f at 0 is (cid:229) ¥ 1 f(n)(0)xn. This is, indeed, quite similar to the form n=0n! oftheTaylorexpansion oftheapplication inthel -calculus. See[2]formoredetails. Thisoperation canalternatively bedefinedbymeansofcoefficientsdefinedinductivelyonalgebraic andresourceterms. Tothiseffect,werecallthecoefficientmdescribedin[4]accountingfortheintrinsic contribution ofaresourcetermt toitscoefficientintheTaylorexpansionofanalgebraictermM andwe introduce theweightswwhichaccountforthedependance inM ofthiscoefficient. Definition 4.3. The multiplicity m of a resource term t and the weight w of a resource term t in an algebraic termM areinductively definedasfollows: m(x)=1 w(x,x)=1 m(l x.t)=m(t) w(l x.t,l x.M)=w(t,M) m(htiT)=m(t)(cid:213) T(t)!m(t)T(t) w(htiT,(M)N)=w(t,M)(cid:213) w(t,N)T(t) t∈supp(T) t∈supp(T) w(t,a M)=a w(t,M) w(t,M+N)=w(t,M)+w(t,N) The coefficient m(t) corresponds to the number of permutations of variable occurrences of t pre- serving the name of the variables and letting the term t unchanged. Finally, contrary to the case of the ordinaryl -calculus,themultiplicityoft intheTaylorexpansionofMdoesnotonlydependont butalso depends on M. The weights w account for this phenomenon and represent one of the contributions of thispaper. A.Allioux 31 Weshallgivesomeexamplestoenlighten thereaderaboutthesecoefficients. m(hl x.xi(hyiz3)2)=m(l x.x)2!m(hyiz3)2 =m(x)2(m(y)3!m(z)3)2 =2∗(3!)2 =2∗36=72 Asfortheweights, theiruseismotivated bytermsoftheformM+N anda M. Otherwise, ifaterm M is a pure l -term and not an algebraic term then for any t ∈D , w(t,M) is equal to 1 if t ∈M∗ and 0 otherwise. Considerthefollowingexample: w(hxix3,(x)(2x+y)+(x)(x+z))=w(hxix3,(x)(2x+y))+w(hxix3,(x)(x+z)) =w(x,x)w(x,2x+y)3+w(x,x)w(x,x+z)3 =w(x,x)(2w(x,x)+w(x,y))3+w(x,x)(w(x,x)+w(x,z))3 =23+1=9 Therefore, thereare9waystoderivehxix3 from(x)(2x+y)+(x)(x+z). Finally,theexpressionoftheTaylorexpansioncanalternativelybegivenbythefollowingdefinition: Definition4.4. (Taylorexpansion) Givenanalgebraic termM,itsTaylorexpansion is: M∗= (cid:229) w(t,M)t (7) m(t) t∈D ItiseasytoshowthisdefinitionleadstoaninductivedefinitionoftheTaylorexpansionontheshape ofalgebraic termswhichiscompatiblewithEquation6. Thismotivatesourterminology. 4.3 Connection between the qKAMand the Taylorexpansion Thefollowingtheorem,whichisoneofthemaincontributions ofthispaper, alongwiththedefinitionof theqKAM,linksthebehaviour oftheqKAMwiththeTaylorexpansion ofalgebraic terms. Theorem 4.5. For all algebraic terms M ∈L , for all resource terms t ∈D and provided that S has a S multiplicative inverse, Kˆ(M) =M∗NF(t) (8) t t c0 whereM∗ isthecoefficient oft inM∗ andNF(t) isthecoefficient ofc inNF(t). t c0 0 This theorem is a particular case of a more general result applying to any algebraic state and any resource state. Itcanbefoundinthereport. 4.4 Computational complexity At first, it seemed that Theorem 4.5 informed us of an efficient way to compute K(M,0/,0/). Indeed, the Krivine machine reduces M to compute a subset of its Taylor expansion whereas the equation (8) gave hope we could obtain the same result more efficiently as the right-hand side does not involve the reduction of M. Although M∗ can be computed statically by means of the coefficients m and w, it is t folklore thatdetermining NF(t) isNP-complete. c0 32 KrivineMachineandTaylorExpansioninaNon-uniformSetting References [1] Vincent Danos & Laurent Regnier (1999): Reversible, irreversible and optimal l -machines. Theoretical ComputerScience227(1),pp.79–97,doi:10.1016/S0304-3975(99)00049-3. [2] Thomas Ehrhard & Laurent Regnier (2003): The differential lambda-calculus. Theoretical Computer Science 309(1-3), pp. 1–41, doi:10.1016/S0304-3975(03)00392-X. Available at https://hal. archives-ouvertes.fr/hal-00150572. 41pages. [3] Thomas Ehrhard & Laurent Regnier (2006): Bo¨hm trees, Krivine machine and the Taylor expansion of or- dinary lambda-terms. In A. Beckmann, U. Berger, B. Lo¨we & J.V. Tucker, editors: SecondConference onComputabilityinEurope,CiE2006, LNCS 3988, Springer Berlin / Heidelberg, Swansea, United King- dom, pp. 186–197, doi:10.1007/11780342_20. Available at https://hal.archives-ouvertes.fr/ hal-00150273. 12pages. [4] ThomasEhrhard&LaurentRegnier(2008): UniformityandtheTaylorexpansionofordinarylambda-terms. JournalofTheoreticalComputerScience403(2-3),pp.347–372,doi:10.1016/j.tcs.2008.06.001. Avail- ableathttps://hal.archives-ouvertes.fr/hal-00150275. [5] Lionel Vaux (2009): The algebraic lambda calculus. MathematicalStructuresinComputerScience19, pp. 1029–1059, doi:10.1017/S0960129509990089. Available at http://journals.cambridge.org/ article_S0960129509990089.