let s be State of ; for a being read-write Int-Location
for I being Program of st I is_closed_on s & I is_halting_on s & s . a > 0 holds
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((LifeSpan (s +* (I +* (Start-At (insloc 0 ))))) + 3)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))
let a be read-write Int-Location ; for I being Program of st I is_closed_on s & I is_halting_on s & s . a > 0 holds
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((LifeSpan (s +* (I +* (Start-At (insloc 0 ))))) + 3)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))
let I be Program of ; ( I is_closed_on s & I is_halting_on s & s . a > 0 implies DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((LifeSpan (s +* (I +* (Start-At (insloc 0 ))))) + 3)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) )
assume that
A1:
( I is_closed_on s & I is_halting_on s )
and
A2:
s . a > 0
; DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((LifeSpan (s +* (I +* (Start-At (insloc 0 ))))) + 3)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))
set sI = s +* (I +* (Start-At (insloc 0 )));
set s1 = s +* ((while>0 a,I) +* (Start-At (insloc 0 )));
defpred S1[ Element of NAT ] means ( $1 <= LifeSpan (s +* (I +* (Start-At (insloc 0 )))) implies ( IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + $1)) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),$1)) + 4 & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + $1)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),$1) ) );
A3:
now let k be
Element of
NAT ;
( S1[k] implies S1[k + 1] )assume A4:
S1[
k]
;
S1[k + 1]now A5:
k + 0 < k + 1
by XREAL_1:8;
assume
k + 1
<= LifeSpan (s +* (I +* (Start-At (insloc 0 ))))
;
( IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + k) + 1)) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(k + 1))) + 4 & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + k) + 1)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(k + 1)) )then
k < LifeSpan (s +* (I +* (Start-At (insloc 0 ))))
by A5, XXREAL_0:2;
hence
(
IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + k) + 1)) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),(k + 1))) + 4 &
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + k) + 1)) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(k + 1)) )
by A1, A4, SCMFSA_9:44;
verum end; hence
S1[
k + 1]
;
verum end;
set i = a >0_goto (insloc 4);
set s2 = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),1;
A6:
IC SCM+FSA in dom ((while>0 a,I) +* (Start-At (insloc 0 )))
by SF_MASTR:65;
A7: IC (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) =
(s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . (IC SCM+FSA )
by AMI_1:def 15
.=
((while>0 a,I) +* (Start-At (insloc 0 ))) . (IC SCM+FSA )
by A6, FUNCT_4:14
.=
insloc 0
by SF_MASTR:66
;
not a in dom ((while>0 a,I) +* (Start-At (insloc 0 )))
by SCMFSA6B:12;
then A8:
(s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . a = s . a
by FUNCT_4:12;
set loc4 = insloc ((card I) + 4);
while>0 a,I c= (while>0 a,I) +* (Start-At (insloc 0 ))
by SCMFSA8A:9;
then A9:
dom (while>0 a,I) c= dom ((while>0 a,I) +* (Start-At (insloc 0 )))
by GRFUNC_1:8;
A10:
insloc 0 in dom (while>0 a,I)
by SCMFSA_9:10;
then (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . (insloc 0 ) =
((while>0 a,I) +* (Start-At (insloc 0 ))) . (insloc 0 )
by A9, FUNCT_4:14
.=
(while>0 a,I) . (insloc 0 )
by A10, SCMFSA6B:7
.=
a >0_goto (insloc 4)
by SCMFSA_9:11
;
then A11:
CurInstr (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) = a >0_goto (insloc 4)
by A7, AMI_1:def 16;
A12: Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(0 + 1) =
Following (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),0 )
by AMI_1:14
.=
Following (s +* ((while>0 a,I) +* (Start-At (insloc 0 ))))
by AMI_1:13
.=
Exec (a >0_goto (insloc 4)),(s +* ((while>0 a,I) +* (Start-At (insloc 0 ))))
by A11, AMI_1:def 18
;
then
( ( for c being Int-Location holds (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),1) . c = (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . c ) & ( for f being FinSeq-Location holds (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),1) . f = (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . f ) )
by SCMFSA_2:97;
then A13: DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),1) =
DataPart (s +* ((while>0 a,I) +* (Start-At (insloc 0 ))))
by SCMFSA6A:38
.=
DataPart s
by SCMFSA8A:11
.=
DataPart (s +* (I +* (Start-At (insloc 0 ))))
by SCMFSA8A:11
;
A14: IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),1) =
(Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),1) . (IC SCM+FSA )
by AMI_1:def 15
.=
insloc 4
by A2, A12, A8, SCMFSA_2:97
;
A15:
S1[ 0 ]
proof
assume
0 <= LifeSpan (s +* (I +* (Start-At (insloc 0 ))))
;
( IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + 0 )) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),0 )) + 4 & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + 0 )) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),0 ) )
A16:
IC SCM+FSA in dom (I +* (Start-At (insloc 0 )))
by SF_MASTR:65;
IC (Computation (s +* (I +* (Start-At (insloc 0 )))),0 ) =
IC (s +* (I +* (Start-At (insloc 0 ))))
by AMI_1:13
.=
(s +* (I +* (Start-At (insloc 0 )))) . (IC SCM+FSA )
by AMI_1:def 15
.=
(I +* (Start-At (insloc 0 ))) . (IC SCM+FSA )
by A16, FUNCT_4:14
.=
insloc 0
by SF_MASTR:66
;
hence
(
IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + 0 )) = (IC (Computation (s +* (I +* (Start-At (insloc 0 )))),0 )) + 4 &
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + 0 )) = DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),0 ) )
by A14, A13, AMI_1:13;
verum
end;
for k being Element of NAT holds S1[k]
from NAT_1:sch 1(A15, A3);
then A17:
S1[ LifeSpan (s +* (I +* (Start-At (insloc 0 ))))]
;
set s4 = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1) + 1);
set s3 = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1);
A18:
insloc ((card I) + 4) in dom (while>0 a,I)
by SCMFSA_9:38;
set s2 = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))));
A19:
CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) = goto (insloc ((card I) + 4))
by A1, A17, SCMFSA_9:45;
A20: Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1) =
Following (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))))
by AMI_1:14
.=
Exec (goto (insloc ((card I) + 4))),(Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))))
by A19, AMI_1:def 18
;
then A21:
( ( for c being Int-Location holds (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) . c = (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) . c ) & ( for f being FinSeq-Location holds (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) . f = (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))) . f ) )
by SCMFSA_2:95;
A22: (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) . (insloc ((card I) + 4)) =
(s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . (insloc ((card I) + 4))
by AMI_1:54
.=
((while>0 a,I) +* (Start-At (insloc 0 ))) . (insloc ((card I) + 4))
by A9, A18, FUNCT_4:14
.=
(while>0 a,I) . (insloc ((card I) + 4))
by A18, SCMFSA6B:7
.=
goto (insloc 0 )
by SCMFSA_9:46
;
IC (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) =
(Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) . (IC SCM+FSA )
by AMI_1:def 15
.=
insloc ((card I) + 4)
by A20, SCMFSA_2:95
;
then A23:
CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) = goto (insloc 0 )
by A22, AMI_1:def 16;
Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1) + 1) =
Following (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1))
by AMI_1:14
.=
Exec (goto (insloc 0 )),(Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1))
by A23, AMI_1:def 18
;
then
( ( for c being Int-Location holds (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1) + 1)) . c = (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) . c ) & ( for f being FinSeq-Location holds (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1) + 1)) . f = (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1)) . f ) )
by SCMFSA_2:95;
hence DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((LifeSpan (s +* (I +* (Start-At (insloc 0 ))))) + 3)) =
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),((1 + (LifeSpan (s +* (I +* (Start-At (insloc 0 )))))) + 1))
by SCMFSA6A:38
.=
DataPart (Computation (s +* (I +* (Start-At (insloc 0 )))),(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))))
by A17, A21, SCMFSA6A:38
;
verum