n':
, n:{n'...}, a,z:
, s:({a...z}
{1...n}
Peg).
Thm* s is a Hanoi(n disk) seq on a..z
Thm*
Thm* (a',z':{a...z}.
Thm* ((x:{a'...z'}, i:{n'+1...n}. s(a',i) = s(x,i))
Thm* (
Thm* (s is a Hanoi(n' disk) seq on a'..z')
Digression on polymorphism:
This formulation uses two different, but related, types for the sequences , namely the type{a...z} which it needs to be a stacking sequence for{1...n}
Peg
n disks, but also the type{a'...z'} which it needs to be a, possibly shorter, stacking sequence for{1...n'}
Peg
n' disks.Note that in general, the mathematical notation we are employing allows us to construe any notation for a function also as a notation for its restriction to a subtype of the domain, without any explicit notation for the conversion. The pertinent case here is that
n':
, n:{n'...}, a,z:
, a',z':{a...z}.
{a...z}{1...n}
Peg
{a'...z'}
{1...n'}
Peg
since
n':
, n:{n'...}. {1...n'}
{1...n}
anda,z:
, a',z':{a...z}. {a'...z'}
{a...z}
where the propositional form
A expresses the fact that all the notations for values of one typeB
A may be construed also as notations for values in typeB (seePolymorphism ).
Turning to the argument, under the assumption that {1...n}
Moving disk k of n takes s(x) to s(x') hence, by
Thm* ,n:
, f,g:({1...n}
Peg), k:{1...n}.
Thm* Moving disk k of n takes f to gf(k)
g(k)
s(x,k) s(x+1,k)
To establish that {a'...z'}
{1...n}
x:{a'...z'}, i:{n'+1...n}. s(a',i) = s(x,i)
n'<k s(x,k) = s(x+1,k)
since both sides could be rewritten to n<k
s(x+1,k)
QED
About:
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |