Re: Successor Axiom: on what grounds TF?

From: |-|erc (h_at_r.c)
Date: 02/07/05


Date: Mon, 7 Feb 2005 10:29:28 +1000


"The Ghost In The Machine" <ewill@sirius.athghost7038suus.net> wrote in
> >
> > twice(twice((twice(twice())twice))) twice(twice(twice())) twice() = twice(twice(twice(twice())))
> >
> > + 3 1 = 4
> >
> > where twice(x y) = x(xy)
>
> Erm, if you're defining twice(x y), what is twice() and twice(x) ?
> Not to mention twice?
>
> If I define:
>
> a = twice()
> b = twice(a)
> c = twice(b)
>
> then the above expression breaks down into
>
> twice(twice((b twice))) c a = twice(c)

Its the prototypical high order function,

http://www.uni-bonn.de/~manfear/haskell-functions.php

Consider the following definitions:
> inc :: Int -> Int
> inc n = n+1
>
> twice :: (a -> a) -> a -> a
> twice f a = f (f a)

twice inc 0 =
inc (inc 0) =
inc 1 =
2

twice twice inc 0 =
((twice twice) inc) 0 =
((twice . twice) inc) 0 =
(twice (twice inc)) 0 =
(twice (inc . inc)) 0 =
(inc . inc . inc . inc) 0 =
(inc (inc (inc (inc 0)))) =
(inc (inc (inc 1))) =
(inc (inc 2)) =
(inc 3) =
4

twice twice twice inc 0 = ?
since twice is TM complete, some mathematicians consider the number 1 to be twice(),
and 2 to be twice(twice()), an actual successor function and no zero required!

Herc



Relevant Pages

  • Re: iif statement and defining calculated expression once only
    ... The query optimizer *should* be able to recognize that the same expression is used twice, and *should* cache it after its first computation, but definitively, YOU will have to type it twice, or to use an expression alias, in another column, and use the alias rather than the expression, in the SELECT clause. ... avoid defining the complicated expression twice. ... the complicated expression by a temp field name e.g. x. ...
    (microsoft.public.access.queries)
  • Re: Headers in Table of Contents using fancyhdr
    ... Yes "sort of". ... And why are you defining \fancypagestyletwice? ... Ulrike Fischer ...
    (comp.text.tex)
  • Re: Headers in Table of Contents using fancyhdr
    ... Yes "sort of". ... And why are you defining \fancypagestyletwice? ... Ulrike Fischer ...
    (comp.text.tex)
  • Re: Pattern Matching from a OS command
    ... defining @files twice. ... It was being defined twice in the code you gave initially. ... is the prior declaration that is causing the warning. ...
    (comp.lang.perl.misc)
  • Uploading files...
    ... Erm, this must be an error SOMEWHERE - but I can't find it. ... I have been in programming a while but a pretty new to the PHP/C++ scene so ... It only works if I do it twice - it's like the save-name only works if I do ...
    (alt.php)