{"comment":{"url":"https://api.github.com/repos/hakaru-dev/hakaru/comments/9518966","html_url":"https://github.com/hakaru-dev/hakaru/commit/3c3b307ff619eab0f1a67a5896f6b3ef01633181#commitcomment-9518966","id":9518966,"user":{"login":"JacquesCarette","id":1855141,"avatar_url":"https://avatars.githubusercontent.com/u/1855141?v=3","gravatar_id":"","url":"https://api.github.com/users/JacquesCarette","html_url":"https://github.com/JacquesCarette","followers_url":"https://api.github.com/users/JacquesCarette/followers","following_url":"https://api.github.com/users/JacquesCarette/following{/other_user}","gists_url":"https://api.github.com/users/JacquesCarette/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesCarette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesCarette/subscriptions","organizations_url":"https://api.github.com/users/JacquesCarette/orgs","repos_url":"https://api.github.com/users/JacquesCarette/repos","events_url":"https://api.github.com/users/JacquesCarette/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesCarette/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"3c3b307ff619eab0f1a67a5896f6b3ef01633181","created_at":"2015-01-30T15:13:53Z","updated_at":"2015-01-30T15:13:53Z","body":"On 2015-01-30 9:58 AM, Chung-chieh Shan wrote:\n> On 2015-01-30T05:44:27-0800, Jacques Carette wrote:\n> > But I, just now, notice another really weird thing: there is no \n> 'exp' in the above expression! I have a suspicion that there might be \n> differences in evaluation order. I'll look into that now.\n>\n> I suspect the lack of 'exp' is due to variable capture.\n\nIt is / was.\n\n>\n> I just changed the Maple interpretation to use \"local\" to name\n> integration variables. Now they all look like they're named \"x\" but\n> they are actually different \"x\"s. Now t51 gives\n>\n> *** Exception: MapleException \n> \"Typed((x0->Pair(Bind(fst(Pair(Bind(Lebesgue,x1,if_(((-1)<x1), \n> if_((x1<1), Superpose(WeightedM((1/(1-(-1))),Return(x1))), \n> Superpose()), if_(false, \n> Superpose(WeightedM((1/(1-(-1))),Return(x1))), Superpose()))), \n> (x1->(proc (r,c) local x; Int(c(x),x=r) end proc)(((-1)..1), \n> (x2->(x1(x2)/(1-(-1)))))))),x1,fst(x0(x1))), \n> (x1->snd(Pair(Bind(Lebesgue,x1,if_(((-1)<x1), if_((x1<1), \n> Superpose(WeightedM((1/(1-(-1))),Return(x1))), Superpose()), \n> if_(false, Superpose(WeightedM((1/(1-(-1))),Return(x1))), \n> Superpose()))), (x1->(proc (r,c) local x; Int(c(x),x=r) end \n> proc)(((-1)..1), \n> (x2->(x1(x2)/(1-(-1))))))))((x2->snd(x0(x2))(x1))))))((x0->Pair(Bind(Lebesgue,x1,Superpose(WeightedM(((exp((-(((x1-x0)*(x1-x0))/(2*(1^2)))))/1)/sqrt((2*Pi))),Return(x1)))), \n> (x1->(proc (r,c) local x; Int(c(x),x=r) end \n> proc)((-infinity..infinity), \n> (x2->(((exp((-(((x2-x0)*(x2-x0))/(2*(1^2)))))/1)/sqrt((2*Pi)))*x1(x2)))))))), \n> Measure(Real))& quot; &q uot;Error, (in Haskell) incorrect inert form\\n\"\n>\n> which I suspect is due to some interaction with myint. Would you please\n> take a look (and maybe permute things between the definition of myint in\n> Maple and the definition of quant in Haskell)? Thanks.\n\nActually, the problem is indeed in the prettyprinter.  It now gets a \n_Inert_LOCALNAME(x, 18446744073890419134) where it expected to only even \nget a (global) name.  I'll adapt the code."}}