tag:blogger.com,1999:blog-11295132.post5532328337205821486..comments2016-12-05T13:41:53.469-08:00Comments on A Neighborhood of Infinity: Finite Differences of TypesDan Piponihttps://plus.google.com/107913314994758123748noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-11295132.post-36510602123301772522010-06-13T09:24:10.650-07:002010-06-13T09:24:10.650-07:00"I think this geometric analogy can be taken ..."I think this geometric analogy can be taken a lot further and that in fact a non-trivial piece of differential geometry can be made to work with types"<br /><br />care to spill the beans on what you're thinking of? =)Gilberthttp://www.blogger.com/profile/12848246894741812189noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-73818808464665999582009-11-04T07:03:49.537-08:002009-11-04T07:03:49.537-08:00Duncan,
You could try here if you're not a Ha...Duncan,<br /><br />You could try <a href="http://sigfpe.com/Computing/diff.html" rel="nofollow">here</a> if you're not a Haskell programmer (yet). '+' is disjoint union. Another place is <a href="http://en.wikibooks.org/wiki/Haskell/Zippers" rel="nofollow">here</a>.sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-5163837613682898722009-11-03T23:46:01.233-08:002009-11-03T23:46:01.233-08:00I'm really new to this stuff, but I find it fa...I'm really new to this stuff, but I find it fascinating. I'm a bit confused however: what does it mean to add two types together? i.e. it makes sense to me that X^2 is (X,X), but I don't understand, for example, why a list of Xs has type L(X)=1+X L(X). Do we just think of + as a form of union? Could you recommend a reference on this stuff?<br /><br />Thanks! DuncanDuncanhttp://www.blogger.com/profile/10953461883282730140noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-15189561524083666312009-09-29T11:18:08.569-07:002009-09-29T11:18:08.569-07:00There's another version here.There's another version <a href="http://mywikibiz.com/Directory:Jon_Awbrey/Papers/Differential_Logic_:_Introduction" rel="nofollow">here</a>.Jon Awbreyhttp://knol.google.com/k/jon-awbrey/jon-awbrey/3fkwvf69kridz/1noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-49920060490940207532009-09-29T11:07:25.685-07:002009-09-29T11:07:25.685-07:00Jon,
Interesting! That looks remarkably like a si...Jon,<br /><br />Interesting! That looks remarkably like a side project of mine. Unfortunately I can't read the web site right now because despite following lots of instructions I've never managed to make the fonts work for the n-category cafe under Linux. I'll see how it looks under MacOSX tonight.sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-79828962420896628232009-09-29T10:28:11.711-07:002009-09-29T10:28:11.711-07:00See Differential Logic and refs therein.See <a href="http://ncatlab.org/nlab/show/differential+logic" rel="nofollow">Differential Logic</a> and refs therein.Jon Awbreyhttp://mywikibiz.com/Directory:Jon_Awbreynoreply@blogger.comtag:blogger.com,1999:blog-11295132.post-20338088869726704922009-09-28T15:38:25.058-07:002009-09-28T15:38:25.058-07:00leihaus,
I just talked about the easy case of an ...leihaus,<br /><br />I just talked about the easy case of an N-element array <a href="http://blog.sigfpe.com/2008/03/comonadic-arrays.html" rel="nofollow">here</a>. Otherwise it's all in Conor's papers.sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-37925829982778578992009-09-28T15:33:35.014-07:002009-09-28T15:33:35.014-07:00Hey Dan,
i forget did you already post on the zip...Hey Dan,<br /><br />i forget did you already post on the zipper-comonad connection to spell out the connection between differentiation and comonads?<br /><br />Best wishes,<br /><br />--gregleithaushttp://www.blogger.com/profile/01069099703796397027noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-73125670590352028122009-09-28T14:57:44.673-07:002009-09-28T14:57:44.673-07:00Sjoerd,
Sounds like you're trying to find a F...Sjoerd,<br /><br />Sounds like you're trying to find a <a href="http://en.wikipedia.org/wiki/Fa%C3%A0_di_Bruno's_formula" rel="nofollow">Faa di Bruno</a> style formula. I think there may be a nice way of approaching that but I have no time right now...sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-23272459653333224272009-09-28T10:12:42.120-07:002009-09-28T10:12:42.120-07:00I was specifically going for the second difference...I was specifically going for the second difference of function composition, i.e. the difference equivalent of (fg)''(x) = f''(g(x))g^2(x) + g''(x)f'(g(x))<br /><br />The problem is that I'm not sure about what the formula of second order difference should be exactly.<br /><br />But I agree that having the difference view makes things easier.<br /><br />I derived the first difference by guessing what the difference equivalent of the chain rule would be, and confirming the result by filling in the difference formulas.<br /><br />Conor will probably agree as well, as the C&J paper says: "Of course, what’s missing here is a more semantic characterisation of dissection, with respect to which the operational rules for /|\ p may be justified."Sjoerd Visscherhttp://www.blogger.com/profile/10698430967044536619noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-12091493400010815182009-09-28T09:49:51.914-07:002009-09-28T09:49:51.914-07:00Sjoerd, there's no need for second differences...Sjoerd, there's no need for second differences in the chain rule. We want the first difference of the composition of two functions:<br /><br />Informally:<br /><br />Δ(F o G)(X,Y)<br />=(F(G(X))-F(G(Y)))/(X-Y)<br />=(F(G(X)-F(G(Y))/(G(X)-G(Y)) . (G(X)-G(Y))/(X-Y)<br />= ΔF(G(X),G(Y)) . ΔG(X,Y)<br /><br />That can now be verified using Conor's definition of dissection. When Y=X we get the usual chain rule.<br /><br />I think this would have been tricky to derive without seeing dissection as finite difference.sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-37433453496586775122009-09-28T07:14:38.164-07:002009-09-28T07:14:38.164-07:00Still doesn't seem right. Can't get the ch...Still doesn't seem right. Can't get the chain rule to work. Looking at the holes it should be something like:<br /><br />Δ^2(FG)(X,Y,Z) = Δ^2G(X,Y,Z)DF(G(X),G(Z)) + DG(X,Y)DG(Y,Z)Δ^2F(G(X),G(Y),G(Z))<br /><br />(I.e. the 2 holes in the same part of F or in different parts of F)Sjoerd Visscherhttp://www.blogger.com/profile/10698430967044536619noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-80684031850919445572009-09-28T01:20:07.168-07:002009-09-28T01:20:07.168-07:00Perhaps my question makes no sense, but what would...Perhaps my question makes no sense, but what would it mean to define the "exponential" type as the type that is equal to its own derivative? <br /><br />Or, can you do "type" differential equations?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11295132.post-71407464327677737862009-09-27T15:28:17.836-07:002009-09-27T15:28:17.836-07:00Ah, I forgot that you can choose which hole goes t...Ah, I forgot that you can choose which hole goes to F and which to G.<br />So: Δ^2(FG)(X,Y,Z) = F(X)Δ^2G(X,Y,Z) + 2ΔF(X,Y)ΔG(Y,Z) + Δ^2F(X,Y,Z)G(Z)<br /><br />This can be derived from Δ^2(f)(x,y,z) = (f(x) - 2f(y) + f(z)) / (x - y) / (y - z)Sjoerd Visscherhttp://www.blogger.com/profile/10698430967044536619noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-60766147957844914732009-09-27T15:00:18.408-07:002009-09-27T15:00:18.408-07:00What about second order dissectioning?
F.e. Δ^2(FG...What about second order dissectioning?<br />F.e. Δ^2(FG)(X,Y,Z) = F(X)Δ^2G(X,Y,Z) + ΔF(X,Y)ΔG(Y,Z) + Δ^2F(X,Y,Z)G(Z)<br />(I.e. both holes in G, one hole in F and one in G or both holes in F.)<br /><br />I couldn't manage to derive this from second order finite difference. But maybe I did something wrong.Sjoerd Visscherhttp://www.blogger.com/profile/10698430967044536619noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-43884982564466114012009-09-27T13:36:34.077-07:002009-09-27T13:36:34.077-07:00You refer to X^N as the type of arrays of elements...You refer to X^N as the type of arrays of elements of X of length N, but shouldn't they be thought of instead as N-tuples? (I guess it's a minor difference in terminology, but I think of ‘array’ as specifically connoting extensibility, with some sort of push/pull operation.)Lorenhttp://www.blogger.com/profile/10866289941226429119noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-45722824807776761812009-09-27T12:25:38.567-07:002009-09-27T12:25:38.567-07:00Creighton,
No exponentials needed here as N is an...Creighton,<br /><br />No exponentials needed here as N is an integer.<br /><br />With a bit of trickery I did once sort of get exponentials going with derivatives. But I don't think anything similar will work for finite differences and exponentials.sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-21608393702149832032009-09-27T12:17:30.006-07:002009-09-27T12:17:30.006-07:00I think that
(f(x)g(x)-f(x)g(y)+f(x)g(y)-f(y)g(y)...I think that<br /><br />(f(x)g(x)-f(x)g(y)+f(x)g(y)-f(y)g(y)/(x-y)<br /><br />is missing a paren before the /. <br /><br />(f(x)g(x)-f(x)g(y)+f(x)g(y)-f(y)g(y))/(x-y)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11295132.post-57250183961565198442009-09-27T12:16:54.899-07:002009-09-27T12:16:54.899-07:00Permutations and combinations crossed my mind.Permutations and combinations crossed my mind.Hanknoreply@blogger.comtag:blogger.com,1999:blog-11295132.post-89852993289031493222009-09-27T12:14:17.503-07:002009-09-27T12:14:17.503-07:00Okay - so categorically this is requiring finite p...Okay - so categorically this is requiring finite products, finite sums (and exponentials for your X^N example)?<br /><br />What I'd be very curious about is how well this generalizes to categories with less structure - monoidal instead of cartesian, for instance.Creighton Hogghttp://www.blogger.com/profile/09820771070038676909noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-1063192635683803392009-09-27T10:04:18.729-07:002009-09-27T10:04:18.729-07:00I just did the tree example to show it works even ...I just did the tree example to show it works even for algebraic functions like square root, not to show it's easier :-) But in general, I find thinking about dissection as finite differences does make it a lot easier.sigfpehttp://www.blogger.com/profile/08096190433222340957noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-78848548019041052052009-09-27T09:48:51.795-07:002009-09-27T09:48:51.795-07:00I find finitely differentiating T(X)=X+T(X)^2 dire...I find finitely differentiating T(X)=X+T(X)^2 directly easier. It becomes ΔT(X,Y) = 1 + (T(X) + T(Y))ΔT(X,Y) which is obviously a list of (T(X) + T(Y)).<br /><br />One typo: "That tells us that Δf(x,y) = 1/(f(x)f(y))." I think you got 2 formulas confused here.Sjoerd Visscherhttp://www.blogger.com/profile/10698430967044536619noreply@blogger.comtag:blogger.com,1999:blog-11295132.post-55861526074594135022009-09-27T09:30:20.840-07:002009-09-27T09:30:20.840-07:00You should investigate interval arithmetic and int...You should investigate interval arithmetic and interval constraints. Interval constraints are used to deal with the explosive ranges that accumulate with interval arithmetic. This is relevant to floating point numbers so you can have very accurate calculations (bounded by the smallest different floating numbers possible).<br /><br />e.g. http://webhome.cs.uvic.ca/~bmoa/icsp.pptAnonymousnoreply@blogger.com