let I, J be Program of SCM+FSA ; :: thesis: for a being read-write Int-Location
for s being State of SCM+FSA st s . a > 0 & I is_closed_on Initialize s & I is_halting_on Initialize s holds
IExec (if>0 a,I,J),s = (IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3)))
let a be read-write Int-Location ; :: thesis: for s being State of SCM+FSA st s . a > 0 & I is_closed_on Initialize s & I is_halting_on Initialize s holds
IExec (if>0 a,I,J),s = (IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3)))
let s be State of SCM+FSA ; :: thesis: ( s . a > 0 & I is_closed_on Initialize s & I is_halting_on Initialize s implies IExec (if>0 a,I,J),s = (IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3))) )
set I1 = I ';' (Stop SCM+FSA );
set s1 = s +* (Initialized (I ';' (Stop SCM+FSA )));
set s3 = s +* (Initialized (if>0 a,I,J));
set s4 = Computation (s +* (Initialized (if>0 a,I,J))),1;
set i = a >0_goto (insloc ((card J) + 3));
A1:
(I ';' (Stop SCM+FSA )) +* (Start-At (insloc 0 )) c= s +* (Initialized (I ';' (Stop SCM+FSA )))
by FUNCT_4:26, SCMFSA6B:8;
A2:
if>0 a,I,J = (((a >0_goto (insloc ((card J) + 3))) ';' J) ';' (Goto (insloc ((card I) + 1)))) ';' (I ';' (Stop SCM+FSA ))
by SCMFSA6A:67;
A3:
insloc 0 in dom (if>0 a,I,J)
by Lm2;
if>0 a,I,J c= Initialized (if>0 a,I,J)
by SCMFSA6A:26;
then
dom (if>0 a,I,J) c= dom (Initialized (if>0 a,I,J))
by GRFUNC_1:8;
then A4: (s +* (Initialized (if>0 a,I,J))) . (insloc 0 ) =
(Initialized (if>0 a,I,J)) . (insloc 0 )
by A3, FUNCT_4:14
.=
(if>0 a,I,J) . (insloc 0 )
by A3, SCMFSA6A:50
.=
a >0_goto (insloc ((card J) + 3))
by Lm3
;
IC SCM+FSA in dom (Initialized (if>0 a,I,J))
by SCMFSA6A:24;
then A5: IC (s +* (Initialized (if>0 a,I,J))) =
(Initialized (if>0 a,I,J)) . (IC SCM+FSA )
by FUNCT_4:14
.=
insloc 0
by SCMFSA6A:46
;
A6: Computation (s +* (Initialized (if>0 a,I,J))),(0 + 1) =
Following (Computation (s +* (Initialized (if>0 a,I,J))),0 )
by AMI_1:14
.=
Following (s +* (Initialized (if>0 a,I,J)))
by AMI_1:13
.=
Exec (a >0_goto (insloc ((card J) + 3))),(s +* (Initialized (if>0 a,I,J)))
by A5, A4
;
A7:
if>0 a,I,J c= Initialized (if>0 a,I,J)
by SCMFSA6A:26;
Initialized (if>0 a,I,J) c= s +* (Initialized (if>0 a,I,J))
by FUNCT_4:26;
then A8:
if>0 a,I,J c= s +* (Initialized (if>0 a,I,J))
by A7, XBOOLE_1:1;
A9:
not a in dom (Initialized (if>0 a,I,J))
by SCMFSA6A:48;
A10:
dom (s | NAT ) = NAT
by SCMFSA8A:3;
assume
s . a > 0
; :: thesis: ( not I is_closed_on Initialize s or not I is_halting_on Initialize s or IExec (if>0 a,I,J),s = (IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3))) )
then
(s +* (Initialized (if>0 a,I,J))) . a > 0
by A9, FUNCT_4:12;
then A11:
IC (Computation (s +* (Initialized (if>0 a,I,J))),1) = insloc ((card J) + 3)
by A6, SCMFSA_2:97;
A12:
DataPart (s +* (Initialized (I ';' (Stop SCM+FSA )))) = DataPart (s +* (Initialized (if>0 a,I,J)))
by SCMFSA6A:39, SCMFSA6A:53;
A13:
now let f be
FinSeq-Location ;
:: thesis: (s +* (Initialized (I ';' (Stop SCM+FSA )))) . f = (Computation (s +* (Initialized (if>0 a,I,J))),1) . fthus (s +* (Initialized (I ';' (Stop SCM+FSA )))) . f =
(s +* (Initialized (if>0 a,I,J))) . f
by A12, SCMFSA6A:38
.=
(Computation (s +* (Initialized (if>0 a,I,J))),1) . f
by A6, SCMFSA_2:97
;
:: thesis: verum end;
now let a be
Int-Location ;
:: thesis: (s +* (Initialized (I ';' (Stop SCM+FSA )))) . a = (Computation (s +* (Initialized (if>0 a,I,J))),1) . athus (s +* (Initialized (I ';' (Stop SCM+FSA )))) . a =
(s +* (Initialized (if>0 a,I,J))) . a
by A12, SCMFSA6A:38
.=
(Computation (s +* (Initialized (if>0 a,I,J))),1) . a
by A6, SCMFSA_2:97
;
:: thesis: verum end;
then A14:
DataPart (s +* (Initialized (I ';' (Stop SCM+FSA )))) = DataPart (Computation (s +* (Initialized (if>0 a,I,J))),1)
by A13, SCMFSA6A:38;
card (((a >0_goto (insloc ((card J) + 3))) ';' J) ';' (Goto (insloc ((card I) + 1)))) =
card (((Macro (a >0_goto (insloc ((card J) + 3)))) ';' J) ';' (Goto (insloc ((card I) + 1))))
by SCMFSA6A:def 6
.=
(card ((Macro (a >0_goto (insloc ((card J) + 3)))) ';' J)) + (card (Goto (insloc ((card I) + 1))))
by SCMFSA6A:61
.=
(card ((Macro (a >0_goto (insloc ((card J) + 3)))) ';' J)) + 1
by SCMFSA8A:29
.=
((card (Macro (a >0_goto (insloc ((card J) + 3))))) + (card J)) + 1
by SCMFSA6A:61
.=
((card J) + 2) + 1
by SCMFSA7B:6
.=
(card J) + (2 + 1)
;
then
ProgramPart (Relocated (I ';' (Stop SCM+FSA )),((card J) + 3)) c= if>0 a,I,J
by A2, Lm1;
then
ProgramPart (Relocated (I ';' (Stop SCM+FSA )),((card J) + 3)) c= s +* (Initialized (if>0 a,I,J))
by A8, XBOOLE_1:1;
then
ProgramPart [(ProgramPart (Relocated (I ';' (Stop SCM+FSA )),((card J) + 3)))] c= Computation (s +* (Initialized (if>0 a,I,J))),1
by AMI_1:99;
then A15:
ProgramPart (Relocated (I ';' (Stop SCM+FSA )),((card J) + 3)) c= Computation (s +* (Initialized (if>0 a,I,J))),1
by AMI_1:105;
assume A16:
I is_closed_on Initialize s
; :: thesis: ( not I is_halting_on Initialize s or IExec (if>0 a,I,J),s = (IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3))) )
assume A17:
I is_halting_on Initialize s
; :: thesis: IExec (if>0 a,I,J),s = (IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3)))
then A18:
s +* (Initialized (I ';' (Stop SCM+FSA ))) is halting
by A16, SCMFSA8A:55;
I ';' (Stop SCM+FSA ) is_closed_on Initialize s
by A16, A17, SCMFSA8A:46;
then A19:
I ';' (Stop SCM+FSA ) is_closed_on s +* (Initialized (I ';' (Stop SCM+FSA )))
by Th9;
A20: CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),((LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1)) =
CurInstr (Computation (Computation (s +* (Initialized (if>0 a,I,J))),1),(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))))
by AMI_1:51
.=
IncAddr (CurInstr (Computation (s +* (Initialized (I ';' (Stop SCM+FSA )))),(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))))),((card J) + 3)
by A1, A19, A15, A11, A14, Th11
.=
IncAddr (halt SCM+FSA ),((card J) + 3)
by A18, AMI_1:def 46
.=
halt SCM+FSA
by SCMFSA_4:8
;
then A21:
s +* (Initialized (if>0 a,I,J)) is halting
by AMI_1:def 20;
now let l be
Element of
NAT ;
:: thesis: ( l < (LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1 implies CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),b1) <> halt SCM+FSA )assume A22:
l < (LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1
;
:: thesis: CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),b1) <> halt SCM+FSA per cases
( l = 0 or l <> 0 )
;
suppose
l = 0
;
:: thesis: CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),b1) <> halt SCM+FSA then
CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),l) = CurInstr (s +* (Initialized (if>0 a,I,J)))
by AMI_1:13;
hence
CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),l) <> halt SCM+FSA
by A5, A4, SCMFSA_2:49, SCMFSA_2:124;
:: thesis: verum end; suppose
l <> 0
;
:: thesis: not CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),b1) = halt SCM+FSA then consider n being
Nat such that A23:
l = n + 1
by NAT_1:6;
assume A24:
CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),l) = halt SCM+FSA
;
:: thesis: contradictionreconsider n =
n as
Element of
NAT by ORDINAL1:def 13;
InsCode (CurInstr (Computation (s +* (Initialized (I ';' (Stop SCM+FSA )))),n)) =
InsCode (IncAddr (CurInstr (Computation (s +* (Initialized (I ';' (Stop SCM+FSA )))),n)),((card J) + 3))
by SCMFSA_4:22
.=
InsCode (CurInstr (Computation (Computation (s +* (Initialized (if>0 a,I,J))),1),n))
by A1, A19, A15, A11, A14, Th11
.=
0
by A23, A24, AMI_1:51, SCMFSA_2:124
;
then A25:
CurInstr (Computation (s +* (Initialized (I ';' (Stop SCM+FSA )))),n) = halt SCM+FSA
by SCMFSA_2:122;
n < LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))
by A22, A23, XREAL_1:8;
hence
contradiction
by A18, A25, AMI_1:def 46;
:: thesis: verum end; end; end;
then
for l being Element of NAT st CurInstr (Computation (s +* (Initialized (if>0 a,I,J))),l) = halt SCM+FSA holds
(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1 <= l
;
then A26:
LifeSpan (s +* (Initialized (if>0 a,I,J))) = (LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1
by A20, A21, AMI_1:def 46;
A27: DataPart (Result (s +* (Initialized (I ';' (Stop SCM+FSA ))))) =
DataPart (Computation (s +* (Initialized (I ';' (Stop SCM+FSA )))),(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))))
by A16, A17, AMI_1:122, SCMFSA8A:55
.=
DataPart (Computation (Computation (s +* (Initialized (if>0 a,I,J))),1),(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))))
by A1, A19, A15, A11, A14, Th11
.=
DataPart (Computation (s +* (Initialized (if>0 a,I,J))),((LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1))
by AMI_1:51
.=
DataPart (Result (s +* (Initialized (if>0 a,I,J))))
by A21, A26, AMI_1:122
;
A28:
now let x be
set ;
:: thesis: ( x in dom (IExec (if>0 a,I,J),s) implies (IExec (if>0 a,I,J),s) . b1 = ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . b1 )A30:
dom (Start-At (insloc (((card I) + (card J)) + 3))) = {(IC SCM+FSA )}
by FUNCOP_1:19;
A31:
IExec (if>0 a,I,J),
s = (Result (s +* (Initialized (if>0 a,I,J)))) +* (s | NAT )
by SCMFSA6B:def 1;
A32:
IExec (I ';' (Stop SCM+FSA )),
s = (Result (s +* (Initialized (I ';' (Stop SCM+FSA ))))) +* (s | NAT )
by SCMFSA6B:def 1;
assume A33:
x in dom (IExec (if>0 a,I,J),s)
;
:: thesis: (IExec (if>0 a,I,J),s) . b1 = ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . b1per cases
( x is Int-Location or x is FinSeq-Location or x = IC SCM+FSA or x is Instruction-Location of SCM+FSA )
by A33, SCMFSA6A:35;
suppose A34:
x is
Int-Location
;
:: thesis: (IExec (if>0 a,I,J),s) . b1 = ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . b1then
x <> IC SCM+FSA
by SCMFSA_2:81;
then A35:
not
x in dom (Start-At (insloc (((card I) + (card J)) + 3)))
by A30, TARSKI:def 1;
thus (IExec (if>0 a,I,J),s) . x =
(Result (s +* (Initialized (if>0 a,I,J)))) . x
by A29, A31, A34, FUNCT_4:12, SCMFSA_2:84
.=
(Result (s +* (Initialized (I ';' (Stop SCM+FSA ))))) . x
by A27, A34, SCMFSA6A:38
.=
(IExec (I ';' (Stop SCM+FSA )),s) . x
by A29, A32, A34, FUNCT_4:12, SCMFSA_2:84
.=
((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . x
by A35, FUNCT_4:12
;
:: thesis: verum end; suppose A36:
x is
FinSeq-Location
;
:: thesis: (IExec (if>0 a,I,J),s) . b1 = ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . b1then
x <> IC SCM+FSA
by SCMFSA_2:82;
then A37:
not
x in dom (Start-At (insloc (((card I) + (card J)) + 3)))
by A30, TARSKI:def 1;
thus (IExec (if>0 a,I,J),s) . x =
(Result (s +* (Initialized (if>0 a,I,J)))) . x
by A29, A31, A36, FUNCT_4:12, SCMFSA_2:85
.=
(Result (s +* (Initialized (I ';' (Stop SCM+FSA ))))) . x
by A27, A36, SCMFSA6A:38
.=
(IExec (I ';' (Stop SCM+FSA )),s) . x
by A29, A32, A36, FUNCT_4:12, SCMFSA_2:85
.=
((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . x
by A37, FUNCT_4:12
;
:: thesis: verum end; suppose A38:
x = IC SCM+FSA
;
:: thesis: (IExec (if>0 a,I,J),s) . b1 = ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . b1then A39:
x in dom (Start-At (insloc (((card I) + (card J)) + 3)))
by A30, TARSKI:def 1;
A40:
IC (Result (s +* (Initialized (I ';' (Stop SCM+FSA ))))) =
(IExec (I ';' (Stop SCM+FSA )),s) . (IC SCM+FSA )
by A29, A32, A38, AMI_1:48, FUNCT_4:12
.=
IC ((IExec I,s) +* (Start-At (insloc (card I))))
by A16, A17, SCMFSA8A:57
.=
insloc (card I)
by AMI_1:111
;
thus (IExec (if>0 a,I,J),s) . x =
(Result (s +* (Initialized (if>0 a,I,J)))) . x
by A29, A31, A38, AMI_1:48, FUNCT_4:12
.=
(Computation (s +* (Initialized (if>0 a,I,J))),((LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))) + 1)) . x
by A21, A26, AMI_1:122
.=
IC (Computation (Computation (s +* (Initialized (if>0 a,I,J))),1),(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))))
by A38, AMI_1:51
.=
(IC (Computation (s +* (Initialized (I ';' (Stop SCM+FSA )))),(LifeSpan (s +* (Initialized (I ';' (Stop SCM+FSA ))))))) + ((card J) + 3)
by A1, A19, A15, A11, A14, Th11
.=
(IC (Result (s +* (Initialized (I ';' (Stop SCM+FSA )))))) + ((card J) + 3)
by A16, A17, AMI_1:122, SCMFSA8A:55
.=
(Start-At ((insloc (card I)) + ((card J) + 3))) . (IC SCM+FSA )
by A40, FUNCOP_1:87
.=
((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . x
by A38, A39, FUNCT_4:14
;
:: thesis: verum end; suppose A41:
x is
Instruction-Location of
SCM+FSA
;
:: thesis: (IExec (if>0 a,I,J),s) . b1 = ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . b1then
x <> IC SCM+FSA
by AMI_1:48;
then A42:
not
x in dom (Start-At (insloc (((card I) + (card J)) + 3)))
by A30, TARSKI:def 1;
A43:
x in NAT
by A41, AMI_1:def 4;
hence (IExec (if>0 a,I,J),s) . x =
(s | NAT ) . x
by A10, A31, FUNCT_4:14
.=
(IExec (I ';' (Stop SCM+FSA )),s) . x
by A10, A32, A43, FUNCT_4:14
.=
((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))) . x
by A42, FUNCT_4:12
;
:: thesis: verum end; end; end;
dom (IExec (if>0 a,I,J),s) =
the carrier of SCM+FSA
by AMI_1:79
.=
dom ((IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3))))
by AMI_1:79
;
hence IExec (if>0 a,I,J),s =
(IExec (I ';' (Stop SCM+FSA )),s) +* (Start-At (insloc (((card I) + (card J)) + 3)))
by A28, FUNCT_1:9
.=
((IExec I,s) +* (Start-At (insloc (card I)))) +* (Start-At (insloc (((card I) + (card J)) + 3)))
by A16, A17, SCMFSA8A:57
.=
(IExec I,s) +* (Start-At (insloc (((card I) + (card J)) + 3)))
by AMI_1:141
;
:: thesis: verum