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}{1...n}Peg which it needs to be a stacking sequence forn disks, but also the type{a'...z'}{1...n'}Peg which it needs to be a, possibly shorter, stacking sequence forn' 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'}Pegsince
n':, n:{n'...}. {1...n'} {1...n}
anda,z:, a',z':{a...z}. {a'...z'} {a...z} where the propositional form
A B expresses the fact that all the notations for values of one typeA may be construed also as notations for values in typeB (seePolymorphism ).
Turning to the argument, under the assumption that
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 g f(k) g(k)
s(x,k) s(x+1,k)
To establish that
n'<k s(x,k) = s(x+1,k)
since both sides could be rewritten to
QED
About: