set S = s +* ((while>0 a,I) +* (Start-At (insloc 0 )));
set SW = StepWhile>0 a,I,s;
defpred S1[ Element of NAT ] means ((StepWhile>0 a,I,s) . $1) . a <= 0 ;
A3:
(while>0 a,I) +* (Start-At (insloc 0 )) c= s +* ((while>0 a,I) +* (Start-At (insloc 0 )))
by FUNCT_4:26;
consider f being Function of (product the Object-Kind of SCM+FSA ),NAT such that
A4:
for k being Element of NAT holds
( f . ((StepWhile>0 a,I,s) . (k + 1)) < f . ((StepWhile>0 a,I,s) . k) or S1[k] )
by A2, Def5;
deffunc H1( Element of NAT ) -> Element of NAT = f . ((StepWhile>0 a,I,s) . $1);
A5:
for k being Element of NAT holds
( H1(k + 1) < H1(k) or S1[k] )
by A4;
consider m being Element of NAT such that
A6:
S1[m]
and
A7:
for n being Element of NAT st S1[n] holds
m <= n
from SEQ_4:sch 1(A5);
take
m
; :: thesis: ex k being Element of NAT st
( m = k & ((StepWhile>0 a,I,s) . k) . a <= 0 & ( for i being Element of NAT st ((StepWhile>0 a,I,s) . i) . a <= 0 holds
k <= i ) & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . k) )
take
m
; :: thesis: ( m = m & ((StepWhile>0 a,I,s) . m) . a <= 0 & ( for i being Element of NAT st ((StepWhile>0 a,I,s) . i) . a <= 0 holds
m <= i ) & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m) )
thus
m = m
; :: thesis: ( ((StepWhile>0 a,I,s) . m) . a <= 0 & ( for i being Element of NAT st ((StepWhile>0 a,I,s) . i) . a <= 0 holds
m <= i ) & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m) )
thus
((StepWhile>0 a,I,s) . m) . a <= 0
by A6; :: thesis: ( ( for i being Element of NAT st ((StepWhile>0 a,I,s) . i) . a <= 0 holds
m <= i ) & DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m) )
thus
for n being Element of NAT st ((StepWhile>0 a,I,s) . n) . a <= 0 holds
m <= n
by A7; :: thesis: DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m)
defpred S2[ Element of NAT ] means ( $1 + 1 <= m implies ex k being Element of NAT st (StepWhile>0 a,I,s) . ($1 + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),k );
A8:
ProperBodyWhile>0 a,I,s
by A1, Th32;
A9:
now let k be
Element of
NAT ;
:: thesis: ( S2[k] implies S2[k + 1] )assume A10:
S2[
k]
;
:: thesis: S2[k + 1]now set sk1 =
(StepWhile>0 a,I,s) . (k + 1);
set sk =
(StepWhile>0 a,I,s) . k;
assume A11:
(k + 1) + 1
<= m
;
:: thesis: ex m being Element of NAT st (StepWhile>0 a,I,s) . ((k + 1) + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),m
k + 0 < k + (1 + 1)
by XREAL_1:8;
then
k < m
by A11, XXREAL_0:2;
then A12:
((StepWhile>0 a,I,s) . k) . a > 0
by A7;
(k + 1) + 0 < (k + 1) + 1
by XREAL_1:8;
then consider n being
Element of
NAT such that A13:
(StepWhile>0 a,I,s) . (k + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
n
by A10, A11, XXREAL_0:2;
A14:
(StepWhile>0 a,I,s) . (k + 1) = Computation (((StepWhile>0 a,I,s) . k) +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
((LifeSpan (((StepWhile>0 a,I,s) . k) +* (I +* (Start-At (insloc 0 ))))) + 3)
by SCMFSA_9:def 5;
take m =
n + ((LifeSpan (((StepWhile>0 a,I,s) . (k + 1)) +* (I +* (Start-At (insloc 0 ))))) + 3);
:: thesis: (StepWhile>0 a,I,s) . ((k + 1) + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),m
(
I is_closed_on (StepWhile>0 a,I,s) . k &
I is_halting_on (StepWhile>0 a,I,s) . k )
by A8, A12, Def4;
then
IC ((StepWhile>0 a,I,s) . (k + 1)) = insloc 0
by A14, A12, SCMFSA_9:47;
hence
(StepWhile>0 a,I,s) . ((k + 1) + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
m
by A13, SCMFSA_9:52;
:: thesis: verum end; hence
S2[
k + 1]
;
:: thesis: verum end;
A15:
IC SCM+FSA in dom ((while>0 a,I) +* (Start-At (insloc 0 )))
by SF_MASTR:65;
A16:
S2[ 0 ]
proof
assume
0 + 1
<= m
;
:: thesis: ex k being Element of NAT st (StepWhile>0 a,I,s) . (0 + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),k
take n =
(LifeSpan (s +* (I +* (Start-At (insloc 0 ))))) + 3;
:: thesis: (StepWhile>0 a,I,s) . (0 + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),n
thus
(StepWhile>0 a,I,s) . (0 + 1) = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
n
by SCMFSA_9:51;
:: thesis: verum
end;
A17:
for k being Element of NAT holds S2[k]
from NAT_1:sch 1(A16, A9);
per cases
( m = 0 or m <> 0 )
;
suppose A18:
m = 0
;
:: thesis: DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m)A19:
DataPart (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) =
DataPart s
by SCMFSA8A:11
.=
DataPart ((StepWhile>0 a,I,s) . m)
by A18, SCMFSA_9:def 5
;
then
(s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) . a = ((StepWhile>0 a,I,s) . m) . a
by SCMFSA6A:38;
hence
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m)
by A6, A3, A19, Th35;
:: thesis: verum end; suppose A20:
m <> 0
;
:: thesis: DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m)set sm =
(StepWhile>0 a,I,s) . m;
set sm1 =
((StepWhile>0 a,I,s) . m) +* ((while>0 a,I) +* (Start-At (insloc 0 )));
consider i being
Nat such that A21:
m = i + 1
by A20, NAT_1:6;
reconsider i =
i as
Element of
NAT by ORDINAL1:def 13;
set si =
(StepWhile>0 a,I,s) . i;
A22:
(StepWhile>0 a,I,s) . m = Computation (((StepWhile>0 a,I,s) . i) +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
((LifeSpan (((StepWhile>0 a,I,s) . i) +* (I +* (Start-At (insloc 0 ))))) + 3)
by A21, SCMFSA_9:def 5;
m = i + 1
by A21;
then consider n being
Element of
NAT such that A23:
(StepWhile>0 a,I,s) . m = Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
n
by A17;
i < m
by A21, NAT_1:13;
then A24:
((StepWhile>0 a,I,s) . i) . a > 0
by A7;
then
(
I is_closed_on (StepWhile>0 a,I,s) . i &
I is_halting_on (StepWhile>0 a,I,s) . i )
by A8, Def4;
then A25:
IC ((StepWhile>0 a,I,s) . m) = insloc 0
by A22, A24, SCMFSA_9:47;
A26:
IC (((StepWhile>0 a,I,s) . m) +* ((while>0 a,I) +* (Start-At (insloc 0 )))) =
(((StepWhile>0 a,I,s) . m) +* ((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 A15, FUNCT_4:14
.=
IC ((StepWhile>0 a,I,s) . m)
by A25, SF_MASTR:66
;
((StepWhile>0 a,I,s) . m) | NAT = (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))) | NAT
by A23, AMI_1:123;
then
(
DataPart (((StepWhile>0 a,I,s) . m) +* ((while>0 a,I) +* (Start-At (insloc 0 )))) = DataPart ((StepWhile>0 a,I,s) . m) &
(((StepWhile>0 a,I,s) . m) +* ((while>0 a,I) +* (Start-At (insloc 0 )))) | NAT = ((StepWhile>0 a,I,s) . m) | NAT )
by FUNCT_4:100, SCMFSA8A:11;
then A27:
((StepWhile>0 a,I,s) . m) +* ((while>0 a,I) +* (Start-At (insloc 0 ))) = (StepWhile>0 a,I,s) . m
by A26, SCMFSA_9:29;
while>0 a,
I is_halting_on (StepWhile>0 a,I,s) . m
by A6, SCMFSA_9:43;
then
((StepWhile>0 a,I,s) . m) +* ((while>0 a,I) +* (Start-At (insloc 0 ))) is
halting
by SCMFSA7B:def 8;
then consider j being
Element of
NAT such that A28:
CurInstr (Computation ((StepWhile>0 a,I,s) . m),j) = halt SCM+FSA
by A27, AMI_1:def 20;
CurInstr (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(n + j)) = halt SCM+FSA
by A23, A28, AMI_1:51;
then A29:
Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 ))))) =
Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),
(n + j)
by AMI_1:127
.=
Computation ((StepWhile>0 a,I,s) . m),
j
by A23, AMI_1:51
.=
Computation ((StepWhile>0 a,I,s) . m),
(LifeSpan ((StepWhile>0 a,I,s) . m))
by A28, AMI_1:127
;
(while>0 a,I) +* (Start-At (insloc 0 )) c= (StepWhile>0 a,I,s) . m
by A27, FUNCT_4:26;
hence
DataPart (Computation (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))),(LifeSpan (s +* ((while>0 a,I) +* (Start-At (insloc 0 )))))) = DataPart ((StepWhile>0 a,I,s) . m)
by A6, A29, Th35;
:: thesis: verum end; end;