Seemingly impossible functional programs (2007)
math.andrej.com
Seemingly impossible functional programs (2007)
1–10 of 46 posts
Re: Seemingly impossible functional programs (2007)
#2[1] http://xenon.kiam.ru/~roman/doc/2009-Klyuchnikov_Romanenko--...
Basically, if supercompilation of the expression above results in a huge nested case that has either True as a result (termination) or an application of function (not terminated due to infinite data structures, for example), then functions are equivalent. Otherwise, if there is at least one False, they are not, the path to False provides a counterexample.
Re: Seemingly impossible functional programs (2007)
#3Re: Seemingly impossible functional programs (2007)
#4Sure, this is interesting, but in the sense of "look at this emergent behavior -- such a simple system can do unusually complex result", rather than "wow! no one could do such things with computer before"
Re: Seemingly impossible functional programs (2007)
#5The article mentions the inability to decide equality of functions. A paper [1] about proving properties of functional programs shows how to do that modulo halting theorem. E.g., if (\x -> f x == g x) halts we can decide whether f and g are equal. [1] http://xenon.kiam.ru/~roman/doc/2009-Klyuchnikov_Romanenko--... Basically, if supercompilation of the expression above results in a huge nested case that has either Tru…
Re: Seemingly impossible functional programs (2007)
#6The article mentions the inability to decide equality of functions. A paper [1] about proving properties of functional programs shows how to do that modulo halting theorem. E.g., if (\x -> f x == g x) halts we can decide whether f and g are equal. [1] http://xenon.kiam.ru/~roman/doc/2009-Klyuchnikov_Romanenko--... Basically, if supercompilation of the expression above results in a huge nested case that has either Tru…
One of the authors of this work apparently now works on supercompilers at Meta and open sourced some nice tools for equivalence checking based on graph rewriting [1] and constructive type theory [2]. If you're interested in that kind of thing I would recommend checking out his work: [1]: https://github.com/ilya-klyuchnikov/mrsc [2]: https://github.com/ilya-klyuchnikov/ttlite
Re: Seemingly impossible functional programs (2007)
#7Re: Seemingly impossible functional programs (2007)
#8Thus if you assume that the function is total and thus doesn't halt, it must run in O(1) time.
To find an infinite input bit string where the function halts, we can just record which k = O(1) bits the function is querying and then try all 2^k possibilities and as calculating the function is O(1) the total time is also O(1). (We don't always have to try all 2^k possibilities).
Re: Seemingly impossible functional programs (2007)
#9I looked up Cantor Sets so I have a vague understanding... but there are many things I don't understand. Like what does it mean to have a sequence with a bit appended to a Cantor Set? Why is that a Cantor Set? What the heck is a total p - is it a function?
Re: Seemingly impossible functional programs (2007)
#10Can someone explain to me in plain English what this is? I looked up Cantor Sets so I have a vague understanding... but there are many things I don't understand. Like what does it mean to have a sequence with a bit appended to a Cantor Set? Why is that a Cantor Set? What the heck is a total p - is it a function?