Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

[Phys-L] Re: arithmetic



On 02/23/05 18:07, RAUBER, JOEL wrote:
|
| The proof that (S0 + 0) is equal to (0 + S0) is easy.
|

Am I allowed to use associativity for "+",

i.e. may I use (a+b)+c = a+(b+c) for any, (a,b,c)

Well, if you're going to "play the game", then you
have to prove associativity; it is not axiomatic.

And may I use

a+c=b+c => a=b

You can prove that, too.

================

On the other hand, there is a lot of stuff you do get
to use that hasn't heretofore been mentioned in this thread,
including the axiomatic properties of the "=" operator
(reflexive, symmetric, transitive).

Email isn't really the best medium for learning number
theory. Hofstadter spends about 20 pages introducing
the ideas (i.e. his chapter VIII) and I'm sure I can't
do better. My suggestion: grab a copy of the book.
It's widely available.

When I said "it's easy" I didn't mean to suggest that
re-inventing all of number theory from scratch would be
easy. What I meant was that after you've seen 20 pages
of explanations and examples, then little puzzles like
(S0 + 0) = (0 + S0) are easy. They're also kinda fun.

==================================

Another fun thing is the short self-replicating program
("ENIUQ") found at the middle of page 498. If you
understand the program, try re-writing it in another
language, such as C++ or perl ... using only *simple*
language features, such as basic string handling.

This really drives home one of the lessons of Gödel's
work, that even rather simple systems are capable of
encoding statements about themselves.

This is the best kind of magic: even if you know how
it's done, it's still amazing. The idea that a simple
self-contained program can quote itself never ceases
to amaze me.

FWIW here's a version I wrote in perl:

#! /usr/bin/perl -w
## Self-replicating program: prints out exact copy of itself.

use strict;
do {
my $self = <<\EoF;
#! /usr/bin/perl -w
## Self-replicating program: prints out exact copy of itself.

use strict;
do {
my $self = <<X
$self =~ s/X/\\EoF;\n${self}EoF/;
print $self;
}
EoF
$self =~ s/X/\\EoF;\n${self}EoF/;
print $self;
}