let P be Instruction-Sequence of SCMPDS; :: thesis: 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 n, i, p0 being Element of NAT
for f being FinSequence of INT st f is_FinSequence_on s,p0 & len f = n & s . b = 0 & s . a = 0 & s . (intpos i) = - n & s . c = p0 + 1 & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) holds
( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let s be 0 -started State of SCMPDS; :: thesis: for I being halt-free shiftable Program of SCMPDS
for a, b, c being Int_position
for n, i, p0 being Element of NAT
for f being FinSequence of INT st f is_FinSequence_on s,p0 & len f = n & s . b = 0 & s . a = 0 & s . (intpos i) = - n & s . c = p0 + 1 & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) holds
( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let I be halt-free shiftable Program of SCMPDS; :: thesis: for a, b, c being Int_position
for n, i, p0 being Element of NAT
for f being FinSequence of INT st f is_FinSequence_on s,p0 & len f = n & s . b = 0 & s . a = 0 & s . (intpos i) = - n & s . c = p0 + 1 & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) holds
( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let a, b, c be Int_position; :: thesis: for n, i, p0 being Element of NAT
for f being FinSequence of INT st f is_FinSequence_on s,p0 & len f = n & s . b = 0 & s . a = 0 & s . (intpos i) = - n & s . c = p0 + 1 & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) holds
( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let n, i, p0 be Element of NAT ; :: thesis: for f being FinSequence of INT st f is_FinSequence_on s,p0 & len f = n & s . b = 0 & s . a = 0 & s . (intpos i) = - n & s . c = p0 + 1 & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) holds
( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )

let f be FinSequence of INT ; :: thesis: ( f is_FinSequence_on s,p0 & len f = n & s . b = 0 & s . a = 0 & s . (intpos i) = - n & s . c = p0 + 1 & ( for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) implies ( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) )

set Iw = IExec ((while<0 (a,i,I)),P,s);
set Dw = Initialize (IExec ((while<0 (a,i,I)),P,s));
set da = DataLoc ((s . a),i);
defpred S1[ State of SCMPDS] means ( ( for i being Element of NAT st i > p0 holds
$1 . (intpos i) = s . (intpos i) ) & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ($1 . (intpos i)) + n & $1 . b = Sum g & $1 . (intpos i) <= 0 & $1 . c = (p0 + 1) + (len g) ) );
assume that
A1: f is_FinSequence_on s,p0 and
A2: len f = n and
A3: s . b = 0 and
A4: s . a = 0 and
A5: s . (intpos i) = - n and
A6: s . c = p0 + 1 ; :: thesis: ( ex t being 0 -started State of SCMPDS ex Q being Instruction-Sequence of SCMPDS st
( ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) & not ( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ) or ( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) )

