Fixed point combinators for functions by user types?

Most examples of using fixed-point combinators include functions that take integers as integers (for example, factorial). In many cases, a fixed point of a function over real numbers will turn out to be an arbitrary rational or, possibly, irrational number (a well-known example is the logistic map http://en.wikipedia.org/wiki/Logistic_map ). In these cases, a fixed point cannot be expressed in terms of primitive types (note that Clojure has relationship support). I'm interested in learning about fixed-point combinators (and their implementations!) That can calculate fixed-point functions over these "exotic" types. Since things like irrational numbers have a decimal notation as infinite sequences, it seems like this calculation should be evaluated lazily. Do any of these (supposed) lazy estimates give good approximations to true fixed points? My target languages ​​are Python and Clojure, but I certainly don't mind seeing any implementations of OCaml or Haskell).

+4
source share
1 answer

You will find a function that calculates fixed points on the Andrej Bauer blog; for example, seemingly impossible programs and endless searches for a finite time . This is for the case when the fixed point is actually at a "finite distance" so that it will be reached.

Some of the fixed points that you are talking about are not like they are really "infinitely far." These are the types of fixed points that are used in Computable Analysis . Basically, there is a theory on how to get good approximations to a fixed point.

+2
source

Source: https://habr.com/ru/post/1315586/


All Articles