1. Loop through the numbers 0, 1, 2, . . . with loop variable X or Y
or Z . . .
2. Assign variables A, B, C . . . to a variable, constant 0 or 1, or a
programmable function on variables.
3. Execute a (sub)program iff two given variables are equal.
4. STOP loop and continue the program after the loop.
5. Return variable value and stop entire program.
Inputs are variables I, J, K . . . 0 means FALSE and 1 means TRUE.
Which of the following functions are programmable?
1. Zero
2. Less Than
3. Less than or equal.
4. Minimum of two numbers.
5. Successor
6. Addition
7. Multiplication
8 Exponentiation
Syntax:
1. Loop: FOR(X){ . . . }
2. Assignment: A<=B
3. Conditional: (A=B){ . . . }
4. End loop: STOP
5. End program: HALT A
For starters: We can check for less than by seeing which of I and J
are reached first in a loop. Variables A, B, C etc. can represent the
current state of information by being assigned values 0 and 1, and
checked if they are later equal to 0 or 1.
C-B
That is, write programs for 0 and 1 without using them as constants,
so that they need not be supplied as literals in the language.
Using R for "result", something like this might work. Of course, I
needed a hack for the set-to-one function.
Set to zero:
FOR(Z)
{
R <= Z
STOP
}
Set to one:
(T starts as any non-zero value)
FOR(Z)
{
(T=0)
{
R <= Z
T <= Z
STOP
}
T <= 0
}
X < Y:
FOR(Z)
{
(Z=Y)
{
R <= 0
STOP
}
(Z=X)
{
R <= 1
STOP
}
}
X <= Y:
FOR(Z)
{
(Z=X)
{
R <= 1
STOP
}
(Z=Y)
{
R <= 0
STOP
}
}
minimum:
FOR(Z)
{
(Z=X)
{
R <= X
STOP
}
(Z=Y)
{
R <= Y
STOP
}
}
successor:
F<=0
FOR(Z)
{
(F=1)
{
R <= Z
STOP
}
(Z=X)
{
F <= 1
}
}
Addition X + Y:
R <= X
FOR(Z)
{
(Y=Z)
{
STOP
}
R <= successor(R)
}
Multiplication X * Y:
R <= 0
FOR(Z)
{
(Z=Y)
{
STOP
}
R <= add(R, X)
}
Exponentiation X ** Y:
R <= 1
FOR(Z)
{
(Z=Y)
{
STOP
}
R <= multiply(R, X)
}
Steven
>Consider the following particularly simple programming language called
>LOOP+EQ:
It is known that brainfuck is Turing Complete
(http://en.wikipedia.org/wiki/Brainfuck).
If you can write a brainfuck interpreter in LOOP+EQ then that is also
Turing Complete.
rossum
What do you mean by "programmable function" (in item 2)?
If you mean "programmable in LOOP+EQ", then the language is trivially
not Turing-complete, because you cannot change the values in the
program (the set V of values of variables and constants will never
become bigger).
If you mean "programmable in some Turing complete language" then
your LOOP+EQ is trivially Turing-complete (only item 2 would suffice).
If you take some finite set of basic programmable functions (which
includes incrementing a variable, A=A+1), then I am inclined to
say that it is Turing-complete, although then it still depends on
what exactly you mean by item 3 (in particular, whether or not it
is allowed to recursively call a subprogram from itself).
All in all, the semantics of your language is just not well enough
defined to be able to say anything about its Turing-completeness.
groente
-- Sander
Great idea and choice of programming languages. It is a lot different
from my LOOP+EQ language. I think we could use a general model that
includes both of these languages. I learned that when I wrote a
translator between two versions of a programming language. After
messing with direct translation, I developed a general representation
of both - translating to and from that was much simpler.
What would be the shortest programs for the 8 functions listed?
How does BF compare to LOOP+EQ - in terms of number of primitives,
size of these programs, ease of use and universality?
Notice that LOOP+EQ is universal in the sense that no particular
mathematical objects are needed. You can list many sets (or go on
forever listing only a subset) and equality is a pretty universal
relation. BF seems to have more primitives and require numbers.
C-B
> rossum
A program can be written in LOOP+EQ that calculates the function, as
illustrated by the earlier programs by Steven (SFUERST) written in LOOP
+EQ.
> If you mean "programmable in LOOP+EQ", then the language is trivially
> not Turing-complete, because you cannot change the values in the
> program (the set V of values of variables and constants will never
> become bigger).
I’m not sure what you mean. Certainly variable X assumes new values
as we go through a LOOP. Can you give me an example of a programming
language making the set of values and constants bigger that cannot be
done in LOOP+EQ (as far as you can see, of course)?
> If you mean "programmable in some Turing complete language" then
> your LOOP+EQ is trivially Turing-complete (only item 2 would suffice).
Of course not. I mean programmable in LOOP+EQ. It is just to make
sure that the set of programmable functions is closed under
composition – though I would be happy to see a demonstration that it
is not necessary - there is a program for f(g) whenever there is a
program for f and g without using function calls.
> If you take some finite set of basic programmable functions (which
> includes incrementing a variable, A=A+1), then I am inclined to
> say that it is Turing-complete,
Do you not agree that LOOP+EQ does that (allows one to add one to a
given value, i.e. includes the successor function)? I would say that
it is better to leave out successor as a primitive if you can, to make
the language smaller (the whole objective) and also to make the
language more universal - no reference to numbers.
For example, can you write a LOOP+EQ program for the choice function
in the Axiom of Choice? What if the given set is empty - can we be
more precise than the axiom itself and say what the program does if
the set is empty? And would this program give us more insight into
AOC with a solid example of how it would work?
> although then it still depends on
> what exactly you mean by item 3 (in particular, whether or not it
> is allowed to recursively call a subprogram from itself).
No, the syntax is meant to illustrate that I am talking about code in
a program that is executed when reached iff two given variables are
equal.
> All in all, the semantics of your language is just not well enough
> defined to be able to say anything about its Turing-completeness.
I guess it's all a waste of time.
But then again, you did say that if it includes incrementing a
variable then you would tend to believe that it is Turing Complete.
So there the issue was not whether it is well-defined, but whether or
not it included successor. And do you agree that it does include the
successor function – the successor function is programmable in LOOP
+EQ? (See Steven's post.)
Have I answered all of your questions now? LOOP+EQ can be used to
program various functions, as shown by Steven. The question is
whether this includes all of the recursive functions. One could
follow Godel’s path in 1931 to show it includes the primitive
recursive functions (by programming the 45 functions that he does.)
(As I recall, actually number 45 was the non-r.e. relation of
unprovability.) Better yet, describe a translator from MF into LOOP
+EQ.
C-B
> groente
> -- Sander
> I�m not sure what you mean. Certainly variable X assumes new values
> as we go through a LOOP.
Ah, I see. I misunderstood your LOOP construct; I thought it was a FOR
loop, which just repeats a subprogram a fixed number of times. So yes,
your language is Turing complete.
[snip]
> Do you not agree that LOOP+EQ does that (allows one to add one to a
> given value, i.e. includes the successor function)? I would say that
> it is better to leave out successor as a primitive if you can, to make
> the language smaller (the whole objective) and also to make the
> language more universal - no reference to numbers.
There is a reference to numbers in your LOOP construct already.
>
> For example, can you write a LOOP+EQ program for the choice function
> in the Axiom of Choice?
No. First, because there is no "the" choice function. Second, because
the axiom of choice also applies to structures which are far larger than
any language which is just Turing-complete can ever hope to cope with.
groente
-- Sander
The set that it loops through need not be a set of numbers. The
values that it checks for being equal need not be numbers. Looping
through a set and checking for equality apply to any domain of
discourse, certainly more than just numbers.
> > For example, can you write a LOOP+EQ program for the choice function
> > in the Axiom of Choice?
>
> No. First, because there is no "the" choice function.
How about "a choice function"?
> Second, because
> the axiom of choice also applies to structures which are far larger than
> any language which is just Turing-complete can ever hope to cope with.
Can you formally define any of that?
A<=0
FOR(X){ B<=X A<=1 STOP }
(A=0){ HALT "Set is empty" }
HALT B
See?
C-B
> groente
> -- Sander
>>> Do you not agree that LOOP+EQ does that (allows one to add one to a
>>> given value, i.e. includes the successor function)? I would say that
>>> it is better to leave out successor as a primitive if you can, to make
>>> the language smaller (the whole objective) and also to make the
>>> language more universal - no reference to numbers.
>>
>> There is a reference to numbers in your LOOP construct already.
>
> The set that it loops through need not be a set of numbers. The
> values that it checks for being equal need not be numbers. Looping
> through a set and checking for equality apply to any domain of
> discourse, certainly more than just numbers.
False. Your loop construct requires the domain of discourse to have
a start object and a "successor" function. So the domain of discourse
needs to be recursively enumerable.
>
>>> For example, can you write a LOOP+EQ program for the choice function
>>> in the Axiom of Choice?
>>
>> No. First, because there is no "the" choice function.
>
> How about "a choice function"?
>
>> Second, because
>> the axiom of choice also applies to structures which are far larger than
>> any language which is just Turing-complete can ever hope to cope with.
>
> Can you formally define any of that?
Sure. Google for cardinal numbers.
>
> A<=0
> FOR(X){ B<=X A<=1 STOP }
> (A=0){ HALT "Set is empty" }
> HALT B
>
> See?
I guess this program is supposed to be a choice function. Since your
programming language only works for recursively enumerable sets (see
above), it is hardly surprising that you can write a choice function
(for those sets) in it.
groente
-- Sander
And is there a simpler Turing complete language? Notice that I have
the loop as given and derive the first and next functions. Contrast
that with Peano's Axioms that give you the first and next functions,
from which you construct the loop (induction rule.) Since we are
talking about the primitives of the language, by Occam's Razor we
should minimize the number of primitives at this point. So we can
define a simpler language if we have as given the fact that the
language can create a loop of all values. That means that the
universal set is representable. There is a wff w1(x) that is provable
for all values x being substituted for the x.
Peano Arithmetic is defined at the wrong level of abstraction. Any
system in which the universal set is representable will do, which
includes the PA model of zero and successor, but also includes simpler
systems based on the loop being primitive, such as LOOP+EQ.
C-B
> That means that the universal set is representable. There is a wff
> w1(x) that is provable for all values x being substituted for the x.
Right. Like, say, w1(x) could be x = x.
How is this fascinating?
--
Jesse F. Hughes
"You do know that after the get done with [outlawing] cigarettes,
they're gonna come after guns, right?"
-- AM talk radio host Mike Gallagher
Yes, that's right. (I was wondering if anyone would notice.) Any
axiom (and add a reference to x if you must) will do. But what is
different about Peano's way of making sure that we can prove that
every number is a number? That I haven't thought through.
But the fact that the addition and multiplication relations are also
representable (the other 2/3 of Peano's Axioms) has no trivial
alternative, does it?
Reducing primitives is definitely something worthwhile and possible.
It's possible because true primitives cannot be complex (as complex as
Peano's Axioms). This (I have always said) is not possible otherwise
we can use simpler expresssions that define smaller concepts than the
primitives.
TRUE/PR
ADD/PR
MUL/PR
I have discussed at least 3 or 4 approaches to reducing Peano's
Axioms. For example, the simple computer program to generate the
natural numbers using assignment, output and goto contains Peano's
Axioms implicitly. It would be good to put them all together into a
coherent treatment.
C-B
Yes. As I said, “You can list many sets (or go on forever listing
only a subset)” but you have to list the universal set for all these
programs to work (e.g. to be assured that you will reach any given
number.)
> >>> For example, can you write a LOOP+EQ program for the choice function
> >>> in the Axiom of Choice?
>
> >> No. First, because there is no "the" choice function.
>
> > How about "a choice function"?
>
> >> Second, because
> >> the axiom of choice also applies to structures which are far larger than
> >> any language which is just Turing-complete can ever hope to cope with.
>
> > Can you formally define any of that?
>
> Sure. Google for cardinal numbers.
It doesn't define "far larger" or "cope with". (Can you?)
> > A<=0
> > FOR(X){ B<=X A<=1 STOP }
> > (A=0){ HALT "Set is empty" }
> > HALT B
>
> > See?
>
> I guess this program is supposed to be a choice function. Since your
> programming language only works for recursively enumerable sets (see
> above), it is hardly surprising that you can write a choice function
> (for those sets) in it.
But all of the programming languages likewise work only for r.e.
universal sets and in how many of them (or any other languages, for
that matter) can you write the choice function?
I guess we also have the first higher order programming language.
I have always felt that was why AOC has been controversial. The
natural formalization involves operations that cannot be performed on
sets in general.
Yes! So, does that mean that only r.e. sets have choice functions?
If we agreed with that then we must’ve found a counter-example to AOC.
What non-r.e. set has a choice function? The set of Turing Machines
that don’t halt is not r.e., but it has a choice function: the
smallest element in the set.
You see, in higher order programming languages (e.g. LOOP+EQ, or
should I say i.e. LOOP+EQ) we can express the program but we can’t
execute it. And guess what? Functions don’t need to be executed for
the AOC!
C-B
> groente
> -- Sander
Addendum: How do we know that this set is one for which a choice
function should produce a value? The answer is proven using Godel's
1st Theorem - applied very directly. The puzzle is, how?
C-B
> You see, in higher order programming languages (e.g. LOOP+EQ, or
> should I say i.e. LOOP+EQ) we can express the program but we can’t
> execute it. And guess what? Functions don’t need to be executed for
> the AOC!
>
> C-B
>
>
>
> > groente
> > -- Sander- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
> On Dec 20, 11:45 am, "Jesse F. Hughes" <je...@phiwumbda.org> wrote:
>> Charlie-Boo <shymath...@gmail.com> writes:
>> > That means that the universal set is representable. There is a wff
>> > w1(x) that is provable for all values x being substituted for the x.
>>
>> Right. Like, say, w1(x) could be x = x.
>>
>> How is this fascinating?
>
> Yes, that's right. (I was wondering if anyone would notice.)
Sure, it was a test.
It looked like a stupid blunder, but it was a test.
You're a clever one, you are.
Actually, I realized it after I read it one more time after posting
it. (This happens from time to time. No need to rationalize.) I
guess you can say it was a blunder that turned into an unintentional
test - I did in fact wonder who would notice, of course, as would
anyone - mayhaps even yourself?
Anywho, as far as my questions about addition and multiplication, and
the original (broader) question about characterizing what Peano's
Axioms really say about a system that contains them go, . . . ?
> You're a clever one, you are.
As are you - when you're talking about Mathematics, i.e.
C-B
> On Dec 22, 7:52 am, "Jesse F. Hughes" <je...@phiwumbda.org> wrote:
>> Charlie-Boo <shymath...@gmail.com> writes:
>> > On Dec 20, 11:45 am, "Jesse F. Hughes" <je...@phiwumbda.org> wrote:
>> >> Charlie-Boo <shymath...@gmail.com> writes:
>> >> > That means that the universal set is representable. There is a wff
>> >> > w1(x) that is provable for all values x being substituted for the x.
>>
>> >> Right. Like, say, w1(x) could be x = x.
>>
>> >> How is this fascinating?
>>
>> > Yes, that's right. (I was wondering if anyone would notice.)
>>
>> Sure, it was a test.
>>
>> It looked like a stupid blunder, but it was a test.
>
> Actually, I realized it after I read it one more time after posting
> it. (This happens from time to time. No need to rationalize.) I
> guess you can say it was a blunder that turned into an unintentional
> test - I did in fact wonder who would notice, of course, as would
> anyone - mayhaps even yourself?
Sorry for the insinuation.
But, no, I didn't wonder who would notice. I don't know who reads
your posts and with what attention. Personally, I skimmed it and
didn't bother to respond to the post generally, pointing out this one
obvious oddity and skipping over the reasonableness of Occam's razor
when it comes to mathematical theories and so on.
> Anywho, as far as my questions about addition and multiplication, and
> the original (broader) question about characterizing what Peano's
> Axioms really say about a system that contains them go, . . . ?
>
>> You're a clever one, you are.
>
> As are you - when you're talking about Mathematics, i.e.
It's nice you're trying out Latin abbreviations, but I'm not sure
you've quite got them down.
--
Jesse F. Hughes
"You may not realize it but THOUSANDS of people read my posts.
You are putting your stupidity on wide display."
-- James S. Harris knows about wide displays of stupidity.
--l'Oeuvre!
www.wlym.com
If 3. does not allow recursion, than it is not
turing complete (=partial recursive). Then its
only primitive recursive.
Its primitive recursive, provided you are not allowed
to modify the for variable, inside a for loop. It will
just loop X times. Otherwise its turing complete
(=partial recursive).
Early in the thread, 2nd aricle, Charlie asked about
defining 0 and 1 wuthout using them as contants.
If we leve off constants 0 and 1 from the language,
0 can be recovered. We can write a program for the
constantly 0 function, and can write programs to assign
0 to a variable.
With neither 0 or 1 constants available 1 cannot be
recovered. There is no program for the constantly 1
function.
So with no contants 0 or 1, the language is not
Turing complete.
But Charlie's original specification, from the base
article of this thread, allowed constants 0 and 1 to
be assigned to variables.
With that basic version, the language is Turing
complete for partial recursive functions over
non-negative integers.
--
David Libert ah...@FreeNet.Carleton.CA
It thought it too obvious to spell out, but here goes: a Turing Machine,
by definition, has only inputs which are finite. Therefore, the domain
of the function it computes is always countable. There exist uncountable
sets. QED.
[snip]
> I have always felt that was why AOC has been controversial. The
> natural formalization involves operations that cannot be performed on
> sets in general.
And what, in your opinion, is this "natural formalization" and what
operations does it involve?
[snip]
> What non-r.e. set has a choice function? The set of Turing Machines
> that don�t halt isnot r.e., but it has a choice function: the
> smallest element in the set.
The set of TMs that don't halt is not a set of non-empty sets. Do you
actually know what a choice function is?
[snip]
groente
-- Sander
How's that? (You've never been right.)
C-B
>
> --
> Jesse F. Hughes
> "You may not realize it but THOUSANDS of people read my posts.
> You are putting your stupidity on wide display."
> -- James S. Harris knows about wide displays of stupidity.- Hide quoted text -
And what is wrong with "As are you - when you're talking about
Mathematics, that is."?
Can you ask the same question about the sentence asking the question?
(In CBL you can do so in any system of mathematics.)
C-B
Function, Mr. Ackerman (with proof even better.)
C-B
>>>>You're a clever one, you are.
>>
>>>As are you - when you're talking about
>>>Mathematics, i.e.
>>
>>It's nice you're trying out Latin abbreviations,
>>but I'm not sure you've quite got them down.
>
> How's that? (You've never been right.)
Well, I doubt it will matter to anyone but you,
if you decide to ignore Jesse's advice (and mine).
Your use of "i.e." above is not normal. It may be
that you will spark a change in what is considered
normal use, but maybe not.
In my experience, "i.e." is used to introduce what
is purportedly a restatement of the preceding phrase.
I do not remember ever seeing it used terminally
as you have here.
A sentence I would be comfortable with, so far as
i.e.-usage is concerned would be: "As are you when
you're talking about Mathematics, i.e., when you
are not talking nonsense."
It is true that ending your sentence with "that is"
would be a thing that is done, and the literal tranlation
of "i.e." is "that is", but idioms do not have to be
logical. They follow a higher standard, presumably.
My bit of research gives me
(adv) i.e., ie, id est (that is to say; in other words)
http://wordnetweb.princeton.edu/perl/webwn?s=i.e.
This makes a better match for the uses I have have seen,
but even those are most likely less than identical.
Jim Burns