consider ff being Function of (product (the_Values_of SCMPDS)),NAT such that
A7: for t being State of SCMPDS holds
( ( t . (DataLoc ((s . a),i)) >= 0 implies ff . t = 0 ) & ( t . (DataLoc ((s . a),i)) < 0 implies ff . t = - (t . (DataLoc ((s . a),i))) ) ) by Th3;
deffunc H1( State of SCMPDS) -> Element of NAT = ff . $1;
assume A8: for t being 0 -started State of SCMPDS
for Q being Instruction-Sequence of SCMPDS st ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (t . (intpos i)) + n & t . b = Sum g & t . c = (p0 + 1) + (len g) ) & t . a = 0 & t . (intpos i) < 0 & ( for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) ) holds
( (IExec (I,Q,t)) . a = 0 & I is_closed_on t,Q & I is_halting_on t,Q & (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 & ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((t . (intpos i)) + n) + 1 & (IExec (I,Q,t)) . c = (p0 + 1) + (len g) & (IExec (I,Q,t)) . b = Sum g ) & ( for i being Element of NAT st i > p0 holds
(IExec (I,Q,t)) . (intpos i) = s . (intpos i) ) ) ; :: thesis: ( (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f & while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )
A9: for t being 0 -started State of SCMPDS st S1[t] holds
( ( H1(t) = 0 implies not t . (DataLoc ((s . a),i)) < 0 ) & ( t . (DataLoc ((s . a),i)) >= 0 implies H1(t) = 0 ) )
proof
let t be 0 -started State of SCMPDS; :: thesis: ( S1[t] implies ( ( H1(t) = 0 implies not t . (DataLoc ((s . a),i)) < 0 ) & ( t . (DataLoc ((s . a),i)) >= 0 implies H1(t) = 0 ) ) )
assume S1[t] ; :: thesis: ( ( H1(t) = 0 implies not t . (DataLoc ((s . a),i)) < 0 ) & ( t . (DataLoc ((s . a),i)) >= 0 implies H1(t) = 0 ) )
hereby :: thesis: ( t . (DataLoc ((s . a),i)) >= 0 implies H1(t) = 0 )
assume A10: H1(t) = 0 ; :: thesis: not t . (DataLoc ((s . a),i)) < 0
assume A11: t . (DataLoc ((s . a),i)) < 0 ; :: thesis: contradiction
then t . (DataLoc ((s . a),i)) < 0 ;
then H1(t) = - (t . (DataLoc ((s . a),i))) by A7;
hence contradiction by A10, A11; :: thesis: verum
end;
assume t . (DataLoc ((s . a),i)) >= 0 ; :: thesis: H1(t) = 0
then t . (DataLoc ((s . a),i)) >= 0 ;
hence H1(t) = 0 by A7; :: thesis: verum
end;
A12: now :: thesis: for t being 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 t be 0 -started State of SCMPDS; :: thesis: 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; :: thesis: ( 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
A13: S1[t] and
A14: t . a = s . a and
A15: t . (DataLoc ((s . a),i)) < 0 ; :: thesis: ( (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))] )
consider h being FinSequence of INT such that
A16: h is_FinSequence_on s,p0 and
A17: ( len h = (t . (intpos i)) + n & t . b = Sum h ) and
A18: t . c = (p0 + 1) + (len h) by A13;
A19: t . c = (p0 + 1) + (len h) by A18;
set It = IExec (I,Q,t);
set Dit = Initialize (IExec (I,Q,t));
A20: for i being Element of NAT st i > p0 holds
t . (intpos i) = s . (intpos i) by A13;
A21: intpos (0 + i) = DataLoc ((s . a),i) by A4, SCMP_GCD:1;
A22: ( len h = (t . (intpos i)) + n & t . b = Sum h ) by A17;
hence (IExec (I,Q,t)) . a = t . a by A4, A8, A14, A15, A20, A16, A19, A21; :: thesis: ( 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))] )
consider g being FinSequence of INT such that
A23: g is_FinSequence_on s,p0 and
A24: len g = ((t . (intpos i)) + n) + 1 and
A25: (IExec (I,Q,t)) . c = (p0 + 1) + (len g) and
A26: (IExec (I,Q,t)) . b = Sum g by A4, A8, A14, A15, A20, A16, A22, A19, A21;
thus ( I is_closed_on t,Q & I is_halting_on t,Q ) by A4, A8, A14, A15, A20, A16, A22, A19, A21; :: thesis: ( H1( Initialize (IExec (I,Q,t))) < H1(t) & S1[ Initialize (IExec (I,Q,t))] )
A27: (IExec (I,Q,t)) . (intpos i) = (t . (intpos i)) + 1 by A4, A8, A14, A15, A20, A16, A22, A19, A21;
hereby :: thesis: S1[ Initialize (IExec (I,Q,t))]
per cases ( (IExec (I,Q,t)) . (intpos i) >= 0 or (IExec (I,Q,t)) . (intpos i) < 0 ) ;
suppose (IExec (I,Q,t)) . (intpos i) >= 0 ; :: thesis: H1( Initialize (IExec (I,Q,t))) < H1(t)
then (Initialize (IExec (I,Q,t))) . (DataLoc ((s . a),i)) >= 0 by A21, SCMPDS_5:15;
then A28: H1( Initialize (IExec (I,Q,t))) = 0 by A7;
H1(t) <> 0 by A9, A13, A15;
hence H1( Initialize (IExec (I,Q,t))) < H1(t) by A28; :: thesis: verum
end;
suppose A29: (IExec (I,Q,t)) . (intpos i) < 0 ; :: thesis: H1( Initialize (IExec (I,Q,t))) < H1(t)
t . (DataLoc ((s . a),i)) < 0 by A15;
then A30: H1(t) = - (t . (DataLoc ((s . a),i))) by A7
.= - (t . (intpos i)) by A21 ;
(Initialize (IExec (I,Q,t))) . (DataLoc ((s . a),i)) < 0 by A21, A29, SCMPDS_5:15;
then H1( Initialize (IExec (I,Q,t))) = - ((Initialize (IExec (I,Q,t))) . (DataLoc ((s . a),i))) by A7
.= - ((t . (intpos i)) + 1) by A21, A27, SCMPDS_5:15
.= (- (t . (intpos i))) - 1 ;
hence H1( Initialize (IExec (I,Q,t))) < H1(t) by A30, XREAL_1:146; :: thesis: verum
end;
end;
end;
thus S1[ Initialize (IExec (I,Q,t))] :: thesis: verum
proof
hereby :: thesis: ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = ((Initialize (IExec (I,Q,t))) . (intpos i)) + n & (Initialize (IExec (I,Q,t))) . b = Sum g & (Initialize (IExec (I,Q,t))) . (intpos i) <= 0 & (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g) )
let i be Element of NAT ; :: thesis: ( i > p0 implies (Initialize (IExec (I,Q,t))) . (intpos i) = s . (intpos i) )
assume A31: i > p0 ; :: thesis: (Initialize (IExec (I,Q,t))) . (intpos i) = s . (intpos i)
thus (Initialize (IExec (I,Q,t))) . (intpos i) = (IExec (I,Q,t)) . (intpos i) by SCMPDS_5:15
.= s . (intpos i) by A4, A8, A14, A15, A20, A16, A22, A19, A21, A31 ; :: thesis: verum
end;
take g ; :: thesis: ( g is_FinSequence_on s,p0 & len g = ((Initialize (IExec (I,Q,t))) . (intpos i)) + n & (Initialize (IExec (I,Q,t))) . b = Sum g & (Initialize (IExec (I,Q,t))) . (intpos i) <= 0 & (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g) )
thus g is_FinSequence_on s,p0 by A23; :: thesis: ( len g = ((Initialize (IExec (I,Q,t))) . (intpos i)) + n & (Initialize (IExec (I,Q,t))) . b = Sum g & (Initialize (IExec (I,Q,t))) . (intpos i) <= 0 & (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g) )
thus len g = ((IExec (I,Q,t)) . (intpos i)) + n by A27, A24
.= ((Initialize (IExec (I,Q,t))) . (intpos i)) + n by SCMPDS_5:15 ; :: thesis: ( (Initialize (IExec (I,Q,t))) . b = Sum g & (Initialize (IExec (I,Q,t))) . (intpos i) <= 0 & (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g) )
thus (Initialize (IExec (I,Q,t))) . b = Sum g by A26, SCMPDS_5:15; :: thesis: ( (Initialize (IExec (I,Q,t))) . (intpos i) <= 0 & (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g) )
(Initialize (IExec (I,Q,t))) . (intpos i) = (t . (intpos i)) + 1 by A27, SCMPDS_5:15;
hence (Initialize (IExec (I,Q,t))) . (intpos i) <= 0 by A15, A21, INT_1:7; :: thesis: (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g)
thus (Initialize (IExec (I,Q,t))) . c = (p0 + 1) + (len g) by A25, SCMPDS_5:15; :: thesis: verum
end;
end;
A32: S1[s]
proof
thus for i being Element of NAT st i > p0 holds
s . (intpos i) = s . (intpos i) ; :: thesis: ex g being FinSequence of INT st
( g is_FinSequence_on s,p0 & len g = (s . (intpos i)) + n & s . b = Sum g & s . (intpos i) <= 0 & s . c = (p0 + 1) + (len g) )

