So, we are down to proving
z:{a...}, m:{a...z-1}, s1:({a...m}
{1...n}
Peg),
(A) s2:({m+1...z}
{1...n}
Peg).
(A) (s1 @(m) s2) is a Hanoi(n disk) seq on a..z
(A) & s1(a) = (i.p)
(A) & s2(z) = (i.q)
Since q
i.otherPeg(p; q)
Peg, a
{a...}
{a...m}
{1...n-1}
Peg
s1 is a Hanoi(n-1 disk) seq on a..m
s1(a) = ( i.p)
s1(m) = ( i.otherPeg(p; q))
Applying the inductive hypothesis further to Peg, m+1
{m+1...}
{m+1...z}
{1...n-1}
Peg
s2 is a Hanoi(n-1 disk) seq on m+1..z
s2(m+1) = ( i.otherPeg(p; q))
s2(z) = ( i.q)
The principle for showing how to combine two such Hanoi sequences to show our goal has been isolated in a lemma:
Thm* n:
, a:
, z:{a...}, m:{a...z-1}, f,g:({1...n}
Peg).
Thm* f(n)g(n)
Thm*![]()
Thm* (s1:({a...m}
{1...n-1}
Peg), s2:({m+1...z}
{1...n-1}
Peg).
Thm* (s1 is a Hanoi(n-1 disk) seq on a..m
Thm* (& s1(a) = f{1...n-1}
Peg
Thm* (& s2 is a Hanoi(n-1 disk) seq on m+1..z
Thm* (& s2(z) = g{1...n-1}
Peg
Thm* (& s1(m) = s2(m+1)
Thm* (& (i:{1...n-1}. s1(m,i)
f(n) & s2(m+1,i)
g(n)))
Thm*![]()
Thm* (r1:({a...m}
{1...n}
Peg), r2:({m+1...z}
{1...n}
Peg).
Thm* ((r1 @(m) r2) is a Hanoi(n disk) seq on a..z & r1(a) = f & r2(z) = g)
Applying this special lemma here to show (A) from above, reduces to establishing that for {1...n-1}
s1(m,i) , which follows fromp
s1(m) = ( above, andi.otherPeg(p; q))
s2(m+1,i) , which follows fromq
s2(m+1) = ( above.i.otherPeg(p; q))
QED
About:
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |