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


Groups > comp.theory > #44126

Re: Primitive recursive functions and LBA?

From Jeff Barnett <jbb@notatt.com>
Newsgroups comp.theory
Subject Re: Primitive recursive functions and LBA?
Date 2022-01-28 19:39 -0700
Organization A noiseless patient Spider
Message-ID <st29e6$sbc$1@dont-email.me> (permalink)
References (3 earlier) <sss5gf$1ke$1@dont-email.me> <8735l929vu.fsf@bsb.me.uk> <sstefq$fu1$1@dont-email.me> <87sft7zgv2.fsf@bsb.me.uk> <PNGdnaYT_f5IA2n8nZ2dnUU7-aHNnZ2d@brightview.co.uk>

Show all headers | View raw


On 1/28/2022 6:56 PM, Mike Terry wrote:
> On 28/01/2022 21:32, Ben Bacarisse wrote:
>> Sorry, I started an answer but life happened.  I have eventually got
>> round to finishing it...
>>
>> Jeff Barnett <jbb@notatt.com> writes:
>>
>>> On 1/26/2022 7:24 PM, Ben Bacarisse wrote:
>>>> Jeff Barnett <jbb@notatt.com> writes:
>>>>
>>>>> When I looked at the definitions of PR in Linz and a few other places,
>>>>> I was struck by the glib way they presented a definition that, in my
>>>>> opinion, was inadequate. I think those definitions must allow many
>>>>> more ways to compose a new function from the basics and previously
>>>>> defined functions, i.e., more liberal nesting and ordering are
>>>>> necessary.
>>>> Necessary for what?  Linz limits his discussion to unary and binary
>>>> functions.  Is that what you mean?
>>>
>>> It's been quite a while since I thought I understood all of this so
>>> let's see if I can dredge out some examples.
>>>
>>> Linz provides no way to directly compose one argument functions; so,
>>> for example I cannot write one(x) = s(z(x)). And I'm not sure if I
>>> could write "one" using what he does provide.
>>>
>>> The ONLY composition rule in Linz for a 2 argument function is
>>>      f(x,y) =  h(g1(x,y), g2(x,y))
>>> where h, g1, and g2 are already defined.
> 
> A general comment first - I had previously never got as far as this 
> chapter of Linz, since I stopped after the TM chapter.  So I'm just 
> having a quick look now.  I understand Jeff's general concern I think 
> (and sympathise).
> 
>>
>> The PR rule lets one extend a unary function to a binary one:
>>
>>    u'(x, 0) = u(x)
>>    u'(x, y+1) = p2(..., u'(x, y)) = u'(x, y)
>>
>> where p2 is the projection function and ... denotes an arbitrary (and
>> irrelevant) PR function.  You can then show (by induction) that u'(x, y)
>> = u(x).  Similarly for v'(x, y) = v(x)
> 
> Yep.  (We need to know there is at least one two-place function we can 
> use for "..." and we have p1 or p2 for that.)
> 
>>
>> Now, by setting h = v' and g1 = u' in the composition rule we see that
>>
>>    v'(u'(x, y), ...) = v(u'(x, y)) = v(u(x))
>>
>> is PR, so the composition of unary PR functions is PR.  (Again, I've
>> used ... rather than refer to some function g2 that is irrelevant.)
>>
> 
> Is this what we want though?  The expression evaluates as above, but 
> what is the g(x) such that g(x) = v(u(x))?  I think we need a couple 
> more build-up steps.
> 
> Hmm.  It's like we need at least the reverse for what you did above, so 
> if h(x,y) is PR, then h'(x) = h(x,0) is PR.  Or better, h'(x) = 
> h(f(x),g(x))  [why be unnecesarily restrictive here?]
> 
> Also we don't yet have the right h, but one more Composition gets us that.
> 
>     h := Composite [ u', p1, v' ]
> 
> and h' should be easy?
> 
>     h' := PR [ um, I'm changing my mind, maybe not so easy  :(
> 
> OK, I can't see a way in Linz world to get /any/ new 1-place function!  
> So I'd say his definitions are thoroughly broken.  Perhaps we could do 
> without all 1-place functions, and just use 2-place functions which are 
> independant of the second argument?  But then all PR rule applications 
> can only use the two given 1-place functions z and s.  This is just dumb...
> 
>>> There is, of course, the strict definitions of the allowed pattern of
>>> recursion for a two argument function.
>>>
>>> So lets say I want to define f(x,y) = 5 + x*y. I might try
>>>      f(x,y) = add(five(x,y), mult(x, y))
>>>
>>> but I don't know how to write "five(x, y)" using only the forms that
>>> Linz provides. Do You?
>>
>>    five(x, 0) = 5
>>    five(x, y+1) = p2(..., five(x, y)) = five(x, y).
> 
> But 5 is not a 1-place function, and how can you make it?  There is no 
> way unless I've misunderstood something basic.
> 
> And also the very first example from Linz for his rules is this:
> 
>     add (x, 0) = x
>     add (x, y+1) = add (x,y) + 1
> 
> but that's rubbish for multiple reasons.  First x (he means the identity 
> 1-place function, I suppose) is not yet shown to be PR, and what are the 
> h, g2 and f supposed to be for add (x,y)+1 ?
> 
> I mean, that's his very first example and it doesn't work, right?  I am 
> less than impressed! <stomps foot>
> 
>>
>> Once you see that you can have arbitrary constant unary and binary
>> functions, there is no need to keep using this level of detail.  One
>> might just write
>>
>>    f(x,y) = add(5, mult(x, y))
>>
>> as an example of composition with a constant function.
>>
>> It's not ideal to confuse elements of the domain (the non-negative
>> integers) with constant functions over the domain, but it's technically
>> sound once you see what's meant.  In fact, many authors include nullary
>> functions with a notation (like bold) to show that 5 is really a
>> constant function.  These then work in the composition rule because it
>> will have been defined more generally.
>>
>>> Other authors seem to allow arbitrary nesting of previously defined
>>> functions and the obvious freedoms. Linz doesn't and I don't know how
>>> to recover the needed capabilities. Above (where you snipped) there
>>> was a grammar (or pattern) driven manipulation idea based on the few
>>> patterns that Linz provided.
> 
> Right now, I'm agreeing with you, but I might change my mind later if 
> I've goofed :)
> 
> But there's a more thorny problem that occurs to me.  Most authors allow 
> many-place functions, and so a give 1- or 2-place non-Linz-PR function 
> can be built from a chain including 3-, 4-, 77324-place previously 
> constructed functions etc..  How do we know that the 1- and 2-place 
> Linz-PR functions include all the 1- or 2-place non-Linz-PR functions?  
> (Even if we fix any missing rules for 1- and 2-place Linz-PR functions???)
> 
> E.g. is it true that every 2-place non-Linz-PR function can be 
> constructed (as a non-Linz-PR function) ONLY USING 1- and 2-place 
> functions?  (I suspect yes, but it sounds like serious thought is 
> required, and I'm not as tenacious as I was in my younger days!)
> 
>>
>> I snipped the grammar because I did not follow exactly what was being
>> said about it, and the part I kept stood on it's own.
>>
>> By the way, being asked for the details makes me think Linz could have
>> been much more explicit about this as even his first example (add) does
>> not work without a binary successor function.  I bet most readers just
>> nod and keep going but kudos for not lettering that go without an
>> explanation.
>>
>> But in fairness to Linz, this is part of a veritable gallop through
>> other models of computation.  PR functions get 5 pages, several or which
>> are about functions that aren't PR, because that's the main goal.
> 
> I get that, but I think in this topic Linz has fallen a little short of 
> the line.  He says he is aiming his text at CS students rather than 
> mathematicians, which makes sense, but here he is not simply shortening 
> proofs by omitting tedious details - he's missing out key definitions 
> and he's missed that because nobody looked closely enough during the 
> proof reading (it seems to me...).  At least you'd expect his very first 
> example for his students to work!  :)
You had precisely the reaction to Linz that I did, i.e., his add example 
function was botched. I was too lazy to go through all the tedium but if 
anything was to be built from Linz, a lot of things needed to be sorted. 
I look at a few other sources laying on my book shelves and found some 
that just tossed in arbitrary nesting (except in recursive definitions) 
  with a comment and some did approximately what Linz did.
-- 
Jeff Barnett

Back to comp.theory | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2021-10-03 22:47 -0600
  Re: Primitive recursive functions and LBA? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-04 15:00 +0100
  Re: Primitive recursive functions and LBA? Alan Smaill <alandsmaill@gmail.com> - 2022-01-23 15:10 -0800
    Re: Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2022-01-23 16:57 -0700
      Re: Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2022-01-26 11:56 -0700
        Re: Primitive recursive functions and LBA? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-27 02:24 +0000
          Re: Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2022-01-26 23:35 -0700
            Re: Primitive recursive functions and LBA? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-28 21:32 +0000
              Re: Primitive recursive functions and LBA? Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2022-01-29 01:56 +0000
                Re: Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2022-01-28 19:39 -0700
                Re: Primitive recursive functions and LBA? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-29 17:34 +0000
                Re: Primitive recursive functions and LBA? Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2022-01-29 19:53 +0000
              Re: Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2022-01-29 13:41 -0700
                Re: Primitive recursive functions and LBA? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-01-29 22:13 +0000
                Re: Primitive recursive functions and LBA? Jeff Barnett <jbb@notatt.com> - 2022-01-29 18:42 -0700

csiph-web