consider h being FinSequence of INT such that
A33: len h = 0 and
A34: h is_FinSequence_on s,p0 by SCPISORT:2;
take h ; :: thesis: ( h is_FinSequence_on s,p0 & len h = (s . (intpos i)) + n & s . b = Sum h & s . (intpos i) <= 0 & s . c = (p0 + 1) + (len h) )
thus h is_FinSequence_on s,p0 by A34; :: thesis: ( len h = (s . (intpos i)) + n & s . b = Sum h & s . (intpos i) <= 0 & s . c = (p0 + 1) + (len h) )
thus len h = (s . (intpos i)) + n by A5, A33
.= (s . (intpos i)) + n ; :: thesis: ( s . b = Sum h & s . (intpos i) <= 0 & s . c = (p0 + 1) + (len h) )
h = <*> REAL by A33;
hence s . b = Sum h by A3, RVSUM_1:72; :: thesis: ( s . (intpos i) <= 0 & s . c = (p0 + 1) + (len h) )
thus s . (intpos i) <= 0 by A5; :: thesis: s . c = (p0 + 1) + (len h)
thus s . c = (p0 + 1) + (len h) by A6, A33; :: thesis: verum
end;
A35: ( H1( Initialize (IExec ((while<0 (a,i,I)),P,s))) = 0 & S1[ Initialize (IExec ((while<0 (a,i,I)),P,s))] ) from SCPINVAR:sch 1(A9, A32, A12);
then consider g being FinSequence of INT such that
A36: g is_FinSequence_on s,p0 and
A37: len g = ((Initialize (IExec ((while<0 (a,i,I)),P,s))) . (intpos i)) + n and
A38: (Initialize (IExec ((while<0 (a,i,I)),P,s))) . b = Sum g and
A39: (Initialize (IExec ((while<0 (a,i,I)),P,s))) . (intpos i) <= 0 ;
A40: (Initialize (IExec ((while<0 (a,i,I)),P,s))) . (intpos i) = (IExec ((while<0 (a,i,I)),P,s)) . (intpos (0 + i)) by SCMPDS_5:15
.= (IExec ((while<0 (a,i,I)),P,s)) . (DataLoc ((s . a),i)) by A4, SCMP_GCD:1 ;
(IExec ((while<0 (a,i,I)),P,s)) . (DataLoc ((s . a),i)) = (Initialize (IExec ((while<0 (a,i,I)),P,s))) . (DataLoc ((s . a),i)) by SCMPDS_5:15;
then (Initialize (IExec ((while<0 (a,i,I)),P,s))) . (intpos i) >= 0 by A9, A35, A40;
then A41: (Initialize (IExec ((while<0 (a,i,I)),P,s))) . (intpos i) = 0 by A39;
now :: thesis: for i being Nat st i in dom f holds
f . i = g . i
let i be Nat; :: thesis: ( i in dom f implies f . i = g . i )
reconsider a = i as Element of NAT by ORDINAL1:def 12;
assume i in dom f ; :: thesis: f . i = g . i
then A42: ( 1 <= i & i <= n ) by A2, FINSEQ_3:25;
hence f . i = s . (intpos (p0 + a)) by A1, A2
.= g . i by A36, A37, A41, A42 ;
:: thesis: verum
end;
then f = g by A2, A37, A41, FINSEQ_2:9;
hence (IExec ((while<0 (a,i,I)),P,s)) . b = Sum f by A38, SCMPDS_5:15; :: thesis: ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P )
A43: for t being 0 -started State of SCMPDS st S1[t] & H1(t) = 0 holds
t . (DataLoc ((s . a),i)) >= 0 by A9;
( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) from SCMPDS_8:sch 1(A43, A32, A12);
hence ( while<0 (a,i,I) is_closed_on s,P & while<0 (a,i,I) is_halting_on s,P ) ; :: thesis: verum