Working with the set of real numbers

Chris Angelico rosuav at gmail.com
Thu Feb 13 20:25:37 CET 2014


On Fri, Feb 14, 2014 at 1:00 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM
> and ran at ℵ₁ hertz and Python supported transfinite iteration, you
> could easily do reals:
>
>     def real_sqrt(y):
>         for x in continuum(0, max(1, y)):
>             # Note: x is not traversed in the < order but some other
>             # well-ordering, which has been proved to exist.
>             if x * x == y:
>                 return x
>         assert False

How exactly do you iterate over a continuum, with a digital computer?
Even adding to your requirements that it have an ℵ₁ Hz bus (which, by
the way, I *totally* want - the uses are endless), it would take a
finite amount of time to assign to x the "next number", ergo your
algorithm can't guarantee to finish in finite time.

ChrisA



More information about the Python-list mailing list