let P be Instruction-Sequence of SCMPDS; for s being 0 -started State of SCMPDS
for I being halt-free shiftable Program of SCMPDS
for a, b, c being Int_position
for i, d being Integer st card I > 0 & s . a = d & s . b > 0 & s . c > 0 & s . (DataLoc (d,i)) = (s . b) - (s . c) & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c holds
( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) holds
( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) )
let s be 0 -started State of SCMPDS; for I being halt-free shiftable Program of SCMPDS
for a, b, c being Int_position
for i, d being Integer st card I > 0 & s . a = d & s . b > 0 & s . c > 0 & s . (DataLoc (d,i)) = (s . b) - (s . c) & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c holds
( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) holds
( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) )
let I be halt-free shiftable Program of SCMPDS; for a, b, c being Int_position
for i, d being Integer st card I > 0 & s . a = d & s . b > 0 & s . c > 0 & s . (DataLoc (d,i)) = (s . b) - (s . c) & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c holds
( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) holds
( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) )
let a, b, c be Int_position ; for i, d being Integer st card I > 0 & s . a = d & s . b > 0 & s . c > 0 & s . (DataLoc (d,i)) = (s . b) - (s . c) & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c holds
( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) holds
( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) )
let i, d be Integer; ( card I > 0 & s . a = d & s . b > 0 & s . c > 0 & s . (DataLoc (d,i)) = (s . b) - (s . c) & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c holds
( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) implies ( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) ) )
set ci = DataLoc ((s . a),i);
assume
card I > 0
; ( not s . a = d or not s . b > 0 or not s . c > 0 or not s . (DataLoc (d,i)) = (s . b) - (s . c) or ex t being 0 -started State of SCMPDS ex Q being Instruction-Sequence of SCMPDS st
( t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c & not ( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) or ( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) ) )
consider f being Function of (product the Object-Kind of SCMPDS),NAT such that
A2:
for s being State of SCMPDS holds
( ( s . b = s . c implies f . s = 0 ) & ( s . b <> s . c implies f . s = max ((abs (s . b)),(abs (s . c))) ) )
by Th6;
deffunc H1( State of SCMPDS) -> Element of NAT = f . $1;
defpred S1[ set ] means ex t being State of SCMPDS st
( t = $1 & t . b > 0 & t . c > 0 & t . (DataLoc (d,i)) = (t . b) - (t . c) );
assume that
A3:
s . a = d
and
A4:
s . b > 0
and
A5:
s . c > 0
and
A6:
s . (DataLoc (d,i)) = (s . b) - (s . c)
; ( ex t being 0 -started State of SCMPDS ex Q being Instruction-Sequence of SCMPDS st
( t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c & not ( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) ) ) or ( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) ) )
assume A7:
for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st t . b > 0 & t . c > 0 & t . a = d & t . (DataLoc (d,i)) = (t . b) - (t . c) & t . b <> t . c holds
( (IExec (I,Q,t)) . a = d & I is_closed_on t,Q & I is_halting_on t,Q & ( t . b > t . c implies ( (IExec (I,Q,t)) . b = (t . b) - (t . c) & (IExec (I,Q,t)) . c = t . c ) ) & ( t . b <= t . c implies ( (IExec (I,Q,t)) . c = (t . c) - (t . b) & (IExec (I,Q,t)) . b = t . b ) ) & (IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c) )
; ( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P & ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) ) )
A8:
now let t be
0 -started State of
SCMPDS;
for Q being Instruction-Sequence of SCMPDS st S1[t] & t . a = s . a & t . (DataLoc ((s . a),i)) <> 0 holds
( (IExec (I,Q,t)) . a = t . a & I is_closed_on t,Q & I is_halting_on t,Q & H1( Initialize (IExec (I,Q,t))) < H1(t) & S1[ Initialize (IExec (I,Q,t))] )let Q be
Instruction-Sequence of
SCMPDS;
( S1[t] & t . a = s . a & t . (DataLoc ((s . a),i)) <> 0 implies ( (IExec (I,Q,t)) . a = t . a & I is_closed_on t,Q & I is_halting_on t,Q & H1( Initialize (IExec (I,Q,t))) < H1(t) & S1[ Initialize (IExec (I,Q,t))] ) )assume that A9:
S1[
t]
and A10:
t . a = s . a
and A11:
t . (DataLoc ((s . a),i)) <> 0
;
( (IExec (I,Q,t)) . a = t . a & I is_closed_on t,Q & I is_halting_on t,Q & H1( Initialize (IExec (I,Q,t))) < H1(t) & S1[ Initialize (IExec (I,Q,t))] )set It =
IExec (
I,
Q,
t);
set t2 =
Initialize (IExec (I,Q,t));
set t1 =
t;
set x =
(IExec (I,Q,t)) . b;
set y =
(IExec (I,Q,t)) . c;
consider v being
State of
SCMPDS such that A12:
v = t
and A13:
v . b > 0
and A14:
v . c > 0
and A15:
v . (DataLoc (d,i)) = (v . b) - (v . c)
by A9;
A16:
t . b > 0
by A12, A13;
A17:
t . c > 0
by A12, A14;
A18:
t . (DataLoc (d,i)) =
(v . b) - (v . c)
by A12, A15
.=
(t . b) - (v . c)
by A12
.=
(t . b) - (t . c)
by A12
;
then A19:
t . b <> t . c
by A3, A11;
hence
(IExec (I,Q,t)) . a = t . a
by A3, A7, A10, A16, A17, A18;
( I is_closed_on t,Q & I is_halting_on t,Q & H1( Initialize (IExec (I,Q,t))) < H1(t) & S1[ Initialize (IExec (I,Q,t))] )thus
(
I is_closed_on t,
Q &
I is_halting_on t,
Q )
by A3, A7, A10, A16, A17, A18, A19;
( H1( Initialize (IExec (I,Q,t))) < H1(t) & S1[ Initialize (IExec (I,Q,t))] )A20:
now per cases
( t . b > t . c or t . b <= t . c )
;
suppose A21:
t . b > t . c
;
( (IExec (I,Q,t)) . b > 0 & (IExec (I,Q,t)) . c > 0 & max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c)) )then
(t . b) - (t . c) > 0
by XREAL_1:50;
hence
(IExec (I,Q,t)) . b > 0
by A3, A7, A10, A16, A17, A18, A21;
( (IExec (I,Q,t)) . c > 0 & max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c)) )thus
(IExec (I,Q,t)) . c > 0
by A3, A7, A10, A16, A17, A18, A21;
max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c))A22:
(IExec (I,Q,t)) . b = (t . b) - (t . c)
by A3, A7, A10, A16, A17, A18, A21;
hereby verum
A23:
max (
(t . b),
(t . c))
= t . b
by A21, XXREAL_0:def 10;
per cases
( max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) = (IExec (I,Q,t)) . b or max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) = (IExec (I,Q,t)) . c )
by XXREAL_0:16;
suppose
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
= (IExec (I,Q,t)) . b
;
max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c))end; suppose
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
= (IExec (I,Q,t)) . c
;
max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c))hence
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
< max (
(t . b),
(t . c))
by A3, A7, A10, A16, A17, A18, A21, A23;
verum end; end;
end; end; suppose A24:
t . b <= t . c
;
( (IExec (I,Q,t)) . b > 0 & (IExec (I,Q,t)) . c > 0 & max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c)) )hence
(IExec (I,Q,t)) . b > 0
by A3, A7, A10, A16, A17, A18, A19;
( (IExec (I,Q,t)) . c > 0 & max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c)) )
t . b < t . c
by A19, A24, XXREAL_0:1;
then
(t . c) - (t . b) > 0
by XREAL_1:50;
hence
(IExec (I,Q,t)) . c > 0
by A3, A7, A10, A16, A17, A18, A19, A24;
max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c))A25:
(IExec (I,Q,t)) . c = (t . c) - (t . b)
by A3, A7, A10, A16, A17, A18, A19, A24;
A26:
(IExec (I,Q,t)) . b = t . b
by A3, A7, A10, A16, A17, A18, A19, A24;
hereby verum
A27:
max (
(t . b),
(t . c))
= t . c
by A24, XXREAL_0:def 10;
per cases
( max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) = (IExec (I,Q,t)) . c or max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) = (IExec (I,Q,t)) . b )
by XXREAL_0:16;
suppose
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
= (IExec (I,Q,t)) . c
;
max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c))end; suppose
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
= (IExec (I,Q,t)) . b
;
max (((IExec (I,Q,t)) . b),((IExec (I,Q,t)) . c)) < max ((t . b),(t . c))hence
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
< max (
(t . b),
(t . c))
by A19, A24, A26, A27, XXREAL_0:1;
verum end; end;
end; end; end; end; thus
H1(
Initialize (IExec (I,Q,t)))
< H1(
t)
S1[ Initialize (IExec (I,Q,t))]proof
t . b <> t . c
by A19;
then
t . b <> t . c
;
then A28:
H1(
t) =
max (
(abs (t . b)),
(abs (t . c)))
by A2
.=
max (
(abs (t . b)),
(abs (t . c)))
.=
max (
(abs (t . b)),
(abs (t . c)))
.=
max (
(t . b),
(abs (t . c)))
by A16, ABSVALUE:def 1
.=
max (
(t . b),
(t . c))
by A17, ABSVALUE:def 1
;
then
H1(
t)
>= t . b
by XXREAL_0:25;
then A29:
H1(
t)
> 0
by A16, XXREAL_0:2;
per cases
( (Initialize (IExec (I,Q,t))) . b = (Initialize (IExec (I,Q,t))) . c or (Initialize (IExec (I,Q,t))) . b <> (Initialize (IExec (I,Q,t))) . c )
;
suppose
(Initialize (IExec (I,Q,t))) . b <> (Initialize (IExec (I,Q,t))) . c
;
H1( Initialize (IExec (I,Q,t))) < H1(t)then H1(
Initialize (IExec (I,Q,t))) =
max (
(abs ((Initialize (IExec (I,Q,t))) . b)),
(abs ((Initialize (IExec (I,Q,t))) . c)))
by A2
.=
max (
(abs ((IExec (I,Q,t)) . b)),
(abs ((Initialize (IExec (I,Q,t))) . c)))
by SCMPDS_5:15
.=
max (
(abs ((IExec (I,Q,t)) . b)),
(abs ((IExec (I,Q,t)) . c)))
by SCMPDS_5:15
.=
max (
((IExec (I,Q,t)) . b),
(abs ((IExec (I,Q,t)) . c)))
by A20, ABSVALUE:def 1
.=
max (
((IExec (I,Q,t)) . b),
((IExec (I,Q,t)) . c))
by A20, ABSVALUE:def 1
;
hence
H1(
Initialize (IExec (I,Q,t)))
< H1(
t)
by A20, A28;
verum end; end;
end; A30:
(IExec (I,Q,t)) . (DataLoc (d,i)) = ((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c)
by A3, A7, A10, A16, A17, A18, A19;
thus
S1[
Initialize (IExec (I,Q,t))]
verumproof
take v =
Initialize (IExec (I,Q,t));
( v = Initialize (IExec (I,Q,t)) & v . b > 0 & v . c > 0 & v . (DataLoc (d,i)) = (v . b) - (v . c) )
thus
v = Initialize (IExec (I,Q,t))
;
( v . b > 0 & v . c > 0 & v . (DataLoc (d,i)) = (v . b) - (v . c) )
thus
(
v . b > 0 &
v . c > 0 )
by A20, SCMPDS_5:15;
v . (DataLoc (d,i)) = (v . b) - (v . c)
thus v . (DataLoc (d,i)) =
((IExec (I,Q,t)) . b) - ((IExec (I,Q,t)) . c)
by A30, SCMPDS_5:15
.=
(v . b) - ((IExec (I,Q,t)) . c)
by SCMPDS_5:15
.=
(v . b) - (v . c)
by SCMPDS_5:15
;
verum
end; end;
A31:
for t being 0 -started State of SCMPDS st S1[t] & H1(t) = 0 holds
t . (DataLoc ((s . a),i)) = 0
A39:
S1[s]
by A4, A5, A6;
( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P )
from SCPINVAR:sch 3(A31, A39, A8);
hence
( while<>0 (a,i,I) is_closed_on s,P & while<>0 (a,i,I) is_halting_on s,P )
; ( s . (DataLoc ((s . a),i)) <> 0 implies IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s)))) )
assume A40:
s . (DataLoc ((s . a),i)) <> 0
; IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s))))
IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s))))
from SCPINVAR:sch 4(A40, A31, A39, A8);
hence
IExec ((while<>0 (a,i,I)),P,s) = IExec ((while<>0 (a,i,I)),P,(Initialize (IExec (I,P,s))))
; verum