Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.math > #539387 > unrolled thread

Re: Must a partial halt decider be a pure function of its inputs? (addendum)

Started byolcott <NoOne@NoWhere.com>
First post2021-09-19 11:20 -0500
Last post2021-09-19 13:21 -0500
Articles 13 — 2 participants

Back to article view | Back to sci.math

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 11:20 -0500
    Re: Must a partial halt decider be a pure function of its inputs? (addendum) Mr Flibble <flibble@reddwarf.jmc> - 2021-09-19 19:05 +0100
      Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 13:16 -0500
        Re: Must a partial halt decider be a pure function of its inputs? (addendum) Mr Flibble <flibble@reddwarf.jmc> - 2021-09-19 19:29 +0100
          Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 13:40 -0500
            Re: Must a partial halt decider be a pure function of its inputs? (addendum) Mr Flibble <flibble@reddwarf.jmc> - 2021-09-19 19:44 +0100
              Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 14:04 -0500
                Re: Must a partial halt decider be a pure function of its inputs? (addendum) Mr Flibble <flibble@reddwarf.jmc> - 2021-09-19 20:13 +0100
                  Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 14:27 -0500
                    Re: Must a partial halt decider be a pure function of its inputs? (addendum) Mr Flibble <flibble@reddwarf.jmc> - 2021-09-19 20:29 +0100
                      Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 15:08 -0500
                        Re: Must a partial halt decider be a pure function of its inputs? (addendum) Mr Flibble <flibble@reddwarf.jmc> - 2021-09-19 21:32 +0100
    Re: Must a partial halt decider be a pure function of its inputs? (addendum) olcott <NoOne@NoWhere.com> - 2021-09-19 13:21 -0500

#539387 — Re: Must a partial halt decider be a pure function of its inputs? (addendum)

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 11:20 -0500
SubjectRe: Must a partial halt decider be a pure function of its inputs? (addendum)
Message-ID<EfSdnT66Affd_tr8nZ2dnUU7-N_NnZ2d@giganews.com>
On 9/18/2021 10:42 PM, olcott wrote:
> 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)
> {
>    static u32 Aborted;
>    static u32* execution_trace;

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.







-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [next] | [standalone]


#539401

FromMr Flibble <flibble@reddwarf.jmc>
Date2021-09-19 19:05 +0100
Message-ID<20210919190500.00003629@reddwarf.jmc>
In reply to#539387
On Sun, 19 Sep 2021 11:20:15 -0500
olcott <NoOne@NoWhere.com> wrote:

> On 9/18/2021 10:42 PM, olcott wrote:
> > 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)
> > {
> >    static u32 Aborted;
> >    static u32* execution_trace;  
> 
> 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.

No, a pure function cannot have any side effects: changing static
variables is a side effect.

/Flibble

[toc] | [prev] | [next] | [standalone]


#539402

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 13:16 -0500
Message-ID<j5SdnQ0eGsDk49r8nZ2dnUU7-bnNnZ2d@giganews.com>
In reply to#539401
On 9/19/2021 1:05 PM, Mr Flibble wrote:
> On Sun, 19 Sep 2021 11:20:15 -0500
> olcott <NoOne@NoWhere.com> wrote:
> 
>> On 9/18/2021 10:42 PM, olcott wrote:
>>> 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)
>>> {
>>>     static u32 Aborted;
>>>     static u32* execution_trace;
>>
>> 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.
> 
> No, a pure function cannot have any side effects: changing static
> variables is a side effect.
> 
> /Flibble
> 

It does not have to be an actual pure function, it only has to be a pure 
function of its inputs.

If it has to be a pure function then it is impossible for any software 
function to be able to ever determine that it has been called in 
infinite recursion because on each recursive invocation all of its 
memory of prior invocations is erased.

-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [prev] | [next] | [standalone]


#539405

FromMr Flibble <flibble@reddwarf.jmc>
Date2021-09-19 19:29 +0100
Message-ID<20210919192912.0000074c@reddwarf.jmc>
In reply to#539402
On Sun, 19 Sep 2021 13:16:24 -0500
olcott <NoOne@NoWhere.com> wrote:

> On 9/19/2021 1:05 PM, Mr Flibble wrote:
> > On Sun, 19 Sep 2021 11:20:15 -0500
> > olcott <NoOne@NoWhere.com> wrote:
> >   
> >> On 9/18/2021 10:42 PM, olcott wrote:  
> >>> 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)
> >>> {
> >>>     static u32 Aborted;
> >>>     static u32* execution_trace;  
> >>
> >> 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.  
> > 
> > No, a pure function cannot have any side effects: changing static
> > variables is a side effect.
> > 
> > /Flibble
> >   
> 
> It does not have to be an actual pure function, it only has to be a
> pure function of its inputs.

"a pure function of its inputs" makes no sense: a function is either
pure (no side effects at all) or it is impure. Impure functions are
normally called "procedures" rather than functions if we define our
terms taking the intersection of mathematics and computer science as a
guide.

> 
> If it has to be a pure function then it is impossible for any
> software function to be able to ever determine that it has been
> called in infinite recursion because on each recursive invocation all
> of its memory of prior invocations is erased.
 
Then add an extra parameter to the function that is "stack depth" or
some such but note that if we do that then obviously the function is no
longer being called with the same arguments as it recurses.

/Flibble

[toc] | [prev] | [next] | [standalone]


#539412

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 13:40 -0500
Message-ID<hMmdnceVtcK4Gdr8nZ2dnUU7-LHNnZ2d@giganews.com>
In reply to#539405
On 9/19/2021 1:29 PM, Mr Flibble wrote:
> On Sun, 19 Sep 2021 13:16:24 -0500
> olcott <NoOne@NoWhere.com> wrote:
> 
>> On 9/19/2021 1:05 PM, Mr Flibble wrote:
>>> On Sun, 19 Sep 2021 11:20:15 -0500
>>> olcott <NoOne@NoWhere.com> wrote:
>>>    
>>>> On 9/18/2021 10:42 PM, olcott wrote:
>>>>> 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)
>>>>> {
>>>>>      static u32 Aborted;
>>>>>      static u32* execution_trace;
>>>>
>>>> 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.
>>>
>>> No, a pure function cannot have any side effects: changing static
>>> variables is a side effect.
>>>
>>> /Flibble
>>>    
>>
>> It does not have to be an actual pure function, it only has to be a
>> pure function of its inputs.
> 
> "a pure function of its inputs" makes no sense:

It is merely the first element of the linked "pure function" requirements.

>  a function is either
> pure (no side effects at all) or it is impure. Impure functions are
> normally called "procedures" rather than functions if we define our
> terms taking the intersection of mathematics and computer science as a
> guide.
> 
>>
>> If it has to be a pure function then it is impossible for any
>> software function to be able to ever determine that it has been
>> called in infinite recursion because on each recursive invocation all
>> of its memory of prior invocations is erased.
>   
> Then add an extra parameter to the function that is "stack depth" or

// Stack_Depth is incremented in H

void P(u32 x, Stack_Depth)
{
   H(x, x, 0);
}

int main()
{
   Output("Input_Halts = ", H((u32)P, (u32)P, 0));
}

P can break the Stack_Depth value if it has access to Stack_Depth variable.

> some such but note that if we do that then obviously the function is no
> longer being called with the same arguments as it recurses.
> 
> /Flibble
> 


-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [prev] | [next] | [standalone]


#539413

FromMr Flibble <flibble@reddwarf.jmc>
Date2021-09-19 19:44 +0100
Message-ID<20210919194430.00002cdd@reddwarf.jmc>
In reply to#539412
On Sun, 19 Sep 2021 13:40:36 -0500
olcott <NoOne@NoWhere.com> wrote:

> On 9/19/2021 1:29 PM, Mr Flibble wrote:
> > On Sun, 19 Sep 2021 13:16:24 -0500
> > olcott <NoOne@NoWhere.com> wrote:
> >   
> >> On 9/19/2021 1:05 PM, Mr Flibble wrote:  
> >>> On Sun, 19 Sep 2021 11:20:15 -0500
> >>> olcott <NoOne@NoWhere.com> wrote:
> >>>      
> >>>> On 9/18/2021 10:42 PM, olcott wrote:  
> >>>>> 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)
> >>>>> {
> >>>>>      static u32 Aborted;
> >>>>>      static u32* execution_trace;  
> >>>>
> >>>> 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.  
> >>>
> >>> No, a pure function cannot have any side effects: changing static
> >>> variables is a side effect.
> >>>
> >>> /Flibble
> >>>      
> >>
> >> It does not have to be an actual pure function, it only has to be a
> >> pure function of its inputs.  
> > 
> > "a pure function of its inputs" makes no sense:  
> 
> It is merely the first element of the linked "pure function"
> requirements.

It is merely something that makes no sense. Pure functions CANNOT have
any side effects.

/Flibble

[toc] | [prev] | [next] | [standalone]


#539415

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 14:04 -0500
Message-ID<4qydncQrKblXFNr8nZ2dnUU7-QmdnZ2d@giganews.com>
In reply to#539413
On 9/19/2021 1:44 PM, Mr Flibble wrote:
> On Sun, 19 Sep 2021 13:40:36 -0500
> olcott <NoOne@NoWhere.com> wrote:
> 
>> On 9/19/2021 1:29 PM, Mr Flibble wrote:
>>> On Sun, 19 Sep 2021 13:16:24 -0500
>>> olcott <NoOne@NoWhere.com> wrote:
>>>    
>>>> On 9/19/2021 1:05 PM, Mr Flibble wrote:
>>>>> On Sun, 19 Sep 2021 11:20:15 -0500
>>>>> olcott <NoOne@NoWhere.com> wrote:
>>>>>       
>>>>>> On 9/18/2021 10:42 PM, olcott wrote:
>>>>>>> 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)
>>>>>>> {
>>>>>>>       static u32 Aborted;
>>>>>>>       static u32* execution_trace;
>>>>>>
>>>>>> 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.
>>>>>
>>>>> No, a pure function cannot have any side effects: changing static
>>>>> variables is a side effect.
>>>>>
>>>>> /Flibble
>>>>>       
>>>>
>>>> It does not have to be an actual pure function, it only has to be a
>>>> pure function of its inputs.
>>>
>>> "a pure function of its inputs" makes no sense:
>>
>> It is merely the first element of the linked "pure function"
>> requirements.
> 
> It is merely something that makes no sense. Pure functions CANNOT have
> any side effects.
> 
> /Flibble
> 

Then a function that can always know when it has been called in infinite 
recursion is simply not allowed. That makes no sense.

-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [prev] | [next] | [standalone]


#539417

FromMr Flibble <flibble@reddwarf.jmc>
Date2021-09-19 20:13 +0100
Message-ID<20210919201305.0000555f@reddwarf.jmc>
In reply to#539415
On Sun, 19 Sep 2021 14:04:41 -0500
olcott <NoOne@NoWhere.com> wrote:

> On 9/19/2021 1:44 PM, Mr Flibble wrote:
> > On Sun, 19 Sep 2021 13:40:36 -0500
> > olcott <NoOne@NoWhere.com> wrote:
> >   
> >> On 9/19/2021 1:29 PM, Mr Flibble wrote:  
> >>> On Sun, 19 Sep 2021 13:16:24 -0500
> >>> olcott <NoOne@NoWhere.com> wrote:
> >>>      
> >>>> On 9/19/2021 1:05 PM, Mr Flibble wrote:  
> >>>>> On Sun, 19 Sep 2021 11:20:15 -0500
> >>>>> olcott <NoOne@NoWhere.com> wrote:
> >>>>>         
> >>>>>> On 9/18/2021 10:42 PM, olcott wrote:  
> >>>>>>> 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)
> >>>>>>> {
> >>>>>>>       static u32 Aborted;
> >>>>>>>       static u32* execution_trace;  
> >>>>>>
> >>>>>> 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.  
> >>>>>
> >>>>> No, a pure function cannot have any side effects: changing
> >>>>> static variables is a side effect.
> >>>>>
> >>>>> /Flibble
> >>>>>         
> >>>>
> >>>> It does not have to be an actual pure function, it only has to
> >>>> be a pure function of its inputs.  
> >>>
> >>> "a pure function of its inputs" makes no sense:  
> >>
> >> It is merely the first element of the linked "pure function"
> >> requirements.  
> > 
> > It is merely something that makes no sense. Pure functions CANNOT
> > have any side effects.
> > 
> > /Flibble
> >   
> 
> Then a function that can always know when it has been called in
> infinite recursion is simply not allowed. That makes no sense.
 
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.

/Flibble

[toc] | [prev] | [next] | [standalone]


#539419

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 14:27 -0500
Message-ID<I_CdnWYzBIO0Etr8nZ2dnUU7-VGdnZ2d@giganews.com>
In reply to#539417
On 9/19/2021 2:13 PM, Mr Flibble wrote:
> On Sun, 19 Sep 2021 14:04:41 -0500
> olcott <NoOne@NoWhere.com> wrote:
> 
>> On 9/19/2021 1:44 PM, Mr Flibble wrote:
>>> On Sun, 19 Sep 2021 13:40:36 -0500
>>> olcott <NoOne@NoWhere.com> wrote:
>>>    
>>>> On 9/19/2021 1:29 PM, Mr Flibble wrote:
>>>>> On Sun, 19 Sep 2021 13:16:24 -0500
>>>>> olcott <NoOne@NoWhere.com> wrote:
>>>>>       
>>>>>> On 9/19/2021 1:05 PM, Mr Flibble wrote:
>>>>>>> On Sun, 19 Sep 2021 11:20:15 -0500
>>>>>>> olcott <NoOne@NoWhere.com> wrote:
>>>>>>>          
>>>>>>>> On 9/18/2021 10:42 PM, olcott wrote:
>>>>>>>>> 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)
>>>>>>>>> {
>>>>>>>>>        static u32 Aborted;
>>>>>>>>>        static u32* execution_trace;
>>>>>>>>
>>>>>>>> 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.
>>>>>>>
>>>>>>> No, a pure function cannot have any side effects: changing
>>>>>>> static variables is a side effect.
>>>>>>>
>>>>>>> /Flibble
>>>>>>>          
>>>>>>
>>>>>> It does not have to be an actual pure function, it only has to
>>>>>> be a pure function of its inputs.
>>>>>
>>>>> "a pure function of its inputs" makes no sense:
>>>>
>>>> It is merely the first element of the linked "pure function"
>>>> requirements.
>>>
>>> It is merely something that makes no sense. Pure functions CANNOT
>>> have any side effects.
>>>
>>> /Flibble
>>>    
>>
>> Then a function that can always know when it has been called in
>> infinite recursion is simply not allowed. That makes no sense.
>   
> 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.
> 
> /Flibble
> 

This was always presented to me as "a pure function of its inputs".

-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [prev] | [next] | [standalone]


#539420

FromMr Flibble <flibble@reddwarf.jmc>
Date2021-09-19 20:29 +0100
Message-ID<20210919202944.00007ff6@reddwarf.jmc>
In reply to#539419
On Sun, 19 Sep 2021 14:27:37 -0500
olcott <NoOne@NoWhere.com> wrote:

> On 9/19/2021 2:13 PM, Mr Flibble wrote:
> > On Sun, 19 Sep 2021 14:04:41 -0500
> > olcott <NoOne@NoWhere.com> wrote:
> >   
> >> On 9/19/2021 1:44 PM, Mr Flibble wrote:  
> >>> On Sun, 19 Sep 2021 13:40:36 -0500
> >>> olcott <NoOne@NoWhere.com> wrote:
> >>>      
> >>>> On 9/19/2021 1:29 PM, Mr Flibble wrote:  
> >>>>> On Sun, 19 Sep 2021 13:16:24 -0500
> >>>>> olcott <NoOne@NoWhere.com> wrote:
> >>>>>         
> >>>>>> On 9/19/2021 1:05 PM, Mr Flibble wrote:  
> >>>>>>> On Sun, 19 Sep 2021 11:20:15 -0500
> >>>>>>> olcott <NoOne@NoWhere.com> wrote:
> >>>>>>>            
> >>>>>>>> On 9/18/2021 10:42 PM, olcott wrote:  
> >>>>>>>>> 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)
> >>>>>>>>> {
> >>>>>>>>>        static u32 Aborted;
> >>>>>>>>>        static u32* execution_trace;  
> >>>>>>>>
> >>>>>>>> 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.  
> >>>>>>>
> >>>>>>> No, a pure function cannot have any side effects: changing
> >>>>>>> static variables is a side effect.
> >>>>>>>
> >>>>>>> /Flibble
> >>>>>>>            
> >>>>>>
> >>>>>> It does not have to be an actual pure function, it only has to
> >>>>>> be a pure function of its inputs.  
> >>>>>
> >>>>> "a pure function of its inputs" makes no sense:  
> >>>>
> >>>> It is merely the first element of the linked "pure function"
> >>>> requirements.  
> >>>
> >>> It is merely something that makes no sense. Pure functions CANNOT
> >>> have any side effects.
> >>>
> >>> /Flibble
> >>>      
> >>
> >> Then a function that can always know when it has been called in
> >> infinite recursion is simply not allowed. That makes no sense.  
> >   
> > 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.
> > 
> > /Flibble
> >   
> 
> This was always presented to me as "a pure function of its inputs".
 
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

[toc] | [prev] | [next] | [standalone]


#539425

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 15:08 -0500
Message-ID<uLCdnZteQYlKBdr8nZ2dnUU7-evNnZ2d@giganews.com>
In reply to#539420
On 9/19/2021 2:29 PM, Mr Flibble wrote:
> On Sun, 19 Sep 2021 14:27:37 -0500
> olcott <NoOne@NoWhere.com> wrote:
> 
>> On 9/19/2021 2:13 PM, Mr Flibble wrote:
>>> On Sun, 19 Sep 2021 14:04:41 -0500
>>> olcott <NoOne@NoWhere.com> wrote:
>>>    
>>>> On 9/19/2021 1:44 PM, Mr Flibble wrote:
>>>>> On Sun, 19 Sep 2021 13:40:36 -0500
>>>>> olcott <NoOne@NoWhere.com> wrote:
>>>>>       
>>>>>> On 9/19/2021 1:29 PM, Mr Flibble wrote:
>>>>>>> On Sun, 19 Sep 2021 13:16:24 -0500
>>>>>>> olcott <NoOne@NoWhere.com> wrote:
>>>>>>>          
>>>>>>>> On 9/19/2021 1:05 PM, Mr Flibble wrote:
>>>>>>>>> On Sun, 19 Sep 2021 11:20:15 -0500
>>>>>>>>> olcott <NoOne@NoWhere.com> wrote:
>>>>>>>>>             
>>>>>>>>>> On 9/18/2021 10:42 PM, olcott wrote:
>>>>>>>>>>> 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)
>>>>>>>>>>> {
>>>>>>>>>>>         static u32 Aborted;
>>>>>>>>>>>         static u32* execution_trace;
>>>>>>>>>>
>>>>>>>>>> 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.
>>>>>>>>>
>>>>>>>>> No, a pure function cannot have any side effects: changing
>>>>>>>>> static variables is a side effect.
>>>>>>>>>
>>>>>>>>> /Flibble
>>>>>>>>>             
>>>>>>>>
>>>>>>>> It does not have to be an actual pure function, it only has to
>>>>>>>> be a pure function of its inputs.
>>>>>>>
>>>>>>> "a pure function of its inputs" makes no sense:
>>>>>>
>>>>>> It is merely the first element of the linked "pure function"
>>>>>> requirements.
>>>>>
>>>>> It is merely something that makes no sense. Pure functions CANNOT
>>>>> have any side effects.
>>>>>
>>>>> /Flibble
>>>>>       
>>>>
>>>> Then a function that can always know when it has been called in
>>>> infinite recursion is simply not allowed. That makes no sense.
>>>    
>>> 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.
>>>
>>> /Flibble
>>>    
>>
>> This was always presented to me as "a pure function of its inputs".
>   
> 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
> 

Pure functions relate to functional programming in software engineering.
Pure functions of their inputs relates to computer science computations.

A pure function of its inputs bases its return value entirely on its 
inputs and/or additional intermediate computations that are derived from 
these inputs.

-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [prev] | [next] | [standalone]


#539426

FromMr Flibble <flibble@reddwarf.jmc>
Date2021-09-19 21:32 +0100
Message-ID<20210919213225.00004429@reddwarf.jmc>
In reply to#539425
On Sun, 19 Sep 2021 15:08:54 -0500
olcott <NoOne@NoWhere.com> wrote:

> On 9/19/2021 2:29 PM, Mr Flibble wrote:
> > On Sun, 19 Sep 2021 14:27:37 -0500
> > olcott <NoOne@NoWhere.com> wrote:
> >   
> >> On 9/19/2021 2:13 PM, Mr Flibble wrote:  
> >>> On Sun, 19 Sep 2021 14:04:41 -0500
> >>> olcott <NoOne@NoWhere.com> wrote:
> >>>      
> >>>> On 9/19/2021 1:44 PM, Mr Flibble wrote:  
> >>>>> On Sun, 19 Sep 2021 13:40:36 -0500
> >>>>> olcott <NoOne@NoWhere.com> wrote:
> >>>>>         
> >>>>>> On 9/19/2021 1:29 PM, Mr Flibble wrote:  
> >>>>>>> On Sun, 19 Sep 2021 13:16:24 -0500
> >>>>>>> olcott <NoOne@NoWhere.com> wrote:
> >>>>>>>            
> >>>>>>>> On 9/19/2021 1:05 PM, Mr Flibble wrote:  
> >>>>>>>>> On Sun, 19 Sep 2021 11:20:15 -0500
> >>>>>>>>> olcott <NoOne@NoWhere.com> wrote:
> >>>>>>>>>               
> >>>>>>>>>> On 9/18/2021 10:42 PM, olcott wrote:  
> >>>>>>>>>>> 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)
> >>>>>>>>>>> {
> >>>>>>>>>>>         static u32 Aborted;
> >>>>>>>>>>>         static u32* execution_trace;  
> >>>>>>>>>>
> >>>>>>>>>> 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.  
> >>>>>>>>>
> >>>>>>>>> No, a pure function cannot have any side effects: changing
> >>>>>>>>> static variables is a side effect.
> >>>>>>>>>
> >>>>>>>>> /Flibble
> >>>>>>>>>               
> >>>>>>>>
> >>>>>>>> It does not have to be an actual pure function, it only has
> >>>>>>>> to be a pure function of its inputs.  
> >>>>>>>
> >>>>>>> "a pure function of its inputs" makes no sense:  
> >>>>>>
> >>>>>> It is merely the first element of the linked "pure function"
> >>>>>> requirements.  
> >>>>>
> >>>>> It is merely something that makes no sense. Pure functions
> >>>>> CANNOT have any side effects.
> >>>>>
> >>>>> /Flibble
> >>>>>         
> >>>>
> >>>> Then a function that can always know when it has been called in
> >>>> infinite recursion is simply not allowed. That makes no sense.  
> >>>    
> >>> 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.
> >>>
> >>> /Flibble
> >>>      
> >>
> >> This was always presented to me as "a pure function of its
> >> inputs".  
> >   
> > 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
> >   
> 
> Pure functions relate to functional programming in software
> engineering. Pure functions of their inputs relates to computer
> science computations.
> 
> A pure function of its inputs bases its return value entirely on its 
> inputs and/or additional intermediate computations that are derived
> from these inputs.
 
You failed to define any differences between a pure function and a
"pure function of its inputs".

/Flibble

[toc] | [prev] | [next] | [standalone]


#539403

Fromolcott <NoOne@NoWhere.com>
Date2021-09-19 13:21 -0500
Message-ID<9v2dncLT_fQ24tr8nZ2dnUU7-X_NnZ2d@giganews.com>
In reply to#539387
On 9/19/2021 1:05 PM, Richard Damon wrote:
> On 9/19/21 12:20 PM, olcott wrote:
>> On 9/18/2021 10:42 PM, olcott wrote:
>>> 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)
>>> {
>>>     static u32 Aborted;
>>>     static u32* execution_trace;
>>
>> 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.
>>
> 
> 
> Right, those items, do not BY THEMSELVES, make the code not a
> computation. They do make it much easier for it to end up being not a
> computation.
> 
> Note, The rules for Computaiton theory are different than in 'Normal'
> Computer Science, which tend to define a Pure Function on a more
> mechanical rather than behavioral definition.
> 
> Enforcing the mechanical rules makes sure you meet the behavioral rules,
> but are not absolutely required.
> 
> If you do any of that list, it can be very hard to show that you code
> is, in fact, a computation.
> 

Surprisingly it seems that you have the best understanding of this of 
all of the reviewers that have responded to this.



void P(u32 x)
{
   H(x, x);
}

int main()
{
   Output("Input_Halts = ", H((u32)P, (u32)P));
}

Does this still meet the Halting Problem requirement that the function 
must be a pure function of its inputs:

The concern is that H is called three times and only terminates its 
input after it has seen enough of the execution trace to determine that 
it specifies infinitely recursive simulation. The initial invocation of 
H(P,P) always eventually returns 0. The intermediate simulations of 
H(P,P) never return.

Can we construe this whole thing as a single computation such that the 
eventual return value of the execution H(P,P) is a pure function of its 
inputs?


-- 
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre 
minds." Einstein

[toc] | [prev] | [standalone]


Back to top | Article view | sci.math


csiph-web