[Haskell-cafe] Hyper-recursion?
Olaf Klinke
olf at aatal-apotheke.de
Tue Jan 17 20:14:14 UTC 2017
If I may step into this discussion, I'd like to suggest you start modelling your world of parcels more concretely, as data types. From there it should be easier to grasp our hyper-recursion.
Question: Does every parcel have its own time, or is there a universal clock ticking in the background?
If you have a uiversal clock, you could model your world as a linear series of state changes, stretching infinitely into the past and future. Hence two streams going out form a "now" would be the overarching data type. This has been used e.g. for doubly linked lists. Doesn't functional reactive programming use a similar model?
Question: How does one identify a parcel of land? Is it a polygon of coordinates in some reference system? Hence can the state be seen as a finite set of (Polygon,Owner) pairs?
Question: What is more important: The state or the state change? If the state is more important, a kind of graph might be the appropriate data structure. If the change is important, it might be interesting to model the world (and time) as a network of functions.
Question to all mathematicians on this list: Suppose (again assuming a universal clock) there is a type (a set?) X and a function
change :: Integer -> (X -> X)
where the state of "now" is to be understood as the value
now = change 0 . change (-1) . change (-2) . {...ad infinitum}
Under which circumstances does this determine the value of "now"? The only instance I can think of are contractions on a (compact) metric space. (Brouwer's/Banach's fixed point theorems)
I second the contributors who suggest that this has not much to do with recursion nor corecursion. To me, the essence of recusion is self-reference. A function building e.g. an infinite stream from a seed is not self-referential in itself, it is the resulting data that is self-referential.
Olaf
More information about the Haskell-Cafe
mailing list