Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.roellig-ltd.de!open-news-network.org!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx01.ams4.POSTED!not-for-mail From: Mr Flibble Newsgroups: comp.theory,comp.ai.philosophy,sci.logic,sci.math Subject: Re: Must a partial halt decider be a pure function of its inputs? (addendum) Message-ID: <20210919202944.00007ff6@reddwarf.jmc> References: <20210919190500.00003629@reddwarf.jmc> <20210919192912.0000074c@reddwarf.jmc> <20210919194430.00002cdd@reddwarf.jmc> <4qydncQrKblXFNr8nZ2dnUU7-QmdnZ2d@giganews.com> <20210919201305.0000555f@reddwarf.jmc> Organization: Jupiter Mining Corp X-Newsreader: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Lines: 95 X-Complaints-To: abuse@eweka.nl NNTP-Posting-Date: Sun, 19 Sep 2021 19:29:43 UTC Date: Sun, 19 Sep 2021 20:29:44 +0100 X-Received-Bytes: 4880 Xref: csiph.com comp.theory:39556 comp.ai.philosophy:25763 sci.logic:232003 sci.math:539420 On Sun, 19 Sep 2021 14:27:37 -0500 olcott wrote: > On 9/19/2021 2:13 PM, Mr Flibble wrote: > > On Sun, 19 Sep 2021 14:04:41 -0500 > > olcott wrote: > > =20 > >> On 9/19/2021 1:44 PM, Mr Flibble wrote: =20 > >>> On Sun, 19 Sep 2021 13:40:36 -0500 > >>> olcott wrote: > >>> =20 > >>>> On 9/19/2021 1:29 PM, Mr Flibble wrote: =20 > >>>>> On Sun, 19 Sep 2021 13:16:24 -0500 > >>>>> olcott wrote: > >>>>> =20 > >>>>>> On 9/19/2021 1:05 PM, Mr Flibble wrote: =20 > >>>>>>> On Sun, 19 Sep 2021 11:20:15 -0500 > >>>>>>> olcott wrote: > >>>>>>> =20 > >>>>>>>> On 9/18/2021 10:42 PM, olcott wrote: =20 > >>>>>>>>> This is my paraphrase of the requirement a partial > >>>>>>>>> halt decider must be a pure function of its inputs: > >>>>>>>>> > >>>>>>>>> As long as there is one set of inputs such as such as the > >>>>>>>>> formal parameters to a function and a single output such as > >>>>>>>>> return value of {1,0} (indicating true or false) from this > >>>>>>>>> function, then whatever occurs in-between does not make any > >>>>>>>>> difference. > >>>>>>>>> > >>>>>>>>> This would mean that my use of static local variables has no > >>>>>>>>> detrimental effect on the applicability of my partial halt > >>>>>>>>> decider to the halting problem. > >>>>>>>>> > >>>>>>>>> u32 H(u32 P, u32 I) > >>>>>>>>> { > >>>>>>>>> =A0 static u32 Aborted; > >>>>>>>>> =A0 static u32* execution_trace; =20 > >>>>>>>> > >>>>>>>> Although a "pure function" would seem to require both > >>>>>>>> elements on the link provided below, a "pure function of its > >>>>>>>> inputs" seems to only require this first element. > >>>>>>>> > >>>>>>>> (1) The function return values are identical for identical > >>>>>>>> arguments (no variation with local static variables, > >>>>>>>> non-local variables, mutable reference arguments or input > >>>>>>>> streams). https://en.wikipedia.org/wiki/Pure_function > >>>>>>>> > >>>>>>>> This seems to be saying as long as the final return value of > >>>>>>>> a function is consistently the same for any specific initial > >>>>>>>> arguments it does not matter that: > >>>>>>>> (a) local static variables > >>>>>>>> (b) non-local variables > >>>>>>>> (c) mutable reference arguments > >>>>>>>> (d) input streams > >>>>>>>> > >>>>>>>> are used to achieve this consistent return value. =20 > >>>>>>> > >>>>>>> No, a pure function cannot have any side effects: changing > >>>>>>> static variables is a side effect. > >>>>>>> > >>>>>>> /Flibble > >>>>>>> =20 > >>>>>> > >>>>>> It does not have to be an actual pure function, it only has to > >>>>>> be a pure function of its inputs. =20 > >>>>> > >>>>> "a pure function of its inputs" makes no sense: =20 > >>>> > >>>> It is merely the first element of the linked "pure function" > >>>> requirements. =20 > >>> > >>> It is merely something that makes no sense. Pure functions CANNOT > >>> have any side effects. > >>> > >>> /Flibble > >>> =20 > >> > >> Then a function that can always know when it has been called in > >> infinite recursion is simply not allowed. That makes no sense. =20 > > =20 > > Your conclusion makes no sense. What isn't allowed here is > > your use of the term "pure function" to describe something that > > isn't a pure function. > >=20 > > /Flibble > > =20 >=20 > This was always presented to me as "a pure function of its inputs". =20 So what in your mind is the difference between a pure function and a "pure function of its inputs"? If a "pure function of its inputs" has side effects then it isn't a pure function, period. /Flibble