:: SCMFSA8C semantic presentation
begin
set SA0 = Start-At (0,SCM+FSA);
set Q = (intloc 0) .--> 1;
theorem Th1: :: SCMFSA8C:1
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_pseudo-closed_on s,P holds
for k being Element of NAT st ( for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
k < pseudo-LifeSpan (s,P,I)
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_pseudo-closed_on s,P holds
for k being Element of NAT st ( for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
k < pseudo-LifeSpan (s,P,I)
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_pseudo-closed_on s,P holds
for k being Element of NAT st ( for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
k < pseudo-LifeSpan (s,P,I)
let I be Program of SCM+FSA; ::_thesis: ( I is_pseudo-closed_on s,P implies for k being Element of NAT st ( for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
k < pseudo-LifeSpan (s,P,I) )
assume I is_pseudo-closed_on s,P ; ::_thesis: for k being Element of NAT st ( for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
k < pseudo-LifeSpan (s,P,I)
then IC (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,I)))) = card I by SCMFSA8A:def_4;
then A1: not IC (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,I)))) in dom I ;
let k be Element of NAT ; ::_thesis: ( ( for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) implies k < pseudo-LifeSpan (s,P,I) )
assume for n being Element of NAT st n <= k holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ; ::_thesis: k < pseudo-LifeSpan (s,P,I)
hence pseudo-LifeSpan (s,P,I) > k by A1; ::_thesis: verum
end;
theorem Th2: :: SCMFSA8C:2
for I, J being Program of SCM+FSA
for k being Element of NAT st card I <= k & k < (card I) + (card J) holds
for i being Instruction of SCM+FSA st i = J . (k -' (card I)) holds
(I ";" J) . k = IncAddr (i,(card I))
proof
let I, J be Program of SCM+FSA; ::_thesis: for k being Element of NAT st card I <= k & k < (card I) + (card J) holds
for i being Instruction of SCM+FSA st i = J . (k -' (card I)) holds
(I ";" J) . k = IncAddr (i,(card I))
let k be Element of NAT ; ::_thesis: ( card I <= k & k < (card I) + (card J) implies for i being Instruction of SCM+FSA st i = J . (k -' (card I)) holds
(I ";" J) . k = IncAddr (i,(card I)) )
assume A1: card I <= k ; ::_thesis: ( not k < (card I) + (card J) or for i being Instruction of SCM+FSA st i = J . (k -' (card I)) holds
(I ";" J) . k = IncAddr (i,(card I)) )
assume k < (card I) + (card J) ; ::_thesis: for i being Instruction of SCM+FSA st i = J . (k -' (card I)) holds
(I ";" J) . k = IncAddr (i,(card I))
then A2: k + 0 < (card J) + (card I) ;
k -' (card I) = k - (card I) by A1, XREAL_1:233;
then k -' (card I) < (card J) - 0 by A2, XREAL_1:21;
then A3: k -' (card I) in dom J by AFINSQ_1:66;
let i be Instruction of SCM+FSA; ::_thesis: ( i = J . (k -' (card I)) implies (I ";" J) . k = IncAddr (i,(card I)) )
assume A4: i = J . (k -' (card I)) ; ::_thesis: (I ";" J) . k = IncAddr (i,(card I))
A5: (k -' (card I)) + (card I) = (k - (card I)) + (card I) by A1, XREAL_1:233
.= k ;
then k in { (m + (card I)) where m is Element of NAT : m in dom J } by A3;
then k in dom (Reloc (J,(card I))) by COMPOS_1:33;
hence (I ";" J) . k = (Reloc (J,(card I))) . k by FUNCT_4:13
.= IncAddr (i,(card I)) by A4, A3, A5, COMPOS_1:35 ;
::_thesis: verum
end;
theorem :: SCMFSA8C:3
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA holds IExec (I,P,s) = IExec (I,P,(Initialized s)) ;
theorem :: SCMFSA8C:4
canceled;
theorem Th5: :: SCMFSA8C:5
for I being Program of SCM+FSA st ( for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA holds I is_halting_on Initialized s,P ) holds
Initialize ((intloc 0) .--> 1) is I -halted
proof
let I be Program of SCM+FSA; ::_thesis: ( ( for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA holds I is_halting_on Initialized s,P ) implies Initialize ((intloc 0) .--> 1) is I -halted )
assume A1: for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA holds I is_halting_on Initialized s,P ; ::_thesis: Initialize ((intloc 0) .--> 1) is I -halted
let s be State of SCM+FSA; :: according to EXTPRO_1:def_11 ::_thesis: ( not Initialize ((intloc 0) .--> 1) c= s or for b1 being set holds
( not I c= b1 or b1 halts_on s ) )
assume Initialize ((intloc 0) .--> 1) c= s ; ::_thesis: for b1 being set holds
( not I c= b1 or b1 halts_on s )
then Initialize ((intloc 0) .--> 1) c= s ;
then A2: s +* (Initialize ((intloc 0) .--> 1)) = s by FUNCT_4:98;
let P be Instruction-Sequence of SCM+FSA; ::_thesis: ( not I c= P or P halts_on s )
assume A3: I c= P ; ::_thesis: P halts_on s
A4: P +* I = P by A3, FUNCT_4:98;
I is_halting_on Initialized s,P by A1;
then P +* I halts_on Initialize (Initialized s) by SCMFSA7B:def_7;
hence P halts_on s by A2, A4, MEMSTR_0:44; ::_thesis: verum
end;
theorem Th6: :: SCMFSA8C:6
for I being Program of SCM+FSA st ( for s being State of SCM+FSA
for P being Instruction-Sequence of SCM+FSA holds I is_halting_on Initialized s,P ) holds
Initialize ((intloc 0) .--> 1) is I -halted by Th5;
theorem :: SCMFSA8C:7
canceled;
theorem :: SCMFSA8C:8
canceled;
theorem :: SCMFSA8C:9
canceled;
theorem :: SCMFSA8C:10
canceled;
theorem :: SCMFSA8C:11
canceled;
theorem Th12: :: SCMFSA8C:12
for s being State of SCM+FSA
for i being Instruction of SCM+FSA st InsCode i in {0,6,7,8} holds
DataPart (Exec (i,s)) = DataPart s
proof
let s be State of SCM+FSA; ::_thesis: for i being Instruction of SCM+FSA st InsCode i in {0,6,7,8} holds
DataPart (Exec (i,s)) = DataPart s
let i be Instruction of SCM+FSA; ::_thesis: ( InsCode i in {0,6,7,8} implies DataPart (Exec (i,s)) = DataPart s )
assume A1: InsCode i in {0,6,7,8} ; ::_thesis: DataPart (Exec (i,s)) = DataPart s
now__::_thesis:_for_a_being_Int-Location
for_f_being_FinSeq-Location_holds_
(_(Exec_(i,s))_._a_=_s_._a_&_(Exec_(i,s))_._f_=_s_._f_)
let a be Int-Location; ::_thesis: for f being FinSeq-Location holds
( (Exec (i,s)) . b2 = s . b2 & (Exec (i,s)) . b3 = s . b3 )
let f be FinSeq-Location ; ::_thesis: ( (Exec (i,s)) . b1 = s . b1 & (Exec (i,s)) . b2 = s . b2 )
percases ( InsCode i = 0 or InsCode i = 6 or InsCode i = 7 or InsCode i = 8 ) by A1, ENUMSET1:def_2;
suppose InsCode i = 0 ; ::_thesis: ( (Exec (i,s)) . b1 = s . b1 & (Exec (i,s)) . b2 = s . b2 )
then i = halt SCM+FSA by SCMFSA_2:95;
hence ( (Exec (i,s)) . a = s . a & (Exec (i,s)) . f = s . f ) by EXTPRO_1:def_3; ::_thesis: verum
end;
suppose InsCode i = 6 ; ::_thesis: ( (Exec (i,s)) . b1 = s . b1 & (Exec (i,s)) . b2 = s . b2 )
then ex lb being Element of NAT st i = goto lb by SCMFSA_2:35;
hence ( (Exec (i,s)) . a = s . a & (Exec (i,s)) . f = s . f ) by SCMFSA_2:69; ::_thesis: verum
end;
suppose InsCode i = 7 ; ::_thesis: ( (Exec (i,s)) . b1 = s . b1 & (Exec (i,s)) . b2 = s . b2 )
then ex lb being Element of NAT ex b being Int-Location st i = b =0_goto lb by SCMFSA_2:36;
hence ( (Exec (i,s)) . a = s . a & (Exec (i,s)) . f = s . f ) by SCMFSA_2:70; ::_thesis: verum
end;
suppose InsCode i = 8 ; ::_thesis: ( (Exec (i,s)) . b1 = s . b1 & (Exec (i,s)) . b2 = s . b2 )
then ex lb being Element of NAT ex b being Int-Location st i = b >0_goto lb by SCMFSA_2:37;
hence ( (Exec (i,s)) . a = s . a & (Exec (i,s)) . f = s . f ) by SCMFSA_2:71; ::_thesis: verum
end;
end;
end;
hence DataPart (Exec (i,s)) = DataPart s by SCMFSA_M:2; ::_thesis: verum
end;
theorem :: SCMFSA8C:13
canceled;
theorem Th14: :: SCMFSA8C:14
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA holds IExec ((Stop SCM+FSA),P,s) = Initialized s
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA holds IExec ((Stop SCM+FSA),P,s) = Initialized s
let s be State of SCM+FSA; ::_thesis: IExec ((Stop SCM+FSA),P,s) = Initialized s
set D = Data-Locations ;
set s1 = Initialize (Initialized s);
set P1 = P +* (Stop SCM+FSA);
A1: Stop SCM+FSA c= P +* (Stop SCM+FSA) by FUNCT_4:25;
A2: Initialize (Initialized s) = Comput ((P +* (Stop SCM+FSA)),(Initialize (Initialized s)),0) ;
A3: (P +* (Stop SCM+FSA)) /. (IC (Initialize (Initialized s))) = (P +* (Stop SCM+FSA)) . (IC (Initialize (Initialized s))) by PBOOLE:143;
A4: (Stop SCM+FSA) . 0 = halt SCM+FSA by AFINSQ_1:34;
A5: 0 in dom (Stop SCM+FSA) by COMPOS_1:3;
A6: s +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized s) by MEMSTR_0:44;
A7: CurInstr ((P +* (Stop SCM+FSA)),(Initialize (Initialized s))) = (P +* (Stop SCM+FSA)) . 0 by A3, MEMSTR_0:28
.= (Stop SCM+FSA) . 0 by A5, A1, GRFUNC_1:2 ;
then P +* (Stop SCM+FSA) halts_on Initialize (Initialized s) by A2, A4, EXTPRO_1:29;
then A8: IExec ((Stop SCM+FSA),P,s) = Initialize (Initialized s) by A6, A7, A2, A4, EXTPRO_1:def_9;
then A9: DataPart (IExec ((Stop SCM+FSA),P,s)) = DataPart (Initialize (Initialized s))
.= DataPart (Initialized s) by MEMSTR_0:79 ;
hereby ::_thesis: verum
A10: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((Stop_SCM+FSA),P,s))_holds_
(IExec_((Stop_SCM+FSA),P,s))_._x_=_(Initialized_s)_._x
let x be set ; ::_thesis: ( x in dom (IExec ((Stop SCM+FSA),P,s)) implies (IExec ((Stop SCM+FSA),P,s)) . b1 = (Initialized s) . b1 )
assume A11: x in dom (IExec ((Stop SCM+FSA),P,s)) ; ::_thesis: (IExec ((Stop SCM+FSA),P,s)) . b1 = (Initialized s) . b1
percases ( x is Int-Location or x is FinSeq-Location or x = IC ) by A11, SCMFSA_M:1;
supposeA12: x is Int-Location ; ::_thesis: (IExec ((Stop SCM+FSA),P,s)) . b1 = (Initialized s) . b1
(IExec ((Stop SCM+FSA),P,s)) . x = (Initialized s) . x by A9, A12, SCMFSA_M:2;
hence (IExec ((Stop SCM+FSA),P,s)) . x = (Initialized s) . x ; ::_thesis: verum
end;
supposeA13: x is FinSeq-Location ; ::_thesis: (IExec ((Stop SCM+FSA),P,s)) . b1 = (Initialized s) . b1
(IExec ((Stop SCM+FSA),P,s)) . x = (Initialized s) . x by A9, A13, SCMFSA_M:2;
hence (IExec ((Stop SCM+FSA),P,s)) . x = (Initialized s) . x ; ::_thesis: verum
end;
supposeA14: x = IC ; ::_thesis: (IExec ((Stop SCM+FSA),P,s)) . b1 = (Initialized s) . b1
then x in {(IC )} by TARSKI:def_1;
then A15: x in dom (Start-At (0,SCM+FSA)) by FUNCOP_1:13;
thus (IExec ((Stop SCM+FSA),P,s)) . x = (Initialize (Initialized s)) . (IC ) by A8, A14
.= (Start-At (0,SCM+FSA)) . (IC ) by A14, A15, FUNCT_4:13
.= ((s +* ((intloc 0) .--> 1)) +* (Start-At (0,SCM+FSA))) . x by A14, A15, FUNCT_4:13
.= (s +* (Initialize ((intloc 0) .--> 1))) . x by FUNCT_4:14
.= (Initialized s) . x ; ::_thesis: verum
end;
end;
end;
dom (IExec ((Stop SCM+FSA),P,s)) = the carrier of SCM+FSA by PARTFUN1:def_2
.= dom (Initialized s) by PARTFUN1:def_2 ;
hence IExec ((Stop SCM+FSA),P,s) = Initialized s by A10, FUNCT_1:2; ::_thesis: verum
end;
end;
theorem Th15: :: SCMFSA8C:15
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P holds
0 in dom I
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P holds
0 in dom I
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s,P holds
0 in dom I
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s,P implies 0 in dom I )
reconsider n = IC (Comput ((P +* I),(Initialize s),0)) as Element of NAT ;
assume A1: I is_closed_on s,P ; ::_thesis: 0 in dom I
then A2: n in dom I by SCMFSA7B:def_6;
percases ( n = 0 or 0 < n ) ;
suppose n = 0 ; ::_thesis: 0 in dom I
hence 0 in dom I by A1, SCMFSA7B:def_6; ::_thesis: verum
end;
suppose 0 < n ; ::_thesis: 0 in dom I
hence 0 in dom I by A2, AFINSQ_1:def_12; ::_thesis: verum
end;
end;
end;
theorem Th16: :: SCMFSA8C:16
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1 being 0 -started State of SCM+FSA
for s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1 being 0 -started State of SCM+FSA
for s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
let s1 be 0 -started State of SCM+FSA; ::_thesis: for s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
let s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
let J be Program of SCM+FSA; ::_thesis: ( J is_closed_on s1,P1 & J c= P1 implies for n being Element of NAT st Reloc (J,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) )
set JAt = Start-At (0,SCM+FSA);
assume A1: J is_closed_on s1,P1 ; ::_thesis: ( not J c= P1 or for n being Element of NAT st Reloc (J,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) )
then A2: 0 in dom J by Th15;
A3: Start-At (0,SCM+FSA) c= s1 by MEMSTR_0:29;
assume A4: J c= P1 ; ::_thesis: for n being Element of NAT st Reloc (J,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
Start-At (0,SCM+FSA) c= s1 by A3;
then A5: Initialize s1 = s1 by FUNCT_4:98;
A6: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A7: P1 . (IC s1) = P1 . 0 by A5, MEMSTR_0:16
.= J . 0 by A2, A4, GRFUNC_1:2 ;
A8: P1 = P1 +* J by A4, FUNCT_4:98;
A9: IC (Comput (P1,s1,0)) = IC s1
.= IC (Start-At (0,SCM+FSA)) by A3, A6, GRFUNC_1:2
.= 0 by FUNCOP_1:72 ;
A10: 0 in dom J by A1, Th15;
let n be Element of NAT ; ::_thesis: ( Reloc (J,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 implies for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) )
defpred S1[ Nat] means ( (IC (Comput (P1,s1,$1))) + n = IC (Comput (P2,s2,$1)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,$1)))),n) = CurInstr (P2,(Comput (P2,s2,$1))) & DataPart (Comput (P1,s1,$1)) = DataPart (Comput (P2,s2,$1)) );
assume that
A11: Reloc (J,n) c= P2 and
A12: IC s2 = n and
A13: DataPart s1 = DataPart s2 ; ::_thesis: for i being Element of NAT holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
let i be Element of NAT ; ::_thesis: ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
A14: DataPart (Comput (P1,s1,0)) = DataPart s2 by A13
.= DataPart (Comput (P2,s2,0)) ;
A15: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
A16: Comput (P1,s1,(k + 1)) = Following (P1,(Comput (P1,s1,k))) by EXTPRO_1:3;
reconsider l = IC (Comput (P1,s1,(k + 1))) as Element of NAT ;
reconsider j = CurInstr (P1,(Comput (P1,s1,(k + 1)))) as Instruction of SCM+FSA ;
A17: Comput (P2,s2,(k + 1)) = Following (P2,(Comput (P2,s2,k))) by EXTPRO_1:3;
A18: Initialize s1 = s1 by A3, FUNCT_4:98;
then A19: IC (Comput (P1,s1,(k + 1))) in dom J by A1, A8, SCMFSA7B:def_6;
assume A20: S1[k] ; ::_thesis: S1[k + 1]
hence A21: (IC (Comput (P1,s1,(k + 1)))) + n = IC (Comput (P2,s2,(k + 1))) by A16, A17, SCMFSA6A:8; ::_thesis: ( IncAddr ((CurInstr (P1,(Comput (P1,s1,(k + 1))))),n) = CurInstr (P2,(Comput (P2,s2,(k + 1)))) & DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) )
then A22: IC (Comput (P2,s2,(k + 1))) in dom (Reloc (J,n)) by A19, COMPOS_1:46;
A23: l in dom J by A18, A1, A8, SCMFSA7B:def_6;
j = P1 . (IC (Comput (P1,s1,(k + 1)))) by PBOOLE:143
.= J . l by A19, A4, GRFUNC_1:2 ;
hence IncAddr ((CurInstr (P1,(Comput (P1,s1,(k + 1))))),n) = (Reloc (J,n)) . (l + n) by A23, COMPOS_1:35
.= P2 . (IC (Comput (P2,s2,(k + 1)))) by A11, A21, A22, GRFUNC_1:2
.= CurInstr (P2,(Comput (P2,s2,(k + 1)))) by PBOOLE:143 ;
::_thesis: DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1)))
thus DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) by A20, A16, A17, SCMFSA6A:8; ::_thesis: verum
end;
0 in dom J by A1, Th15;
then A24: 0 + n in dom (Reloc (J,n)) by COMPOS_1:46;
A25: P1 /. (IC s1) = P1 . (IC s1) by PBOOLE:143;
A26: P2 /. (IC s2) = P2 . (IC s2) by PBOOLE:143;
IncAddr ((CurInstr (P1,(Comput (P1,s1,0)))),n) = (Reloc (J,n)) . (0 + n) by A10, A25, A7, COMPOS_1:35
.= CurInstr (P2,(Comput (P2,s2,0))) by A11, A12, A24, A26, GRFUNC_1:2 ;
then A27: S1[ 0 ] by A12, A9, A14;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A27, A15);
hence ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ; ::_thesis: verum
end;
theorem Th17: :: SCMFSA8C:17
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being 0 -started State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 & I c= P2 & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being 0 -started State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 & I c= P2 & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
let s1, s2 be 0 -started State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s1,P1 & I c= P1 & I c= P2 & DataPart s1 = DataPart s2 holds
for i being Element of NAT holds
( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
let J be Program of SCM+FSA; ::_thesis: ( J is_closed_on s1,P1 & J c= P1 & J c= P2 & DataPart s1 = DataPart s2 implies for i being Element of NAT holds
( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) )
assume that
A1: J is_closed_on s1,P1 and
A2: J c= P1 and
A3: J c= P2 and
A4: DataPart s1 = DataPart s2 ; ::_thesis: for i being Element of NAT holds
( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
A5: Start-At (0,SCM+FSA) c= s2 by MEMSTR_0:29;
A6: Reloc (J,0) = J ;
let i be Element of NAT ; ::_thesis: ( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
A7: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A8: (IC (Comput (P1,s1,i))) + 0 = IC (Comput (P1,s1,i)) ;
A9: IC s2 = IC (Initialize s2) by A5, FUNCT_4:98
.= IC (Start-At (0,SCM+FSA)) by A7, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),0) = CurInstr (P1,(Comput (P1,s1,i))) by COMPOS_0:3;
hence ( IC (Comput (P1,s1,i)) = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) by A1, A4, A8, A9, Th16, A2, A3, A6; ::_thesis: verum
end;
theorem Th18: :: SCMFSA8C:18
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being 0 -started State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & DataPart s1 = DataPart s2 holds
LifeSpan (P1,s1) = LifeSpan (P2,s2)
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being 0 -started State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & DataPart s1 = DataPart s2 holds
LifeSpan (P1,s1) = LifeSpan (P2,s2)
let s1, s2 be 0 -started State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & DataPart s1 = DataPart s2 holds
LifeSpan (P1,s1) = LifeSpan (P2,s2)
let J be Program of SCM+FSA; ::_thesis: ( J is_closed_on s1,P1 & J is_halting_on s1,P1 & J c= P1 & J c= P2 & DataPart s1 = DataPart s2 implies LifeSpan (P1,s1) = LifeSpan (P2,s2) )
assume that
A1: J is_closed_on s1,P1 and
A2: J is_halting_on s1,P1 and
A3: J c= P1 and
A4: J c= P2 and
A5: DataPart s1 = DataPart s2 ; ::_thesis: LifeSpan (P1,s1) = LifeSpan (P2,s2)
A6: P1 = P1 +* J by A3, FUNCT_4:98;
s1 = Initialize s1 by MEMSTR_0:44;
then A7: P1 halts_on s1 by A2, A6, SCMFSA7B:def_7;
A8: now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_(P2,(Comput_(P2,s2,k)))_=_halt_SCM+FSA_holds_
LifeSpan_(P1,s1)_<=_k
let k be Element of NAT ; ::_thesis: ( CurInstr (P2,(Comput (P2,s2,k))) = halt SCM+FSA implies LifeSpan (P1,s1) <= k )
assume CurInstr (P2,(Comput (P2,s2,k))) = halt SCM+FSA ; ::_thesis: LifeSpan (P1,s1) <= k
then CurInstr (P1,(Comput (P1,s1,k))) = halt SCM+FSA by A1, A5, Th17, A3, A4;
hence LifeSpan (P1,s1) <= k by A7, EXTPRO_1:def_15; ::_thesis: verum
end;
CurInstr (P1,(Comput (P1,s1,(LifeSpan (P1,s1))))) = halt SCM+FSA by A7, EXTPRO_1:def_15;
then A9: CurInstr (P2,(Comput (P2,s2,(LifeSpan (P1,s1))))) = halt SCM+FSA by A1, A5, Th17, A3, A4;
then P2 halts_on s2 by EXTPRO_1:29;
hence LifeSpan (P1,s1) = LifeSpan (P2,s2) by A9, A8, EXTPRO_1:def_15; ::_thesis: verum
end;
theorem :: SCMFSA8C:19
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & ( for a being read-write Int-Location holds s1 . a = s2 . a ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) holds
DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & ( for a being read-write Int-Location holds s1 . a = s2 . a ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) holds
DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
let s1, s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & ( for a being read-write Int-Location holds s1 . a = s2 . a ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) holds
DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & ( for a being read-write Int-Location holds s1 . a = s2 . a ) & ( for f being FinSeq-Location holds s1 . f = s2 . f ) implies DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2)) )
set s11 = Initialized s1;
set P11 = P1 +* I;
set s21 = Initialized s2;
set P21 = P2 +* I;
assume s1 . (intloc 0) = 1 ; ::_thesis: ( not I is_closed_on s1,P1 or not I is_halting_on s1,P1 or ex a being read-write Int-Location st not s1 . a = s2 . a or ex f being FinSeq-Location st not s1 . f = s2 . f or DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2)) )
then A1: Initialized s1 = Initialize s1 by SCMFSA_M:18;
then A2: DataPart (Initialized s1) = DataPart s1 by MEMSTR_0:79;
assume that
A3: I is_closed_on s1,P1 and
A4: I is_halting_on s1,P1 ; ::_thesis: ( ex a being read-write Int-Location st not s1 . a = s2 . a or ex f being FinSeq-Location st not s1 . f = s2 . f or DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2)) )
A5: I is_closed_on Initialized s1,P1 +* I by A3, A4, A2, SCMFSA8B:5;
assume A6: for a being read-write Int-Location holds s1 . a = s2 . a ; ::_thesis: ( ex f being FinSeq-Location st not s1 . f = s2 . f or DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2)) )
A7: now__::_thesis:_for_a_being_read-write_Int-Location_holds_(Initialized_s1)_._a_=_(Initialized_s2)_._a
let a be read-write Int-Location; ::_thesis: (Initialized s1) . a = (Initialized s2) . a
( a <> intloc 0 & a <> IC ) by SCMFSA_2:56;
then A8: not a in dom (Initialize ((intloc 0) .--> 1)) by SCMFSA_M:11, TARSKI:def_2;
hence (Initialized s1) . a = s1 . a by FUNCT_4:11
.= s2 . a by A6
.= (Initialized s2) . a by A8, FUNCT_4:11 ;
::_thesis: verum
end;
assume A9: for f being FinSeq-Location holds s1 . f = s2 . f ; ::_thesis: DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
A10: now__::_thesis:_for_f_being_FinSeq-Location_holds_(Initialized_s1)_._f_=_(Initialized_s2)_._f
let f be FinSeq-Location ; ::_thesis: (Initialized s1) . f = (Initialized s2) . f
( f <> intloc 0 & f <> IC ) by SCMFSA_2:57, SCMFSA_2:58;
then A11: not f in dom (Initialize ((intloc 0) .--> 1)) by SCMFSA_M:11, TARSKI:def_2;
hence (Initialized s1) . f = s1 . f by FUNCT_4:11
.= s2 . f by A9
.= (Initialized s2) . f by A11, FUNCT_4:11 ;
::_thesis: verum
end;
A12: intloc 0 in dom (Initialize ((intloc 0) .--> 1)) by SCMFSA_M:10;
then (Initialized s1) . (intloc 0) = (Initialize ((intloc 0) .--> 1)) . (intloc 0) by FUNCT_4:13
.= (Initialized s2) . (intloc 0) by A12, FUNCT_4:13 ;
then A13: DataPart (Initialized s1) = DataPart (Initialized s2) by A7, A10, SCMFSA_M:20;
A14: I c= P2 +* I by FUNCT_4:25;
A15: I c= P1 +* I by FUNCT_4:25;
A16: P1 +* I halts_on Initialized s1 by A4, A1, SCMFSA7B:def_7;
then CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialized s1),(LifeSpan ((P1 +* I),(Initialized s1)))))) = halt SCM+FSA by EXTPRO_1:def_15;
then CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialized s2),(LifeSpan ((P1 +* I),(Initialized s1)))))) = halt SCM+FSA by A5, A13, Th17, A15, A14;
then A17: P2 +* I halts_on Initialized s2 by EXTPRO_1:29;
I is_halting_on Initialized s1,P1 +* I by A3, A4, A2, SCMFSA8B:5;
then A18: LifeSpan ((P1 +* I),(Initialized s1)) = LifeSpan ((P2 +* I),(Initialized s2)) by A5, A13, Th18, A15, A14;
thus DataPart (IExec (I,P1,s1)) = DataPart (Result ((P1 +* I),(Initialized s1)))
.= DataPart (Comput ((P1 +* I),(Initialized s1),(LifeSpan ((P1 +* I),(Initialized s1))))) by A16, EXTPRO_1:23
.= DataPart (Comput ((P2 +* I),(Initialized s2),(LifeSpan ((P1 +* I),(Initialized s1))))) by A5, A13, Th17, A15, A14
.= DataPart (Result ((P2 +* I),(Initialized s2))) by A18, A17, EXTPRO_1:23
.= DataPart (IExec (I,P2,s2)) ; ::_thesis: verum
end;
theorem Th20: :: SCMFSA8C:20
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
let s1, s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( s1 . (intloc 0) = 1 & I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 implies DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2)) )
set s11 = Initialized s1;
set P11 = P1 +* I;
set s21 = Initialized s2;
set P21 = P2 +* I;
A1: I c= P1 +* I by FUNCT_4:25;
A2: I c= P2 +* I by FUNCT_4:25;
assume that
A3: s1 . (intloc 0) = 1 and
A4: I is_closed_on s1,P1 and
A5: I is_halting_on s1,P1 and
A6: DataPart s1 = DataPart s2 ; ::_thesis: DataPart (IExec (I,P1,s1)) = DataPart (IExec (I,P2,s2))
A7: Initialized s1 = Initialize s1 by A3, SCMFSA_M:18;
then A8: DataPart (Initialized s1) = DataPart s1 by MEMSTR_0:79;
then A9: I is_closed_on Initialized s1,P1 +* I by A4, A5, SCMFSA8B:5;
s2 . (intloc 0) = 1 by A3, A6, SCMFSA_M:2;
then Initialized s2 = Initialize s2 by SCMFSA_M:18;
then A10: DataPart (Initialized s1) = DataPart (Initialized s2) by A6, A8, MEMSTR_0:79;
A11: P1 +* I halts_on Initialized s1 by A5, A7, SCMFSA7B:def_7;
then CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialized s1),(LifeSpan ((P1 +* I),(Initialized s1)))))) = halt SCM+FSA by EXTPRO_1:def_15;
then CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialized s2),(LifeSpan ((P1 +* I),(Initialized s1)))))) = halt SCM+FSA by A9, A10, Th17, A1, A2;
then A12: P2 +* I halts_on Initialized s2 by EXTPRO_1:29;
I is_halting_on Initialized s1,P1 +* I by A4, A5, A8, SCMFSA8B:5;
then A13: LifeSpan ((P1 +* I),(Initialized s1)) = LifeSpan ((P2 +* I),(Initialized s2)) by A9, A10, Th18, A1, A2;
thus DataPart (IExec (I,P1,s1)) = DataPart (Result ((P1 +* I),(Initialized s1)))
.= DataPart (Comput ((P1 +* I),(Initialized s1),(LifeSpan ((P1 +* I),(Initialized s1))))) by A11, EXTPRO_1:23
.= DataPart (Comput ((P2 +* I),(Initialized s2),(LifeSpan ((P1 +* I),(Initialized s1))))) by A9, A10, Th17, A1, A2
.= DataPart (Result ((P2 +* I),(Initialized s2))) by A13, A12, EXTPRO_1:23
.= DataPart (IExec (I,P2,s2)) ; ::_thesis: verum
end;
theorem Th21: :: SCMFSA8C:21
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_pseudo-closed_on s,P holds
( I is_pseudo-closed_on Initialize s,P +* I & pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_pseudo-closed_on s,P holds
( I is_pseudo-closed_on Initialize s,P +* I & pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I) )
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_pseudo-closed_on s,P holds
( I is_pseudo-closed_on Initialize s,P +* I & pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I) )
let I be Program of SCM+FSA; ::_thesis: ( I is_pseudo-closed_on s,P implies ( I is_pseudo-closed_on Initialize s,P +* I & pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I) ) )
set s2 = Initialize (Initialize s);
set P2 = (P +* I) +* I;
assume A1: I is_pseudo-closed_on s,P ; ::_thesis: ( I is_pseudo-closed_on Initialize s,P +* I & pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I) )
then A2: for n being Element of NAT st not IC (Comput (((P +* I) +* I),(Initialize (Initialize s)),n)) in dom I holds
pseudo-LifeSpan (s,P,I) <= n by SCMFSA8A:def_4;
A3: for n being Element of NAT st n < pseudo-LifeSpan (s,P,I) holds
IC (Comput (((P +* I) +* I),(Initialize (Initialize s)),n)) in dom I by A1, SCMFSA8A:def_4;
IC (Comput (((P +* I) +* I),(Initialize (Initialize s)),(pseudo-LifeSpan (s,P,I)))) = card I by A1, SCMFSA8A:def_4;
hence A4: I is_pseudo-closed_on Initialize s,P +* I by A3, SCMFSA8A:def_2; ::_thesis: pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I)
IC (Comput (((P +* I) +* I),(Initialize (Initialize s)),(pseudo-LifeSpan (s,P,I)))) = card I by A1, SCMFSA8A:def_4;
hence pseudo-LifeSpan (s,P,I) = pseudo-LifeSpan ((Initialize s),(P +* I),I) by A2, A4, SCMFSA8A:def_4; ::_thesis: verum
end;
theorem Th22: :: SCMFSA8C:22
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1 being 0 -started State of SCM+FSA
for s2 being State of SCM+FSA
for I being Program of SCM+FSA st I c= P1 & I is_pseudo-closed_on s1,P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) )
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1 being 0 -started State of SCM+FSA
for s2 being State of SCM+FSA
for I being Program of SCM+FSA st I c= P1 & I is_pseudo-closed_on s1,P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) )
let s1 be 0 -started State of SCM+FSA; ::_thesis: for s2 being State of SCM+FSA
for I being Program of SCM+FSA st I c= P1 & I is_pseudo-closed_on s1,P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) )
let s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I c= P1 & I is_pseudo-closed_on s1,P1 holds
for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) )
let I be Program of SCM+FSA; ::_thesis: ( I c= P1 & I is_pseudo-closed_on s1,P1 implies for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) ) )
A1: Start-At (0,SCM+FSA) c= s1 by MEMSTR_0:29;
assume A2: I c= P1 ; ::_thesis: ( not I is_pseudo-closed_on s1,P1 or for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) ) )
then A3: P1 = P1 +* I by FUNCT_4:98;
assume A4: I is_pseudo-closed_on s1,P1 ; ::_thesis: for n being Element of NAT st Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds
( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) )
let n be Element of NAT ; ::_thesis: ( Reloc (I,n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 implies ( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) ) )
assume A5: Reloc (I,n) c= P2 ; ::_thesis: ( not IC s2 = n or not DataPart s1 = DataPart s2 or ( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) ) )
defpred S1[ Nat] means ( $1 <= pseudo-LifeSpan (s1,P1,I) implies ( (IC (Comput (P1,s1,$1))) + n = IC (Comput (P2,s2,$1)) & DataPart (Comput (P1,s1,$1)) = DataPart (Comput (P2,s2,$1)) ) );
assume A6: IC s2 = n ; ::_thesis: ( not DataPart s1 = DataPart s2 or ( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) ) )
assume A7: DataPart s1 = DataPart s2 ; ::_thesis: ( ( for i being Element of NAT st i < pseudo-LifeSpan (s1,P1,I) holds
IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) ) & ( for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) )
hereby ::_thesis: for i being Element of NAT st i <= pseudo-LifeSpan (s1,P1,I) holds
( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
defpred S2[ Nat] means ( $1 < pseudo-LifeSpan (s1,P1,I) implies ( (IC (Comput (P1,s1,$1))) + n = IC (Comput (P2,s2,$1)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,$1)))),n) = CurInstr (P2,(Comput (P2,s2,$1))) & DataPart (Comput (P1,s1,$1)) = DataPart (Comput (P2,s2,$1)) ) );
let i be Element of NAT ; ::_thesis: ( i < pseudo-LifeSpan (s1,P1,I) implies IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) )
assume A9: i < pseudo-LifeSpan (s1,P1,I) ; ::_thesis: IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i)))
A10: for k being Element of NAT st S2[k] holds
S2[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A11: S2[k] ; ::_thesis: S2[k + 1]
reconsider l = IC (Comput (P1,s1,(k + 1))) as Element of NAT ;
reconsider j = CurInstr (P1,(Comput (P1,s1,(k + 1)))) as Instruction of SCM+FSA ;
assume A12: k + 1 < pseudo-LifeSpan (s1,P1,I) ; ::_thesis: ( (IC (Comput (P1,s1,(k + 1)))) + n = IC (Comput (P2,s2,(k + 1))) & IncAddr ((CurInstr (P1,(Comput (P1,s1,(k + 1))))),n) = CurInstr (P2,(Comput (P2,s2,(k + 1)))) & DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) )
A13: Comput (P1,s1,(k + 1)) = Following (P1,(Comput (P1,s1,k))) by EXTPRO_1:3;
A14: Initialize s1 = s1 by A1, FUNCT_4:98;
then A15: IC (Comput (P1,s1,(k + 1))) in dom I by A4, A12, A3, SCMFSA8A:def_4;
A16: l in dom I by A14, A4, A12, A3, SCMFSA8A:def_4;
A17: Comput (P2,s2,(k + 1)) = Following (P2,(Comput (P2,s2,k))) by EXTPRO_1:3;
A18: k + 0 < k + 1 by XREAL_1:6;
hence A19: (IC (Comput (P1,s1,(k + 1)))) + n = IC (Comput (P2,s2,(k + 1))) by A11, A12, A13, A17, SCMFSA6A:8, XXREAL_0:2; ::_thesis: ( IncAddr ((CurInstr (P1,(Comput (P1,s1,(k + 1))))),n) = CurInstr (P2,(Comput (P2,s2,(k + 1)))) & DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) )
then A20: IC (Comput (P2,s2,(k + 1))) in dom (Reloc (I,n)) by A15, COMPOS_1:46;
j = P1 . (IC (Comput (P1,s1,(k + 1)))) by PBOOLE:143
.= I . l by A15, A2, GRFUNC_1:2 ;
hence IncAddr ((CurInstr (P1,(Comput (P1,s1,(k + 1))))),n) = (Reloc (I,n)) . (l + n) by A16, COMPOS_1:35
.= P2 . (IC (Comput (P2,s2,(k + 1)))) by A20, A19, A5, GRFUNC_1:2
.= CurInstr (P2,(Comput (P2,s2,(k + 1)))) by PBOOLE:143 ;
::_thesis: DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1)))
thus DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) by A11, A12, A18, A13, A17, SCMFSA6A:8, XXREAL_0:2; ::_thesis: verum
end;
A21: S2[ 0 ]
proof
A22: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A23: IC (Comput ((P1 +* I),(Initialize s1),0)) = IC (Initialize s1)
.= IC (Start-At (0,SCM+FSA)) by A22, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
assume 0 < pseudo-LifeSpan (s1,P1,I) ; ::_thesis: ( (IC (Comput (P1,s1,0))) + n = IC (Comput (P2,s2,0)) & IncAddr ((CurInstr (P1,(Comput (P1,s1,0)))),n) = CurInstr (P2,(Comput (P2,s2,0))) & DataPart (Comput (P1,s1,0)) = DataPart (Comput (P2,s2,0)) )
then A24: 0 in dom I by A4, A23, SCMFSA8A:def_4;
A25: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
IC (Comput (P1,s1,0)) = s1 . (IC )
.= IC (Start-At (0,SCM+FSA)) by A1, A25, GRFUNC_1:2
.= 0 by FUNCOP_1:72 ;
hence (IC (Comput (P1,s1,0))) + n = IC (Comput (P2,s2,0)) by A6; ::_thesis: ( IncAddr ((CurInstr (P1,(Comput (P1,s1,0)))),n) = CurInstr (P2,(Comput (P2,s2,0))) & DataPart (Comput (P1,s1,0)) = DataPart (Comput (P2,s2,0)) )
A26: 0 + n in dom (Reloc (I,n)) by A24, COMPOS_1:46;
A27: P1 . (IC s1) = P1 . (IC (Start-At (0,SCM+FSA))) by A1, A25, GRFUNC_1:2
.= P1 . 0 by FUNCOP_1:72
.= I . 0 by A24, A2, GRFUNC_1:2 ;
A28: P1 /. (IC s1) = P1 . (IC s1) by PBOOLE:143;
A29: P2 /. (IC s2) = P2 . (IC s2) by PBOOLE:143;
thus IncAddr ((CurInstr (P1,(Comput (P1,s1,0)))),n) = (Reloc (I,n)) . (0 + n) by A24, A28, A27, COMPOS_1:35
.= CurInstr (P2,(Comput (P2,s2,0))) by A6, A26, A29, A5, GRFUNC_1:2 ; ::_thesis: DataPart (Comput (P1,s1,0)) = DataPart (Comput (P2,s2,0))
thus DataPart (Comput (P1,s1,0)) = DataPart s2 by A7
.= DataPart (Comput (P2,s2,0)) ; ::_thesis: verum
end;
for k being Element of NAT holds S2[k] from NAT_1:sch_1(A21, A10);
hence IncAddr ((CurInstr (P1,(Comput (P1,s1,i)))),n) = CurInstr (P2,(Comput (P2,s2,i))) by A9; ::_thesis: verum
end;
A30: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A31: S1[k] ; ::_thesis: S1[k + 1]
set i = CurInstr (P1,(Comput (P1,s1,k)));
A32: Comput (P2,s2,(k + 1)) = Following (P2,(Comput (P2,s2,k))) by EXTPRO_1:3;
assume A33: k + 1 <= pseudo-LifeSpan (s1,P1,I) ; ::_thesis: ( (IC (Comput (P1,s1,(k + 1)))) + n = IC (Comput (P2,s2,(k + 1))) & DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) )
then A34: k + 1 <= (pseudo-LifeSpan (s1,P1,I)) + 1 by NAT_1:12;
A35: k < pseudo-LifeSpan (s1,P1,I) by A33, NAT_1:13;
A36: Comput (P1,s1,(k + 1)) = Following (P1,(Comput (P1,s1,k))) by EXTPRO_1:3;
hence (IC (Comput (P1,s1,(k + 1)))) + n = IC (Exec ((IncAddr ((CurInstr (P1,(Comput (P1,s1,k)))),n)),(Comput (P2,s2,k)))) by A31, A34, SCMFSA6A:8, XREAL_1:6
.= IC (Comput (P2,s2,(k + 1))) by A8, A35, A32 ;
::_thesis: DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1)))
thus DataPart (Comput (P1,s1,(k + 1))) = DataPart (Exec ((IncAddr ((CurInstr (P1,(Comput (P1,s1,k)))),n)),(Comput (P2,s2,k)))) by A31, A34, A36, SCMFSA6A:8, XREAL_1:6
.= DataPart (Comput (P2,s2,(k + 1))) by A8, A35, A32 ; ::_thesis: verum
end;
let i be Element of NAT ; ::_thesis: ( i <= pseudo-LifeSpan (s1,P1,I) implies ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) )
assume A37: i <= pseudo-LifeSpan (s1,P1,I) ; ::_thesis: ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
A38: S1[ 0 ]
proof
assume 0 <= pseudo-LifeSpan (s1,P1,I) ; ::_thesis: ( (IC (Comput (P1,s1,0))) + n = IC (Comput (P2,s2,0)) & DataPart (Comput (P1,s1,0)) = DataPart (Comput (P2,s2,0)) )
A39: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
IC (Comput (P1,s1,0)) = s1 . (IC )
.= IC (Start-At (0,SCM+FSA)) by A1, A39, GRFUNC_1:2
.= 0 by FUNCOP_1:72 ;
hence (IC (Comput (P1,s1,0))) + n = IC (Comput (P2,s2,0)) by A6; ::_thesis: DataPart (Comput (P1,s1,0)) = DataPart (Comput (P2,s2,0))
thus DataPart (Comput (P1,s1,0)) = DataPart s2 by A7
.= DataPart (Comput (P2,s2,0)) ; ::_thesis: verum
end;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A38, A30);
hence ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) by A37; ::_thesis: verum
end;
theorem Th23: :: SCMFSA8C:23
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st DataPart s1 = DataPart s2 & I is_pseudo-closed_on s1,P1 holds
I is_pseudo-closed_on s2,P2
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st DataPart s1 = DataPart s2 & I is_pseudo-closed_on s1,P1 holds
I is_pseudo-closed_on s2,P2
let s1, s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st DataPart s1 = DataPart s2 & I is_pseudo-closed_on s1,P1 holds
I is_pseudo-closed_on s2,P2
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( DataPart s1 = DataPart s2 & I is_pseudo-closed_on s1,P1 implies I is_pseudo-closed_on s2,P2 )
set S1 = Initialize s1;
set Q1 = P1 +* I;
set S2 = Initialize s2;
set Q2 = P2 +* I;
A1: I c= P1 +* I by FUNCT_4:25;
A2: Reloc (I,0) = I ;
A3: IC (Initialize s2) = IC (s2 +* (Start-At (0,SCM+FSA)))
.= 0 by FUNCT_4:113 ;
A4: I c= P2 +* I by FUNCT_4:25;
assume DataPart s1 = DataPart s2 ; ::_thesis: ( not I is_pseudo-closed_on s1,P1 or I is_pseudo-closed_on s2,P2 )
then A5: DataPart (Initialize s1) = DataPart s2 by MEMSTR_0:79
.= DataPart (Initialize s2) by MEMSTR_0:79 ;
assume A6: I is_pseudo-closed_on s1,P1 ; ::_thesis: I is_pseudo-closed_on s2,P2
then A7: IC (Comput ((P1 +* I),(Initialize s1),(pseudo-LifeSpan (s1,P1,I)))) = card I by SCMFSA8A:def_4;
A8: I is_pseudo-closed_on Initialize s1,P1 +* I by A6, Th21;
A9: now__::_thesis:_for_k_being_Element_of_NAT_st_k_<_pseudo-LifeSpan_(s1,P1,I)_holds_
IC_(Comput_((P2_+*_I),(Initialize_s2),k))_in_dom_I
let k be Element of NAT ; ::_thesis: ( k < pseudo-LifeSpan (s1,P1,I) implies IC (Comput ((P2 +* I),(Initialize s2),k)) in dom I )
assume A10: k < pseudo-LifeSpan (s1,P1,I) ; ::_thesis: IC (Comput ((P2 +* I),(Initialize s2),k)) in dom I
then k <= pseudo-LifeSpan ((Initialize s1),(P1 +* I),I) by A6, Th21;
then IC (Comput ((P2 +* I),(Initialize s2),k)) = (IC (Comput ((P1 +* I),(Initialize s1),k))) + 0 by A5, A8, A4, A3, Th22, A1, A2
.= IC (Comput ((P1 +* I),(Initialize s1),k)) ;
hence IC (Comput ((P2 +* I),(Initialize s2),k)) in dom I by A6, A10, SCMFSA8A:def_4; ::_thesis: verum
end;
IC (Comput ((P2 +* I),(Initialize s2),(pseudo-LifeSpan (s1,P1,I)))) = IC (Comput ((P2 +* I),(Initialize s2),(pseudo-LifeSpan ((Initialize s1),(P1 +* I),I)))) by A6, Th21
.= (IC (Comput ((P1 +* I),(Initialize s1),(pseudo-LifeSpan ((Initialize s1),(P1 +* I),I))))) + 0 by A5, A8, A4, A3, Th22, A1, A2
.= IC (Comput ((P1 +* I),(Initialize s1),(pseudo-LifeSpan (s1,P1,I)))) by A6, Th21 ;
hence I is_pseudo-closed_on s2,P2 by A7, A9, SCMFSA8A:def_2; ::_thesis: verum
end;
theorem Th24: :: SCMFSA8C:24
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st s . (intloc 0) = 1 holds
( I is_pseudo-closed_on s,P iff I is_pseudo-closed_on Initialized s,P )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st s . (intloc 0) = 1 holds
( I is_pseudo-closed_on s,P iff I is_pseudo-closed_on Initialized s,P )
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st s . (intloc 0) = 1 holds
( I is_pseudo-closed_on s,P iff I is_pseudo-closed_on Initialized s,P )
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( s . (intloc 0) = 1 implies ( I is_pseudo-closed_on s,P iff I is_pseudo-closed_on Initialized s,P ) )
assume s . (intloc 0) = 1 ; ::_thesis: ( I is_pseudo-closed_on s,P iff I is_pseudo-closed_on Initialized s,P )
then DataPart s = DataPart (Initialized s) by SCMFSA_M:19;
hence ( I is_pseudo-closed_on s,P iff I is_pseudo-closed_on Initialized s,P ) by Th23; ::_thesis: verum
end;
theorem Th25: :: SCMFSA8C:25
for a being Int-Location
for I, J being Program of SCM+FSA holds
( 0 in dom (if=0 (a,I,J)) & 1 in dom (if=0 (a,I,J)) & 0 in dom (if>0 (a,I,J)) & 1 in dom (if>0 (a,I,J)) )
proof
let a be Int-Location; ::_thesis: for I, J being Program of SCM+FSA holds
( 0 in dom (if=0 (a,I,J)) & 1 in dom (if=0 (a,I,J)) & 0 in dom (if>0 (a,I,J)) & 1 in dom (if>0 (a,I,J)) )
let I, J be Program of SCM+FSA; ::_thesis: ( 0 in dom (if=0 (a,I,J)) & 1 in dom (if=0 (a,I,J)) & 0 in dom (if>0 (a,I,J)) & 1 in dom (if>0 (a,I,J)) )
set i = a =0_goto ((card J) + 3);
if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1
.= (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25
.= ((a =0_goto ((card J) + 3)) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25
.= (a =0_goto ((card J) + 3)) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:29
.= (Macro (a =0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) ;
then A1: dom (Macro (a =0_goto ((card J) + 3))) c= dom (if=0 (a,I,J)) by SCMFSA6A:17;
A2: dom (Macro (a =0_goto ((card J) + 3))) = {0,1} by COMPOS_1:61;
then A3: 1 in dom (Macro (a =0_goto ((card J) + 3))) by TARSKI:def_2;
0 in dom (Macro (a =0_goto ((card J) + 3))) by A2, TARSKI:def_2;
hence ( 0 in dom (if=0 (a,I,J)) & 1 in dom (if=0 (a,I,J)) ) by A1, A3; ::_thesis: ( 0 in dom (if>0 (a,I,J)) & 1 in dom (if>0 (a,I,J)) )
set i = a >0_goto ((card J) + 3);
if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2
.= (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25
.= ((a >0_goto ((card J) + 3)) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25
.= (a >0_goto ((card J) + 3)) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:29
.= (Macro (a >0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) ;
then A4: dom (Macro (a >0_goto ((card J) + 3))) c= dom (if>0 (a,I,J)) by SCMFSA6A:17;
A5: dom (Macro (a >0_goto ((card J) + 3))) = {0,1} by COMPOS_1:61;
then A6: 1 in dom (Macro (a >0_goto ((card J) + 3))) by TARSKI:def_2;
0 in dom (Macro (a >0_goto ((card J) + 3))) by A5, TARSKI:def_2;
hence ( 0 in dom (if>0 (a,I,J)) & 1 in dom (if>0 (a,I,J)) ) by A4, A6; ::_thesis: verum
end;
theorem Th26: :: SCMFSA8C:26
for a being Int-Location
for I, J being Program of SCM+FSA holds
( (if=0 (a,I,J)) . 0 = a =0_goto ((card J) + 3) & (if=0 (a,I,J)) . 1 = goto 2 & (if>0 (a,I,J)) . 0 = a >0_goto ((card J) + 3) & (if>0 (a,I,J)) . 1 = goto 2 )
proof
let a be Int-Location; ::_thesis: for I, J being Program of SCM+FSA holds
( (if=0 (a,I,J)) . 0 = a =0_goto ((card J) + 3) & (if=0 (a,I,J)) . 1 = goto 2 & (if>0 (a,I,J)) . 0 = a >0_goto ((card J) + 3) & (if>0 (a,I,J)) . 1 = goto 2 )
let I, J be Program of SCM+FSA; ::_thesis: ( (if=0 (a,I,J)) . 0 = a =0_goto ((card J) + 3) & (if=0 (a,I,J)) . 1 = goto 2 & (if>0 (a,I,J)) . 0 = a >0_goto ((card J) + 3) & (if>0 (a,I,J)) . 1 = goto 2 )
set i = a =0_goto ((card J) + 3);
A1: if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1
.= (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25
.= ((a =0_goto ((card J) + 3)) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25
.= (a =0_goto ((card J) + 3)) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:29
.= (Macro (a =0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) ;
A2: dom (Macro (a =0_goto ((card J) + 3))) = {0,1} by COMPOS_1:61;
then 0 in dom (Macro (a =0_goto ((card J) + 3))) by TARSKI:def_2;
hence (if=0 (a,I,J)) . 0 = (Directed (Macro (a =0_goto ((card J) + 3)))) . 0 by A1, SCMFSA8A:14
.= a =0_goto ((card J) + 3) by SCMFSA7B:1 ;
::_thesis: ( (if=0 (a,I,J)) . 1 = goto 2 & (if>0 (a,I,J)) . 0 = a >0_goto ((card J) + 3) & (if>0 (a,I,J)) . 1 = goto 2 )
1 in dom (Macro (a =0_goto ((card J) + 3))) by A2, TARSKI:def_2;
hence (if=0 (a,I,J)) . 1 = (Directed (Macro (a =0_goto ((card J) + 3)))) . 1 by A1, SCMFSA8A:14
.= goto 2 by SCMFSA7B:2 ;
::_thesis: ( (if>0 (a,I,J)) . 0 = a >0_goto ((card J) + 3) & (if>0 (a,I,J)) . 1 = goto 2 )
set i = a >0_goto ((card J) + 3);
A3: if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2
.= (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25
.= ((a >0_goto ((card J) + 3)) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25
.= (a >0_goto ((card J) + 3)) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:29
.= (Macro (a >0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) ;
A4: dom (Macro (a >0_goto ((card J) + 3))) = {0,1} by COMPOS_1:61;
then 0 in dom (Macro (a >0_goto ((card J) + 3))) by TARSKI:def_2;
hence (if>0 (a,I,J)) . 0 = (Directed (Macro (a >0_goto ((card J) + 3)))) . 0 by A3, SCMFSA8A:14
.= a >0_goto ((card J) + 3) by SCMFSA7B:1 ;
::_thesis: (if>0 (a,I,J)) . 1 = goto 2
1 in dom (Macro (a >0_goto ((card J) + 3))) by A4, TARSKI:def_2;
hence (if>0 (a,I,J)) . 1 = (Directed (Macro (a >0_goto ((card J) + 3)))) . 1 by A3, SCMFSA8A:14
.= goto 2 by SCMFSA7B:2 ;
::_thesis: verum
end;
theorem Th27: :: SCMFSA8C:27
for a being Int-Location
for I, J being Program of SCM+FSA
for n being Element of NAT st n < ((card I) + (card J)) + 3 holds
( n in dom (if=0 (a,I,J)) & (if=0 (a,I,J)) . n <> halt SCM+FSA )
proof
let a be Int-Location; ::_thesis: for I, J being Program of SCM+FSA
for n being Element of NAT st n < ((card I) + (card J)) + 3 holds
( n in dom (if=0 (a,I,J)) & (if=0 (a,I,J)) . n <> halt SCM+FSA )
let I, J be Program of SCM+FSA; ::_thesis: for n being Element of NAT st n < ((card I) + (card J)) + 3 holds
( n in dom (if=0 (a,I,J)) & (if=0 (a,I,J)) . n <> halt SCM+FSA )
let n be Element of NAT ; ::_thesis: ( n < ((card I) + (card J)) + 3 implies ( n in dom (if=0 (a,I,J)) & (if=0 (a,I,J)) . n <> halt SCM+FSA ) )
set J1 = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
A1: card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a =0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a =0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
assume n < ((card I) + (card J)) + 3 ; ::_thesis: ( n in dom (if=0 (a,I,J)) & (if=0 (a,I,J)) . n <> halt SCM+FSA )
then n in dom ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) by A1, AFINSQ_1:66;
then A2: n in dom (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_4:99;
then A3: (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . n in rng (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_1:def_3;
if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
then A4: Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) c= if=0 (a,I,J) by SCMFSA6A:16;
then dom (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) c= dom (if=0 (a,I,J)) by GRFUNC_1:2;
hence n in dom (if=0 (a,I,J)) by A2; ::_thesis: (if=0 (a,I,J)) . n <> halt SCM+FSA
(if=0 (a,I,J)) . n = (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . n by A2, A4, GRFUNC_1:2;
hence (if=0 (a,I,J)) . n <> halt SCM+FSA by A3, COMPOS_1:def_11; ::_thesis: verum
end;
theorem Th28: :: SCMFSA8C:28
for a being Int-Location
for I, J being Program of SCM+FSA
for n being Element of NAT st n < ((card I) + (card J)) + 3 holds
( n in dom (if>0 (a,I,J)) & (if>0 (a,I,J)) . n <> halt SCM+FSA )
proof
let a be Int-Location; ::_thesis: for I, J being Program of SCM+FSA
for n being Element of NAT st n < ((card I) + (card J)) + 3 holds
( n in dom (if>0 (a,I,J)) & (if>0 (a,I,J)) . n <> halt SCM+FSA )
let I, J be Program of SCM+FSA; ::_thesis: for n being Element of NAT st n < ((card I) + (card J)) + 3 holds
( n in dom (if>0 (a,I,J)) & (if>0 (a,I,J)) . n <> halt SCM+FSA )
let n be Element of NAT ; ::_thesis: ( n < ((card I) + (card J)) + 3 implies ( n in dom (if>0 (a,I,J)) & (if>0 (a,I,J)) . n <> halt SCM+FSA ) )
set J1 = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
A1: card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a >0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
assume n < ((card I) + (card J)) + 3 ; ::_thesis: ( n in dom (if>0 (a,I,J)) & (if>0 (a,I,J)) . n <> halt SCM+FSA )
then n in dom ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) by A1, AFINSQ_1:66;
then A2: n in dom (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_4:99;
then A3: (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . n in rng (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_1:def_3;
if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
then A4: Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) c= if>0 (a,I,J) by SCMFSA6A:16;
then dom (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) c= dom (if>0 (a,I,J)) by GRFUNC_1:2;
hence n in dom (if>0 (a,I,J)) by A2; ::_thesis: (if>0 (a,I,J)) . n <> halt SCM+FSA
(if>0 (a,I,J)) . n = (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . n by A2, A4, GRFUNC_1:2;
hence (if>0 (a,I,J)) . n <> halt SCM+FSA by A3, COMPOS_1:def_11; ::_thesis: verum
end;
theorem Th29: :: SCMFSA8C:29
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st Directed I is_pseudo-closed_on s,P holds
( I ";" (Stop SCM+FSA) is_closed_on s,P & I ";" (Stop SCM+FSA) is_halting_on s,P & LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st Directed I is_pseudo-closed_on s,P holds
( I ";" (Stop SCM+FSA) is_closed_on s,P & I ";" (Stop SCM+FSA) is_halting_on s,P & LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st Directed I is_pseudo-closed_on s,P holds
( I ";" (Stop SCM+FSA) is_closed_on s,P & I ";" (Stop SCM+FSA) is_halting_on s,P & LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( Directed I is_pseudo-closed_on s,P implies ( I ";" (Stop SCM+FSA) is_closed_on s,P & I ";" (Stop SCM+FSA) is_halting_on s,P & LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) ) )
set I0 = Directed I;
set I1 = I ";" (Stop SCM+FSA);
set s00 = Initialize s;
set P00 = P +* (Directed I);
set s10 = Initialize s;
set P10 = P +* (I ";" (Stop SCM+FSA));
reconsider k = pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) as Element of NAT ;
(Stop SCM+FSA) . 0 = halt SCM+FSA by AFINSQ_1:34;
then A1: halt SCM+FSA = (Stop SCM+FSA) . ((card I) -' (card I)) by XREAL_1:232;
A2: DataPart (Initialize s) = DataPart (Initialize s) ;
assume A3: Directed I is_pseudo-closed_on s,P ; ::_thesis: ( I ";" (Stop SCM+FSA) is_closed_on s,P & I ";" (Stop SCM+FSA) is_halting_on s,P & LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
then A4: Directed I is_pseudo-closed_on Initialize s,P +* (Directed I) by Th21;
defpred S1[ Nat] means ( k <= $1 implies ( IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),$1)) = card I & CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),$1))) = halt SCM+FSA ) );
A5: I ";" (Stop SCM+FSA) c= P +* (I ";" (Stop SCM+FSA)) by FUNCT_4:25;
A6: I ";" (Stop SCM+FSA) c= P +* (I ";" (Stop SCM+FSA)) by FUNCT_4:25;
A7: Directed I c= I ";" (Stop SCM+FSA) by SCMFSA6A:16;
then A8: dom (Directed I) c= dom (I ";" (Stop SCM+FSA)) by GRFUNC_1:2;
A9: Directed I c= P +* (I ";" (Stop SCM+FSA)) by A7, A5, XBOOLE_1:1;
Reloc ((Directed I),0) c= I ";" (Stop SCM+FSA) by A7;
then A10: Reloc ((Directed I),0) c= P +* (I ";" (Stop SCM+FSA)) by A6, XBOOLE_1:1;
A11: IC (Initialize s) = 0 by FUNCT_4:113;
A12: Directed I c= P +* (Directed I) by FUNCT_4:25;
A13: now__::_thesis:_for_n_being_Element_of_NAT_st_n_<=_pseudo-LifeSpan_((Initialize_s),(P_+*_(Directed_I)),(Directed_I))_holds_
(_IC_(Comput_((P_+*_(Directed_I)),(Initialize_s),n))_=_IC_(Comput_((P_+*_(I_";"_(Stop_SCM+FSA))),(Initialize_s),n))_&_DataPart_(Comput_((P_+*_(Directed_I)),(Initialize_s),n))_=_DataPart_(Comput_((P_+*_(I_";"_(Stop_SCM+FSA))),(Initialize_s),n))_)
let n be Element of NAT ; ::_thesis: ( n <= pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) implies ( IC (Comput ((P +* (Directed I)),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) & DataPart (Comput ((P +* (Directed I)),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
assume A14: n <= pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) ; ::_thesis: ( IC (Comput ((P +* (Directed I)),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) & DataPart (Comput ((P +* (Directed I)),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) )
then (IC (Comput ((P +* (Directed I)),(Initialize s),n))) + 0 = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A4, A10, A11, A2, Th22, A12;
hence IC (Comput ((P +* (Directed I)),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ; ::_thesis: DataPart (Comput ((P +* (Directed I)),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
thus DataPart (Comput ((P +* (Directed I)),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A4, A10, A11, A2, A14, Th22, A12; ::_thesis: verum
end;
A15: k = pseudo-LifeSpan (s,P,(Directed I)) by A3, Th21;
A16: Initialize (Initialize s) = Initialize s ;
A17: (P +* (Directed I)) +* (Directed I) = P +* ((Directed I) +* (Directed I))
.= P +* (Directed I) ;
A18: now__::_thesis:_for_n_being_Element_of_NAT_st_n_<_pseudo-LifeSpan_((Initialize_s),(P_+*_(Directed_I)),(Directed_I))_holds_
(_CurInstr_((P_+*_(Directed_I)),(Comput_((P_+*_(Directed_I)),(Initialize_s),n)))_=_CurInstr_((P_+*_(I_";"_(Stop_SCM+FSA))),(Comput_((P_+*_(I_";"_(Stop_SCM+FSA))),(Initialize_s),n)))_&_IC_(Comput_((P_+*_(Directed_I)),(Initialize_s),n))_in_dom_(Directed_I)_&_CurInstr_((P_+*_(Directed_I)),(Comput_((P_+*_(Directed_I)),(Initialize_s),n)))_<>_halt_SCM+FSA_)
let n be Element of NAT ; ::_thesis: ( n < pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) implies ( CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) = CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) & IC (Comput ((P +* (Directed I)),(Initialize s),n)) in dom (Directed I) & CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) <> halt SCM+FSA ) )
assume A19: n < pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) ; ::_thesis: ( CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) = CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) & IC (Comput ((P +* (Directed I)),(Initialize s),n)) in dom (Directed I) & CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) <> halt SCM+FSA )
then IncAddr ((CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n)))),0) = CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by A4, A10, A11, A2, Th22, A12;
hence CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) = CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by COMPOS_0:3; ::_thesis: ( IC (Comput ((P +* (Directed I)),(Initialize s),n)) in dom (Directed I) & CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) <> halt SCM+FSA )
thus IC (Comput ((P +* (Directed I)),(Initialize s),n)) in dom (Directed I) by A16, A4, A19, A17, SCMFSA8A:17; ::_thesis: CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) <> halt SCM+FSA
thus CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) <> halt SCM+FSA by A16, A4, A19, A17, SCMFSA8A:17; ::_thesis: verum
end;
A20: now__::_thesis:_for_n_being_Element_of_NAT_st_CurInstr_((P_+*_(I_";"_(Stop_SCM+FSA))),(Comput_((P_+*_(I_";"_(Stop_SCM+FSA))),(Initialize_s),n)))_=_halt_SCM+FSA_holds_
not_k_>_n
let n be Element of NAT ; ::_thesis: ( CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) = halt SCM+FSA implies not k > n )
assume A21: CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) = halt SCM+FSA ; ::_thesis: not k > n
reconsider l = IC (Comput ((P +* (Directed I)),(Initialize s),n)) as Element of NAT ;
assume A22: k > n ; ::_thesis: contradiction
then A23: l in dom (Directed I) by A3, A15, SCMFSA8A:def_4;
CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) = CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) by A18, A22
.= (P +* (Directed I)) . l by PBOOLE:143
.= (Directed I) . l by A23, A12, GRFUNC_1:2 ;
then halt SCM+FSA in rng (Directed I) by A21, A23, FUNCT_1:def_3;
hence contradiction by COMPOS_1:def_11; ::_thesis: verum
end;
A24: card (Stop SCM+FSA) = 1 by AFINSQ_1:33;
then card (I ";" (Stop SCM+FSA)) = (card I) + 1 by SCMFSA6A:21;
then card I < card (I ";" (Stop SCM+FSA)) by NAT_1:13;
then A25: card I in dom (I ";" (Stop SCM+FSA)) by AFINSQ_1:66;
card I < (card I) + (card (Stop SCM+FSA)) by A24, NAT_1:13;
then A26: (I ";" (Stop SCM+FSA)) . (card I) = IncAddr ((halt SCM+FSA),(card I)) by A1, Th2
.= halt SCM+FSA by COMPOS_0:4 ;
then A27: (P +* (I ";" (Stop SCM+FSA))) . (card I) = halt SCM+FSA by A25, A5, GRFUNC_1:2;
A28: for n being Element of NAT st S1[n] holds
S1[n + 1]
proof
let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] )
assume A29: S1[n] ; ::_thesis: S1[n + 1]
assume A30: k <= n + 1 ; ::_thesis: ( IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) = card I & CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)))) = halt SCM+FSA )
hereby ::_thesis: CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)))) = halt SCM+FSA
percases ( k = n + 1 or k <= n ) by A30, NAT_1:8;
suppose k = n + 1 ; ::_thesis: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) = card I
hence IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) = IC (Comput ((P +* (Directed I)),(Initialize s),k)) by A13
.= card (Directed I) by A3, A15, SCMFSA8A:def_4
.= card I by SCMFSA8A:20 ;
::_thesis: verum
end;
supposeA31: k <= n ; ::_thesis: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) = card I
Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)) = Following ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by EXTPRO_1:3;
hence IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) = card I by A29, A31, EXTPRO_1:def_3; ::_thesis: verum
end;
end;
end;
hence CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)))) = halt SCM+FSA by A27, PBOOLE:143; ::_thesis: verum
end;
A32: S1[ 0 ]
proof
assume k <= 0 ; ::_thesis: ( IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) = card I & CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0))) = halt SCM+FSA )
then k = 0 ;
hence IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) = IC (Comput ((P +* (Directed I)),(Initialize s),k)) by A13
.= card (Directed I) by A3, A15, SCMFSA8A:def_4
.= card I by SCMFSA8A:20 ;
::_thesis: CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0))) = halt SCM+FSA
hence CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0))) = (P +* (I ";" (Stop SCM+FSA))) . (card I) by PBOOLE:143
.= halt SCM+FSA by A26, A25, A5, GRFUNC_1:2 ;
::_thesis: verum
end;
A33: for n being Element of NAT holds S1[n] from NAT_1:sch_1(A32, A28);
now__::_thesis:_for_n_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(I_";"_(Stop_SCM+FSA))),(Initialize_s),n))_in_dom_(I_";"_(Stop_SCM+FSA))
let n be Element of NAT ; ::_thesis: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),b1)) in dom (I ";" (Stop SCM+FSA))
percases ( n < k or k <= n ) ;
supposeA34: n < k ; ::_thesis: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),b1)) in dom (I ";" (Stop SCM+FSA))
then IC (Comput ((P +* (Directed I)),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A13;
then IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) in dom (Directed I) by A3, A15, A34, SCMFSA8A:def_4;
hence IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) in dom (I ";" (Stop SCM+FSA)) by A8; ::_thesis: verum
end;
suppose k <= n ; ::_thesis: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),b1)) in dom (I ";" (Stop SCM+FSA))
hence IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) in dom (I ";" (Stop SCM+FSA)) by A25, A33; ::_thesis: verum
end;
end;
end;
hence I ";" (Stop SCM+FSA) is_closed_on s,P by SCMFSA7B:def_6; ::_thesis: ( I ";" (Stop SCM+FSA) is_halting_on s,P & LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
set s1 = Initialize s;
set P1 = P +* I;
A35: I c= P +* I by FUNCT_4:25;
A36: card (Directed I) = card I by SCMFSA8A:20;
S1[k] by A33;
then A37: P +* (I ";" (Stop SCM+FSA)) halts_on Initialize s by EXTPRO_1:29;
hence I ";" (Stop SCM+FSA) is_halting_on s,P by SCMFSA7B:def_7; ::_thesis: ( LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) & ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),k))) = halt SCM+FSA by A33;
then A38: LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = k by A37, A20, EXTPRO_1:def_15;
defpred S2[ Nat] means ( $1 < pseudo-LifeSpan (s,P,(Directed I)) implies ( IC (Comput ((P +* I),(Initialize s),$1)) in dom I & IC (Comput ((P +* I),(Initialize s),$1)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),$1)) & DataPart (Comput ((P +* I),(Initialize s),$1)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),$1)) ) );
A39: for n being Element of NAT st S2[n] holds
S2[n + 1]
proof
let n be Element of NAT ; ::_thesis: ( S2[n] implies S2[n + 1] )
set l = IC (Comput ((P +* I),(Initialize s),n));
set l0 = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n));
assume A40: S2[n] ; ::_thesis: S2[n + 1]
assume A41: n + 1 < pseudo-LifeSpan (s,P,(Directed I)) ; ::_thesis: ( IC (Comput ((P +* I),(Initialize s),(n + 1))) in dom I & IC (Comput ((P +* I),(Initialize s),(n + 1))) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) & DataPart (Comput ((P +* I),(Initialize s),(n + 1))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) )
then A42: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) in dom (Directed I) by A40, FUNCT_4:99, NAT_1:12;
A43: for f being FinSeq-Location holds (Comput ((P +* I),(Initialize s),n)) . f = (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) . f by A40, A41, NAT_1:12, SCMFSA_M:2;
for a being Int-Location holds (Comput ((P +* I),(Initialize s),n)) . a = (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) . a by A40, A41, NAT_1:12, SCMFSA_M:2;
then A44: Comput ((P +* I),(Initialize s),n) = Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n) by A40, A41, A43, NAT_1:12, SCMFSA_2:61;
A45: now__::_thesis:_not_I_._(IC_(Comput_((P_+*_I),(Initialize_s),n)))_=_halt_SCM+FSA
assume A46: I . (IC (Comput ((P +* I),(Initialize s),n))) = halt SCM+FSA ; ::_thesis: contradiction
A47: (P +* (Directed I)) /. (IC (Comput ((P +* (Directed I)),(Initialize s),n))) = (P +* (Directed I)) . (IC (Comput ((P +* (Directed I)),(Initialize s),n))) by PBOOLE:143;
n < k by A15, A41, NAT_1:12;
then A48: CurInstr ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n))) = (P +* (Directed I)) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by A13, A47
.= (Directed I) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by A42, A12, GRFUNC_1:2
.= goto (card I) by A40, A41, A46, NAT_1:12, SCMFSA8A:16 ;
A49: IC (Comput ((P +* (Directed I)),(Initialize s),(n + 1))) = IC (Following ((P +* (Directed I)),(Comput ((P +* (Directed I)),(Initialize s),n)))) by EXTPRO_1:3
.= card I by A48, SCMFSA_2:69
.= card (Directed I) by SCMFSA8A:20 ;
IC (Comput ((P +* (Directed I)),(Initialize s),(n + 1))) in dom (Directed I) by A3, A41, SCMFSA8A:17;
hence contradiction by A49; ::_thesis: verum
end;
A50: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),n))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),n))) by PBOOLE:143
.= I . (IC (Comput ((P +* I),(Initialize s),n))) by A35, A40, A41, GRFUNC_1:2, NAT_1:12
.= (Directed I) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by A40, A41, A45, NAT_1:12, SCMFSA8A:16
.= (P +* (I ";" (Stop SCM+FSA))) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by A42, A9, GRFUNC_1:2
.= CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by PBOOLE:143 ;
A51: Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)) = Following ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by EXTPRO_1:3
.= Exec ((CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),n)))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))) by A50 ;
pseudo-LifeSpan (s,P,(Directed I)) = k by A3, Th21;
then A52: IC (Comput ((P +* (Directed I)),(Initialize s),(n + 1))) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) by A13, A41;
A53: dom (Directed I) = dom I by FUNCT_4:99;
Comput ((P +* I),(Initialize s),(n + 1)) = Following ((P +* I),(Comput ((P +* I),(Initialize s),n))) by EXTPRO_1:3;
then A54: Comput ((P +* I),(Initialize s),(n + 1)) = Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)) by A51, A44;
A55: for f being FinSeq-Location holds (Comput ((P +* I),(Initialize s),(n + 1))) . f = (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) . f by A54;
IC (Comput ((P +* (Directed I)),(Initialize s),(n + 1))) in dom (Directed I) by A3, A41, SCMFSA8A:17;
hence IC (Comput ((P +* I),(Initialize s),(n + 1))) in dom I by A52, A53, A54; ::_thesis: ( IC (Comput ((P +* I),(Initialize s),(n + 1))) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) & DataPart (Comput ((P +* I),(Initialize s),(n + 1))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) )
thus IC (Comput ((P +* I),(Initialize s),(n + 1))) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) by A54; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),(n + 1))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1)))
for a being Int-Location holds (Comput ((P +* I),(Initialize s),(n + 1))) . a = (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) . a by A54;
hence DataPart (Comput ((P +* I),(Initialize s),(n + 1))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(n + 1))) by A55, SCMFSA_M:2; ::_thesis: verum
end;
IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),k)) = card I by A33;
then A56: IC (Comput ((P +* (Directed I)),(Initialize s),(LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))))) = card I by A13, A38;
for n being Element of NAT st not IC (Comput ((P +* (Directed I)),(Initialize s),n)) in dom (Directed I) holds
LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) <= n by A18, A38;
hence LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) by A3, A56, A36, SCMFSA8A:def_4; ::_thesis: ( ( for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) & ( for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ) )
A57: S2[ 0 ]
proof
A58: IC (Comput ((P +* I),(Initialize s),0)) = IC (Initialize s)
.= IC (Initialize s)
.= 0 by FUNCT_4:113 ;
assume 0 < pseudo-LifeSpan (s,P,(Directed I)) ; ::_thesis: ( IC (Comput ((P +* I),(Initialize s),0)) in dom I & IC (Comput ((P +* I),(Initialize s),0)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) & DataPart (Comput ((P +* I),(Initialize s),0)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) )
then IC (Comput ((P +* (Directed I)),(Initialize s),0)) in dom (Directed I) by A3, SCMFSA8A:17;
then IC (Initialize s) in dom (Directed I) ;
then 0 in dom (Directed I) by MEMSTR_0:16;
hence IC (Comput ((P +* I),(Initialize s),0)) in dom I by A58, FUNCT_4:99; ::_thesis: ( IC (Comput ((P +* I),(Initialize s),0)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) & DataPart (Comput ((P +* I),(Initialize s),0)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) )
thus IC (Comput ((P +* I),(Initialize s),0)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),0)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0))
thus DataPart (Comput ((P +* I),(Initialize s),0)) = DataPart (Initialize s)
.= DataPart (Initialize s)
.= DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),0)) ; ::_thesis: verum
end;
A59: for n being Element of NAT holds S2[n] from NAT_1:sch_1(A57, A39);
hence for n being Element of NAT st n < pseudo-LifeSpan (s,P,(Directed I)) holds
IC (Comput ((P +* I),(Initialize s),n)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) ; ::_thesis: for n being Element of NAT st n <= pseudo-LifeSpan (s,P,(Directed I)) holds
DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
let n be Element of NAT ; ::_thesis: ( n <= pseudo-LifeSpan (s,P,(Directed I)) implies DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) )
assume A60: n <= pseudo-LifeSpan (s,P,(Directed I)) ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
percases ( n < pseudo-LifeSpan (s,P,(Directed I)) or n = pseudo-LifeSpan (s,P,(Directed I)) ) by A60, XXREAL_0:1;
suppose n < pseudo-LifeSpan (s,P,(Directed I)) ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
hence DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A59; ::_thesis: verum
end;
supposeA61: n = pseudo-LifeSpan (s,P,(Directed I)) ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
percases ( n = 0 or ex m being Nat st n = m + 1 ) by NAT_1:6;
supposeA62: n = 0 ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
hence DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Initialize s) by EXTPRO_1:2
.= DataPart (Initialize s)
.= DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A62, EXTPRO_1:2 ;
::_thesis: verum
end;
suppose ex m being Nat st n = m + 1 ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
then consider m being Nat such that
A63: n = m + 1 ;
reconsider m = m as Element of NAT by ORDINAL1:def_12;
A64: Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n) = Following ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) by A63, EXTPRO_1:3;
set i = CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m)));
A65: Comput ((P +* I),(Initialize s),n) = Following ((P +* I),(Comput ((P +* I),(Initialize s),m))) by A63, EXTPRO_1:3;
set l0 = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m));
set l = IC (Comput ((P +* I),(Initialize s),m));
A66: m + 0 < pseudo-LifeSpan (s,P,(Directed I)) by A61, A63, XREAL_1:6;
then A67: IC (Comput ((P +* I),(Initialize s),m)) = IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m)) by A59;
A68: IC (Comput ((P +* I),(Initialize s),m)) in dom I by A59, A66;
then A69: IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m)) in dom (Directed I) by A67, FUNCT_4:99;
A70: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),m))) by PBOOLE:143
.= I . (IC (Comput ((P +* I),(Initialize s),m))) by A35, A68, GRFUNC_1:2 ;
A71: Directed I c= I ";" (Stop SCM+FSA) by SCMFSA6A:16;
then A72: dom (Directed I) c= dom (I ";" (Stop SCM+FSA)) by RELAT_1:11;
A73: (Directed I) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) = (I ";" (Stop SCM+FSA)) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) by A69, A71, GRFUNC_1:2
.= (P +* (I ";" (Stop SCM+FSA))) . (IC (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) by A5, A72, A69, GRFUNC_1:2
.= CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) by PBOOLE:143 ;
A74: DataPart (Comput ((P +* I),(Initialize s),m)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m)) by A59, A66;
percases ( CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = halt SCM+FSA or CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) <> halt SCM+FSA ) ;
supposeA75: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = halt SCM+FSA ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
then CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) = goto (card I) by A68, A67, A70, A73, SCMFSA8A:16;
then InsCode (CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m)))) = 6 by SCMFSA_2:23;
then A76: InsCode (CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m)))) in {0,6,7,8} by ENUMSET1:def_2;
thus DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* I),(Initialize s),m)) by A65, A75, EXTPRO_1:def_3
.= DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m)) by A59, A66
.= DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A64, A76, Th12 ; ::_thesis: verum
end;
suppose CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) <> halt SCM+FSA ; ::_thesis: DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n))
then CurInstr ((P +* (I ";" (Stop SCM+FSA))),(Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),m))) = CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) by A68, A67, A70, A73, SCMFSA8A:16;
hence DataPart (Comput ((P +* I),(Initialize s),n)) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),n)) by A65, A64, A74, SCMFSA6C:4; ::_thesis: verum
end;
end;
end;
end;
end;
end;
end;
theorem Th30: :: SCMFSA8C:30
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st Directed I is_pseudo-closed_on s,P holds
DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st Directed I is_pseudo-closed_on s,P holds
DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st Directed I is_pseudo-closed_on s,P holds
DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( Directed I is_pseudo-closed_on s,P implies DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) )
set I0 = Directed I;
set I1 = I ";" (Stop SCM+FSA);
set s2 = Initialize s;
set P2 = P +* I;
set s10 = Initialize s;
set P10 = P +* (I ";" (Stop SCM+FSA));
set k = pseudo-LifeSpan (s,P,(Directed I));
assume A1: Directed I is_pseudo-closed_on s,P ; ::_thesis: DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
then A2: DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) by Th29;
I ";" (Stop SCM+FSA) is_halting_on s,P by A1, Th29;
then A3: P +* (I ";" (Stop SCM+FSA)) halts_on Initialize s by SCMFSA7B:def_7;
LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) = pseudo-LifeSpan (s,P,(Directed I)) by A1, Th29;
hence DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) by A2, A3, EXTPRO_1:23; ::_thesis: verum
end;
theorem :: SCMFSA8C:31
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st s . (intloc 0) = 1 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st s . (intloc 0) = 1 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st s . (intloc 0) = 1 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( s . (intloc 0) = 1 & Directed I is_pseudo-closed_on s,P implies DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) )
set I0 = Directed I;
set I1 = I ";" (Stop SCM+FSA);
set s2 = Initialize s;
set P2 = P +* I;
set s10 = Initialize s;
set P10 = P +* (I ";" (Stop SCM+FSA));
set k = pseudo-LifeSpan (s,P,(Directed I));
assume A1: s . (intloc 0) = 1 ; ::_thesis: ( not Directed I is_pseudo-closed_on s,P or DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) )
assume A2: Directed I is_pseudo-closed_on s,P ; ::_thesis: DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))
A3: Initialize s = Initialized s by A1, SCMFSA_M:18;
thus DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s)) = DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) by A3
.= DataPart (Comput ((P +* I),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I))))) by A2, Th30 ; ::_thesis: verum
end;
theorem Th32: :: SCMFSA8C:32
for I, J being Program of SCM+FSA
for a being Int-Location holds (if=0 (a,I,J)) . (((card I) + (card J)) + 3) = halt SCM+FSA
proof
let I, J be Program of SCM+FSA; ::_thesis: for a being Int-Location holds (if=0 (a,I,J)) . (((card I) + (card J)) + 3) = halt SCM+FSA
let a be Int-Location; ::_thesis: (if=0 (a,I,J)) . (((card I) + (card J)) + 3) = halt SCM+FSA
A1: if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
set II = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
A2: card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a =0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a =0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
then A3: (((card I) + (card J)) + 3) -' (card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) = 0 by XREAL_1:232;
A4: (Stop SCM+FSA) . 0 = halt SCM+FSA by AFINSQ_1:34;
card (Stop SCM+FSA) = 1 by AFINSQ_1:33;
then ((card I) + (card J)) + 3 < (card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) + (card (Stop SCM+FSA)) by A2, NAT_1:13;
hence (if=0 (a,I,J)) . (((card I) + (card J)) + 3) = IncAddr ((halt SCM+FSA),(card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I))) by A1, A2, A3, Th2, A4
.= halt SCM+FSA by COMPOS_0:4 ;
::_thesis: verum
end;
theorem Th33: :: SCMFSA8C:33
for I, J being Program of SCM+FSA
for a being Int-Location holds (if>0 (a,I,J)) . (((card I) + (card J)) + 3) = halt SCM+FSA
proof
let I, J be Program of SCM+FSA; ::_thesis: for a being Int-Location holds (if>0 (a,I,J)) . (((card I) + (card J)) + 3) = halt SCM+FSA
let a be Int-Location; ::_thesis: (if>0 (a,I,J)) . (((card I) + (card J)) + 3) = halt SCM+FSA
A1: if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
set II = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
A2: card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a >0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
then A3: (((card I) + (card J)) + 3) -' (card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) = 0 by XREAL_1:232;
A4: (Stop SCM+FSA) . 0 = halt SCM+FSA by AFINSQ_1:34;
card (Stop SCM+FSA) = 1 by AFINSQ_1:33;
then ((card I) + (card J)) + 3 < (card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) + (card (Stop SCM+FSA)) by A2, NAT_1:13;
hence (if>0 (a,I,J)) . (((card I) + (card J)) + 3) = IncAddr ((halt SCM+FSA),(card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I))) by A1, A2, A3, Th2, A4
.= halt SCM+FSA by COMPOS_0:4 ;
::_thesis: verum
end;
theorem Th34: :: SCMFSA8C:34
for I, J being Program of SCM+FSA
for a being Int-Location holds (if=0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3)
proof
let I, J be Program of SCM+FSA; ::_thesis: for a being Int-Location holds (if=0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3)
let a be Int-Location; ::_thesis: (if=0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3)
set JJ = (a =0_goto ((card J) + 3)) ";" J;
set J3 = ((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1));
A1: if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
A2: card ((a =0_goto ((card J) + 3)) ";" J) = (card (Macro (a =0_goto ((card J) + 3)))) + (card J) by SCMFSA6A:21
.= 2 + (card J) by COMPOS_1:56 ;
then ((card J) + 2) -' (card ((a =0_goto ((card J) + 3)) ";" J)) = 0 by XREAL_1:232;
then A3: goto ((card I) + 1) = (Goto ((card I) + 1)) . (((card J) + 2) -' (card ((a =0_goto ((card J) + 3)) ";" J))) by SCMFSA8A:31;
card (Goto ((card I) + 1)) = 1 by SCMFSA8A:15;
then (card J) + 2 < (card ((a =0_goto ((card J) + 3)) ";" J)) + (card (Goto ((card I) + 1))) by A2, NAT_1:13;
then A4: (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) . ((card J) + 2) = IncAddr ((goto ((card I) + 1)),(card ((a =0_goto ((card J) + 3)) ";" J))) by A2, A3, Th2
.= goto (((card I) + 1) + ((card J) + 2)) by A2, SCMFSA_4:1
.= goto (((card I) + (card J)) + (1 + 2)) ;
card (Goto ((card I) + 1)) = 1 by SCMFSA8A:15;
then card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = ((card J) + 2) + 1 by A2, SCMFSA6A:21
.= (card J) + (2 + 1) ;
then card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = ((card J) + 2) + 1 ;
then (card J) + 2 < card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) by NAT_1:13;
then A5: (card J) + 2 in dom (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) by AFINSQ_1:66;
then ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA))) . ((card J) + 2) = (Directed (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1)))) . ((card J) + 2) by SCMFSA8A:14
.= goto (((card I) + (card J)) + 3) by A4, A5, SCMFSA8A:16 ;
hence (if=0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3) by A1, SCMFSA6A:25; ::_thesis: verum
end;
theorem Th35: :: SCMFSA8C:35
for I, J being Program of SCM+FSA
for a being Int-Location holds (if>0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3)
proof
let I, J be Program of SCM+FSA; ::_thesis: for a being Int-Location holds (if>0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3)
let a be Int-Location; ::_thesis: (if>0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3)
set JJ = (a >0_goto ((card J) + 3)) ";" J;
set J3 = ((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1));
A1: if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
A2: card ((a >0_goto ((card J) + 3)) ";" J) = (card (Macro (a >0_goto ((card J) + 3)))) + (card J) by SCMFSA6A:21
.= 2 + (card J) by COMPOS_1:56 ;
then ((card J) + 2) -' (card ((a >0_goto ((card J) + 3)) ";" J)) = 0 by XREAL_1:232;
then A3: goto ((card I) + 1) = (Goto ((card I) + 1)) . (((card J) + 2) -' (card ((a >0_goto ((card J) + 3)) ";" J))) by SCMFSA8A:31;
card (Goto ((card I) + 1)) = 1 by SCMFSA8A:15;
then (card J) + 2 < (card ((a >0_goto ((card J) + 3)) ";" J)) + (card (Goto ((card I) + 1))) by A2, NAT_1:13;
then A4: (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) . ((card J) + 2) = IncAddr ((goto ((card I) + 1)),(card ((a >0_goto ((card J) + 3)) ";" J))) by A2, A3, Th2
.= goto (((card I) + 1) + ((card J) + 2)) by A2, SCMFSA_4:1
.= goto (((card I) + (card J)) + (1 + 2)) ;
card (Goto ((card I) + 1)) = 1 by SCMFSA8A:15;
then card (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = ((card J) + 2) + 1 by A2, SCMFSA6A:21
.= (card J) + (2 + 1) ;
then card (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = ((card J) + 2) + 1 ;
then (card J) + 2 < card (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) by NAT_1:13;
then A5: (card J) + 2 in dom (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) by AFINSQ_1:66;
then ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA))) . ((card J) + 2) = (Directed (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1)))) . ((card J) + 2) by SCMFSA8A:14
.= goto (((card I) + (card J)) + 3) by A4, A5, SCMFSA8A:16 ;
hence (if>0 (a,I,J)) . ((card J) + 2) = goto (((card I) + (card J)) + 3) by A1, SCMFSA6A:25; ::_thesis: verum
end;
theorem Th36: :: SCMFSA8C:36
for J being Program of SCM+FSA
for a being Int-Location holds (if=0 (a,(Goto 2),J)) . ((card J) + 3) = goto ((card J) + 5)
proof
let J be Program of SCM+FSA; ::_thesis: for a being Int-Location holds (if=0 (a,(Goto 2),J)) . ((card J) + 3) = goto ((card J) + 5)
let a be Int-Location; ::_thesis: (if=0 (a,(Goto 2),J)) . ((card J) + 3) = goto ((card J) + 5)
set JJ = (a =0_goto ((card J) + 3)) ";" J;
set J3 = ((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2);
set J4 = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2);
A1: card (Goto 2) = 1 by SCMFSA8A:15;
card ((a =0_goto ((card J) + 3)) ";" J) = (card (Macro (a =0_goto ((card J) + 3)))) + (card J) by SCMFSA6A:21
.= 2 + (card J) by COMPOS_1:56 ;
then A2: card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) = ((card J) + 2) + 1 by A1, SCMFSA6A:21
.= (card J) + (2 + 1) ;
then ((card J) + 3) -' (card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2))) = 0 by XREAL_1:232;
then A3: goto 2 = (Goto 2) . (((card J) + 3) -' (card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)))) by SCMFSA8A:31;
card (Goto 2) = 1 by SCMFSA8A:15;
then (card J) + 3 < (card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2))) + (card (Goto 2)) by A2, NAT_1:13;
then A4: ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2)) . ((card J) + 3) = IncAddr ((goto 2),(card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)))) by A2, A3, Th2
.= goto (2 + ((card J) + 3)) by A2, SCMFSA_4:1
.= goto ((card J) + (2 + 3)) ;
card (Goto 2) = 1 by SCMFSA8A:15;
then A5: if=0 (a,(Goto 2),J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto (1 + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2)) = ((card J) + 3) + 1 by A1, A2, SCMFSA6A:21
.= (card J) + (3 + 1) ;
then card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2)) = ((card J) + 3) + 1 ;
then (card J) + 3 < card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2)) by NAT_1:13;
then A6: (card J) + 3 in dom ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2)) by AFINSQ_1:66;
then (((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2)) ";" (Stop SCM+FSA)) . ((card J) + 3) = (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto 2)) ";" (Goto 2))) . ((card J) + 3) by SCMFSA8A:14
.= goto ((card J) + 5) by A4, A6, SCMFSA8A:16 ;
hence (if=0 (a,(Goto 2),J)) . ((card J) + 3) = goto ((card J) + 5) by A5; ::_thesis: verum
end;
theorem Th37: :: SCMFSA8C:37
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a = 0 & Directed I is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a = 0 & Directed I is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
let s be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a = 0 & Directed I is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st s . a = 0 & Directed I is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
let a be read-write Int-Location; ::_thesis: ( s . a = 0 & Directed I is_pseudo-closed_on s,P implies ( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 ) )
set I0 = Directed I;
set I1 = I ";" (Stop SCM+FSA);
set s00 = Initialize s;
set P00 = P +* (Directed I);
set s3 = Initialize s;
set P3 = P +* (if=0 (a,I,J));
A1: if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
set s4 = Comput ((P +* (if=0 (a,I,J))),(Initialize s),1);
set i = a =0_goto ((card J) + 3);
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by NAT_1:13;
then A2: ((card I) + (card J)) + 3 in dom (if=0 (a,I,J)) by AFINSQ_1:66;
A3: if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
A4: 0 in dom (if=0 (a,I,J)) by Th25;
A5: (P +* (if=0 (a,I,J))) . 0 = (if=0 (a,I,J)) . 0 by A4, A1, GRFUNC_1:2
.= a =0_goto ((card J) + 3) by Th26 ;
A6: card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = (card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1))) by SCMFSA6A:21
.= (card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + 1 by SCMFSA8A:15
.= ((card (Macro (a =0_goto ((card J) + 3)))) + (card J)) + 1 by SCMFSA6A:21
.= ((card J) + 2) + 1 by COMPOS_1:56
.= (card J) + (2 + 1) ;
A7: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A8: IC (Initialize s) = IC (Initialize s)
.= IC (Start-At (0,SCM+FSA)) by A7, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
A9: Comput ((P +* (if=0 (a,I,J))),(Initialize s),(0 + 1)) = Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (if=0 (a,I,J))),(Initialize s))
.= Exec ((a =0_goto ((card J) + 3)),(Initialize s)) by A8, A5, PBOOLE:143 ;
A10: if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
then if=0 (a,I,J) = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= if=0 (a,I,J) by A6, FUNCT_4:25;
then A11: Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= P +* (if=0 (a,I,J)) by A3, XBOOLE_1:1;
Reloc ((Directed I),((card J) + 3)) c= Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) by COMPOS_1:44, SCMFSA6A:16;
then A12: Reloc ((Directed I),((card J) + 3)) c= P +* (if=0 (a,I,J)) by A11, XBOOLE_1:1;
A13: for f being FinSeq-Location holds (Initialize s) . f = (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) . f by A9, SCMFSA_2:70;
for a being Int-Location holds (Initialize s) . a = (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) . a by A9, SCMFSA_2:70;
then A14: DataPart (Initialize s) = DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) by A13, SCMFSA_M:2;
A15: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A15, TARSKI:def_1;
then A16: not a in dom (Start-At (0,SCM+FSA)) ;
assume s . a = 0 ; ::_thesis: ( not Directed I is_pseudo-closed_on s,P or ( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 ) )
then (Initialize s) . a = 0 by A16, FUNCT_4:11;
then A17: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) = (card J) + 3 by A9, SCMFSA_2:70;
assume A18: Directed I is_pseudo-closed_on s,P ; ::_thesis: ( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
then A19: pseudo-LifeSpan (s,P,(Directed I)) = LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) by Th29;
DataPart s = DataPart (Initialize s) by MEMSTR_0:79;
then A20: Directed I is_pseudo-closed_on Initialize s,P +* (Directed I) by A18, Th23;
A21: Directed I c= P +* (Directed I) by FUNCT_4:25;
A22: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1))) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)),(pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize s),(pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)))))) + ((card J) + 3) by A20, A12, A17, A14, Th22, A21
.= (IC (Comput ((P +* (Directed I)),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))) + ((card J) + 3) by A18, Th21
.= (card (Directed I)) + ((card J) + 3) by A18, SCMFSA8A:def_4
.= (card I) + ((card J) + 3) by SCMFSA8A:20
.= ((card I) + (card J)) + 3 ;
then A23: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1)))) = (P +* (if=0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if=0 (a,I,J)) . (((card I) + (card J)) + 3) by A2, A1, GRFUNC_1:2
.= halt SCM+FSA by Th32 ;
then A24: P +* (if=0 (a,I,J)) halts_on Initialize s by EXTPRO_1:29;
hence if=0 (a,I,J) is_halting_on s,P by SCMFSA7B:def_7; ::_thesis: ( if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_s),k))_in_dom_(if=0_(a,I,J))
let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
percases ( k = 0 or ( 0 < k & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 ) or ( 0 < k & (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k ) ) ;
suppose k = 0 ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
then Comput ((P +* (if=0 (a,I,J))),(Initialize s),k) = Initialize s by EXTPRO_1:2;
then IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) = 0 by MEMSTR_0:16;
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by Th25; ::_thesis: verum
end;
supposeA25: ( 0 < k & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 ) ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then A26: ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by XREAL_1:29;
0 + 1 <= k by A25, INT_1:7;
then consider k1 being Nat such that
A27: 1 + k1 = k by NAT_1:10;
reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed I)),(Initialize s),k1)) as Element of NAT ;
A28: k1 < pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) by A25, A27, XREAL_1:6;
then k1 < pseudo-LifeSpan (s,P,(Directed I)) by A18, Th21;
then n in dom (Directed I) by A18, SCMFSA8A:17;
then n < card (Directed I) by AFINSQ_1:66;
then n + ((card J) + 3) < (card (Directed I)) + ((card J) + 3) by XREAL_1:6;
then n + ((card J) + 3) < (card I) + ((card J) + 3) by SCMFSA8A:20;
then A29: n + ((card J) + 3) < card (if=0 (a,I,J)) by A26, XXREAL_0:2;
IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)),k1)) by A27, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize s),k1))) + ((card J) + 3) by A20, A12, A17, A14, A28, Th22, A21 ;
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A29, AFINSQ_1:66; ::_thesis: verum
end;
suppose ( 0 < k & (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k ) ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A2, A22, A23, EXTPRO_1:5; ::_thesis: verum
end;
end;
end;
hence if=0 (a,I,J) is_closed_on s,P by SCMFSA7B:def_6; ::_thesis: LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if=0_(a,I,J))),(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_s),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_s),(P_+*_(Directed_I)),(Directed_I)))_+_1_<=_k
set J1 = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k )
assume A30: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k
assume not (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k ; ::_thesis: contradiction
then A31: k <= pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) by NAT_1:13;
A32: 0 in dom (if=0 (a,I,J)) by Th25;
A33: (P +* (if=0 (a,I,J))) /. (IC (Initialize s)) = (P +* (if=0 (a,I,J))) . (IC (Initialize s)) by PBOOLE:143;
CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),0))) = (P +* (if=0 (a,I,J))) . 0 by A33, MEMSTR_0:16
.= (if=0 (a,I,J)) . 0 by A32, A1, GRFUNC_1:2
.= a =0_goto ((card J) + 3) by Th26 ;
then consider k1 being Nat such that
A34: k1 + 1 = k by A30, NAT_1:6;
reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed I)),(Initialize s),k1)) as Element of NAT ;
k1 < k by A34, XREAL_1:29;
then A35: k1 < pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) by A31, XXREAL_0:2;
then k1 < pseudo-LifeSpan (s,P,(Directed I)) by A18, Th21;
then n in dom (Directed I) by A18, SCMFSA8A:17;
then n < card (Directed I) by AFINSQ_1:66;
then n + ((card J) + 3) < (card (Directed I)) + ((card J) + 3) by XREAL_1:6;
then A36: n + ((card J) + 3) < (card I) + ((card J) + 3) by SCMFSA8A:20;
A37: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)),k1)) by A34, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize s),k1))) + ((card J) + 3) by A20, A12, A17, A14, A35, Th22, A21 ;
card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a =0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a =0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
then IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) by A37, A36, AFINSQ_1:66;
then A38: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_4:99;
then A39: (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) in rng (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_1:def_3;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by XREAL_1:29;
then n + ((card J) + 3) < card (if=0 (a,I,J)) by A36, XXREAL_0:2;
then A40: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A37, AFINSQ_1:66;
A41: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = (P +* (if=0 (a,I,J))) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) by PBOOLE:143
.= (if=0 (a,I,J)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) by A40, A1, GRFUNC_1:2 ;
Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) c= if=0 (a,I,J) by A10, SCMFSA6A:16;
then (if=0 (a,I,J)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) by A38, GRFUNC_1:2;
hence contradiction by A30, A39, A41, COMPOS_1:def_11; ::_thesis: verum
end;
then LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 by A23, A24, EXTPRO_1:def_15;
hence LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 by A18, A19, Th21; ::_thesis: verum
end;
theorem :: SCMFSA8C:38
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a = 0 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((if=0 (a,I,J)),P,s)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a = 0 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((if=0 (a,I,J)),P,s)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s))
let ss be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a = 0 & Directed I is_pseudo-closed_on ss,P holds
DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss))
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a = 0 & Directed I is_pseudo-closed_on ss,P holds
DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss))
let a be read-write Int-Location; ::_thesis: ( ss . (intloc 0) = 1 & ss . a = 0 & Directed I is_pseudo-closed_on ss,P implies DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) )
set I0 = Directed I;
set s = Initialized ss;
set I1 = I ";" (Stop SCM+FSA);
set s00 = Initialize (Initialized ss);
set P00 = P +* (Directed I);
set s3 = Initialize (Initialized ss);
set P3 = P +* (if=0 (a,I,J));
A1: if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
set s4 = Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1);
set i = a =0_goto ((card J) + 3);
A2: Directed I c= P +* (Directed I) by FUNCT_4:25;
assume A3: ss . (intloc 0) = 1 ; ::_thesis: ( not ss . a = 0 or not Directed I is_pseudo-closed_on ss,P or DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) )
set s1 = Initialize (Initialized ss);
set P1 = P +* (I ";" (Stop SCM+FSA));
assume ss . a = 0 ; ::_thesis: ( not Directed I is_pseudo-closed_on ss,P or DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) )
then A4: (Initialized ss) . a = 0 by SCMFSA_M:37;
A5: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A6: IC (Initialize (Initialized ss)) = IC (Initialize (Initialized ss))
.= IC (Start-At (0,SCM+FSA)) by A5, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
A7: 0 in dom (if=0 (a,I,J)) by Th25;
A8: (P +* (if=0 (a,I,J))) . 0 = (if=0 (a,I,J)) . 0 by A7, FUNCT_4:13
.= a =0_goto ((card J) + 3) by Th26 ;
A9: Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(0 + 1)) = Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),0))) by EXTPRO_1:3
.= Following ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)))
.= Exec ((a =0_goto ((card J) + 3)),(Initialize (Initialized ss))) by A6, A8, PBOOLE:143 ;
A10: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A10, TARSKI:def_1;
then A11: not a in dom (Start-At (0,SCM+FSA)) ;
(Initialize (Initialized ss)) . a = 0 by A11, A4, FUNCT_4:11;
then A12: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) = (card J) + 3 by A9, SCMFSA_2:70;
assume Directed I is_pseudo-closed_on ss,P ; ::_thesis: DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss))
then A13: Directed I is_pseudo-closed_on Initialized ss,P by A3, Th24;
then A14: LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss))) = pseudo-LifeSpan ((Initialized ss),P,(Directed I)) by Th29;
DataPart (Initialized ss) = DataPart (Initialize (Initialized ss)) by MEMSTR_0:79;
then A15: Directed I is_pseudo-closed_on Initialize (Initialized ss),P +* (Directed I) by A13, Th23;
A16: for f being FinSeq-Location holds (Initialize (Initialized ss)) . f = (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) . f by A9, SCMFSA_2:70;
for a being Int-Location holds (Initialize (Initialized ss)) . a = (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) . a by A9, SCMFSA_2:70;
then A17: DataPart (Initialize (Initialized ss)) = DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) by A16, SCMFSA_M:2;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by NAT_1:13;
then A18: ((card I) + (card J)) + 3 in dom (if=0 (a,I,J)) by AFINSQ_1:66;
A19: card (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = (card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1))) by SCMFSA6A:21
.= (card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + 1 by SCMFSA8A:15
.= ((card (Macro (a =0_goto ((card J) + 3)))) + (card J)) + 1 by SCMFSA6A:21
.= ((card J) + 2) + 1 by COMPOS_1:56
.= (card J) + (2 + 1) ;
A20: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
A21: if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
A22: if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
then if=0 (a,I,J) = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= if=0 (a,I,J) by A19, FUNCT_4:25;
then A23: Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= P +* (if=0 (a,I,J)) by A21, XBOOLE_1:1;
Reloc ((Directed I),((card J) + 3)) c= Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) by COMPOS_1:44, SCMFSA6A:16;
then A24: Reloc ((Directed I),((card J) + 3)) c= P +* (if=0 (a,I,J)) by A23, XBOOLE_1:1;
IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1))) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I)))))) + ((card J) + 3) by A15, A24, A12, A17, Th22, A2
.= (IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed I)))))) + ((card J) + 3) by A13, Th21
.= (card (Directed I)) + ((card J) + 3) by A13, SCMFSA8A:def_4
.= (card I) + ((card J) + 3) by SCMFSA8A:20
.= ((card I) + (card J)) + 3 ;
then A25: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1)))) = (P +* (if=0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if=0 (a,I,J)) . (((card I) + (card J)) + 3) by A18, A1, GRFUNC_1:2
.= halt SCM+FSA by Th32 ;
then A26: P +* (if=0 (a,I,J)) halts_on Initialize (Initialized ss) by EXTPRO_1:29;
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if=0_(a,I,J))),(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_(Initialized_ss)),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_(Initialized_ss)),(P_+*_(Directed_I)),(Directed_I)))_+_1_<=_k
set J1 = (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 <= k )
assume A27: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 <= k
assume not (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 <= k ; ::_thesis: contradiction
then A28: k <= pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I)) by NAT_1:13;
A29: 0 in dom (if=0 (a,I,J)) by Th25;
A30: (P +* (if=0 (a,I,J))) /. (IC (Initialize (Initialized ss))) = (P +* (if=0 (a,I,J))) . (IC (Initialize (Initialized ss))) by PBOOLE:143;
CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),0))) = (P +* (if=0 (a,I,J))) . 0 by A30, MEMSTR_0:16
.= (if=0 (a,I,J)) . 0 by A29, A1, GRFUNC_1:2
.= a =0_goto ((card J) + 3) by Th26 ;
then consider k1 being Nat such that
A31: k1 + 1 = k by A27, NAT_1:6;
reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),k1)) as Element of NAT ;
k1 < k by A31, XREAL_1:29;
then A32: k1 < pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I)) by A28, XXREAL_0:2;
then k1 < pseudo-LifeSpan ((Initialized ss),P,(Directed I)) by A13, Th21;
then n in dom (Directed I) by A13, SCMFSA8A:17;
then n < card (Directed I) by AFINSQ_1:66;
then n + ((card J) + 3) < (card (Directed I)) + ((card J) + 3) by XREAL_1:6;
then A33: n + ((card J) + 3) < (card I) + ((card J) + 3) by SCMFSA8A:20;
A34: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k)) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)),k1)) by A31, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),k1))) + ((card J) + 3) by A15, A24, A12, A17, A32, Th22, A2 ;
card ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a =0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a =0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a =0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
then IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k)) in dom ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) by A34, A33, AFINSQ_1:66;
then A35: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k)) in dom (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_4:99;
then A36: (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) in rng (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_1:def_3;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by XREAL_1:29;
then n + ((card J) + 3) < card (if=0 (a,I,J)) by A33, XXREAL_0:2;
then A37: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k)) in dom (if=0 (a,I,J)) by A34, AFINSQ_1:66;
A38: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = (P +* (if=0 (a,I,J))) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) by PBOOLE:143
.= (if=0 (a,I,J)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) by A37, A1, GRFUNC_1:2 ;
Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) c= if=0 (a,I,J) by A22, SCMFSA6A:16;
then (if=0 (a,I,J)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = (Directed ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) by A35, GRFUNC_1:2;
hence contradiction by A27, A36, A38, COMPOS_1:def_11; ::_thesis: verum
end;
then A39: LifeSpan ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss))) = (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 by A25, A26, EXTPRO_1:def_15;
A40: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
A41: (Directed I) ";" (Stop SCM+FSA) = I ";" (Stop SCM+FSA) by SCMFSA8A:25;
Directed (Directed I) = Directed I by SCMFSA6A:22;
then A42: DataPart (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed I))))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed I))))) by A13, A41, Th29;
I ";" (Stop SCM+FSA) is_halting_on Initialized ss,P by A13, Th29;
then A43: P +* (I ";" (Stop SCM+FSA)) halts_on Initialize (Initialized ss) by SCMFSA7B:def_7;
thus DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((if=0 (a,I,J)),P,(Initialized ss)))
.= DataPart (Result ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)))) by A20
.= DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(LifeSpan ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)))))) by A26, EXTPRO_1:23
.= DataPart (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))))) by A39, EXTPRO_1:4
.= DataPart (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))))) by A15, A24, A12, A17, Th22, A2
.= DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)),(LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))))) by A13, A14, A42, Th21
.= DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))) by A43, EXTPRO_1:23
.= DataPart (IExec ((I ";" (Stop SCM+FSA)),P,(Initialized ss))) by A40
.= DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) ; ::_thesis: verum
end;
theorem Th39: :: SCMFSA8C:39
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a > 0 & Directed I is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a > 0 & Directed I is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
let s be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a > 0 & Directed I is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st s . a > 0 & Directed I is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
let a be read-write Int-Location; ::_thesis: ( s . a > 0 & Directed I is_pseudo-closed_on s,P implies ( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 ) )
set I0 = Directed I;
set I1 = I ";" (Stop SCM+FSA);
set s00 = Initialize s;
set P00 = P +* (Directed I);
set s3 = Initialize s;
set P3 = P +* (if>0 (a,I,J));
set s4 = Comput ((P +* (if>0 (a,I,J))),(Initialize s),1);
set i = a >0_goto ((card J) + 3);
A1: Directed I c= P +* (Directed I) by FUNCT_4:25;
A2: if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by NAT_1:13;
then A3: ((card I) + (card J)) + 3 in dom (if>0 (a,I,J)) by AFINSQ_1:66;
A4: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A5: IC (Initialize s) = IC (Initialize s)
.= IC (Start-At (0,SCM+FSA)) by A4, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
A6: 0 in dom (if>0 (a,I,J)) by Th25;
A7: (P +* (if>0 (a,I,J))) . 0 = (if>0 (a,I,J)) . 0 by A6, FUNCT_4:13
.= a >0_goto ((card J) + 3) by Th26 ;
A8: card (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = (card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1))) by SCMFSA6A:21
.= (card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1 by SCMFSA8A:15
.= ((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1 by SCMFSA6A:21
.= ((card J) + 2) + 1 by COMPOS_1:56
.= (card J) + (2 + 1) ;
A9: Comput ((P +* (if>0 (a,I,J))),(Initialize s),(0 + 1)) = Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (if>0 (a,I,J))),(Initialize s))
.= Exec ((a >0_goto ((card J) + 3)),(Initialize s)) by A5, A7, PBOOLE:143 ;
A10: if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
A11: if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
then if>0 (a,I,J) = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= if>0 (a,I,J) by A8, FUNCT_4:25;
then A12: Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= P +* (if>0 (a,I,J)) by A10, XBOOLE_1:1;
Reloc ((Directed I),((card J) + 3)) c= Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) by COMPOS_1:44, SCMFSA6A:16;
then A13: Reloc ((Directed I),((card J) + 3)) c= P +* (if>0 (a,I,J)) by A12, XBOOLE_1:1;
A14: for f being FinSeq-Location holds (Initialize s) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) . f by A9, SCMFSA_2:71;
for a being Int-Location holds (Initialize s) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) . a by A9, SCMFSA_2:71;
then A15: DataPart (Initialize s) = DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) by A14, SCMFSA_M:2;
A16: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A16, TARSKI:def_1;
then not a in dom (Start-At (0,SCM+FSA)) ;
then A17: (Initialize s) . a = s . a by FUNCT_4:11;
assume s . a > 0 ; ::_thesis: ( not Directed I is_pseudo-closed_on s,P or ( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 ) )
then A18: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) = (card J) + 3 by A9, A17, SCMFSA_2:71;
assume A19: Directed I is_pseudo-closed_on s,P ; ::_thesis: ( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
then A20: pseudo-LifeSpan (s,P,(Directed I)) = LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s)) by Th29;
DataPart s = DataPart (Initialize s) by MEMSTR_0:79;
then A21: Directed I is_pseudo-closed_on Initialize s,P +* (Directed I) by A19, Th23;
A22: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1))) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)),(pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize s),(pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)))))) + ((card J) + 3) by A21, A13, A18, A15, Th22, A1
.= (IC (Comput ((P +* (Directed I)),(Initialize s),(pseudo-LifeSpan (s,P,(Directed I)))))) + ((card J) + 3) by A19, Th21
.= (card (Directed I)) + ((card J) + 3) by A19, SCMFSA8A:def_4
.= (card I) + ((card J) + 3) by SCMFSA8A:20
.= ((card I) + (card J)) + 3 ;
then A23: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1)))) = (P +* (if>0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if>0 (a,I,J)) . (((card I) + (card J)) + 3) by A3, A2, GRFUNC_1:2
.= halt SCM+FSA by Th33 ;
then A24: P +* (if>0 (a,I,J)) halts_on Initialize s by EXTPRO_1:29;
hence if>0 (a,I,J) is_halting_on s,P by SCMFSA7B:def_7; ::_thesis: ( if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 )
now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_s),k))_in_dom_(if>0_(a,I,J))
let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
percases ( k = 0 or ( 0 < k & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 ) or ( 0 < k & (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k ) ) ;
suppose k = 0 ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
then Comput ((P +* (if>0 (a,I,J))),(Initialize s),k) = Initialize s by EXTPRO_1:2;
then IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) = 0 by MEMSTR_0:16;
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by Th25; ::_thesis: verum
end;
supposeA25: ( 0 < k & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 ) ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then A26: ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by XREAL_1:29;
0 + 1 <= k by A25, INT_1:7;
then consider k1 being Nat such that
A27: 1 + k1 = k by NAT_1:10;
reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed I)),(Initialize s),k1)) as Element of NAT ;
A28: k1 < pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) by A25, A27, XREAL_1:6;
then k1 < pseudo-LifeSpan (s,P,(Directed I)) by A19, Th21;
then n in dom (Directed I) by A19, SCMFSA8A:17;
then n < card (Directed I) by AFINSQ_1:66;
then n + ((card J) + 3) < (card (Directed I)) + ((card J) + 3) by XREAL_1:6;
then n + ((card J) + 3) < (card I) + ((card J) + 3) by SCMFSA8A:20;
then A29: n + ((card J) + 3) < card (if>0 (a,I,J)) by A26, XXREAL_0:2;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)),k1)) by A27, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize s),k1))) + ((card J) + 3) by A21, A13, A18, A15, A28, Th22, A1 ;
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A29, AFINSQ_1:66; ::_thesis: verum
end;
suppose ( 0 < k & (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k ) ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A3, A22, A23, EXTPRO_1:5; ::_thesis: verum
end;
end;
end;
hence if>0 (a,I,J) is_closed_on s,P by SCMFSA7B:def_6; ::_thesis: LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if>0_(a,I,J))),(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_s),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_s),(P_+*_(Directed_I)),(Directed_I)))_+_1_<=_k
set J1 = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k )
assume A30: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k
assume not (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 <= k ; ::_thesis: contradiction
then A31: k <= pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) by NAT_1:13;
A32: 0 in dom (if>0 (a,I,J)) by Th25;
A33: (P +* (if>0 (a,I,J))) /. (IC (Initialize s)) = (P +* (if>0 (a,I,J))) . (IC (Initialize s)) by PBOOLE:143;
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),0))) = (P +* (if>0 (a,I,J))) . 0 by A33, MEMSTR_0:16
.= (if>0 (a,I,J)) . 0 by A32, A2, GRFUNC_1:2
.= a >0_goto ((card J) + 3) by Th26 ;
then consider k1 being Nat such that
A34: k1 + 1 = k by A30, NAT_1:6;
reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed I)),(Initialize s),k1)) as Element of NAT ;
k1 < k by A34, XREAL_1:29;
then A35: k1 < pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I)) by A31, XXREAL_0:2;
then k1 < pseudo-LifeSpan (s,P,(Directed I)) by A19, Th21;
then n in dom (Directed I) by A19, SCMFSA8A:17;
then n < card (Directed I) by AFINSQ_1:66;
then n + ((card J) + 3) < (card (Directed I)) + ((card J) + 3) by XREAL_1:6;
then A36: n + ((card J) + 3) < (card I) + ((card J) + 3) by SCMFSA8A:20;
A37: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)),k1)) by A34, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize s),k1))) + ((card J) + 3) by A21, A13, A18, A15, A35, Th22, A1 ;
card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a >0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
then IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) by A37, A36, AFINSQ_1:66;
then A38: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_4:99;
then A39: (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) in rng (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_1:def_3;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by XREAL_1:29;
then n + ((card J) + 3) < card (if>0 (a,I,J)) by A36, XXREAL_0:2;
then A40: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A37, AFINSQ_1:66;
A41: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = (P +* (if>0 (a,I,J))) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) by PBOOLE:143
.= (if>0 (a,I,J)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) by A40, A2, GRFUNC_1:2 ;
Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) c= if>0 (a,I,J) by A11, SCMFSA6A:16;
then (if>0 (a,I,J)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) by A38, GRFUNC_1:2;
hence contradiction by A30, A39, A41, COMPOS_1:def_11; ::_thesis: verum
end;
then LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (pseudo-LifeSpan ((Initialize s),(P +* (Directed I)),(Directed I))) + 1 by A23, A24, EXTPRO_1:def_15;
hence LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize s))) + 1 by A19, A20, Th21; ::_thesis: verum
end;
theorem Th40: :: SCMFSA8C:40
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a > 0 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((if>0 (a,I,J)),P,s)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a > 0 & Directed I is_pseudo-closed_on s,P holds
DataPart (IExec ((if>0 (a,I,J)),P,s)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,s))
let ss be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a > 0 & Directed I is_pseudo-closed_on ss,P holds
DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss))
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a > 0 & Directed I is_pseudo-closed_on ss,P holds
DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss))
let a be read-write Int-Location; ::_thesis: ( ss . (intloc 0) = 1 & ss . a > 0 & Directed I is_pseudo-closed_on ss,P implies DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) )
set I0 = Directed I;
set s = Initialized ss;
set I1 = I ";" (Stop SCM+FSA);
set s00 = Initialize (Initialized ss);
set P00 = P +* (Directed I);
set s3 = Initialize (Initialized ss);
set P3 = P +* (if>0 (a,I,J));
set s4 = Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1);
set i = a >0_goto ((card J) + 3);
A1: Directed I c= P +* (Directed I) by FUNCT_4:25;
A2: if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
assume A3: ss . (intloc 0) = 1 ; ::_thesis: ( not ss . a > 0 or not Directed I is_pseudo-closed_on ss,P or DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) )
set s1 = Initialize (Initialized ss);
set P1 = P +* (I ";" (Stop SCM+FSA));
assume ss . a > 0 ; ::_thesis: ( not Directed I is_pseudo-closed_on ss,P or DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) )
then A4: (Initialized ss) . a > 0 by SCMFSA_M:37;
A5: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A6: IC (Initialize (Initialized ss)) = IC (Initialize (Initialized ss))
.= IC (Start-At (0,SCM+FSA)) by A5, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
A7: 0 in dom (if>0 (a,I,J)) by Th25;
A8: (P +* (if>0 (a,I,J))) . 0 = (if>0 (a,I,J)) . 0 by A7, FUNCT_4:13
.= a >0_goto ((card J) + 3) by Th26 ;
A9: Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(0 + 1)) = Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),0))) by EXTPRO_1:3
.= Following ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)))
.= Exec ((a >0_goto ((card J) + 3)),(Initialize (Initialized ss))) by A6, A8, PBOOLE:143 ;
A10: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A10, TARSKI:def_1;
then not a in dom (Start-At (0,SCM+FSA)) ;
then (Initialize (Initialized ss)) . a = (Initialized ss) . a by FUNCT_4:11;
then A11: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) = (card J) + 3 by A4, A9, SCMFSA_2:71;
assume Directed I is_pseudo-closed_on ss,P ; ::_thesis: DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss))
then A12: Directed I is_pseudo-closed_on Initialized ss,P by A3, Th24;
then A13: LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss))) = pseudo-LifeSpan ((Initialized ss),P,(Directed I)) by Th29;
DataPart (Initialized ss) = DataPart (Initialize (Initialized ss)) by MEMSTR_0:79;
then A14: Directed I is_pseudo-closed_on Initialize (Initialized ss),P +* (Directed I) by A12, Th23;
A15: for f being FinSeq-Location holds (Initialize (Initialized ss)) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) . f by A9, SCMFSA_2:71;
for a being Int-Location holds (Initialize (Initialized ss)) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) . a by A9, SCMFSA_2:71;
then A16: DataPart (Initialize (Initialized ss)) = DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) by A15, SCMFSA_M:2;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by NAT_1:13;
then A17: ((card I) + (card J)) + 3 in dom (if>0 (a,I,J)) by AFINSQ_1:66;
A18: card (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) = (card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1))) by SCMFSA6A:21
.= (card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1 by SCMFSA8A:15
.= ((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1 by SCMFSA6A:21
.= ((card J) + 2) + 1 by COMPOS_1:56
.= (card J) + (2 + 1) ;
(Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
then A19: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized ss) ;
A20: if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
A21: if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
then if>0 (a,I,J) = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= if>0 (a,I,J) by A18, FUNCT_4:25;
then A22: Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) c= P +* (if>0 (a,I,J)) by A20, XBOOLE_1:1;
Reloc ((Directed I),((card J) + 3)) c= Reloc ((I ";" (Stop SCM+FSA)),((card J) + 3)) by COMPOS_1:44, SCMFSA6A:16;
then A23: Reloc ((Directed I),((card J) + 3)) c= P +* (if>0 (a,I,J)) by A22, XBOOLE_1:1;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1))) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I)))))) + ((card J) + 3) by A14, A23, A11, A16, Th22, A1
.= (IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed I)))))) + ((card J) + 3) by A12, Th21
.= (card (Directed I)) + ((card J) + 3) by A12, SCMFSA8A:def_4
.= (card I) + ((card J) + 3) by SCMFSA8A:20
.= ((card I) + (card J)) + 3 ;
then A24: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1)))) = (P +* (if>0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if>0 (a,I,J)) . (((card I) + (card J)) + 3) by A17, A2, GRFUNC_1:2
.= halt SCM+FSA by Th33 ;
then A25: P +* (if>0 (a,I,J)) halts_on Initialize (Initialized ss) by EXTPRO_1:29;
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if>0_(a,I,J))),(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_(Initialized_ss)),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_(Initialized_ss)),(P_+*_(Directed_I)),(Directed_I)))_+_1_<=_k
set J1 = (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 <= k )
assume A26: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 <= k
assume not (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 <= k ; ::_thesis: contradiction
then A27: k <= pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I)) by NAT_1:13;
A28: 0 in dom (if>0 (a,I,J)) by Th25;
A29: (P +* (if>0 (a,I,J))) /. (IC (Initialize (Initialized ss))) = (P +* (if>0 (a,I,J))) . (IC (Initialize (Initialized ss))) by PBOOLE:143;
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),0))) = (P +* (if>0 (a,I,J))) . 0 by A29, MEMSTR_0:16
.= (if>0 (a,I,J)) . 0 by A28, A2, GRFUNC_1:2
.= a >0_goto ((card J) + 3) by Th26 ;
then consider k1 being Nat such that
A30: k1 + 1 = k by A26, NAT_1:6;
reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),k1)) as Element of NAT ;
k1 < k by A30, XREAL_1:29;
then A31: k1 < pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I)) by A27, XXREAL_0:2;
then k1 < pseudo-LifeSpan ((Initialized ss),P,(Directed I)) by A12, Th21;
then n in dom (Directed I) by A12, SCMFSA8A:17;
then n < card (Directed I) by AFINSQ_1:66;
then n + ((card J) + 3) < (card (Directed I)) + ((card J) + 3) by XREAL_1:6;
then A32: n + ((card J) + 3) < (card I) + ((card J) + 3) by SCMFSA8A:20;
A33: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k)) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)),k1)) by A30, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),k1))) + ((card J) + 3) by A14, A23, A11, A16, A31, Th22, A1 ;
card ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) = (card (((Macro (a >0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + (card (Goto ((card I) + 1)))) + (card I) by SCMFSA6A:21
.= ((card ((Macro (a >0_goto ((card J) + 3))) ";" J)) + 1) + (card I) by SCMFSA8A:15
.= (((card (Macro (a >0_goto ((card J) + 3)))) + (card J)) + 1) + (card I) by SCMFSA6A:21
.= ((2 + (card J)) + 1) + (card I) by COMPOS_1:56
.= ((card I) + (card J)) + 3 ;
then IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k)) in dom ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) by A33, A32, AFINSQ_1:66;
then A34: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k)) in dom (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_4:99;
then A35: (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) in rng (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) by FUNCT_1:def_3;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by XREAL_1:29;
then n + ((card J) + 3) < card (if>0 (a,I,J)) by A32, XXREAL_0:2;
then A36: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k)) in dom (if>0 (a,I,J)) by A33, AFINSQ_1:66;
A37: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = (P +* (if>0 (a,I,J))) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) by PBOOLE:143
.= (if>0 (a,I,J)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) by A36, A2, GRFUNC_1:2 ;
Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) c= if>0 (a,I,J) by A21, SCMFSA6A:16;
then (if>0 (a,I,J)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = (Directed ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) by A34, GRFUNC_1:2;
hence contradiction by A26, A35, A37, COMPOS_1:def_11; ::_thesis: verum
end;
then A38: LifeSpan ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss))) = (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))) + 1 by A24, A25, EXTPRO_1:def_15;
A39: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
A40: (Directed I) ";" (Stop SCM+FSA) = I ";" (Stop SCM+FSA) by SCMFSA8A:25;
Directed (Directed I) = Directed I by SCMFSA6A:22;
then A41: DataPart (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed I))))) = DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed I))))) by A12, A40, Th29;
I ";" (Stop SCM+FSA) is_halting_on Initialized ss,P by A12, Th29;
then A42: P +* (I ";" (Stop SCM+FSA)) halts_on Initialize (Initialized ss) by SCMFSA7B:def_7;
thus DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((if>0 (a,I,J)),P,(Initialized ss)))
.= DataPart (Result ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)))) by A19
.= DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(LifeSpan ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)))))) by A25, EXTPRO_1:23
.= DataPart (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))))) by A38, EXTPRO_1:4
.= DataPart (Comput ((P +* (Directed I)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed I)),(Directed I))))) by A14, A23, A11, A16, Th22, A1
.= DataPart (Comput ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)),(LifeSpan ((P +* (I ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))))) by A12, A13, A41, Th21
.= DataPart (Result ((P +* (I ";" (Stop SCM+FSA))),((Initialized ss) +* (Initialize ((intloc 0) .--> 1))))) by A39, A42, EXTPRO_1:23
.= DataPart (IExec ((I ";" (Stop SCM+FSA)),P,(Initialized ss)))
.= DataPart (IExec ((I ";" (Stop SCM+FSA)),P,ss)) ; ::_thesis: verum
end;
theorem Th41: :: SCMFSA8C:41
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a <> 0 & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a <> 0 & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
let s be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a <> 0 & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st s . a <> 0 & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
let a be read-write Int-Location; ::_thesis: ( s . a <> 0 & Directed J is_pseudo-closed_on s,P implies ( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 ) )
set J0 = Directed J;
set s0 = Initialized s;
set J9 = J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)));
set s00 = Initialize s;
set P00 = P +* (Directed J);
set s3 = Initialize s;
set P3 = P +* (if=0 (a,I,J));
set s4 = Comput ((P +* (if=0 (a,I,J))),(Initialize s),1);
set s5 = Comput ((P +* (if=0 (a,I,J))),(Initialize s),2);
set i = a =0_goto ((card J) + 3);
A1: if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
A2: Directed J c= P +* (Directed J) by FUNCT_4:25;
if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
then if=0 (a,I,J) = (((Macro (a =0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then if=0 (a,I,J) = ((Macro (a =0_goto ((card J) + 3))) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25;
then A3: if=0 (a,I,J) = (Macro (a =0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:25;
card (Macro (a =0_goto ((card J) + 3))) = 2 by COMPOS_1:56;
then A4: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= if=0 (a,I,J) by A3, FUNCT_4:25;
A5: 0 in dom (if=0 (a,I,J)) by Th25;
A6: (P +* (if=0 (a,I,J))) . 0 = (if=0 (a,I,J)) . 0 by A5, FUNCT_4:13
.= a =0_goto ((card J) + 3) by Th26 ;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (2 + 2) by SCMFSA8B:11
.= ((card J) + 2) + ((card I) + 2) ;
then A7: ((card J) + 2) + 0 < card (if=0 (a,I,J)) by XREAL_1:8;
then A8: (card J) + 2 in dom (if=0 (a,I,J)) by AFINSQ_1:66;
A9: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A10: IC (Initialize s) = IC (Initialize s)
.= IC (Start-At (0,SCM+FSA)) by A9, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
set ss = Comput ((P +* (if=0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2));
set PP = P +* (if=0 (a,I,J));
if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
then A11: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= P +* (if=0 (a,I,J)) by A4, XBOOLE_1:1;
Reloc ((Directed J),2) c= Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) by COMPOS_1:44, SCMFSA6A:16;
then A12: Reloc ((Directed J),2) c= P +* (if=0 (a,I,J)) by A11, XBOOLE_1:1;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by NAT_1:13;
then A13: ((card I) + (card J)) + 3 in dom (if=0 (a,I,J)) by AFINSQ_1:66;
assume s . a <> 0 ; ::_thesis: ( not Directed J is_pseudo-closed_on s,P or ( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 ) )
then A14: (Initialized s) . a <> 0 by SCMFSA_M:37;
A15: 1 in dom (if=0 (a,I,J)) by Th25;
assume A16: Directed J is_pseudo-closed_on s,P ; ::_thesis: ( if=0 (a,I,J) is_halting_on s,P & if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
then A17: pseudo-LifeSpan (s,P,(Directed J)) = LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s)) by Th29;
A18: (P +* (if=0 (a,I,J))) . 1 = (if=0 (a,I,J)) . 1 by A15, FUNCT_4:13
.= goto 2 by Th26 ;
DataPart s = DataPart (Initialize s) by MEMSTR_0:79;
then A19: Directed J is_pseudo-closed_on Initialize s,P +* (Directed J) by A16, Th23;
A20: Comput ((P +* (if=0 (a,I,J))),(Initialize s),(0 + 1)) = Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (if=0 (a,I,J))),(Initialize s))
.= Exec ((a =0_goto ((card J) + 3)),(Initialize s)) by A10, A6, PBOOLE:143 ;
A21: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A21, TARSKI:def_1;
then not a in dom (Start-At (0,SCM+FSA)) ;
then (Initialize s) . a = s . a by FUNCT_4:11
.= (Initialized s) . a by SCMFSA_M:37 ;
then A22: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) = succ (IC (Initialize s)) by A14, A20, SCMFSA_2:70
.= 0 + 1 by A10 ;
A23: Comput ((P +* (if=0 (a,I,J))),(Initialize s),(1 + 1)) = Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),1))) by EXTPRO_1:3
.= Exec ((goto 2),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),1))) by A22, A18, PBOOLE:143 ;
then A24: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)) = 2 by SCMFSA_2:69;
A25: now__::_thesis:_for_f_being_FinSeq-Location_holds_(Initialize_s)_._f_=_(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_s),2))_._f
let f be FinSeq-Location ; ::_thesis: (Initialize s) . f = (Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)) . f
thus (Initialize s) . f = (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) . f by A20, SCMFSA_2:70
.= (Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)) . f by A23, SCMFSA_2:69 ; ::_thesis: verum
end;
now__::_thesis:_for_a_being_Int-Location_holds_(Initialize_s)_._a_=_(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_s),2))_._a
let a be Int-Location; ::_thesis: (Initialize s) . a = (Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)) . a
thus (Initialize s) . a = (Comput ((P +* (if=0 (a,I,J))),(Initialize s),1)) . a by A20, SCMFSA_2:70
.= (Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)) . a by A23, SCMFSA_2:69 ; ::_thesis: verum
end;
then A26: DataPart (Initialize s) = DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)) by A25, SCMFSA_M:2;
A27: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2))) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)),(pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed J)),(Initialize s),(pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J)))))) + 2 by A19, A12, A24, A26, Th22, A2
.= (IC (Comput ((P +* (Directed J)),(Initialize s),(pseudo-LifeSpan (s,P,(Directed J)))))) + 2 by A16, Th21
.= (card (Directed J)) + 2 by A16, SCMFSA8A:def_4
.= (card J) + 2 by SCMFSA8A:20 ;
then A28: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2)))) = (P +* (if=0 (a,I,J))) . ((card J) + 2) by PBOOLE:143
.= (if=0 (a,I,J)) . ((card J) + 2) by A8, A1, GRFUNC_1:2
.= goto (((card I) + (card J)) + 3) by Th34 ;
A29: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),(((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2) + 1))) = IC (Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2))))) by EXTPRO_1:3
.= ((card I) + (card J)) + 3 by A28, SCMFSA_2:69 ;
then A30: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),(((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2) + 1)))) = (P +* (if=0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if=0 (a,I,J)) . (((card I) + (card J)) + 3) by A13, A1, GRFUNC_1:2
.= halt SCM+FSA by Th32 ;
then A31: P +* (if=0 (a,I,J)) halts_on Initialize s by EXTPRO_1:29;
hence if=0 (a,I,J) is_halting_on s,P by SCMFSA7B:def_7; ::_thesis: ( if=0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_s),k))_in_dom_(if=0_(a,I,J))
let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
percases ( k = 0 or ( 0 < k & k = 1 ) or ( 0 < k & k <> 1 & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 ) or ( 0 < k & k <> 1 & (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 <= k ) ) ;
suppose k = 0 ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
then Comput ((P +* (if=0 (a,I,J))),(Initialize s),k) = Initialize s by EXTPRO_1:2;
then IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) = 0 by MEMSTR_0:16;
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by Th25; ::_thesis: verum
end;
suppose ( 0 < k & k = 1 ) ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A22, Th25; ::_thesis: verum
end;
supposeA32: ( 0 < k & k <> 1 & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 ) ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
then 0 + 1 <= k by INT_1:7;
then 1 < k by A32, XXREAL_0:1;
then 0 + (1 + 1) <= k by INT_1:7;
then consider k2 being Nat such that
A33: 2 + k2 = k by NAT_1:10;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (2 + 2) by SCMFSA8B:11
.= ((card J) + 2) + ((card I) + 2) ;
then A34: (card J) + 2 <= card (if=0 (a,I,J)) by NAT_1:12;
reconsider k2 = k2 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed J)),(Initialize s),k2)) as Element of NAT ;
A35: k2 < pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J)) by A32, A33, XREAL_1:6;
then k2 < pseudo-LifeSpan (s,P,(Directed J)) by A16, Th21;
then n in dom (Directed J) by A16, SCMFSA8A:17;
then n < card (Directed J) by AFINSQ_1:66;
then n + 2 < (card (Directed J)) + 2 by XREAL_1:6;
then n + 2 < (card J) + 2 by SCMFSA8A:20;
then A36: n + 2 < card (if=0 (a,I,J)) by A34, XXREAL_0:2;
IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)),k2)) by A33, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed J)),(Initialize s),k2))) + 2 by A19, A12, A24, A26, A35, Th22, A2 ;
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A36, AFINSQ_1:66; ::_thesis: verum
end;
supposeA37: ( 0 < k & k <> 1 & (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 <= k ) ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),b1)) in dom (if=0 (a,I,J))
hereby ::_thesis: verum
percases ( (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 = k or (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 < k ) by A37, XXREAL_0:1;
suppose (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 = k ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J))
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A7, A27, AFINSQ_1:66; ::_thesis: verum
end;
suppose (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 < k ; ::_thesis: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J))
then ((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2) + 1 <= k by INT_1:7;
hence IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) in dom (if=0 (a,I,J)) by A13, A29, A30, EXTPRO_1:5; ::_thesis: verum
end;
end;
end;
end;
end;
end;
hence if=0 (a,I,J) is_closed_on s,P by SCMFSA7B:def_6; ::_thesis: LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3
A38: CurInstr ((P +* (if=0 (a,I,J))),(Initialize s)) = a =0_goto ((card J) + 3) by A10, A6, PBOOLE:143;
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if=0_(a,I,J))),(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_s),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_s),(P_+*_(Directed_J)),(Directed_J)))_+_(1_+_2)_<=_k
A39: 0 + 2 < ((card I) + (card J)) + 3 by XREAL_1:8;
then A40: 2 in dom (if=0 (a,I,J)) by Th27;
A41: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),2))) = (P +* (if=0 (a,I,J))) . 2 by A24, PBOOLE:143
.= (if=0 (a,I,J)) . 2 by A40, A1, GRFUNC_1:2 ;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k )
assume A42: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k
A43: k <> 0 by A42, A38, EXTPRO_1:2;
A44: k <> 1 by A22, A42, A18, PBOOLE:143;
k <> 2 by A42, A39, Th27, A41;
then 2 < k by A43, A44, NAT_1:26;
then consider k2 being Nat such that
A45: 2 + k2 = k by NAT_1:10;
reconsider k2 = k2 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed J)),(Initialize s),k2)) as Element of NAT ;
assume not (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k ; ::_thesis: contradiction
then k < ((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 1) + 2 ;
then k2 < (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 1 by A45, XREAL_1:6;
then A46: k2 <= pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J)) by NAT_1:13;
then A47: k2 <= pseudo-LifeSpan (s,P,(Directed J)) by A16, Th21;
A48: now__::_thesis:_n_+_2_<_((card_I)_+_(card_J))_+_3
percases ( k2 = pseudo-LifeSpan (s,P,(Directed J)) or k2 < pseudo-LifeSpan (s,P,(Directed J)) ) by A47, XXREAL_0:1;
supposeA49: k2 = pseudo-LifeSpan (s,P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
((card I) + (card J)) + (2 + 1) = (((card J) + 2) + 1) + (card I) ;
then A50: ((card J) + 2) + 1 <= ((card I) + (card J)) + 3 by NAT_1:11;
IC (Comput ((P +* (Directed J)),(Initialize s),k2)) = card (Directed J) by A16, A49, SCMFSA8A:def_4;
then n = card J by SCMFSA8A:20;
hence n + 2 < ((card I) + (card J)) + 3 by A50, NAT_1:13; ::_thesis: verum
end;
suppose k2 < pseudo-LifeSpan (s,P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
then n in dom (Directed J) by A16, SCMFSA8A:17;
then n < card (Directed J) by AFINSQ_1:66;
then n + 2 < (card (Directed J)) + 2 by XREAL_1:6;
then A51: n + 2 < (card J) + 2 by SCMFSA8A:20;
((card I) + (card J)) + (1 + 2) = ((card J) + 2) + ((card I) + 1) ;
then (card J) + 2 <= ((card I) + (card J)) + 3 by NAT_1:11;
hence n + 2 < ((card I) + (card J)) + 3 by A51, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
then A52: n + 2 in dom (if=0 (a,I,J)) by Th27;
A53: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),2)),k2)) by A45, EXTPRO_1:4
.= n + 2 by A19, A12, A24, A26, A46, Th22, A2 ;
CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) = (P +* (if=0 (a,I,J))) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) by PBOOLE:143
.= (if=0 (a,I,J)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize s),k))) by A53, A52, A1, GRFUNC_1:2 ;
hence contradiction by A42, A53, A48, Th27; ::_thesis: verum
end;
then LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 3 by A30, A31, EXTPRO_1:def_15;
hence LifeSpan ((P +* (if=0 (a,I,J))),(Initialize s)) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 by A16, A17, Th21; ::_thesis: verum
end;
theorem :: SCMFSA8C:42
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <> 0 & Directed J is_pseudo-closed_on s,P holds
DataPart (IExec ((if=0 (a,I,J)),P,s)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,s))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <> 0 & Directed J is_pseudo-closed_on s,P holds
DataPart (IExec ((if=0 (a,I,J)),P,s)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,s))
let ss be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a <> 0 & Directed J is_pseudo-closed_on ss,P holds
DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss))
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a <> 0 & Directed J is_pseudo-closed_on ss,P holds
DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss))
let a be read-write Int-Location; ::_thesis: ( ss . (intloc 0) = 1 & ss . a <> 0 & Directed J is_pseudo-closed_on ss,P implies DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) )
set J0 = Directed J;
set s = Initialized ss;
set s0 = Initialized (Initialized ss);
set J9 = J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)));
set s00 = Initialize (Initialized ss);
set P00 = P +* (Directed J);
set s3 = Initialize (Initialized ss);
set P3 = P +* (if=0 (a,I,J));
set s4 = Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1);
set s5 = Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2);
set i = a =0_goto ((card J) + 3);
A1: Directed J c= P +* (Directed J) by FUNCT_4:25;
A2: if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
assume A3: ss . (intloc 0) = 1 ; ::_thesis: ( not ss . a <> 0 or not Directed J is_pseudo-closed_on ss,P or DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) )
set s1 = Initialize (Initialized ss);
set P1 = P +* (J ";" (Stop SCM+FSA));
assume ss . a <> 0 ; ::_thesis: ( not Directed J is_pseudo-closed_on ss,P or DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) )
then A4: (Initialized (Initialized ss)) . a <> 0 by SCMFSA_M:37;
A5: 0 in dom (if=0 (a,I,J)) by Th25;
A6: (P +* (if=0 (a,I,J))) . 0 = (if=0 (a,I,J)) . 0 by A5, FUNCT_4:13
.= a =0_goto ((card J) + 3) by Th26 ;
(Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
then A7: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized ss) ;
A8: (Directed J) ";" (Stop SCM+FSA) = J ";" (Stop SCM+FSA) by SCMFSA8A:25;
A9: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A10: IC (Initialize (Initialized ss)) = IC (Initialize (Initialized ss))
.= IC (Start-At (0,SCM+FSA)) by A9, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
then if=0 (a,I,J) = (((Macro (a =0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then if=0 (a,I,J) = ((Macro (a =0_goto ((card J) + 3))) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25;
then A11: if=0 (a,I,J) = (Macro (a =0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:25;
card (Macro (a =0_goto ((card J) + 3))) = 2 by COMPOS_1:56;
then A12: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= if=0 (a,I,J) by A11, FUNCT_4:25;
if=0 (a,I,J) c= P +* (if=0 (a,I,J)) by FUNCT_4:25;
then A13: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= P +* (if=0 (a,I,J)) by A12, XBOOLE_1:1;
Reloc ((Directed J),2) c= Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) by COMPOS_1:44, SCMFSA6A:16;
then A14: Reloc ((Directed J),2) c= P +* (if=0 (a,I,J)) by A13, XBOOLE_1:1;
A15: Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(0 + 1)) = Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),0))) by EXTPRO_1:3
.= Following ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)))
.= Exec ((a =0_goto ((card J) + 3)),(Initialize (Initialized ss))) by A10, A6, PBOOLE:143 ;
assume Directed J is_pseudo-closed_on ss,P ; ::_thesis: DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss))
then A16: Directed J is_pseudo-closed_on Initialized ss,P by A3, Th24;
then J ";" (Stop SCM+FSA) is_halting_on Initialized ss,P by Th29;
then A17: P +* (J ";" (Stop SCM+FSA)) halts_on Initialize (Initialized ss) by SCMFSA7B:def_7;
DataPart (Initialized ss) = DataPart (Initialize (Initialized ss)) by MEMSTR_0:79;
then A18: Directed J is_pseudo-closed_on Initialize (Initialized ss),P +* (Directed J) by A16, Th23;
(Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
then A19: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized ss) ;
A20: Directed (Directed J) = Directed J by SCMFSA6A:22;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (2 + 2) by SCMFSA8B:11
.= ((card J) + 2) + ((card I) + 2) ;
then ((card J) + 2) + 0 < card (if=0 (a,I,J)) by XREAL_1:8;
then A21: (card J) + 2 in dom (if=0 (a,I,J)) by AFINSQ_1:66;
card (if=0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:11
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if=0 (a,I,J)) by NAT_1:13;
then A22: ((card I) + (card J)) + 3 in dom (if=0 (a,I,J)) by AFINSQ_1:66;
set s9 = Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2));
LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss))) = pseudo-LifeSpan ((Initialized ss),P,(Directed J)) by A16, Th29;
then A23: DataPart (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed J))))) = DataPart (Comput ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss)),(LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))))) by A16, A20, A8, Th29;
A24: 1 in dom (if=0 (a,I,J)) by Th25;
A25: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A25, TARSKI:def_1;
then not a in dom (Start-At (0,SCM+FSA)) ;
then (Initialize (Initialized ss)) . a = (Initialized (Initialized ss)) . a by FUNCT_4:11;
then A26: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) = succ (IC (Initialize (Initialized ss))) by A4, A15, SCMFSA_2:70
.= 0 + 1 by A10 ;
A27: (P +* (if=0 (a,I,J))) . 1 = (if=0 (a,I,J)) . 1 by A24, FUNCT_4:13
.= goto 2 by Th26 ;
A28: Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(1 + 1)) = Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1))) by EXTPRO_1:3
.= Exec ((goto 2),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1))) by A26, A27, PBOOLE:143 ;
then A29: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)) = 2 by SCMFSA_2:69;
A30: now__::_thesis:_for_f_being_FinSeq-Location_holds_(Initialize_(Initialized_ss))_._f_=_(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_(Initialized_ss)),2))_._f
let f be FinSeq-Location ; ::_thesis: (Initialize (Initialized ss)) . f = (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)) . f
thus (Initialize (Initialized ss)) . f = (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) . f by A15, SCMFSA_2:70
.= (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)) . f by A28, SCMFSA_2:69 ; ::_thesis: verum
end;
now__::_thesis:_for_a_being_Int-Location_holds_(Initialize_(Initialized_ss))_._a_=_(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_(Initialized_ss)),2))_._a
let a be Int-Location; ::_thesis: (Initialize (Initialized ss)) . a = (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)) . a
thus (Initialize (Initialized ss)) . a = (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),1)) . a by A15, SCMFSA_2:70
.= (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)) . a by A28, SCMFSA_2:69 ; ::_thesis: verum
end;
then A31: DataPart (Initialize (Initialized ss)) = DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)) by A30, SCMFSA_M:2;
A32: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J)))))) + 2 by A18, A14, A29, A31, Th22, A1
.= (IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed J)))))) + 2 by A16, Th21
.= (card (Directed J)) + 2 by A16, SCMFSA8A:def_4
.= (card J) + 2 by SCMFSA8A:20 ;
then A33: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2)))) = (P +* (if=0 (a,I,J))) . ((card J) + 2) by PBOOLE:143
.= (if=0 (a,I,J)) . ((card J) + 2) by A21, A2, GRFUNC_1:2
.= goto (((card I) + (card J)) + 3) by Th34 ;
IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2) + 1))) = IC (Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) by EXTPRO_1:3
.= ((card I) + (card J)) + 3 by A33, SCMFSA_2:69 ;
then A34: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2) + 1)))) = (P +* (if=0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if=0 (a,I,J)) . (((card I) + (card J)) + 3) by A22, A2, GRFUNC_1:2
.= halt SCM+FSA by Th32 ;
then A35: P +* (if=0 (a,I,J)) halts_on Initialize (Initialized ss) by EXTPRO_1:29;
A36: CurInstr ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss))) = a =0_goto ((card J) + 3) by A10, A6, PBOOLE:143;
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if=0_(a,I,J))),(Comput_((P_+*_(if=0_(a,I,J))),(Initialize_(Initialized_ss)),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_(Initialized_ss)),(P_+*_(Directed_J)),(Directed_J)))_+_(1_+_2)_<=_k
A37: 0 + 2 < ((card I) + (card J)) + 3 by XREAL_1:8;
then A38: 2 in dom (if=0 (a,I,J)) by Th27;
A39: (if=0 (a,I,J)) . 2 <> halt SCM+FSA by A37, Th27;
A40: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2))) = (P +* (if=0 (a,I,J))) . 2 by A29, PBOOLE:143
.= (if=0 (a,I,J)) . 2 by A38, A2, GRFUNC_1:2 ;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k )
assume A41: CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k
A42: k <> 0 by A41, A36, EXTPRO_1:2;
A43: k <> 1 by A26, A27, A41, PBOOLE:143;
2 < k by A42, A43, A41, A39, A40, NAT_1:26;
then consider k2 being Nat such that
A44: 2 + k2 = k by NAT_1:10;
reconsider k2 = k2 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),k2)) as Element of NAT ;
assume not (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k ; ::_thesis: contradiction
then k < ((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 1) + 2 ;
then k2 < (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 1 by A44, XREAL_1:6;
then A45: k2 <= pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J)) by NAT_1:13;
then A46: k2 <= pseudo-LifeSpan ((Initialized ss),P,(Directed J)) by A16, Th21;
A47: now__::_thesis:_n_+_2_<_((card_I)_+_(card_J))_+_3
percases ( k2 = pseudo-LifeSpan ((Initialized ss),P,(Directed J)) or k2 < pseudo-LifeSpan ((Initialized ss),P,(Directed J)) ) by A46, XXREAL_0:1;
supposeA48: k2 = pseudo-LifeSpan ((Initialized ss),P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
((card I) + (card J)) + (2 + 1) = (((card J) + 2) + 1) + (card I) ;
then A49: ((card J) + 2) + 1 <= ((card I) + (card J)) + 3 by NAT_1:11;
IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),k2)) = card (Directed J) by A16, A48, SCMFSA8A:def_4;
then n = card J by SCMFSA8A:20;
hence n + 2 < ((card I) + (card J)) + 3 by A49, NAT_1:13; ::_thesis: verum
end;
suppose k2 < pseudo-LifeSpan ((Initialized ss),P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
then n in dom (Directed J) by A16, SCMFSA8A:17;
then n < card (Directed J) by AFINSQ_1:66;
then n + 2 < (card (Directed J)) + 2 by XREAL_1:6;
then A50: n + 2 < (card J) + 2 by SCMFSA8A:20;
((card I) + (card J)) + (1 + 2) = ((card J) + 2) + ((card I) + 1) ;
then (card J) + 2 <= ((card I) + (card J)) + 3 by NAT_1:11;
hence n + 2 < ((card I) + (card J)) + 3 by A50, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
then A51: n + 2 in dom (if=0 (a,I,J)) by Th27;
A52: IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k)) = IC (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)),k2)) by A44, EXTPRO_1:4
.= n + 2 by A18, A14, A29, A31, A45, Th22, A1 ;
CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) = (P +* (if=0 (a,I,J))) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) by PBOOLE:143
.= (if=0 (a,I,J)) . (IC (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),k))) by A52, A51, A2, GRFUNC_1:2 ;
hence contradiction by A41, A52, A47, Th27; ::_thesis: verum
end;
then A53: LifeSpan ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss))) = ((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2) + 1 by A34, A35, EXTPRO_1:def_15;
CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2)))) = (P +* (if=0 (a,I,J))) . ((card J) + 2) by A32, PBOOLE:143
.= (if=0 (a,I,J)) . ((card J) + 2) by A21, A2, GRFUNC_1:2
.= goto (((card I) + (card J)) + 3) by Th34 ;
then InsCode (CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) = 6 by SCMFSA_2:23;
then InsCode (CurInstr ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) in {0,6,7,8} by ENUMSET1:def_2;
then A54: DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))) = DataPart (Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) by Th12;
A55: DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))) = DataPart (Comput ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),2)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))))) by EXTPRO_1:4
.= DataPart (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))))) by A18, A14, A29, A31, Th22, A1 ;
thus DataPart (IExec ((if=0 (a,I,J)),P,ss)) = DataPart (IExec ((if=0 (a,I,J)),P,(Initialized ss)))
.= DataPart (Result ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)))) by A7
.= DataPart (Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),(LifeSpan ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)))))) by A35, EXTPRO_1:23
.= DataPart (Following ((P +* (if=0 (a,I,J))),(Comput ((P +* (if=0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) by A53, EXTPRO_1:3
.= DataPart (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed J))))) by A16, A55, A54, Th21
.= DataPart (Result ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))) by A17, A23, EXTPRO_1:23
.= DataPart (IExec ((J ";" (Stop SCM+FSA)),P,(Initialized ss))) by A19
.= DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) ; ::_thesis: verum
end;
theorem Th43: :: SCMFSA8C:43
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a <= 0 & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a <= 0 & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
let s be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . a <= 0 & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st s . a <= 0 & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
let a be read-write Int-Location; ::_thesis: ( s . a <= 0 & Directed J is_pseudo-closed_on s,P implies ( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 ) )
set J0 = Directed J;
set s0 = Initialized s;
set J9 = J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)));
set s00 = Initialize s;
set P00 = P +* (Directed J);
set s3 = Initialize s;
set P3 = P +* (if>0 (a,I,J));
A1: if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
set s4 = Comput ((P +* (if>0 (a,I,J))),(Initialize s),1);
set s5 = Comput ((P +* (if>0 (a,I,J))),(Initialize s),2);
set i = a >0_goto ((card J) + 3);
A2: Directed J c= P +* (Directed J) by FUNCT_4:25;
if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
then if>0 (a,I,J) = (((Macro (a >0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then if>0 (a,I,J) = ((Macro (a >0_goto ((card J) + 3))) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25;
then A3: if>0 (a,I,J) = (Macro (a >0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:25;
card (Macro (a >0_goto ((card J) + 3))) = 2 by COMPOS_1:56;
then A4: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= if>0 (a,I,J) by A3, FUNCT_4:25;
A5: 0 in dom (if>0 (a,I,J)) by Th25;
A6: (P +* (if>0 (a,I,J))) . 0 = (if>0 (a,I,J)) . 0 by A5, FUNCT_4:13
.= a >0_goto ((card J) + 3) by Th26 ;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (2 + 2) by SCMFSA8B:12
.= ((card J) + 2) + ((card I) + 2) ;
then A7: ((card J) + 2) + 0 < card (if>0 (a,I,J)) by XREAL_1:8;
then A8: (card J) + 2 in dom (if>0 (a,I,J)) by AFINSQ_1:66;
A9: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A10: IC (Initialize s) = IC (Initialize s)
.= IC (Start-At (0,SCM+FSA)) by A9, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
set ss = Comput ((P +* (if>0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2));
set PP = P +* (if>0 (a,I,J));
if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
then A11: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= P +* (if>0 (a,I,J)) by A4, XBOOLE_1:1;
Reloc ((Directed J),2) c= Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) by COMPOS_1:44, SCMFSA6A:16;
then A12: Reloc ((Directed J),2) c= P +* (if>0 (a,I,J)) by A11, XBOOLE_1:1;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by NAT_1:13;
then A13: ((card I) + (card J)) + 3 in dom (if>0 (a,I,J)) by AFINSQ_1:66;
assume s . a <= 0 ; ::_thesis: ( not Directed J is_pseudo-closed_on s,P or ( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 ) )
then A14: (Initialized s) . a <= 0 by SCMFSA_M:37;
A15: 1 in dom (if>0 (a,I,J)) by Th25;
assume A16: Directed J is_pseudo-closed_on s,P ; ::_thesis: ( if>0 (a,I,J) is_halting_on s,P & if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
then A17: pseudo-LifeSpan (s,P,(Directed J)) = LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s)) by Th29;
A18: (P +* (if>0 (a,I,J))) . 1 = (if>0 (a,I,J)) . 1 by A15, FUNCT_4:13
.= goto 2 by Th26 ;
DataPart s = DataPart (Initialize s) by MEMSTR_0:79;
then A19: Directed J is_pseudo-closed_on Initialize s,P +* (Directed J) by A16, Th23;
A20: Comput ((P +* (if>0 (a,I,J))),(Initialize s),(0 + 1)) = Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),0))) by EXTPRO_1:3
.= Following ((P +* (if>0 (a,I,J))),(Initialize s))
.= Exec ((a >0_goto ((card J) + 3)),(Initialize s)) by A10, A6, PBOOLE:143 ;
A21: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A21, TARSKI:def_1;
then not a in dom (Start-At (0,SCM+FSA)) ;
then (Initialize s) . a = s . a by FUNCT_4:11
.= (Initialized s) . a by SCMFSA_M:37 ;
then A22: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) = succ (IC (Initialize s)) by A14, A20, SCMFSA_2:71
.= 0 + 1 by A10 ;
A23: Comput ((P +* (if>0 (a,I,J))),(Initialize s),(1 + 1)) = Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1))) by EXTPRO_1:3
.= Exec ((goto 2),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),1))) by A22, A18, PBOOLE:143 ;
then A24: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)) = 2 by SCMFSA_2:69;
A25: now__::_thesis:_for_f_being_FinSeq-Location_holds_(Initialize_s)_._f_=_(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_s),2))_._f
let f be FinSeq-Location ; ::_thesis: (Initialize s) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)) . f
thus (Initialize s) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) . f by A20, SCMFSA_2:71
.= (Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)) . f by A23, SCMFSA_2:69 ; ::_thesis: verum
end;
now__::_thesis:_for_a_being_Int-Location_holds_(Initialize_s)_._a_=_(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_s),2))_._a
let a be Int-Location; ::_thesis: (Initialize s) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)) . a
thus (Initialize s) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize s),1)) . a by A20, SCMFSA_2:71
.= (Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)) . a by A23, SCMFSA_2:69 ; ::_thesis: verum
end;
then A26: DataPart (Initialize s) = DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)) by A25, SCMFSA_M:2;
A27: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2))) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)),(pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed J)),(Initialize s),(pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J)))))) + 2 by A19, A12, A24, A26, Th22, A2
.= (IC (Comput ((P +* (Directed J)),(Initialize s),(pseudo-LifeSpan (s,P,(Directed J)))))) + 2 by A16, Th21
.= (card (Directed J)) + 2 by A16, SCMFSA8A:def_4
.= (card J) + 2 by SCMFSA8A:20 ;
then A28: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2)))) = (P +* (if>0 (a,I,J))) . ((card J) + 2) by PBOOLE:143
.= (if>0 (a,I,J)) . ((card J) + 2) by A8, A1, GRFUNC_1:2
.= goto (((card I) + (card J)) + 3) by Th35 ;
A29: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),(((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2) + 1))) = IC (Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2))))) by EXTPRO_1:3
.= ((card I) + (card J)) + 3 by A28, SCMFSA_2:69 ;
then A30: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),(((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2) + 1)))) = (P +* (if>0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if>0 (a,I,J)) . (((card I) + (card J)) + 3) by A13, A1, GRFUNC_1:2
.= halt SCM+FSA by Th33 ;
then A31: P +* (if>0 (a,I,J)) halts_on Initialize s by EXTPRO_1:29;
hence if>0 (a,I,J) is_halting_on s,P by SCMFSA7B:def_7; ::_thesis: ( if>0 (a,I,J) is_closed_on s,P & LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 )
now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_s),k))_in_dom_(if>0_(a,I,J))
let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
percases ( k = 0 or ( 0 < k & k = 1 ) or ( 0 < k & k <> 1 & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 ) or ( 0 < k & k <> 1 & (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 <= k ) ) ;
suppose k = 0 ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
then Comput ((P +* (if>0 (a,I,J))),(Initialize s),k) = Initialize s by EXTPRO_1:2;
then IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) = 0 by MEMSTR_0:16;
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by Th25; ::_thesis: verum
end;
suppose ( 0 < k & k = 1 ) ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A22, Th25; ::_thesis: verum
end;
supposeA32: ( 0 < k & k <> 1 & k < (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 ) ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
then 0 + 1 <= k by INT_1:7;
then 1 < k by A32, XXREAL_0:1;
then 0 + (1 + 1) <= k by INT_1:7;
then consider k2 being Nat such that
A33: 2 + k2 = k by NAT_1:10;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (2 + 2) by SCMFSA8B:12
.= ((card J) + 2) + ((card I) + 2) ;
then A34: (card J) + 2 <= card (if>0 (a,I,J)) by NAT_1:12;
reconsider k2 = k2 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed J)),(Initialize s),k2)) as Element of NAT ;
A35: k2 < pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J)) by A32, A33, XREAL_1:6;
then k2 < pseudo-LifeSpan (s,P,(Directed J)) by A16, Th21;
then n in dom (Directed J) by A16, SCMFSA8A:17;
then n < card (Directed J) by AFINSQ_1:66;
then n + 2 < (card (Directed J)) + 2 by XREAL_1:6;
then n + 2 < (card J) + 2 by SCMFSA8A:20;
then A36: n + 2 < card (if>0 (a,I,J)) by A34, XXREAL_0:2;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)),k2)) by A33, EXTPRO_1:4
.= (IC (Comput ((P +* (Directed J)),(Initialize s),k2))) + 2 by A19, A12, A24, A26, A35, Th22, A2 ;
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A36, AFINSQ_1:66; ::_thesis: verum
end;
supposeA37: ( 0 < k & k <> 1 & (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 <= k ) ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),b1)) in dom (if>0 (a,I,J))
hereby ::_thesis: verum
percases ( (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 = k or (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 < k ) by A37, XXREAL_0:1;
suppose (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 = k ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J))
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A7, A27, AFINSQ_1:66; ::_thesis: verum
end;
suppose (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2 < k ; ::_thesis: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J))
then ((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 2) + 1 <= k by INT_1:7;
hence IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) in dom (if>0 (a,I,J)) by A13, A29, A30, EXTPRO_1:5; ::_thesis: verum
end;
end;
end;
end;
end;
end;
hence if>0 (a,I,J) is_closed_on s,P by SCMFSA7B:def_6; ::_thesis: LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3
A38: CurInstr ((P +* (if>0 (a,I,J))),(Initialize s)) = a >0_goto ((card J) + 3) by A10, A6, PBOOLE:143;
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if>0_(a,I,J))),(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_s),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_s),(P_+*_(Directed_J)),(Directed_J)))_+_(1_+_2)_<=_k
A39: 0 + 2 < ((card I) + (card J)) + 3 by XREAL_1:8;
then A40: 2 in dom (if>0 (a,I,J)) by Th28;
A41: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),2))) = (P +* (if>0 (a,I,J))) . 2 by A24, PBOOLE:143
.= (if>0 (a,I,J)) . 2 by A40, A1, GRFUNC_1:2 ;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k )
assume A42: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k
A43: k <> 0 by A42, A38, EXTPRO_1:2;
A44: k <> 1 by A22, A42, A18, PBOOLE:143;
2 <> k by A42, A39, Th28, A41;
then 2 < k by A43, A44, NAT_1:26;
then consider k2 being Nat such that
A45: 2 + k2 = k by NAT_1:10;
reconsider k2 = k2 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed J)),(Initialize s),k2)) as Element of NAT ;
assume not (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k ; ::_thesis: contradiction
then k < ((pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 1) + 2 ;
then k2 < (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 1 by A45, XREAL_1:6;
then A46: k2 <= pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J)) by NAT_1:13;
then A47: k2 <= pseudo-LifeSpan (s,P,(Directed J)) by A16, Th21;
A48: now__::_thesis:_n_+_2_<_((card_I)_+_(card_J))_+_3
percases ( k2 = pseudo-LifeSpan (s,P,(Directed J)) or k2 < pseudo-LifeSpan (s,P,(Directed J)) ) by A47, XXREAL_0:1;
supposeA49: k2 = pseudo-LifeSpan (s,P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
((card I) + (card J)) + (2 + 1) = (((card J) + 2) + 1) + (card I) ;
then A50: ((card J) + 2) + 1 <= ((card I) + (card J)) + 3 by NAT_1:11;
IC (Comput ((P +* (Directed J)),(Initialize s),k2)) = card (Directed J) by A16, A49, SCMFSA8A:def_4;
then n = card J by SCMFSA8A:20;
hence n + 2 < ((card I) + (card J)) + 3 by A50, NAT_1:13; ::_thesis: verum
end;
suppose k2 < pseudo-LifeSpan (s,P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
then n in dom (Directed J) by A16, SCMFSA8A:17;
then n < card (Directed J) by AFINSQ_1:66;
then n + 2 < (card (Directed J)) + 2 by XREAL_1:6;
then A51: n + 2 < (card J) + 2 by SCMFSA8A:20;
((card I) + (card J)) + (1 + 2) = ((card J) + 2) + ((card I) + 1) ;
then (card J) + 2 <= ((card I) + (card J)) + 3 by NAT_1:11;
hence n + 2 < ((card I) + (card J)) + 3 by A51, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
then A52: n + 2 in dom (if>0 (a,I,J)) by Th28;
A53: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k)) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),2)),k2)) by A45, EXTPRO_1:4
.= n + 2 by A19, A12, A24, A26, A46, Th22, A2 ;
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) = (P +* (if>0 (a,I,J))) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) by PBOOLE:143
.= (if>0 (a,I,J)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize s),k))) by A53, A52, A1, GRFUNC_1:2 ;
hence contradiction by A42, A53, A48, Th28; ::_thesis: verum
end;
then LifeSpan ((P +* (if>0 (a,I,J))),(Initialize s)) = (pseudo-LifeSpan ((Initialize s),(P +* (Directed J)),(Directed J))) + 3 by A30, A31, EXTPRO_1:def_15;
hence LifeSpan ((P +* (if>0 (a,I,J))),(s +* (Start-At (0,SCM+FSA)))) = (LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize s))) + 3 by A16, A17, Th21; ::_thesis: verum
end;
theorem Th44: :: SCMFSA8C:44
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <= 0 & Directed J is_pseudo-closed_on s,P holds
DataPart (IExec ((if>0 (a,I,J)),P,s)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,s))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <= 0 & Directed J is_pseudo-closed_on s,P holds
DataPart (IExec ((if>0 (a,I,J)),P,s)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,s))
let ss be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a <= 0 & Directed J is_pseudo-closed_on ss,P holds
DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss))
set D = Data-Locations ;
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st ss . (intloc 0) = 1 & ss . a <= 0 & Directed J is_pseudo-closed_on ss,P holds
DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss))
let a be read-write Int-Location; ::_thesis: ( ss . (intloc 0) = 1 & ss . a <= 0 & Directed J is_pseudo-closed_on ss,P implies DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) )
set J0 = Directed J;
set s = Initialized ss;
set s0 = Initialized (Initialized ss);
set J9 = J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)));
set s00 = Initialize (Initialized ss);
set P00 = P +* (Directed J);
set s3 = Initialize (Initialized ss);
set P3 = P +* (if>0 (a,I,J));
set s4 = Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1);
set s5 = Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2);
set i = a >0_goto ((card J) + 3);
A1: if>0 (a,I,J) c= P +* (if>0 (a,I,J)) by FUNCT_4:25;
A2: Directed J c= P +* (Directed J) by FUNCT_4:25;
assume A3: ss . (intloc 0) = 1 ; ::_thesis: ( not ss . a <= 0 or not Directed J is_pseudo-closed_on ss,P or DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) )
set s1 = Initialize (Initialized ss);
set P1 = P +* (J ";" (Stop SCM+FSA));
assume ss . a <= 0 ; ::_thesis: ( not Directed J is_pseudo-closed_on ss,P or DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) )
then A4: (Initialized (Initialized ss)) . a <= 0 by SCMFSA_M:37;
A5: 0 in dom (if>0 (a,I,J)) by Th25;
A6: (P +* (if>0 (a,I,J))) . 0 = (if>0 (a,I,J)) . 0 by A5, FUNCT_4:13
.= a >0_goto ((card J) + 3) by Th26 ;
(Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
then A7: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized ss) ;
A8: (Directed J) ";" (Stop SCM+FSA) = J ";" (Stop SCM+FSA) by SCMFSA8A:25;
A9: IC in dom (Start-At (0,SCM+FSA)) by MEMSTR_0:15;
A10: IC (Initialize (Initialized ss)) = IC (Initialize (Initialized ss))
.= IC (Start-At (0,SCM+FSA)) by A9, FUNCT_4:13
.= 0 by FUNCOP_1:72 ;
if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
then if>0 (a,I,J) = (((Macro (a >0_goto ((card J) + 3))) ";" J) ";" (Goto ((card I) + 1))) ";" (I ";" (Stop SCM+FSA)) by SCMFSA6A:25;
then if>0 (a,I,J) = ((Macro (a >0_goto ((card J) + 3))) ";" J) ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA))) by SCMFSA6A:25;
then A11: if>0 (a,I,J) = (Macro (a >0_goto ((card J) + 3))) ";" (J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))) by SCMFSA6A:25;
card (Macro (a >0_goto ((card J) + 3))) = 2 by COMPOS_1:56;
then A12: Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) c= if>0 (a,I,J) by A11, FUNCT_4:25;
A13: Reloc ((Directed J),2) c= Reloc ((J ";" ((Goto ((card I) + 1)) ";" (I ";" (Stop SCM+FSA)))),2) by COMPOS_1:44, SCMFSA6A:16;
Reloc ((Directed J),2) c= if>0 (a,I,J) by A12, A13, XBOOLE_1:1;
then A14: Reloc ((Directed J),2) c= P +* (if>0 (a,I,J)) by A1, XBOOLE_1:1;
A15: Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(0 + 1)) = Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),0))) by EXTPRO_1:3
.= Following ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)))
.= Exec ((a >0_goto ((card J) + 3)),(Initialize (Initialized ss))) by A10, A6, PBOOLE:143 ;
assume Directed J is_pseudo-closed_on ss,P ; ::_thesis: DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss))
then A16: Directed J is_pseudo-closed_on Initialized ss,P by A3, Th24;
then J ";" (Stop SCM+FSA) is_halting_on Initialized ss,P by Th29;
then A17: P +* (J ";" (Stop SCM+FSA)) halts_on Initialize (Initialized ss) by SCMFSA7B:def_7;
DataPart (Initialized ss) = DataPart (Initialize (Initialized ss)) by MEMSTR_0:79;
then A18: Directed J is_pseudo-closed_on Initialize (Initialized ss),P +* (Directed J) by A16, Th23;
(Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized (Initialized ss)) by MEMSTR_0:44;
then A19: (Initialized ss) +* (Initialize ((intloc 0) .--> 1)) = Initialize (Initialized ss) ;
A20: Directed (Directed J) = Directed J by SCMFSA6A:22;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (2 + 2) by SCMFSA8B:12
.= ((card J) + 2) + ((card I) + 2) ;
then ((card J) + 2) + 0 < card (if>0 (a,I,J)) by XREAL_1:8;
then A21: (card J) + 2 in dom (if>0 (a,I,J)) by AFINSQ_1:66;
card (if>0 (a,I,J)) = ((card I) + (card J)) + (3 + 1) by SCMFSA8B:12
.= (((card I) + (card J)) + 3) + 1 ;
then ((card I) + (card J)) + 3 < card (if>0 (a,I,J)) by NAT_1:13;
then A22: ((card I) + (card J)) + 3 in dom (if>0 (a,I,J)) by AFINSQ_1:66;
set s9 = Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2));
LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss))) = pseudo-LifeSpan ((Initialized ss),P,(Directed J)) by A16, Th29;
then A23: DataPart (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed J))))) = DataPart (Comput ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss)),(LifeSpan ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))))) by A16, A20, A8, Th29;
A24: 1 in dom (if>0 (a,I,J)) by Th25;
A25: a <> IC by SCMFSA_2:56;
dom (Start-At (0,SCM+FSA)) = {(IC )} by FUNCOP_1:13;
then not a in dom (Start-At (0,SCM+FSA)) by A25, TARSKI:def_1;
then not a in dom (Start-At (0,SCM+FSA)) ;
then (Initialize (Initialized ss)) . a = (Initialized (Initialized ss)) . a by FUNCT_4:11;
then A26: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) = succ (IC (Initialize (Initialized ss))) by A4, A15, SCMFSA_2:71
.= 0 + 1 by A10 ;
A27: (P +* (if>0 (a,I,J))) . 1 = (if>0 (a,I,J)) . 1 by A24, FUNCT_4:13
.= goto 2 by Th26 ;
A28: Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(1 + 1)) = Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1))) by EXTPRO_1:3
.= Exec ((goto 2),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1))) by A26, A27, PBOOLE:143 ;
then A29: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)) = 2 by SCMFSA_2:69;
A30: now__::_thesis:_for_f_being_FinSeq-Location_holds_(Initialize_(Initialized_ss))_._f_=_(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_(Initialized_ss)),2))_._f
let f be FinSeq-Location ; ::_thesis: (Initialize (Initialized ss)) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)) . f
thus (Initialize (Initialized ss)) . f = (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) . f by A15, SCMFSA_2:71
.= (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)) . f by A28, SCMFSA_2:69 ; ::_thesis: verum
end;
now__::_thesis:_for_a_being_Int-Location_holds_(Initialize_(Initialized_ss))_._a_=_(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_(Initialized_ss)),2))_._a
let a be Int-Location; ::_thesis: (Initialize (Initialized ss)) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)) . a
thus (Initialize (Initialized ss)) . a = (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),1)) . a by A15, SCMFSA_2:71
.= (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)) . a by A28, SCMFSA_2:69 ; ::_thesis: verum
end;
then A31: DataPart (Initialize (Initialized ss)) = DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)) by A30, SCMFSA_M:2;
A32: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))))) by EXTPRO_1:4
.= (IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J)))))) + 2 by A18, A29, A31, Th22, A2, A14
.= (IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed J)))))) + 2 by A16, Th21
.= (card (Directed J)) + 2 by A16, SCMFSA8A:def_4
.= (card J) + 2 by SCMFSA8A:20 ;
then A33: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2)))) = (P +* (if>0 (a,I,J))) . ((card J) + 2) by PBOOLE:143
.= (if>0 (a,I,J)) . ((card J) + 2) by A21, A1, GRFUNC_1:2
.= goto (((card I) + (card J)) + 3) by Th35 ;
IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2) + 1))) = IC (Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) by EXTPRO_1:3
.= ((card I) + (card J)) + 3 by A33, SCMFSA_2:69 ;
then A34: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2) + 1)))) = (P +* (if>0 (a,I,J))) . (((card I) + (card J)) + 3) by PBOOLE:143
.= (if>0 (a,I,J)) . (((card I) + (card J)) + 3) by A22, A1, GRFUNC_1:2
.= halt SCM+FSA by Th33 ;
then A35: P +* (if>0 (a,I,J)) halts_on Initialize (Initialized ss) by EXTPRO_1:29;
A36: CurInstr ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss))) = a >0_goto ((card J) + 3) by A10, A6, PBOOLE:143;
now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_((P_+*_(if>0_(a,I,J))),(Comput_((P_+*_(if>0_(a,I,J))),(Initialize_(Initialized_ss)),k)))_=_halt_SCM+FSA_holds_
(pseudo-LifeSpan_((Initialize_(Initialized_ss)),(P_+*_(Directed_J)),(Directed_J)))_+_(1_+_2)_<=_k
A37: 0 + 2 < ((card I) + (card J)) + 3 by XREAL_1:8;
then A38: 2 in dom (if>0 (a,I,J)) by Th28;
A39: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2))) = (P +* (if>0 (a,I,J))) . 2 by A29, PBOOLE:143
.= (if>0 (a,I,J)) . 2 by A38, A1, GRFUNC_1:2 ;
let k be Element of NAT ; ::_thesis: ( CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA implies (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k )
assume A40: CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = halt SCM+FSA ; ::_thesis: (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k
A41: k <> 0 by A40, A36, EXTPRO_1:2;
A42: k <> 1 by A26, A27, A40, PBOOLE:143;
2 <> k by A40, A37, Th28, A39;
then 2 < k by A41, A42, NAT_1:26;
then consider k2 being Nat such that
A43: 2 + k2 = k by NAT_1:10;
reconsider k2 = k2 as Element of NAT by ORDINAL1:def_12;
reconsider n = IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),k2)) as Element of NAT ;
assume not (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + (1 + 2) <= k ; ::_thesis: contradiction
then k < ((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 1) + 2 ;
then k2 < (pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 1 by A43, XREAL_1:6;
then A44: k2 <= pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J)) by NAT_1:13;
then A45: k2 <= pseudo-LifeSpan ((Initialized ss),P,(Directed J)) by A16, Th21;
A46: now__::_thesis:_n_+_2_<_((card_I)_+_(card_J))_+_3
percases ( k2 = pseudo-LifeSpan ((Initialized ss),P,(Directed J)) or k2 < pseudo-LifeSpan ((Initialized ss),P,(Directed J)) ) by A45, XXREAL_0:1;
supposeA47: k2 = pseudo-LifeSpan ((Initialized ss),P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
((card I) + (card J)) + (2 + 1) = (((card J) + 2) + 1) + (card I) ;
then A48: ((card J) + 2) + 1 <= ((card I) + (card J)) + 3 by NAT_1:11;
IC (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),k2)) = card (Directed J) by A16, A47, SCMFSA8A:def_4;
then n = card J by SCMFSA8A:20;
hence n + 2 < ((card I) + (card J)) + 3 by A48, NAT_1:13; ::_thesis: verum
end;
suppose k2 < pseudo-LifeSpan ((Initialized ss),P,(Directed J)) ; ::_thesis: n + 2 < ((card I) + (card J)) + 3
then n in dom (Directed J) by A16, SCMFSA8A:17;
then n < card (Directed J) by AFINSQ_1:66;
then n + 2 < (card (Directed J)) + 2 by XREAL_1:6;
then A49: n + 2 < (card J) + 2 by SCMFSA8A:20;
((card I) + (card J)) + (1 + 2) = ((card J) + 2) + ((card I) + 1) ;
then (card J) + 2 <= ((card I) + (card J)) + 3 by NAT_1:11;
hence n + 2 < ((card I) + (card J)) + 3 by A49, XXREAL_0:2; ::_thesis: verum
end;
end;
end;
then A50: n + 2 in dom (if>0 (a,I,J)) by Th28;
A51: IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k)) = IC (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)),k2)) by A43, EXTPRO_1:4
.= n + 2 by A18, A29, A31, A44, Th22, A2, A14 ;
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) = (P +* (if>0 (a,I,J))) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) by PBOOLE:143
.= (if>0 (a,I,J)) . (IC (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),k))) by A51, A50, A1, GRFUNC_1:2 ;
hence contradiction by A40, A51, A46, Th28; ::_thesis: verum
end;
then A52: LifeSpan ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss))) = ((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2) + 1 by A34, A35, EXTPRO_1:def_15;
CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2)))) = (P +* (if>0 (a,I,J))) . ((card J) + 2) by A32, PBOOLE:143
.= (if>0 (a,I,J)) . ((card J) + 2) by A21, A1, GRFUNC_1:2
.= goto (((card I) + (card J)) + 3) by Th35 ;
then InsCode (CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) = 6 by SCMFSA_2:23;
then InsCode (CurInstr ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) in {0,6,7,8} by ENUMSET1:def_2;
then A53: DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))) = DataPart (Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) by Th12;
A54: DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))) = DataPart (Comput ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),2)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))))) by EXTPRO_1:4
.= DataPart (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))))) by A18, A29, A31, Th22, A2, A14 ;
thus DataPart (IExec ((if>0 (a,I,J)),P,ss)) = DataPart (IExec ((if>0 (a,I,J)),P,(Initialized ss)))
.= DataPart (Result ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)))) by A7
.= DataPart (Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),(LifeSpan ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)))))) by A35, EXTPRO_1:23
.= DataPart (Following ((P +* (if>0 (a,I,J))),(Comput ((P +* (if>0 (a,I,J))),(Initialize (Initialized ss)),((pseudo-LifeSpan ((Initialize (Initialized ss)),(P +* (Directed J)),(Directed J))) + 2))))) by A52, EXTPRO_1:3
.= DataPart (Comput ((P +* (Directed J)),(Initialize (Initialized ss)),(pseudo-LifeSpan ((Initialized ss),P,(Directed J))))) by A16, A54, A53, Th21
.= DataPart (Result ((P +* (J ";" (Stop SCM+FSA))),(Initialize (Initialized ss)))) by A17, A23, EXTPRO_1:23
.= DataPart (IExec ((J ";" (Stop SCM+FSA)),P,(Initialized ss))) by A19
.= DataPart (IExec ((J ";" (Stop SCM+FSA)),P,ss)) ; ::_thesis: verum
end;
theorem :: SCMFSA8C:45
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
let s be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
let a be read-write Int-Location; ::_thesis: ( Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P implies ( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P ) )
assume A1: Directed I is_pseudo-closed_on s,P ; ::_thesis: ( not Directed J is_pseudo-closed_on s,P or ( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P ) )
assume A2: Directed J is_pseudo-closed_on s,P ; ::_thesis: ( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
hereby ::_thesis: verum
percases ( s . a = 0 or s . a <> 0 ) ;
supposeA3: s . a = 0 ; ::_thesis: ( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
hence if=0 (a,I,J) is_closed_on s,P by A1, Th37; ::_thesis: if=0 (a,I,J) is_halting_on s,P
thus if=0 (a,I,J) is_halting_on s,P by A1, A3, Th37; ::_thesis: verum
end;
supposeA4: s . a <> 0 ; ::_thesis: ( if=0 (a,I,J) is_closed_on s,P & if=0 (a,I,J) is_halting_on s,P )
hence if=0 (a,I,J) is_closed_on s,P by A2, Th41; ::_thesis: if=0 (a,I,J) is_halting_on s,P
thus if=0 (a,I,J) is_halting_on s,P by A2, A4, Th41; ::_thesis: verum
end;
end;
end;
end;
theorem :: SCMFSA8C:46
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I, J being Program of SCM+FSA
for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
let s be State of SCM+FSA; ::_thesis: for I, J being Program of SCM+FSA
for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
let I, J be Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P holds
( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
let a be read-write Int-Location; ::_thesis: ( Directed I is_pseudo-closed_on s,P & Directed J is_pseudo-closed_on s,P implies ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P ) )
assume A1: Directed I is_pseudo-closed_on s,P ; ::_thesis: ( not Directed J is_pseudo-closed_on s,P or ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P ) )
assume A2: Directed J is_pseudo-closed_on s,P ; ::_thesis: ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
hereby ::_thesis: verum
percases ( s . a > 0 or s . a <= 0 ) ;
supposeA3: s . a > 0 ; ::_thesis: ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
hence if>0 (a,I,J) is_closed_on s,P by A1, Th39; ::_thesis: if>0 (a,I,J) is_halting_on s,P
thus if>0 (a,I,J) is_halting_on s,P by A1, A3, Th39; ::_thesis: verum
end;
supposeA4: s . a <= 0 ; ::_thesis: ( if>0 (a,I,J) is_closed_on s,P & if>0 (a,I,J) is_halting_on s,P )
hence if>0 (a,I,J) is_closed_on s,P by A2, Th43; ::_thesis: if>0 (a,I,J) is_halting_on s,P
thus if>0 (a,I,J) is_halting_on s,P by A2, A4, Th43; ::_thesis: verum
end;
end;
end;
end;
theorem :: SCMFSA8C:47
for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
not Directed I destroys a by SCMFSA8A:13;
theorem Th48: :: SCMFSA8C:48
for i being Instruction of SCM+FSA
for a being Int-Location st not i destroys a holds
not Macro i destroys a
proof
let i be Instruction of SCM+FSA; ::_thesis: for a being Int-Location st not i destroys a holds
not Macro i destroys a
let a be Int-Location; ::_thesis: ( not i destroys a implies not Macro i destroys a )
A1: rng (Macro i) = {i,(halt SCM+FSA)} by COMPOS_1:67;
assume A2: not i destroys a ; ::_thesis: not Macro i destroys a
now__::_thesis:_for_ii_being_Instruction_of_SCM+FSA_st_ii_in_rng_(Macro_i)_holds_
not_ii_destroys_a
let ii be Instruction of SCM+FSA; ::_thesis: ( ii in rng (Macro i) implies not ii destroys a )
assume ii in rng (Macro i) ; ::_thesis: not ii destroys a
then ( ii = i or ii = halt SCM+FSA ) by A1, TARSKI:def_2;
hence not ii destroys a by A2, SCMFSA7B:5; ::_thesis: verum
end;
hence not Macro i destroys a by SCMFSA7B:def_4; ::_thesis: verum
end;
theorem Th49: :: SCMFSA8C:49
for a being Int-Location holds not halt SCM+FSA refers a
proof
let a be Int-Location; ::_thesis: not halt SCM+FSA refers a
for b being Int-Location
for l being Element of NAT
for f being FinSeq-Location holds
( b := a <> halt SCM+FSA & AddTo (b,a) <> halt SCM+FSA & SubFrom (b,a) <> halt SCM+FSA & MultBy (b,a) <> halt SCM+FSA & Divide (a,b) <> halt SCM+FSA & Divide (b,a) <> halt SCM+FSA & a =0_goto l <> halt SCM+FSA & a >0_goto l <> halt SCM+FSA & b := (f,a) <> halt SCM+FSA & (f,b) := a <> halt SCM+FSA & (f,a) := b <> halt SCM+FSA & f :=<0,...,0> a <> halt SCM+FSA ) ;
hence not halt SCM+FSA refers a by SCMFSA7B:def_1; ::_thesis: verum
end;
theorem :: SCMFSA8C:50
for a, b, c being Int-Location st a <> b holds
not AddTo (c,b) refers a
proof
let a, b, c be Int-Location; ::_thesis: ( a <> b implies not AddTo (c,b) refers a )
assume A1: a <> b ; ::_thesis: not AddTo (c,b) refers a
now__::_thesis:_for_e_being_Int-Location
for_l_being_Element_of_NAT_
for_f_being_FinSeq-Location_holds_
(_e_:=_a_<>_AddTo_(c,b)_&_AddTo_(e,a)_<>_AddTo_(c,b)_&_SubFrom_(e,a)_<>_AddTo_(c,b)_&_MultBy_(e,a)_<>_AddTo_(c,b)_&_Divide_(a,e)_<>_AddTo_(c,b)_&_Divide_(e,a)_<>_AddTo_(c,b)_&_a_=0_goto_l_<>_AddTo_(c,b)_&_a_>0_goto_l_<>_AddTo_(c,b)_&_e_:=_(f,a)_<>_AddTo_(c,b)_&_(f,e)_:=_a_<>_AddTo_(c,b)_&_(f,a)_:=_e_<>_AddTo_(c,b)_&_f_:=<0,...,0>_a_<>_AddTo_(c,b)_)
let e be Int-Location; ::_thesis: for l being Element of NAT
for f being FinSeq-Location holds
( e := a <> AddTo (c,b) & AddTo (e,a) <> AddTo (c,b) & SubFrom (e,a) <> AddTo (c,b) & MultBy (e,a) <> AddTo (c,b) & Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
let l be Element of NAT ; ::_thesis: for f being FinSeq-Location holds
( e := a <> AddTo (c,b) & AddTo (e,a) <> AddTo (c,b) & SubFrom (e,a) <> AddTo (c,b) & MultBy (e,a) <> AddTo (c,b) & Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
let f be FinSeq-Location ; ::_thesis: ( e := a <> AddTo (c,b) & AddTo (e,a) <> AddTo (c,b) & SubFrom (e,a) <> AddTo (c,b) & MultBy (e,a) <> AddTo (c,b) & Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
A2: InsCode (AddTo (c,b)) = 2 by SCMFSA_2:19;
hence e := a <> AddTo (c,b) by SCMFSA_2:18; ::_thesis: ( AddTo (e,a) <> AddTo (c,b) & SubFrom (e,a) <> AddTo (c,b) & MultBy (e,a) <> AddTo (c,b) & Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus AddTo (e,a) <> AddTo (c,b) by A1, SF_MASTR:2; ::_thesis: ( SubFrom (e,a) <> AddTo (c,b) & MultBy (e,a) <> AddTo (c,b) & Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus SubFrom (e,a) <> AddTo (c,b) by A2, SCMFSA_2:20; ::_thesis: ( MultBy (e,a) <> AddTo (c,b) & Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus MultBy (e,a) <> AddTo (c,b) by A2, SCMFSA_2:21; ::_thesis: ( Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) & a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus ( Divide (a,e) <> AddTo (c,b) & Divide (e,a) <> AddTo (c,b) ) by A2, SCMFSA_2:22; ::_thesis: ( a =0_goto l <> AddTo (c,b) & a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus a =0_goto l <> AddTo (c,b) ; ::_thesis: ( a >0_goto l <> AddTo (c,b) & e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus a >0_goto l <> AddTo (c,b) ; ::_thesis: ( e := (f,a) <> AddTo (c,b) & (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus e := (f,a) <> AddTo (c,b) by A2, SCMFSA_2:26; ::_thesis: ( (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) & f :=<0,...,0> a <> AddTo (c,b) )
thus ( (f,e) := a <> AddTo (c,b) & (f,a) := e <> AddTo (c,b) ) by A2, SCMFSA_2:27; ::_thesis: f :=<0,...,0> a <> AddTo (c,b)
thus f :=<0,...,0> a <> AddTo (c,b) by A2, SCMFSA_2:29; ::_thesis: verum
end;
hence not AddTo (c,b) refers a by SCMFSA7B:def_1; ::_thesis: verum
end;
theorem :: SCMFSA8C:51
for i being Instruction of SCM+FSA
for a being Int-Location st not i refers a holds
not Macro i refers a
proof
let i be Instruction of SCM+FSA; ::_thesis: for a being Int-Location st not i refers a holds
not Macro i refers a
let a be Int-Location; ::_thesis: ( not i refers a implies not Macro i refers a )
A1: rng (Macro i) = {i,(halt SCM+FSA)} by COMPOS_1:67;
assume A2: not i refers a ; ::_thesis: not Macro i refers a
now__::_thesis:_for_ii_being_Instruction_of_SCM+FSA_st_ii_in_rng_(Macro_i)_holds_
not_ii_refers_a
let ii be Instruction of SCM+FSA; ::_thesis: ( ii in rng (Macro i) implies not ii refers a )
assume ii in rng (Macro i) ; ::_thesis: not ii refers a
then ( ii = i or ii = halt SCM+FSA ) by A1, TARSKI:def_2;
hence not ii refers a by A2, Th49; ::_thesis: verum
end;
hence not Macro i refers a by SCMFSA7B:def_2; ::_thesis: verum
end;
theorem Th52: :: SCMFSA8C:52
for I, J being Program of SCM+FSA
for a being Int-Location st not I destroys a & not J destroys a holds
not I ";" J destroys a
proof
let I, J be Program of SCM+FSA; ::_thesis: for a being Int-Location st not I destroys a & not J destroys a holds
not I ";" J destroys a
let a be Int-Location; ::_thesis: ( not I destroys a & not J destroys a implies not I ";" J destroys a )
assume that
A1: not I destroys a and
A2: not J destroys a ; ::_thesis: not I ";" J destroys a
A3: not Reloc (J,(card I)) destroys a by A2, SCMFSA8A:9;
not Directed I destroys a by A1, SCMFSA8A:13;
hence not I ";" J destroys a by A3, SCMFSA8A:11; ::_thesis: verum
end;
theorem Th53: :: SCMFSA8C:53
for J being Program of SCM+FSA
for i being Instruction of SCM+FSA
for a being Int-Location st not i destroys a & not J destroys a holds
not i ";" J destroys a
proof
let J be Program of SCM+FSA; ::_thesis: for i being Instruction of SCM+FSA
for a being Int-Location st not i destroys a & not J destroys a holds
not i ";" J destroys a
let i be Instruction of SCM+FSA; ::_thesis: for a being Int-Location st not i destroys a & not J destroys a holds
not i ";" J destroys a
let a be Int-Location; ::_thesis: ( not i destroys a & not J destroys a implies not i ";" J destroys a )
assume that
A1: not i destroys a and
A2: not J destroys a ; ::_thesis: not i ";" J destroys a
not Macro i destroys a by A1, Th48;
hence not i ";" J destroys a by A2, Th52; ::_thesis: verum
end;
theorem :: SCMFSA8C:54
for I being Program of SCM+FSA
for j being Instruction of SCM+FSA
for a being Int-Location st not I destroys a & not j destroys a holds
not I ";" j destroys a
proof
let I be Program of SCM+FSA; ::_thesis: for j being Instruction of SCM+FSA
for a being Int-Location st not I destroys a & not j destroys a holds
not I ";" j destroys a
let j be Instruction of SCM+FSA; ::_thesis: for a being Int-Location st not I destroys a & not j destroys a holds
not I ";" j destroys a
let a be Int-Location; ::_thesis: ( not I destroys a & not j destroys a implies not I ";" j destroys a )
assume that
A1: not I destroys a and
A2: not j destroys a ; ::_thesis: not I ";" j destroys a
not Macro j destroys a by A2, Th48;
hence not I ";" j destroys a by A1, Th52; ::_thesis: verum
end;
theorem :: SCMFSA8C:55
for i, j being Instruction of SCM+FSA
for a being Int-Location st not i destroys a & not j destroys a holds
not i ";" j destroys a
proof
let i, j be Instruction of SCM+FSA; ::_thesis: for a being Int-Location st not i destroys a & not j destroys a holds
not i ";" j destroys a
let a be Int-Location; ::_thesis: ( not i destroys a & not j destroys a implies not i ";" j destroys a )
assume that
A1: not i destroys a and
A2: not j destroys a ; ::_thesis: not i ";" j destroys a
A3: not Macro j destroys a by A2, Th48;
not Macro i destroys a by A1, Th48;
hence not i ";" j destroys a by A3, Th52; ::_thesis: verum
end;
theorem Th56: :: SCMFSA8C:56
for a being Int-Location holds not Stop SCM+FSA destroys a
proof
let a be Int-Location; ::_thesis: not Stop SCM+FSA destroys a
now__::_thesis:_for_i_being_Instruction_of_SCM+FSA_st_i_in_rng_(Stop_SCM+FSA)_holds_
not_i_destroys_a
let i be Instruction of SCM+FSA; ::_thesis: ( i in rng (Stop SCM+FSA) implies not i destroys a )
A1: rng (Stop SCM+FSA) = {(halt SCM+FSA)} by AFINSQ_1:33;
assume i in rng (Stop SCM+FSA) ; ::_thesis: not i destroys a
then i = halt SCM+FSA by A1, TARSKI:def_1;
hence not i destroys a by SCMFSA7B:5; ::_thesis: verum
end;
hence not Stop SCM+FSA destroys a by SCMFSA7B:def_4; ::_thesis: verum
end;
theorem Th57: :: SCMFSA8C:57
for a being Int-Location
for l being Element of NAT holds not Goto l destroys a
proof
let a be Int-Location; ::_thesis: for l being Element of NAT holds not Goto l destroys a
let l be Element of NAT ; ::_thesis: not Goto l destroys a
now__::_thesis:_for_i_being_Instruction_of_SCM+FSA_st_i_in_rng_(Goto_l)_holds_
not_i_destroys_a
let i be Instruction of SCM+FSA; ::_thesis: ( i in rng (Goto l) implies not i destroys a )
A1: rng (Goto l) = {(goto l)} by FUNCOP_1:8;
assume i in rng (Goto l) ; ::_thesis: not i destroys a
then i = goto l by A1, TARSKI:def_1;
hence not i destroys a by SCMFSA7B:11; ::_thesis: verum
end;
hence not Goto l destroys a by SCMFSA7B:def_4; ::_thesis: verum
end;
theorem Th58: :: SCMFSA8C:58
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_halting_on Initialized s,P holds
( ( for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a ) & ( for f being FinSeq-Location holds (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f ) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_halting_on Initialized s,P holds
( ( for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a ) & ( for f being FinSeq-Location holds (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f ) )
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_halting_on Initialized s,P holds
( ( for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a ) & ( for f being FinSeq-Location holds (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f ) )
let I be Program of SCM+FSA; ::_thesis: ( I is_halting_on Initialized s,P implies ( ( for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a ) & ( for f being FinSeq-Location holds (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f ) ) )
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* I;
assume I is_halting_on Initialized s,P ; ::_thesis: ( ( for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a ) & ( for f being FinSeq-Location holds (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f ) )
then A1: P +* I halts_on Initialize (Initialized s) by SCMFSA7B:def_7;
hereby ::_thesis: for f being FinSeq-Location holds (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f
let a be read-write Int-Location; ::_thesis: (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a
thus (IExec (I,P,s)) . a = (Result ((P +* I),(Initialize (Initialized s)))) . a by MEMSTR_0:44
.= (Result ((P +* I),(Initialize (Initialized s)))) . a
.= (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a by A1, EXTPRO_1:23 ; ::_thesis: verum
end;
let f be FinSeq-Location ; ::_thesis: (IExec (I,P,s)) . f = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f
thus (IExec (I,P,s)) . f = (Result ((P +* I),(Initialize (Initialized s)))) . f by MEMSTR_0:44
.= (Result ((P +* I),(Initialize (Initialized s)))) . f
.= (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . f by A1, EXTPRO_1:23 ; ::_thesis: verum
end;
theorem Th59: :: SCMFSA8C:59
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA
for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA
for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a
let s be State of SCM+FSA; ::_thesis: for I being parahalting Program of SCM+FSA
for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a
let I be parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location holds (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a
let a be read-write Int-Location; ::_thesis: (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a
I is_halting_on Initialized s,P by SCMFSA7B:19;
hence (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a by Th58; ::_thesis: verum
end;
theorem Th60: :: SCMFSA8C:60
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location
for k being Element of NAT st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P & not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location
for k being Element of NAT st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P & not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA
for a being Int-Location
for k being Element of NAT st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P & not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let I be Program of SCM+FSA; ::_thesis: for a being Int-Location
for k being Element of NAT st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P & not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let a be Int-Location; ::_thesis: for k being Element of NAT st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P & not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let k be Element of NAT ; ::_thesis: ( I is_closed_on Initialized s,P & I is_halting_on Initialized s,P & not I destroys a implies (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a )
assume A1: I is_closed_on Initialized s,P ; ::_thesis: ( not I is_halting_on Initialized s,P or I destroys a or (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a )
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* I;
assume I is_halting_on Initialized s,P ; ::_thesis: ( I destroys a or (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a )
then A2: P +* I halts_on Initialize (Initialized s) by SCMFSA7B:def_7;
assume A3: not I destroys a ; ::_thesis: (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
thus (IExec (I,P,s)) . a = (Result ((P +* I),(Initialize (Initialized s)))) . a by MEMSTR_0:44
.= (Result ((P +* I),(Initialize (Initialized s)))) . a
.= (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . a by A2, EXTPRO_1:23
.= (Initialized s) . a by A1, A3, SCMFSA7B:21
.= (Comput ((P +* I),(Initialize (Initialized s)),k)) . a by A1, A3, SCMFSA7B:21 ; ::_thesis: verum
end;
theorem Th61: :: SCMFSA8C:61
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA
for a being Int-Location
for k being Element of NAT st not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA
for a being Int-Location
for k being Element of NAT st not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let s be State of SCM+FSA; ::_thesis: for I being parahalting Program of SCM+FSA
for a being Int-Location
for k being Element of NAT st not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let I be parahalting Program of SCM+FSA; ::_thesis: for a being Int-Location
for k being Element of NAT st not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let a be Int-Location; ::_thesis: for k being Element of NAT st not I destroys a holds
(IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a
let k be Element of NAT ; ::_thesis: ( not I destroys a implies (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a )
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* I;
A1: I c= P +* I by FUNCT_4:25;
A2: I is_closed_on Initialized s,P by SCMFSA7B:18;
P +* I halts_on Initialize (Initialized s) by A1, SCMFSA6B:1;
then I is_halting_on Initialized s,P by SCMFSA7B:def_7;
hence ( not I destroys a implies (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),k)) . a ) by Th60, A2; ::_thesis: verum
end;
theorem Th62: :: SCMFSA8C:62
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA
for a being Int-Location st not I destroys a holds
(IExec (I,P,s)) . a = (Initialized s) . a
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA
for a being Int-Location st not I destroys a holds
(IExec (I,P,s)) . a = (Initialized s) . a
let s be State of SCM+FSA; ::_thesis: for I being parahalting Program of SCM+FSA
for a being Int-Location st not I destroys a holds
(IExec (I,P,s)) . a = (Initialized s) . a
set D = Data-Locations ;
let I be parahalting Program of SCM+FSA; ::_thesis: for a being Int-Location st not I destroys a holds
(IExec (I,P,s)) . a = (Initialized s) . a
let a be Int-Location; ::_thesis: ( not I destroys a implies (IExec (I,P,s)) . a = (Initialized s) . a )
A1: DataPart (Initialized s) = DataPart (Initialize (Initialized s)) by MEMSTR_0:79;
assume not I destroys a ; ::_thesis: (IExec (I,P,s)) . a = (Initialized s) . a
hence (IExec (I,P,s)) . a = (Comput ((P +* I),(Initialize (Initialized s)),0)) . a by Th61
.= (Initialize (Initialized s)) . a
.= (Initialized s) . a by A1, SCMFSA_M:2 ;
::_thesis: verum
end;
theorem Th63: :: SCMFSA8C:63
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being keeping_0 Program of SCM+FSA st I is_halting_on Initialized s,P holds
( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being keeping_0 Program of SCM+FSA st I is_halting_on Initialized s,P holds
( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
set a = intloc 0;
let s be State of SCM+FSA; ::_thesis: for I being keeping_0 Program of SCM+FSA st I is_halting_on Initialized s,P holds
( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
set D = Data-Locations ;
let I be keeping_0 Program of SCM+FSA; ::_thesis: ( I is_halting_on Initialized s,P implies ( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) ) )
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* I;
A1: I c= P +* I by FUNCT_4:25;
A2: DataPart (Initialized s) = DataPart (Initialize (Initialized s)) by MEMSTR_0:79;
A3: now__::_thesis:_for_k_being_Element_of_NAT_holds_(Comput_((P_+*_I),(Initialize_(Initialized_s)),k))_._(intloc_0)_=_1
let k be Element of NAT ; ::_thesis: (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1
thus (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = (Initialize (Initialized s)) . (intloc 0) by A1, SCMFSA6B:def_4
.= (Initialized s) . (intloc 0) by A2, SCMFSA_M:2
.= 1 by SCMFSA_M:9 ; ::_thesis: verum
end;
assume I is_halting_on Initialized s,P ; ::_thesis: ( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
then A4: P +* I halts_on Initialize (Initialized s) by SCMFSA7B:def_7;
thus (IExec (I,P,s)) . (intloc 0) = (Result ((P +* I),(Initialize (Initialized s)))) . (intloc 0) by MEMSTR_0:44
.= (Result ((P +* I),(Initialize (Initialized s)))) . (intloc 0)
.= (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . (intloc 0) by A4, EXTPRO_1:23
.= 1 by A3 ; ::_thesis: for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1
let k be Element of NAT ; ::_thesis: (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1
thus (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 by A3; ::_thesis: verum
end;
theorem Th64: :: SCMFSA8C:64
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
for k being Element of NAT st IC (Comput ((P +* I),(Initialize s),k)) in dom I holds
(Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
for k being Element of NAT st IC (Comput ((P +* I),(Initialize s),k)) in dom I holds
(Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
for k being Element of NAT st IC (Comput ((P +* I),(Initialize s),k)) in dom I holds
(Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a
let I be Program of SCM+FSA; ::_thesis: for a being Int-Location st not I destroys a holds
for k being Element of NAT st IC (Comput ((P +* I),(Initialize s),k)) in dom I holds
(Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a
let a be Int-Location; ::_thesis: ( not I destroys a implies for k being Element of NAT st IC (Comput ((P +* I),(Initialize s),k)) in dom I holds
(Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a )
assume A1: not I destroys a ; ::_thesis: for k being Element of NAT st IC (Comput ((P +* I),(Initialize s),k)) in dom I holds
(Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a
set s1 = Initialize s;
set P1 = P +* I;
A2: I c= P +* I by FUNCT_4:25;
let k be Element of NAT ; ::_thesis: ( IC (Comput ((P +* I),(Initialize s),k)) in dom I implies (Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a )
assume A3: IC (Comput ((P +* I),(Initialize s),k)) in dom I ; ::_thesis: (Comput ((P +* I),(Initialize s),(k + 1))) . a = (Comput ((P +* I),(Initialize s),k)) . a
set l = IC (Comput ((P +* I),(Initialize s),k));
(P +* I) . (IC (Comput ((P +* I),(Initialize s),k))) = I . (IC (Comput ((P +* I),(Initialize s),k))) by A3, A2, GRFUNC_1:2;
then (P +* I) . (IC (Comput ((P +* I),(Initialize s),k))) in rng I by A3, FUNCT_1:def_3;
then A4: not (P +* I) . (IC (Comput ((P +* I),(Initialize s),k))) destroys a by A1, SCMFSA7B:def_4;
thus (Comput ((P +* I),(Initialize s),(k + 1))) . a = (Following ((P +* I),(Comput ((P +* I),(Initialize s),k)))) . a by EXTPRO_1:3
.= (Exec (((P +* I) . (IC (Comput ((P +* I),(Initialize s),k)))),(Comput ((P +* I),(Initialize s),k)))) . a by PBOOLE:143
.= (Comput ((P +* I),(Initialize s),k)) . a by A4, SCMFSA7B:20 ; ::_thesis: verum
end;
theorem Th65: :: SCMFSA8C:65
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA
for a being Int-Location st not I destroys a holds
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a
let I be Program of SCM+FSA; ::_thesis: for a being Int-Location st not I destroys a holds
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a
let a be Int-Location; ::_thesis: ( not I destroys a implies for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a )
assume A1: not I destroys a ; ::_thesis: for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a
set s1 = Initialize s;
set P1 = P +* I;
let m be Element of NAT ; ::_thesis: ( ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) implies for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a )
defpred S1[ Nat] means ( $1 <= m implies (Comput ((P +* I),(Initialize s),$1)) . a = s . a );
assume A2: for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ; ::_thesis: for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . a = s . a
A3: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A4: S1[k] ; ::_thesis: S1[k + 1]
A5: k + 0 < k + 1 by XREAL_1:6;
assume A6: k + 1 <= m ; ::_thesis: (Comput ((P +* I),(Initialize s),(k + 1))) . a = s . a
then k < m by A5, XXREAL_0:2;
then IC (Comput ((P +* I),(Initialize s),k)) in dom I by A2;
hence (Comput ((P +* I),(Initialize s),(k + 1))) . a = s . a by A1, A4, A6, A5, Th64, XXREAL_0:2; ::_thesis: verum
end;
let n be Element of NAT ; ::_thesis: ( n <= m implies (Comput ((P +* I),(Initialize s),n)) . a = s . a )
assume A7: n <= m ; ::_thesis: (Comput ((P +* I),(Initialize s),n)) . a = s . a
(Comput ((P +* I),(Initialize s),0)) . a = (Initialize s) . a
.= s . a by SCMFSA_M:21 ;
then A8: S1[ 0 ] ;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A8, A3);
hence (Comput ((P +* I),(Initialize s),n)) . a = s . a by A7; ::_thesis: verum
end;
theorem Th66: :: SCMFSA8C:66
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good Program of SCM+FSA
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0)
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good Program of SCM+FSA
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0)
let s be State of SCM+FSA; ::_thesis: for I being good Program of SCM+FSA
for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0)
let I be good Program of SCM+FSA; ::_thesis: for m being Element of NAT st ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) holds
for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0)
let m be Element of NAT ; ::_thesis: ( ( for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ) implies for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0) )
assume A1: for n being Element of NAT st n < m holds
IC (Comput ((P +* I),(Initialize s),n)) in dom I ; ::_thesis: for n being Element of NAT st n <= m holds
(Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0)
let n be Element of NAT ; ::_thesis: ( n <= m implies (Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0) )
A2: not I destroys intloc 0 by SCMFSA7B:def_5;
assume n <= m ; ::_thesis: (Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0)
hence (Comput ((P +* I),(Initialize s),n)) . (intloc 0) = s . (intloc 0) by A1, A2, Th65; ::_thesis: verum
end;
theorem Th67: :: SCMFSA8C:67
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good Program of SCM+FSA st I is_halting_on Initialized s,P & I is_closed_on Initialized s,P holds
( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good Program of SCM+FSA st I is_halting_on Initialized s,P & I is_closed_on Initialized s,P holds
( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
set a = intloc 0;
let s be State of SCM+FSA; ::_thesis: for I being good Program of SCM+FSA st I is_halting_on Initialized s,P & I is_closed_on Initialized s,P holds
( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
let I be good Program of SCM+FSA; ::_thesis: ( I is_halting_on Initialized s,P & I is_closed_on Initialized s,P implies ( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) ) )
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* I;
defpred S1[ Nat] means for n being Element of NAT st n <= $1 holds
(Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0);
assume I is_halting_on Initialized s,P ; ::_thesis: ( not I is_closed_on Initialized s,P or ( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) ) )
then A1: P +* I halts_on Initialize (Initialized s) by SCMFSA7B:def_7;
A2: S1[ 0 ]
proof
let n be Element of NAT ; ::_thesis: ( n <= 0 implies (Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0) )
A3: for i being Element of NAT st i < 0 holds
IC (Comput ((P +* I),(Initialize (Initialized s)),i)) in dom I ;
assume n <= 0 ; ::_thesis: (Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0)
hence (Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0) by A3, Th66; ::_thesis: verum
end;
assume A4: I is_closed_on Initialized s,P ; ::_thesis: ( (IExec (I,P,s)) . (intloc 0) = 1 & ( for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 ) )
A5: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume S1[k] ; ::_thesis: S1[k + 1]
let n be Element of NAT ; ::_thesis: ( n <= k + 1 implies (Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0) )
assume A6: n <= k + 1 ; ::_thesis: (Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0)
for i being Element of NAT st i < k + 1 holds
IC (Comput ((P +* I),(Initialize (Initialized s)),i)) in dom I by A4, SCMFSA7B:def_6;
hence (Comput ((P +* I),(Initialize (Initialized s)),n)) . (intloc 0) = (Initialized s) . (intloc 0) by A6, Th66; ::_thesis: verum
end;
A7: for k being Element of NAT holds S1[k] from NAT_1:sch_1(A2, A5);
A8: now__::_thesis:_for_k_being_Element_of_NAT_holds_(Comput_((P_+*_I),(Initialize_(Initialized_s)),k))_._(intloc_0)_=_1
let k be Element of NAT ; ::_thesis: (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1
thus (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = (Initialized s) . (intloc 0) by A7
.= 1 by SCMFSA_M:9 ; ::_thesis: verum
end;
thus (IExec (I,P,s)) . (intloc 0) = (Result ((P +* I),(Initialize (Initialized s)))) . (intloc 0) by MEMSTR_0:44
.= (Result ((P +* I),(Initialize (Initialized s)))) . (intloc 0)
.= (Comput ((P +* I),(Initialize (Initialized s)),(LifeSpan ((P +* I),(Initialize (Initialized s)))))) . (intloc 0) by A1, EXTPRO_1:23
.= 1 by A8 ; ::_thesis: for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1
thus for k being Element of NAT holds (Comput ((P +* I),(Initialize (Initialized s)),k)) . (intloc 0) = 1 by A8; ::_thesis: verum
end;
theorem :: SCMFSA8C:68
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good Program of SCM+FSA st I is_closed_on s,P holds
for k being Element of NAT holds (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0)
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good Program of SCM+FSA st I is_closed_on s,P holds
for k being Element of NAT holds (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0)
let s be State of SCM+FSA; ::_thesis: for I being good Program of SCM+FSA st I is_closed_on s,P holds
for k being Element of NAT holds (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0)
let I be good Program of SCM+FSA; ::_thesis: ( I is_closed_on s,P implies for k being Element of NAT holds (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0) )
assume A1: I is_closed_on s,P ; ::_thesis: for k being Element of NAT holds (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0)
let k be Element of NAT ; ::_thesis: (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0)
not I destroys intloc 0 by SCMFSA7B:def_5;
hence (Comput ((P +* I),(Initialize s),k)) . (intloc 0) = s . (intloc 0) by A1, SCMFSA7B:21; ::_thesis: verum
end;
theorem Th69: :: SCMFSA8C:69
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being keeping_0 parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a holds
(Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = (s . a) - 1
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being keeping_0 parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a holds
(Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = (s . a) - 1
let s be State of SCM+FSA; ::_thesis: for I being keeping_0 parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a holds
(Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = (s . a) - 1
let I be keeping_0 parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a holds
(Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = (s . a) - 1
let a be read-write Int-Location; ::_thesis: ( not I destroys a implies (Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = (s . a) - 1 )
assume A1: not I destroys a ; ::_thesis: (Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = (s . a) - 1
set s0 = Initialized s;
set s1 = Initialize (Initialized s);
set P1 = P +* (I ";" (SubFrom (a,(intloc 0))));
A2: not a in dom (Start-At (0,SCM+FSA)) by SCMFSA_2:102;
(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,s)))) . a by SCMFSA6C:6
.= ((IExec (I,P,s)) . a) - ((IExec (I,P,s)) . (intloc 0)) by SCMFSA_2:65
.= ((IExec (I,P,s)) . a) - 1 by SCMFSA6B:11
.= ((Comput ((P +* I),(Initialize (Initialized s)),0)) . a) - 1 by A1, Th61
.= ((Initialize (Initialized s)) . a) - 1
.= ((Initialized s) . a) - 1 by A2, FUNCT_4:11 ;
hence (Comput ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)),(LifeSpan ((P +* (I ";" (SubFrom (a,(intloc 0))))),(Initialize (Initialized s)))))) . a = ((Initialized s) . a) - 1 by Th59
.= (s . a) - 1 by SCMFSA_M:37 ;
::_thesis: verum
end;
theorem Th70: :: SCMFSA8C:70
for i being Instruction of SCM+FSA st not i destroys intloc 0 holds
Macro i is good
proof
let i be Instruction of SCM+FSA; ::_thesis: ( not i destroys intloc 0 implies Macro i is good )
assume not i destroys intloc 0 ; ::_thesis: Macro i is good
then not Macro i destroys intloc 0 by Th48;
hence Macro i is good by SCMFSA7B:def_5; ::_thesis: verum
end;
theorem Th71: :: SCMFSA8C:71
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) )
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) )
let s1, s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) )
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 implies for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) ) )
assume A1: I is_closed_on s1,P1 ; ::_thesis: ( not I is_halting_on s1,P1 or not DataPart s1 = DataPart s2 or for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) ) )
set ss2 = Initialize s2;
set PP2 = P2 +* I;
set ss1 = Initialize s1;
set PP1 = P1 +* I;
A2: I c= P1 +* I by FUNCT_4:25;
A3: I c= P2 +* I by FUNCT_4:25;
assume A4: I is_halting_on s1,P1 ; ::_thesis: ( not DataPart s1 = DataPart s2 or for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) ) )
assume A5: DataPart s1 = DataPart s2 ; ::_thesis: for k being Element of NAT holds
( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) )
let k be Element of NAT ; ::_thesis: ( Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) & CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) )
A6: IC (Comput ((P1 +* I),(Initialize s1),k)) in dom I by A1, SCMFSA7B:def_6;
I is_closed_on s2,P2 by A1, A4, A5, SCMFSA8B:5;
then A7: for m being Element of NAT st m < k holds
IC (Comput ((P2 +* I),(Initialize s2),m)) in dom I by SCMFSA7B:def_6;
Initialize s1 = Initialize s2 by A5, SCMFSA8B:4;
hence Comput ((P1 +* I),(Initialize s1),k) = Comput ((P2 +* I),(Initialize s2),k) by A7, A2, A3, AMISTD_2:10; ::_thesis: CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k)))
then A8: IC (Comput ((P1 +* I),(Initialize s1),k)) = IC (Comput ((P2 +* I),(Initialize s2),k)) ;
I is_closed_on s2,P2 by A1, A4, A5, SCMFSA8B:5;
then A9: IC (Comput ((P2 +* I),(Initialize s2),k)) in dom I by SCMFSA7B:def_6;
thus CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),k))) = (P2 +* I) . (IC (Comput ((P2 +* I),(Initialize s2),k))) by PBOOLE:143
.= I . (IC (Comput ((P2 +* I),(Initialize s2),k))) by A9, A3, GRFUNC_1:2
.= (P1 +* I) . (IC (Comput ((P1 +* I),(Initialize s1),k))) by A8, A6, A2, GRFUNC_1:2
.= CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),k))) by PBOOLE:143 ; ::_thesis: verum
end;
theorem Th72: :: SCMFSA8C:72
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) )
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) )
let s1, s2 be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 holds
( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) )
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s1,P1 & I is_halting_on s1,P1 & DataPart s1 = DataPart s2 implies ( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) ) )
assume A1: I is_closed_on s1,P1 ; ::_thesis: ( not I is_halting_on s1,P1 or not DataPart s1 = DataPart s2 or ( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) ) )
set ss2 = Initialize s2;
set PP2 = P2 +* I;
set ss1 = Initialize s1;
set PP1 = P1 +* I;
assume A2: I is_halting_on s1,P1 ; ::_thesis: ( not DataPart s1 = DataPart s2 or ( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) ) )
then A3: P1 +* I halts_on Initialize s1 by SCMFSA7B:def_7;
then A4: Result ((P1 +* I),(Initialize s1)) = Comput ((P1 +* I),(Initialize s1),(LifeSpan ((P1 +* I),(Initialize s1)))) by EXTPRO_1:23;
assume A5: DataPart s1 = DataPart s2 ; ::_thesis: ( LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) & Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) )
then I is_halting_on s2,P2 by A1, A2, SCMFSA8B:5;
then A6: P2 +* I halts_on Initialize s2 by SCMFSA7B:def_7;
A7: now__::_thesis:_for_l_being_Element_of_NAT_st_CurInstr_((P2_+*_I),(Comput_((P2_+*_I),(Initialize_s2),l)))_=_halt_SCM+FSA_holds_
LifeSpan_((P1_+*_I),(Initialize_s1))_<=_l
let l be Element of NAT ; ::_thesis: ( CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),l))) = halt SCM+FSA implies LifeSpan ((P1 +* I),(Initialize s1)) <= l )
assume A8: CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),l))) = halt SCM+FSA ; ::_thesis: LifeSpan ((P1 +* I),(Initialize s1)) <= l
CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),l))) = CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),l))) by A1, A2, A5, Th71;
hence LifeSpan ((P1 +* I),(Initialize s1)) <= l by A3, A8, EXTPRO_1:def_15; ::_thesis: verum
end;
CurInstr ((P2 +* I),(Comput ((P2 +* I),(Initialize s2),(LifeSpan ((P1 +* I),(Initialize s1)))))) = CurInstr ((P1 +* I),(Comput ((P1 +* I),(Initialize s1),(LifeSpan ((P1 +* I),(Initialize s1)))))) by A1, A2, A5, Th71
.= halt SCM+FSA by A3, EXTPRO_1:def_15 ;
hence LifeSpan ((P1 +* I),(Initialize s1)) = LifeSpan ((P2 +* I),(Initialize s2)) by A7, A6, EXTPRO_1:def_15; ::_thesis: Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2))
then Result ((P2 +* I),(Initialize s2)) = Comput ((P2 +* I),(Initialize s2),(LifeSpan ((P1 +* I),(Initialize s1)))) by A6, EXTPRO_1:23;
hence Result ((P1 +* I),(Initialize s1)) = Result ((P2 +* I),(Initialize s2)) by A1, A2, A5, A4, Th71; ::_thesis: verum
end;
theorem Th73: :: SCMFSA8C:73
for P1, P2 being Instruction-Sequence of SCM+FSA
for s1, s2 being 0 -started State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & ex k being Element of NAT st Comput (P1,s1,k) = s2 holds
Result (P1,s1) = Result (P2,s2)
proof
let P1, P2 be Instruction-Sequence of SCM+FSA; ::_thesis: for s1, s2 being 0 -started State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & ex k being Element of NAT st Comput (P1,s1,k) = s2 holds
Result (P1,s1) = Result (P2,s2)
let s1, s2 be 0 -started State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & ex k being Element of NAT st Comput (P1,s1,k) = s2 holds
Result (P1,s1) = Result (P2,s2)
set D = Data-Locations ;
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s1,P1 & I is_halting_on s1,P1 & I c= P1 & I c= P2 & ex k being Element of NAT st Comput (P1,s1,k) = s2 implies Result (P1,s1) = Result (P2,s2) )
assume A1: I is_closed_on s1,P1 ; ::_thesis: ( not I is_halting_on s1,P1 or not I c= P1 or not I c= P2 or for k being Element of NAT holds not Comput (P1,s1,k) = s2 or Result (P1,s1) = Result (P2,s2) )
assume A2: I is_halting_on s1,P1 ; ::_thesis: ( not I c= P1 or not I c= P2 or for k being Element of NAT holds not Comput (P1,s1,k) = s2 or Result (P1,s1) = Result (P2,s2) )
A3: Start-At (0,SCM+FSA) c= s1 by MEMSTR_0:29;
A4: s2 = Initialize s2 by MEMSTR_0:44;
assume I c= P1 ; ::_thesis: ( not I c= P2 or for k being Element of NAT holds not Comput (P1,s1,k) = s2 or Result (P1,s1) = Result (P2,s2) )
then A5: P1 = P1 +* I by FUNCT_4:98;
assume I c= P2 ; ::_thesis: ( for k being Element of NAT holds not Comput (P1,s1,k) = s2 or Result (P1,s1) = Result (P2,s2) )
then A6: P2 = P2 +* I by FUNCT_4:98;
A7: s1 = Initialize s1 by A3, FUNCT_4:98;
then A8: P1 halts_on s1 by A2, A5, SCMFSA7B:def_7;
then consider n being Element of NAT such that
A9: CurInstr (P1,(Comput (P1,s1,n))) = halt SCM+FSA by EXTPRO_1:29;
given k being Element of NAT such that A10: Comput (P1,s1,k) = s2 ; ::_thesis: Result (P1,s1) = Result (P2,s2)
set s3 = Comput (P1,s1,k);
set P3 = P1;
A11: IC in dom (Comput (P1,s1,k)) by MEMSTR_0:2;
IC (Comput (P1,s1,k)) = IC s2 by A10
.= IC (Initialize s2) by A4
.= 0 by FUNCT_4:113 ;
then (IC ) .--> 0 c= Comput (P1,s1,k) by A11, FUNCOP_1:73;
then Start-At (0,SCM+FSA) c= Comput (P1,s1,k) ;
then A12: Comput (P1,s1,k) = Initialize (Comput (P1,s1,k)) by FUNCT_4:98;
A13: now__::_thesis:_for_n_being_Element_of_NAT_holds_IC_(Comput_(P1,(Comput_(P1,s1,k)),n))_in_dom_I
let n be Element of NAT ; ::_thesis: IC (Comput (P1,(Comput (P1,s1,k)),n)) in dom I
IC (Comput (P1,(Comput (P1,s1,k)),n)) = IC (Comput (P1,s1,(k + n))) by EXTPRO_1:4;
hence IC (Comput (P1,(Comput (P1,s1,k)),n)) in dom I by A1, A7, A5, SCMFSA7B:def_6; ::_thesis: verum
end;
A14: Comput (P1,s1,(n + k)) = Comput (P1,(Comput (P1,s1,k)),n) by EXTPRO_1:4;
A15: Comput (P1,s1,(n + k)) = Comput (P1,s1,n) by A9, EXTPRO_1:5, NAT_1:11;
P1 halts_on Comput (P1,s1,k) by A9, A15, A14, EXTPRO_1:29;
then A16: I is_halting_on Comput (P1,s1,k),P1 by A12, A5, SCMFSA7B:def_7;
A17: DataPart (Comput (P1,s1,k)) = DataPart s2 by A10;
consider k being Element of NAT such that
A18: CurInstr (P1,(Comput (P1,s1,k))) = halt SCM+FSA by A8, EXTPRO_1:29;
A19: P1 . (IC (Comput (P1,s1,k))) = halt SCM+FSA by A18, PBOOLE:143;
I is_closed_on Comput (P1,s1,k),P1 by A12, A13, A5, SCMFSA7B:def_6;
then Result (P1,(Comput (P1,s1,k))) = Result (P2,s2) by A4, A17, A12, A16, Th72, A5, A6;
hence Result (P1,s1) = Result (P2,s2) by A19, EXTPRO_1:8; ::_thesis: verum
end;
begin
definition
let I be Program of SCM+FSA;
func loop I -> halt-free Program of SCM+FSA equals :: SCMFSA8C:def 1
Directed (I,0);
coherence
Directed (I,0) is halt-free Program of SCM+FSA
proof
dom (Directed (I,0)) = dom I by FUNCT_4:99;
hence Directed (I,0) is halt-free Program of SCM+FSA ; ::_thesis: verum
end;
end;
:: deftheorem defines loop SCMFSA8C:def_1_:_
for I being Program of SCM+FSA holds loop I = Directed (I,0);
theorem :: SCMFSA8C:74
for I being Program of SCM+FSA
for a being Int-Location st loop I destroys a holds
I destroys a by SCMFSA8A:13;
registration
let I be good Program of SCM+FSA;
cluster loop I -> halt-free good ;
correctness
coherence
loop I is good ;
;
end;
theorem Th75: :: SCMFSA8C:75
for I being Program of SCM+FSA holds not halt SCM+FSA in rng (loop I) by FUNCT_4:100;
theorem Th76: :: SCMFSA8C:76
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m)
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m)
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m)
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m) )
set s1 = Initialize s;
set P1 = P +* I;
A1: I c= P +* I by FUNCT_4:25;
set s2 = Initialize s;
set P2 = P +* (loop I);
A2: loop I c= P +* (loop I) by FUNCT_4:25;
assume A3: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m) )
defpred S1[ Nat] means ( $1 <= LifeSpan ((P +* I),(Initialize s)) implies Comput ((P +* I),(Initialize s),$1) = Comput ((P +* (loop I)),(Initialize s),$1) );
assume I is_halting_on s,P ; ::_thesis: for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m)
then A4: P +* I halts_on Initialize s by SCMFSA7B:def_7;
A5: for m being Element of NAT st S1[m] holds
S1[m + 1]
proof
let m be Element of NAT ; ::_thesis: ( S1[m] implies S1[m + 1] )
assume A6: ( m <= LifeSpan ((P +* I),(Initialize s)) implies Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m) ) ; ::_thesis: S1[m + 1]
A7: Comput ((P +* I),(Initialize s),(m + 1)) = Following ((P +* I),(Comput ((P +* I),(Initialize s),m))) by EXTPRO_1:3;
A8: Comput ((P +* (loop I)),(Initialize s),(m + 1)) = Following ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) by EXTPRO_1:3;
A9: IC (Comput ((P +* I),(Initialize s),m)) in dom I by A3, SCMFSA7B:def_6;
A10: (P +* I) /. (IC (Comput ((P +* I),(Initialize s),m))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),m))) by PBOOLE:143;
A11: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = I . (IC (Comput ((P +* I),(Initialize s),m))) by A9, A10, A1, GRFUNC_1:2;
assume A12: m + 1 <= LifeSpan ((P +* I),(Initialize s)) ; ::_thesis: Comput ((P +* I),(Initialize s),(m + 1)) = Comput ((P +* (loop I)),(Initialize s),(m + 1))
then m < LifeSpan ((P +* I),(Initialize s)) by NAT_1:13;
then A13: I . (IC (Comput ((P +* I),(Initialize s),m))) <> halt SCM+FSA by A4, A11, EXTPRO_1:def_15;
A14: (P +* (loop I)) /. (IC (Comput ((P +* (loop I)),(Initialize s),m))) = (P +* (loop I)) . (IC (Comput ((P +* (loop I)),(Initialize s),m))) by PBOOLE:143;
A15: IC (Comput ((P +* I),(Initialize s),m)) in dom (loop I) by A9, FUNCT_4:99;
CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),m))) by PBOOLE:143
.= I . (IC (Comput ((P +* I),(Initialize s),m))) by A1, A9, GRFUNC_1:2
.= (loop I) . (IC (Comput ((P +* I),(Initialize s),m))) by A13, FUNCT_4:105
.= (P +* (loop I)) . (IC (Comput ((P +* I),(Initialize s),m))) by A2, A15, GRFUNC_1:2
.= CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) by A6, A12, A14, NAT_1:13 ;
hence Comput ((P +* I),(Initialize s),(m + 1)) = Comput ((P +* (loop I)),(Initialize s),(m + 1)) by A6, A12, A7, A8, NAT_1:13; ::_thesis: verum
end;
A16: S1[ 0 ] ;
thus for m being Element of NAT holds S1[m] from NAT_1:sch_1(A16, A5); ::_thesis: verum
end;
theorem Th77: :: SCMFSA8C:77
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m < LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m)))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m < LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m)))
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m < LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m)))
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies for m being Element of NAT st m < LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) )
set s1 = Initialize s;
set P1 = P +* I;
set s2 = Initialize s;
set P2 = P +* (loop I);
A1: I c= P +* I by FUNCT_4:25;
A2: loop I c= P +* (loop I) by FUNCT_4:25;
assume that
A3: I is_closed_on s,P and
A4: I is_halting_on s,P ; ::_thesis: for m being Element of NAT st m < LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m)))
let m be Element of NAT ; ::_thesis: ( m < LifeSpan ((P +* I),(Initialize s)) implies CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) )
A5: IC (Comput ((P +* I),(Initialize s),m)) in dom I by A3, SCMFSA7B:def_6;
then A6: IC (Comput ((P +* I),(Initialize s),m)) in dom (loop I) by FUNCT_4:99;
A7: (P +* I) /. (IC (Comput ((P +* I),(Initialize s),m))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),m))) by PBOOLE:143;
A8: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = I . (IC (Comput ((P +* I),(Initialize s),m))) by A5, A7, A1, GRFUNC_1:2;
assume A9: m < LifeSpan ((P +* I),(Initialize s)) ; ::_thesis: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m)))
A10: (P +* (loop I)) /. (IC (Comput ((P +* (loop I)),(Initialize s),m))) = (P +* (loop I)) . (IC (Comput ((P +* (loop I)),(Initialize s),m))) by PBOOLE:143;
P +* I halts_on Initialize s by A4, SCMFSA7B:def_7;
then A11: I . (IC (Comput ((P +* I),(Initialize s),m))) <> halt SCM+FSA by A9, A8, EXTPRO_1:def_15;
A12: Comput ((P +* I),(Initialize s),m) = Comput ((P +* (loop I)),(Initialize s),m) by A3, A4, A9, Th76;
thus CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),m))) by PBOOLE:143
.= I . (IC (Comput ((P +* I),(Initialize s),m))) by A1, A5, GRFUNC_1:2
.= (loop I) . (IC (Comput ((P +* I),(Initialize s),m))) by A11, FUNCT_4:105
.= (P +* (loop I)) . (IC (Comput ((P +* I),(Initialize s),m))) by A6, A2, GRFUNC_1:2
.= CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) by A10, A12 ; ::_thesis: verum
end;
Lm1: for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
( CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = goto 0 & ( for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA ) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
( CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = goto 0 & ( for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA ) )
A1: dom (id the InstructionsF of SCM+FSA) = the InstructionsF of SCM+FSA ;
let s be State of SCM+FSA; ::_thesis: for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
( CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = goto 0 & ( for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA ) )
let I be Program of SCM+FSA; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies ( CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = goto 0 & ( for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA ) ) )
set s1 = Initialize s;
set P1 = P +* I;
set s2 = Initialize s;
set P2 = P +* (loop I);
A2: I c= P +* I by FUNCT_4:25;
assume that
A3: I is_closed_on s,P and
A4: I is_halting_on s,P ; ::_thesis: ( CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = goto 0 & ( for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA ) )
set k = LifeSpan ((P +* I),(Initialize s));
A5: IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s))))) in dom I by A3, SCMFSA7B:def_6;
A6: dom (loop I) = dom I by FUNCT_4:99;
A7: P +* I halts_on Initialize s by A4, SCMFSA7B:def_7;
then A8: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = halt SCM+FSA by EXTPRO_1:def_15;
A9: CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = (P +* I) . (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) by PBOOLE:143
.= I . (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) by A2, A5, GRFUNC_1:2 ;
A10: rng I c= the InstructionsF of SCM+FSA by RELAT_1:def_19;
A11: (P +* (loop I)) /. (IC (Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = (P +* (loop I)) . (IC (Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) by PBOOLE:143;
Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))) = Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))) by A3, A4, Th76;
hence A12: CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = (P +* (loop I)) . (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) by A11
.= (loop I) . (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) by A5, A6, FUNCT_4:13
.= (((id the InstructionsF of SCM+FSA) +* ((halt SCM+FSA),(goto 0))) * I) . (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) by A10, FUNCT_7:116
.= ((id the InstructionsF of SCM+FSA) +* ((halt SCM+FSA),(goto 0))) . (halt SCM+FSA) by A8, A5, A9, FUNCT_1:13
.= goto 0 by A1, FUNCT_7:31 ;
::_thesis: for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA
let m be Element of NAT ; ::_thesis: ( m <= LifeSpan ((P +* I),(Initialize s)) implies CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA )
assume A13: m <= LifeSpan ((P +* I),(Initialize s)) ; ::_thesis: CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA
percases ( m < LifeSpan ((P +* I),(Initialize s)) or m = LifeSpan ((P +* I),(Initialize s)) ) by A13, XXREAL_0:1;
supposeA14: m < LifeSpan ((P +* I),(Initialize s)) ; ::_thesis: CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA
then CurInstr ((P +* I),(Comput ((P +* I),(Initialize s),m))) <> halt SCM+FSA by A7, EXTPRO_1:def_15;
hence CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA by A3, A4, A14, Th77; ::_thesis: verum
end;
suppose m = LifeSpan ((P +* I),(Initialize s)) ; ::_thesis: CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA
hence CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA by A12; ::_thesis: verum
end;
end;
end;
theorem :: SCMFSA8C:78
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
for m being Element of NAT st m <= LifeSpan ((P +* I),(Initialize s)) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),m))) <> halt SCM+FSA by Lm1;
theorem :: SCMFSA8C:79
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) = goto 0 by Lm1;
theorem Th80: :: SCMFSA8C:80
for P being Instruction-Sequence of SCM+FSA
for s being 0 -started State of SCM+FSA
for I being paraclosed Program of SCM+FSA st I c= P & P halts_on s holds
for m being Element of NAT st m <= LifeSpan (P,s) holds
Comput (P,s,m) = Comput ((P +* (loop I)),s,m)
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being 0 -started State of SCM+FSA
for I being paraclosed Program of SCM+FSA st I c= P & P halts_on s holds
for m being Element of NAT st m <= LifeSpan (P,s) holds
Comput (P,s,m) = Comput ((P +* (loop I)),s,m)
let s be 0 -started State of SCM+FSA; ::_thesis: for I being paraclosed Program of SCM+FSA st I c= P & P halts_on s holds
for m being Element of NAT st m <= LifeSpan (P,s) holds
Comput (P,s,m) = Comput ((P +* (loop I)),s,m)
let I be paraclosed Program of SCM+FSA; ::_thesis: ( I c= P & P halts_on s implies for m being Element of NAT st m <= LifeSpan (P,s) holds
Comput (P,s,m) = Comput ((P +* (loop I)),s,m) )
assume A1: I c= P ; ::_thesis: ( not P halts_on s or for m being Element of NAT st m <= LifeSpan (P,s) holds
Comput (P,s,m) = Comput ((P +* (loop I)),s,m) )
defpred S1[ Nat] means ( $1 <= LifeSpan (P,s) implies Comput (P,s,$1) = Comput ((P +* (loop I)),s,$1) );
assume A2: P halts_on s ; ::_thesis: for m being Element of NAT st m <= LifeSpan (P,s) holds
Comput (P,s,m) = Comput ((P +* (loop I)),s,m)
A3: for m being Element of NAT st S1[m] holds
S1[m + 1]
proof
set sI = s;
set PI = P +* (loop I);
A4: loop I c= P +* (loop I) by FUNCT_4:25;
let m be Element of NAT ; ::_thesis: ( S1[m] implies S1[m + 1] )
assume A5: ( m <= LifeSpan (P,s) implies Comput (P,s,m) = Comput ((P +* (loop I)),s,m) ) ; ::_thesis: S1[m + 1]
A6: IC (Comput (P,s,m)) in dom I by A1, AMISTD_1:def_10;
then A7: IC (Comput (P,s,m)) in dom (loop I) by FUNCT_4:99;
A8: P /. (IC (Comput (P,s,m))) = P . (IC (Comput (P,s,m))) by PBOOLE:143;
A9: CurInstr (P,(Comput (P,s,m))) = I . (IC (Comput (P,s,m))) by A6, A8, A1, GRFUNC_1:2;
A10: Comput ((P +* (loop I)),s,(m + 1)) = Following ((P +* (loop I)),(Comput ((P +* (loop I)),s,m))) by EXTPRO_1:3;
A11: Comput (P,s,(m + 1)) = Following (P,(Comput (P,s,m))) by EXTPRO_1:3;
A12: (P +* (loop I)) /. (IC (Comput ((P +* (loop I)),s,m))) = (P +* (loop I)) . (IC (Comput ((P +* (loop I)),s,m))) by PBOOLE:143;
assume A13: m + 1 <= LifeSpan (P,s) ; ::_thesis: Comput (P,s,(m + 1)) = Comput ((P +* (loop I)),s,(m + 1))
then m < LifeSpan (P,s) by NAT_1:13;
then I . (IC (Comput (P,s,m))) <> halt SCM+FSA by A2, A9, EXTPRO_1:def_15;
then CurInstr (P,(Comput (P,s,m))) = (loop I) . (IC (Comput (P,s,m))) by A9, FUNCT_4:105
.= (P +* (loop I)) . (IC (Comput (P,s,m))) by A7, A4, GRFUNC_1:2
.= CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,m))) by A5, A13, A12, NAT_1:13 ;
hence Comput (P,s,(m + 1)) = Comput ((P +* (loop I)),s,(m + 1)) by A5, A13, A11, A10, NAT_1:13; ::_thesis: verum
end;
A14: S1[ 0 ] ;
thus for m being Element of NAT holds S1[m] from NAT_1:sch_1(A14, A3); ::_thesis: verum
end;
theorem :: SCMFSA8C:81
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA st Initialize ((intloc 0) .--> 1) c= s & I c= P holds
for k being Element of NAT st k <= LifeSpan (P,s) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being parahalting Program of SCM+FSA st Initialize ((intloc 0) .--> 1) c= s & I c= P holds
for k being Element of NAT st k <= LifeSpan (P,s) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA
let s be State of SCM+FSA; ::_thesis: for I being parahalting Program of SCM+FSA st Initialize ((intloc 0) .--> 1) c= s & I c= P holds
for k being Element of NAT st k <= LifeSpan (P,s) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA
let I be parahalting Program of SCM+FSA; ::_thesis: ( Initialize ((intloc 0) .--> 1) c= s & I c= P implies for k being Element of NAT st k <= LifeSpan (P,s) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA )
set s2 = s;
set P2 = P +* (loop I);
assume A1: Initialize ((intloc 0) .--> 1) c= s ; ::_thesis: ( not I c= P or for k being Element of NAT st k <= LifeSpan (P,s) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA )
Start-At (0,SCM+FSA) c= Initialize ((intloc 0) .--> 1) by FUNCT_4:25;
then Start-At (0,SCM+FSA) c= s by A1, XBOOLE_1:1;
then A2: s is 0 -started by MEMSTR_0:29;
then reconsider s1 = s as 0 -started State of SCM+FSA ;
assume A3: I c= P ; ::_thesis: for k being Element of NAT st k <= LifeSpan (P,s) holds
CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA
then A4: P halts_on s by A2, AMISTD_1:def_11;
let k be Element of NAT ; ::_thesis: ( k <= LifeSpan (P,s) implies CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA )
assume A5: k <= LifeSpan (P,s) ; ::_thesis: CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) <> halt SCM+FSA
set lk = IC (Comput (P,s,k));
assume A6: CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) = halt SCM+FSA ; ::_thesis: contradiction
A7: dom I = dom (loop I) by FUNCT_4:99;
A8: IC (Comput (P,s1,k)) in dom I by A3, AMISTD_1:def_10;
then A9: (loop I) . (IC (Comput (P,s,k))) in rng (loop I) by A7, FUNCT_1:def_3;
A10: (P +* (loop I)) /. (IC (Comput ((P +* (loop I)),s,k))) = (P +* (loop I)) . (IC (Comput ((P +* (loop I)),s,k))) by PBOOLE:143;
Comput (P,s1,k) = Comput ((P +* (loop I)),s1,k) by A4, A5, Th80, A3;
then CurInstr ((P +* (loop I)),(Comput ((P +* (loop I)),s,k))) = (P +* (loop I)) . (IC (Comput (P,s,k))) by A10
.= (loop I) . (IC (Comput (P,s,k))) by A8, A7, FUNCT_4:13 ;
hence contradiction by A6, A9, Th75; ::_thesis: verum
end;
begin
definition
let a be Int-Location;
let I be Program of SCM+FSA;
func Times (a,I) -> Program of SCM+FSA equals :: SCMFSA8C:def 2
if>0 (a,(loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Stop SCM+FSA));
correctness
coherence
if>0 (a,(loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Stop SCM+FSA)) is Program of SCM+FSA;
;
end;
:: deftheorem defines Times SCMFSA8C:def_2_:_
for a being Int-Location
for I being Program of SCM+FSA holds Times (a,I) = if>0 (a,(loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Stop SCM+FSA));
registration
let a be Int-Location;
let I be Program of SCM+FSA;
cluster Times (a,I) -> non halt-free ;
coherence
not Times (a,I) is halt-free ;
end;
theorem Th82: :: SCMFSA8C:82
for I being good Program of SCM+FSA
for a being read-write Int-Location holds if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is good
proof
let I be good Program of SCM+FSA; ::_thesis: for a being read-write Int-Location holds if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is good
let a be read-write Int-Location; ::_thesis: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is good
reconsider J3 = Macro (SubFrom (a,(intloc 0))) as good Program of SCM+FSA by Th70, SCMFSA7B:8;
I ";" (SubFrom (a,(intloc 0))) = I ";" J3 ;
then reconsider I1 = I ";" (SubFrom (a,(intloc 0))) as good Program of SCM+FSA ;
reconsider J1 = Macro (a =0_goto ((card I1) + 3)) as good Program of SCM+FSA by Th70, SCMFSA7B:12;
if=0 (a,(Goto 2),I1) = ((((a =0_goto ((card I1) + 3)) ";" I1) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA) by SCMFSA8B:def_1
.= (((J1 ";" I1) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA) ;
hence if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is good ; ::_thesis: verum
end;
theorem Th83: :: SCMFSA8C:83
for I, J being Program of SCM+FSA
for a being Int-Location holds (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5)
proof
let I, J be Program of SCM+FSA; ::_thesis: for a being Int-Location holds (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5)
let a be Int-Location; ::_thesis: (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5)
set I1 = I ";" (SubFrom (a,(intloc 0)));
set J3 = ((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1));
set J4 = (((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2);
A1: card (Goto ((card (Goto 2)) + 1)) = 1 by SCMFSA8A:15;
card ((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) = (card (Macro (a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)))) + (card (I ";" (SubFrom (a,(intloc 0))))) by SCMFSA6A:21
.= 2 + (card (I ";" (SubFrom (a,(intloc 0))))) by COMPOS_1:56 ;
then A2: card (((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) = ((card (I ";" (SubFrom (a,(intloc 0))))) + 2) + 1 by A1, SCMFSA6A:21
.= (card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1) ;
then ((card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1)) -' (card (((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1)))) = 0 by XREAL_1:232;
then A3: goto 2 = (Goto 2) . (((card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1)) -' (card (((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))))) by SCMFSA8A:31;
A4: card (Goto 2) = 1 by SCMFSA8A:15;
then (card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1) < (card (((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1)))) + (card (Goto 2)) by A2, NAT_1:13;
then A5: ((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) . ((card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1)) = IncAddr ((goto 2),(card (((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))))) by A2, A3, Th2
.= goto (2 + ((card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1))) by A2, SCMFSA_4:1
.= goto ((card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 3)) ;
card ((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) = ((card (I ";" (SubFrom (a,(intloc 0))))) + (2 + 1)) + 1 by A2, A4, SCMFSA6A:21
.= (card (I ";" (SubFrom (a,(intloc 0))))) + ((2 + 1) + 1) ;
then card ((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) = ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) + 1 ;
then (card (I ";" (SubFrom (a,(intloc 0))))) + 3 < card ((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) by NAT_1:13;
then A6: (card (I ";" (SubFrom (a,(intloc 0))))) + 3 in dom ((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) by AFINSQ_1:66;
then (((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA)) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = (Directed ((((a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) ";" (I ";" (SubFrom (a,(intloc 0))))) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) by SCMFSA8A:14
.= goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5) by A5, A6, SCMFSA8A:16 ;
hence (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5) by SCMFSA8B:def_1; ::_thesis: verum
end;
theorem Th84: :: SCMFSA8C:84
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P
let s be State of SCM+FSA; ::_thesis: for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P
let a be read-write Int-Location; ::_thesis: ( not I destroys a & s . (intloc 0) = 1 & s . a > 0 implies loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P )
set I2 = if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))));
reconsider I1 = I ";" (SubFrom (a,(intloc 0))) as parahalting Program of SCM+FSA ;
set i = a =0_goto ((card I1) + 3);
defpred S1[ Nat] means for s being State of SCM+FSA st s . (intloc 0) = 1 & s . a = $1 & s . a > 0 holds
( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) . a = (s . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) . (intloc 0) = 1 & ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) );
assume A1: not I destroys a ; ::_thesis: ( not s . (intloc 0) = 1 or not s . a > 0 or loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P )
A2: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A3: S1[k] ; ::_thesis: S1[k + 1]
let ss be State of SCM+FSA; ::_thesis: ( ss . (intloc 0) = 1 & ss . a = k + 1 & ss . a > 0 implies ( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 & ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) ) )
assume A4: ss . (intloc 0) = 1 ; ::_thesis: ( not ss . a = k + 1 or not ss . a > 0 or ( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 & ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) ) )
set s2 = Initialize ss;
set P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))));
set s1 = Initialize ss;
set P1 = P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))));
A5: loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) c= P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by FUNCT_4:25;
assume A6: ss . a = k + 1 ; ::_thesis: ( not ss . a > 0 or ( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 & ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) ) )
set s3 = Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1));
set P3 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))));
assume A7: ss . a > 0 ; ::_thesis: ( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 & ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) )
A8: Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)) = Following ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss)))))) by EXTPRO_1:3;
A9: I1 is_halting_on ss,P by SCMFSA7B:19;
A10: I1 is_closed_on ss,P by SCMFSA7B:18;
then A11: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on ss,P by A7, A9, SCMFSA8B:15;
A12: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on ss,P by A7, A10, A9, SCMFSA8B:15;
A13: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on ss,P by A7, A10, A9, SCMFSA8B:15;
then A14: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) = (Exec ((goto 0),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))))))) . (IC ) by A12, A8, Lm1
.= 0 by SCMFSA_2:69 ;
A15: Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)) = Exec ((goto 0),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss)))))) by A13, A12, A8, Lm1;
A16: now__::_thesis:_(_0_in_dom_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))_&_(card_I1)_+_3_in_dom_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))_&_intloc_0_in_dom_ss_&_(Comput_((P_+*_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))),(Initialize_ss),((LifeSpan_((P_+*_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))),(Initialize_ss)))_+_1)))_._a_=_(ss_._a)_-_1_&_(Comput_((P_+*_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))),(Initialize_ss),((LifeSpan_((P_+*_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))),(Initialize_ss)))_+_1)))_._(intloc_0)_=_1_)
A17: I1 is_halting_on Initialized ss,P by SCMFSA7B:19;
A18: I1 is_closed_on Initialized ss,P by SCMFSA7B:18;
IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,ss) = (IExec (I1,P,ss)) +* (Start-At ((((card (Goto 2)) + (card I1)) + 3),SCM+FSA)) by A7, A17, A18, SCMFSA8B:16;
then A19: (IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,ss)) . a = (IExec (I1,P,ss)) . a by SCMFSA_3:3;
A20: card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) = ((card (Goto 2)) + (card I1)) + 4 by SCMFSA8B:11
.= ((card I1) + 1) + 4 by SCMFSA8A:15
.= ((card I1) + 3) + 2 ;
A21: card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = card (dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))))
.= card (dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by FUNCT_4:99
.= card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) ;
hereby ::_thesis: ( intloc 0 in dom ss & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 )
thus 0 in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A21, AFINSQ_1:66; ::_thesis: (card I1) + 3 in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
((card I1) + 3) + (1 + 1) = (((card I1) + 3) + 1) + 1 ;
then ((card I1) + 3) + 1 < card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by A20, NAT_1:13;
then (card I1) + 3 < card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A21, NAT_1:13;
hence (card I1) + 3 in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by AFINSQ_1:66; ::_thesis: verum
end;
thus intloc 0 in dom ss by SCMFSA_2:42; ::_thesis: ( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 )
then A22: ss +* ((intloc 0) .--> 1) = ss by A4, FUNCT_7:109;
A23: I1 is_closed_on Initialized ss,P by SCMFSA7B:18;
A24: I1 is_halting_on Initialized ss,P by SCMFSA7B:19;
A25: (Initialized ss) . a > 0 by A7, SCMFSA_M:37;
then A26: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on Initialized ss,P by A23, A24, SCMFSA8B:15;
A27: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on Initialized ss,P by A25, A23, A24, SCMFSA8B:15;
consider Is being State of SCM+FSA such that
A28: Is = Initialize (Initialized ss) ;
set IP = P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))));
A29: Initialize (Initialized ss) = Initialize (Initialized ss)
.= ((ss +* ((intloc 0) .--> 1)) +* (Start-At (0,SCM+FSA))) +* (Start-At (0,SCM+FSA)) by FUNCT_4:14
.= Initialize ss by A22
.= Initialize ss ;
A30: now__::_thesis:_for_b_being_Int-Location_holds_(Comput_((P_+*_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))),(Initialize_ss),((LifeSpan_((P_+*_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))),(Initialize_ss)))_+_1)))_._b_=_(Comput_((P_+*_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))),Is,(LifeSpan_((P_+*_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))),Is))))_._b
let b be Int-Location; ::_thesis: (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . b = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is)))) . b
A31: Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is))) = Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is))) by A12, A11, A29, A28, Th76;
(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . b = (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))))) . b by A15, SCMFSA_2:69;
hence (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . b = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is)))) . b by A29, A28, A31; ::_thesis: verum
end;
then (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is)))) . a
.= (IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,ss)) . a by A28, A26, Th58 ;
hence (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (Comput ((P +* I1),((Initialized ss) +* (Start-At (0,SCM+FSA))),(LifeSpan ((P +* I1),(Initialize (Initialized ss)))))) . a by A17, A19, Th58
.= (ss . a) - 1 by A1, Th69 ;
::_thesis: (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1
A32: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is good by Th82;
(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),Is)))) . (intloc 0) by A30
.= 1 by A28, A26, A27, A32, Th67 ;
hence (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 ; ::_thesis: verum
end;
hence ( (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . a = (ss . a) - 1 & (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) . (intloc 0) = 1 ) ; ::_thesis: ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
A33: now__::_thesis:_(_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))_._0_=_a_=0_goto_((card_I1)_+_3)_&_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))_._0_<>_halt_SCM+FSA_&_0_in_dom_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))_&_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))_._((card_I1)_+_3)_=_goto_(card_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))))_&_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))_._((card_I1)_+_3)_<>_halt_SCM+FSA_&_(card_I1)_+_3_in_dom_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0))))))_)
A34: (Macro (a =0_goto ((card I1) + 3))) . 0 <> halt SCM+FSA by COMPOS_1:58;
A35: 0 in dom (Macro (a =0_goto ((card I1) + 3))) by COMPOS_1:60;
if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) = ((((a =0_goto ((card I1) + 3)) ";" I1) ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA) by SCMFSA8B:def_1
.= (((a =0_goto ((card I1) + 3)) ";" (I1 ";" (Goto ((card (Goto 2)) + 1)))) ";" (Goto 2)) ";" (Stop SCM+FSA) by SCMFSA6A:29
.= ((a =0_goto ((card I1) + 3)) ";" ((I1 ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2))) ";" (Stop SCM+FSA) by SCMFSA6A:29
.= (a =0_goto ((card I1) + 3)) ";" (((I1 ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA)) by SCMFSA6A:29
.= (Macro (a =0_goto ((card I1) + 3))) ";" (((I1 ";" (Goto ((card (Goto 2)) + 1))) ";" (Goto 2)) ";" (Stop SCM+FSA)) ;
hence (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . 0 = (Macro (a =0_goto ((card I1) + 3))) . 0 by A35, A34, SCMFSA6A:15
.= a =0_goto ((card I1) + 3) by COMPOS_1:58 ;
::_thesis: ( (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . 0 <> halt SCM+FSA & 0 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) & (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) = goto (card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) & (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) <> halt SCM+FSA & (card I1) + 3 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) )
hence (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . 0 <> halt SCM+FSA ; ::_thesis: ( 0 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) & (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) = goto (card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) & (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) <> halt SCM+FSA & (card I1) + 3 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) )
A36: card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) = ((card (Goto 2)) + (card I1)) + 4 by SCMFSA8B:11
.= ((card I1) + 1) + 4 by SCMFSA8A:15
.= ((card I1) + 3) + 2 ;
hence 0 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by AFINSQ_1:66; ::_thesis: ( (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) = goto (card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) & (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) <> halt SCM+FSA & (card I1) + 3 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) )
card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = card (dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))))
.= card (dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by FUNCT_4:99
.= card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) ;
then card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = (card I1) + (3 + 2) by A36;
hence (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) = goto (card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) by Th83; ::_thesis: ( (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) <> halt SCM+FSA & (card I1) + 3 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) )
hence (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card I1) + 3) <> halt SCM+FSA ; ::_thesis: (card I1) + 3 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))
hereby ::_thesis: verum
((card I1) + 3) + 0 < card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by A36, XREAL_1:6;
hence (card I1) + 3 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by AFINSQ_1:66; ::_thesis: verum
end;
end;
hereby ::_thesis: verum
percases ( k = 0 or k > 0 ) ;
supposeA37: k = 0 ; ::_thesis: ex m being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < m holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
take m = (((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1) + 1; ::_thesis: ( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < m holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
A38: CurInstr ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)))) = (P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) . 0 by A14, PBOOLE:143
.= (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) . 0 by A16, A5, GRFUNC_1:2
.= a =0_goto ((card I1) + 3) by A33, FUNCT_4:105 ;
A39: (P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) /. (IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1)))) = (P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) . (IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1)))) by PBOOLE:143;
A40: Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1)) = Following ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)))) by EXTPRO_1:3
.= Exec ((a =0_goto ((card I1) + 3)),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)))) by A38 ;
then A41: CurInstr ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1)))) = (P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) . ((card I1) + 3) by A39, A6, A16, A37, SCMFSA_2:70
.= (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) . ((card I1) + 3) by A16, A5, GRFUNC_1:2
.= goto (card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) by A33, FUNCT_4:105 ;
Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m) = Following ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1)))) by EXTPRO_1:3
.= Exec ((goto (card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),(((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1)))) by A41 ;
hence IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by SCMFSA_2:69; ::_thesis: for n being Element of NAT st n < m holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
hereby ::_thesis: verum
let n be Element of NAT ; ::_thesis: ( n < m implies IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) )
assume n < m ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
then n <= ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1 by NAT_1:13;
then A42: ( n <= (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1 or n = ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1 ) by NAT_1:8;
percases ( n <= LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss)) or n = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1 or n = ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1 ) by A42, NAT_1:8;
supposeA43: n <= LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss)) ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
A44: I1 is_halting_on ss,P by SCMFSA7B:19;
A45: I1 is_closed_on ss,P by SCMFSA7B:18;
then A46: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on ss,P by A7, A44, SCMFSA8B:15;
if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on ss,P by A7, A45, A44, SCMFSA8B:15;
then Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),n) = Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n) by A43, A46, Th76;
then A47: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) = IC (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),n)) ;
IC (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),n)) in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by A46, SCMFSA7B:def_6;
hence IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A47, FUNCT_4:99; ::_thesis: verum
end;
suppose n = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1 ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
hence IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A14, A16; ::_thesis: verum
end;
suppose n = ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + 1 ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
hence IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A6, A16, A37, A40, SCMFSA_2:70; ::_thesis: verum
end;
end;
end;
end;
supposeA48: k > 0 ; ::_thesis: ex m being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < m holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
consider Is3 being State of SCM+FSA such that
A49: Is3 = Initialized (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) ;
A50: Initialize (Initialized (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)))) = (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) +* ((IC ) .--> 0) by A14, A16, SCMFSA_M:8;
A51: Is3 . (intloc 0) = 1 by A49, SCMFSA_M:9;
Is3 . a = k by A6, A16, A49, SCMFSA_M:37;
then consider m0 being Element of NAT such that
A52: IC (Comput (((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize Is3),m0)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) and
A53: for n being Element of NAT st n < m0 holds
IC (Comput (((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize Is3),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A3, A48, A51;
take m = ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) + m0; ::_thesis: ( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < m holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
A54: IC in dom (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) by MEMSTR_0:2;
A55: Initialize (Initialized (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)))) = (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) +* ((IC ) .--> 0) by A50
.= (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))) +* (Start-At (0,SCM+FSA))
.= Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1)) by A14, A54, FUNCT_7:109 ;
thus IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),m)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A49, A52, A55, EXTPRO_1:4; ::_thesis: for n being Element of NAT st n < m holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
hereby ::_thesis: verum
let n be Element of NAT ; ::_thesis: ( n < m implies IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) )
assume A56: n < m ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
A57: I1 is_halting_on ss,P by SCMFSA7B:19;
A58: I1 is_closed_on ss,P by SCMFSA7B:18;
then A59: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on ss,P by A7, A57, SCMFSA8B:15;
A60: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on ss,P by A7, A58, A57, SCMFSA8B:15;
percases ( n <= LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss)) or (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1 <= n ) by NAT_1:13;
suppose n <= LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss)) ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
then Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),n) = Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n) by A59, A60, Th76;
then A61: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) = IC (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),n)) ;
IC (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss),n)) in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by A59, SCMFSA7B:def_6;
hence IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A61, FUNCT_4:99; ::_thesis: verum
end;
supposeA62: (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1 <= n ; ::_thesis: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),b1)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
consider mm being Element of NAT such that
A63: mm = n -' ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) ;
n - ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) >= 0 by A62, XREAL_1:48;
then A64: mm = n - ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) by A63, XREAL_0:def_2;
mm + ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) = n by A62, A63, XREAL_1:235;
then A65: IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) = IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1))),mm)) by EXTPRO_1:4;
m0 = m - ((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize ss))) + 1) ;
then mm < m0 by A56, A64, XREAL_1:9;
hence IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize ss),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A49, A53, A55, A65; ::_thesis: verum
end;
end;
end;
end;
end;
end;
end;
assume A66: s . (intloc 0) = 1 ; ::_thesis: ( not s . a > 0 or loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P )
assume A67: s . a > 0 ; ::_thesis: loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P
then reconsider sa = s . a as Element of NAT by INT_1:3;
A68: S1[ 0 ] ;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A68, A2);
then S1[sa] ;
then ex k being Element of NAT st
( IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),k)) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) by A66, A67;
hence loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on s,P by SCMFSA8A:def_2; ::_thesis: verum
end;
theorem :: SCMFSA8C:85
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P
let s be State of SCM+FSA; ::_thesis: for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a & s . a > 0 holds
loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P
let a be read-write Int-Location; ::_thesis: ( not I destroys a & s . a > 0 implies loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P )
assume A1: not I destroys a ; ::_thesis: ( not s . a > 0 or loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P )
A2: (Initialized s) . a = s . a by SCMFSA_M:37;
A3: (Initialized s) . (intloc 0) = 1 by SCMFSA_M:9;
assume s . a > 0 ; ::_thesis: loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P
hence loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P by A1, A2, A3, Th84; ::_thesis: verum
end;
theorem :: SCMFSA8C:86
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 holds
( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 holds
( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
let s be State of SCM+FSA; ::_thesis: for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 holds
( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 holds
( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
let a be read-write Int-Location; ::_thesis: ( not I destroys a & s . (intloc 0) = 1 implies ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P ) )
assume A1: not I destroys a ; ::_thesis: ( not s . (intloc 0) = 1 or ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P ) )
assume A2: s . (intloc 0) = 1 ; ::_thesis: ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
percases ( s . a > 0 or s . a <= 0 ) ;
supposeA3: s . a > 0 ; ::_thesis: ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by SCMFSA6A:22;
then Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) is_pseudo-closed_on s,P by A1, A2, A3, Th84;
hence ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P ) by A3, Th39; ::_thesis: verum
end;
supposeA4: s . a <= 0 ; ::_thesis: ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P )
A5: Stop SCM+FSA is_halting_on s,P by SCMFSA7B:19;
Stop SCM+FSA is_closed_on s,P by SCMFSA7B:18;
hence ( Times (a,I) is_closed_on s,P & Times (a,I) is_halting_on s,P ) by A4, A5, SCMFSA8B:21; ::_thesis: verum
end;
end;
end;
theorem :: SCMFSA8C:87
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a holds
Initialize ((intloc 0) .--> 1) is Times (a,I) -halted
proof
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a holds
Initialize ((intloc 0) .--> 1) is Times (a,I) -halted
let a be read-write Int-Location; ::_thesis: ( not I destroys a implies Initialize ((intloc 0) .--> 1) is Times (a,I) -halted )
assume A1: not I destroys a ; ::_thesis: Initialize ((intloc 0) .--> 1) is Times (a,I) -halted
now__::_thesis:_for_s_being_State_of_SCM+FSA
for_P_being_Instruction-Sequence_of_SCM+FSA_holds_Times_(a,I)_is_halting_on_Initialized_s,P
let s be State of SCM+FSA; ::_thesis: for P being Instruction-Sequence of SCM+FSA holds Times (a,I) is_halting_on Initialized b2,b3
let P be Instruction-Sequence of SCM+FSA; ::_thesis: Times (a,I) is_halting_on Initialized b1,b2
percases ( s . a > 0 or s . a <= 0 ) ;
suppose s . a > 0 ; ::_thesis: Times (a,I) is_halting_on Initialized b1,b2
then A2: (Initialized s) . a > 0 by SCMFSA_M:37;
A3: Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by SCMFSA6A:22;
(Initialized s) . (intloc 0) = 1 by SCMFSA_M:9;
then Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) is_pseudo-closed_on Initialized s,P by A1, A2, A3, Th84;
hence Times (a,I) is_halting_on Initialized s,P by A2, Th39; ::_thesis: verum
end;
supposeA4: s . a <= 0 ; ::_thesis: Times (a,I) is_halting_on Initialized b1,b2
A5: Stop SCM+FSA is_closed_on Initialized s,P by SCMFSA7B:18;
A6: Stop SCM+FSA is_halting_on Initialized s,P by SCMFSA7B:19;
(Initialized s) . a <= 0 by A4, SCMFSA_M:37;
hence Times (a,I) is_halting_on Initialized s,P by A5, A6, SCMFSA8B:21; ::_thesis: verum
end;
end;
end;
hence Initialize ((intloc 0) .--> 1) is Times (a,I) -halted by Th6; ::_thesis: verum
end;
theorem :: SCMFSA8C:88
for I, J being Program of SCM+FSA
for a, c being Int-Location st not I destroys c & not J destroys c holds
( not if=0 (a,I,J) destroys c & not if>0 (a,I,J) destroys c )
proof
let I, J be Program of SCM+FSA; ::_thesis: for a, c being Int-Location st not I destroys c & not J destroys c holds
( not if=0 (a,I,J) destroys c & not if>0 (a,I,J) destroys c )
let a, c be Int-Location; ::_thesis: ( not I destroys c & not J destroys c implies ( not if=0 (a,I,J) destroys c & not if>0 (a,I,J) destroys c ) )
assume A1: not I destroys c ; ::_thesis: ( J destroys c or ( not if=0 (a,I,J) destroys c & not if>0 (a,I,J) destroys c ) )
A2: not Goto ((card I) + 1) destroys c by Th57;
assume A3: not J destroys c ; ::_thesis: ( not if=0 (a,I,J) destroys c & not if>0 (a,I,J) destroys c )
then not (a =0_goto ((card J) + 3)) ";" J destroys c by Th53, SCMFSA7B:12;
then not ((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1)) destroys c by A2, Th52;
then A4: not (((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I destroys c by A1, Th52;
A5: not Goto ((card I) + 1) destroys c by Th57;
not (a >0_goto ((card J) + 3)) ";" J destroys c by A3, Th53, SCMFSA7B:13;
then not ((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1)) destroys c by A5, Th52;
then A6: not (((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I destroys c by A1, Th52;
A7: if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_1;
not Stop SCM+FSA destroys c by Th56;
hence not if=0 (a,I,J) destroys c by A4, A7, Th52; ::_thesis: not if>0 (a,I,J) destroys c
A8: if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ";" J) ";" (Goto ((card I) + 1))) ";" I) ";" (Stop SCM+FSA) by SCMFSA8B:def_2;
not Stop SCM+FSA destroys c by Th56;
hence not if>0 (a,I,J) destroys c by A6, A8, Th52; ::_thesis: verum
end;
theorem Th89: :: SCMFSA8C:89
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
let s be State of SCM+FSA; ::_thesis: for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a & s . (intloc 0) = 1 & s . a > 0 holds
ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
let a be read-write Int-Location; ::_thesis: ( not I destroys a & s . (intloc 0) = 1 & s . a > 0 implies ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) )
assume A1: not I destroys a ; ::_thesis: ( not s . (intloc 0) = 1 or not s . a > 0 or ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) )
reconsider I1 = I ";" (SubFrom (a,(intloc 0))) as parahalting Program of SCM+FSA ;
set I2 = if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))));
set s1 = Initialize s;
set P1 = P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))));
A2: I1 is_halting_on s,P by SCMFSA7B:19;
set Is = Initialize (Initialized s);
set IP = P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))));
A3: intloc 0 in dom s by SCMFSA_2:42;
assume s . (intloc 0) = 1 ; ::_thesis: ( not s . a > 0 or ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) ) )
then A4: s +* ((intloc 0) .--> 1) = s by A3, FUNCT_7:109;
A5: I1 is_closed_on Initialized s,P by SCMFSA7B:18;
A6: I1 is_halting_on Initialized s,P by SCMFSA7B:19;
assume A7: s . a > 0 ; ::_thesis: ex s2 being State of SCM+FSA ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
then A8: (Initialized s) . a > 0 by SCMFSA_M:37;
then A9: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on Initialized s,P by A5, A6, SCMFSA8B:15;
A10: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on Initialized s,P by A8, A5, A6, SCMFSA8B:15;
take s2 = Initialize s; ::_thesis: ex P2 being Instruction-Sequence of SCM+FSA ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
take P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))); ::_thesis: ex k being Element of NAT st
( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
reconsider k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1 as Element of NAT ;
take k ; ::_thesis: ( s2 = s +* (Start-At (0,SCM+FSA)) & P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
thus s2 = s +* (Start-At (0,SCM+FSA)) ; ::_thesis: ( P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) & k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
thus P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ; ::_thesis: ( k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 & (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
thus k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(s +* (Start-At (0,SCM+FSA))))) + 1 ; ::_thesis: ( (Comput (P2,s2,k)) . a = (s . a) - 1 & (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
A11: Initialize (Initialized s) = ((s +* ((intloc 0) .--> 1)) +* (Start-At (0,SCM+FSA))) +* (Start-At (0,SCM+FSA)) by FUNCT_4:14
.= s +* (Start-At (0,SCM+FSA)) by A4 ;
A12: I1 is_halting_on Initialized s,P by SCMFSA7B:19;
A13: I1 is_closed_on Initialized s,P by SCMFSA7B:18;
A14: IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,s) = (IExec (I1,P,s)) +* (Start-At ((((card (Goto 2)) + (card I1)) + 3),SCM+FSA)) by A7, A12, A13, SCMFSA8B:16;
then A15: (IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,s)) . a = (IExec (I1,P,s)) . a by SCMFSA_3:3;
A16: I1 is_closed_on s,P by SCMFSA7B:18;
then A17: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on s,P by A7, A2, SCMFSA8B:15;
A18: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on s,P by A7, A16, A2, SCMFSA8B:15;
A19: Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1)) = Following (P2,(Comput (P2,s2,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s)))))) by EXTPRO_1:3;
then A20: Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1)) = Exec ((goto 0),(Comput (P2,s2,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s)))))) by A17, A18, Lm1;
A21: Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s))))) = Comput ((P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))),(Initialize s),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s))))) by A17, A18, A11, Th76;
A22: for b being Int-Location holds (Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) . b = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)))))) . b by A11, A21, A20, SCMFSA_2:69;
then (Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) . a = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)))))) . a
.= (IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,s)) . a by A9, Th58 ;
hence (Comput (P2,s2,k)) . a = (Comput ((P +* I1),(Initialize (Initialized s)),(LifeSpan ((P +* I1),(Initialize (Initialized s)))))) . a by A12, A15, Th58
.= (s . a) - 1 by A1, Th69 ;
::_thesis: ( (Comput (P2,s2,k)) . (intloc 0) = 1 & ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
A23: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is good by Th82;
(Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) . (intloc 0) = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)))))) . (intloc 0) by A22
.= 1 by A9, A10, A23, Th67 ;
hence (Comput (P2,s2,k)) . (intloc 0) = 1 ; ::_thesis: ( ( for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b ) & ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
hereby ::_thesis: ( ( for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f ) & IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
let b be read-write Int-Location; ::_thesis: ( b <> a implies (Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b )
assume A24: b <> a ; ::_thesis: (Comput (P2,s2,k)) . b = (IExec (I,P,s)) . b
thus (Comput (P2,s2,k)) . b = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)))))) . b by A22
.= (IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,s)) . b by A9, Th58
.= (IExec (I1,P,s)) . b by A14, SCMFSA_3:3
.= (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,s)))) . b by SCMFSA6C:6
.= (IExec (I,P,s)) . b by A24, SCMFSA_2:65 ; ::_thesis: verum
end;
hereby ::_thesis: ( IC (Comput (P2,s2,k)) = 0 & ( for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ) )
let f be FinSeq-Location ; ::_thesis: (Comput (P2,s2,k)) . f = (IExec (I,P,s)) . f
(Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) . f = (Comput (P2,s2,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))))) . f by A20, SCMFSA_2:69;
hence (Comput (P2,s2,k)) . f = (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)),(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)))))) . f by A11, A21
.= (IExec ((if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))),P,s)) . f by A9, Th58
.= (IExec (I1,P,s)) . f by A14, SCMFSA_3:4
.= (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,s)))) . f by SCMFSA6C:7
.= (IExec (I,P,s)) . f by SCMFSA_2:65 ;
::_thesis: verum
end;
A25: IC (Comput (P2,s2,((LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1))) = (Exec ((goto 0),(Comput (P2,s2,(LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))))))) . (IC ) by A17, A18, A19, Lm1
.= 0 by SCMFSA_2:69 ;
hence IC (Comput (P2,s2,k)) = 0 ; ::_thesis: for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
let n be Element of NAT ; ::_thesis: ( n <= k implies IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) )
assume A26: n <= k ; ::_thesis: IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
percases ( n <= LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s)) or n = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1 ) by A26, NAT_1:8;
supposeA27: n <= LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s)) ; ::_thesis: IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
A28: I1 is_halting_on s,P by SCMFSA7B:19;
A29: I1 is_closed_on s,P by SCMFSA7B:18;
then A30: if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_closed_on s,P by A7, A28, SCMFSA8B:15;
if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))) is_halting_on s,P by A7, A29, A28, SCMFSA8B:15;
then Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s),n) = Comput (P2,s2,n) by A27, A30, Th76;
then A31: IC (Comput (P2,s2,n)) = IC (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s),n)) ;
IC (Comput ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s),n)) in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by A30, SCMFSA7B:def_6;
hence IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A31, FUNCT_4:99; ::_thesis: verum
end;
supposeA32: n = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize s))) + 1 ; ::_thesis: IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = card (dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))))
.= card (dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by FUNCT_4:99
.= card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) ;
hence IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A25, A32, AFINSQ_1:66; ::_thesis: verum
end;
end;
end;
theorem Th90: :: SCMFSA8C:90
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <= 0 holds
DataPart (IExec ((Times (a,I)),P,s)) = DataPart s
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <= 0 holds
DataPart (IExec ((Times (a,I)),P,s)) = DataPart s
let s be State of SCM+FSA; ::_thesis: for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <= 0 holds
DataPart (IExec ((Times (a,I)),P,s)) = DataPart s
set D = Data-Locations ;
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st s . (intloc 0) = 1 & s . a <= 0 holds
DataPart (IExec ((Times (a,I)),P,s)) = DataPart s
let a be read-write Int-Location; ::_thesis: ( s . (intloc 0) = 1 & s . a <= 0 implies DataPart (IExec ((Times (a,I)),P,s)) = DataPart s )
assume A1: s . (intloc 0) = 1 ; ::_thesis: ( not s . a <= 0 or DataPart (IExec ((Times (a,I)),P,s)) = DataPart s )
set s0 = Initialized s;
A2: Stop SCM+FSA is_halting_on Initialized s,P by SCMFSA7B:19;
assume s . a <= 0 ; ::_thesis: DataPart (IExec ((Times (a,I)),P,s)) = DataPart s
then A3: (Initialized s) . a <= 0 by SCMFSA_M:37;
A4: IExec (((Stop SCM+FSA) ";" (Stop SCM+FSA)),P,(Initialized s)) = IncIC ((IExec ((Stop SCM+FSA),P,(IExec ((Stop SCM+FSA),P,(Initialized s))))),(card (Stop SCM+FSA))) by SCMFSA6B:20;
A5: (Initialized s) . (intloc 0) = 1 by SCMFSA_M:9;
A6: Stop SCM+FSA is_closed_on Initialized s,P by SCMFSA7B:18;
A7: Stop SCM+FSA is_halting_on Initialized s,P by SCMFSA7B:19;
A8: DataPart (IExec ((Stop SCM+FSA),P,(Initialized s))) = DataPart (Initialized (Initialized s)) by Th14
.= DataPart (Initialized s) ;
for I being Program of SCM+FSA st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P holds
Directed I is_pseudo-closed_on Initialized s,P by SCMFSA8A:23;
then A9: Directed (Stop SCM+FSA) is_pseudo-closed_on Initialized s,P by A6, A7;
DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(Initialized s)))
.= DataPart (IExec (((Stop SCM+FSA) ";" (Stop SCM+FSA)),P,(Initialized s))) by A3, A5, Th44, A9 ;
hence DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Stop SCM+FSA),P,(IExec ((Stop SCM+FSA),P,(Initialized s))))) by A4, MEMSTR_0:79
.= DataPart (IExec ((Stop SCM+FSA),P,(Initialized s))) by A6, A2, A5, A8, Th20
.= DataPart s by A1, A8, SCMFSA_M:19 ;
::_thesis: verum
end;
theorem Th91: :: SCMFSA8C:91
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . a > 0 holds
( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) )
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . a > 0 holds
( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) )
let s be State of SCM+FSA; ::_thesis: for I being good parahalting Program of SCM+FSA
for a being read-write Int-Location st not I destroys a & s . a > 0 holds
( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) )
let I be good parahalting Program of SCM+FSA; ::_thesis: for a being read-write Int-Location st not I destroys a & s . a > 0 holds
( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) )
let a be read-write Int-Location; ::_thesis: ( not I destroys a & s . a > 0 implies ( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) ) )
set I1 = I ";" (SubFrom (a,(intloc 0)));
set ss = IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s);
set PP = P;
set s0 = Initialized s;
set ss0 = Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s));
set PP0 = P;
set I2 = if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))));
set s21 = Initialize (Initialized s);
set P21 = P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA));
set s31 = Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))));
set P31 = P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA));
A1: (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA) c= P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)) by FUNCT_4:25;
A2: I is_halting_on Initialized s,P by SCMFSA7B:19;
A3: I ";" (SubFrom (a,(intloc 0))) is_halting_on Initialized s,P by SCMFSA7B:19;
reconsider J3 = Macro (SubFrom (a,(intloc 0))) as good Program of SCM+FSA by Th70, SCMFSA7B:8;
set D = Data-Locations ;
assume A4: not I destroys a ; ::_thesis: ( not s . a > 0 or ( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) ) )
0 in dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by Th25;
then A5: 0 in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by FUNCT_4:99;
A6: I ";" (SubFrom (a,(intloc 0))) is_closed_on Initialized s,P by SCMFSA7B:18;
A7: I ";" (SubFrom (a,(intloc 0))) = I ";" J3 ;
then A8: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . (intloc 0) = 1 by A3, A6, Th67;
assume A9: s . a > 0 ; ::_thesis: ( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 & DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) )
then A10: (Initialized s) . a > 0 by SCMFSA_M:37;
A11: (Initialized s) . (intloc 0) = 1 by SCMFSA_M:9;
then A12: loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) is_pseudo-closed_on Initialized s,P by A4, A10, Th84;
A13: Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by SCMFSA6A:22;
then A14: Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) is_pseudo-closed_on Initialized s,P by A4, A11, A10, Th84;
consider s2 being State of SCM+FSA, P2 being Instruction-Sequence of SCM+FSA, k being Element of NAT such that
A15: s2 = Initialize (Initialized s) and
A16: P2 = P +* (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) and
k = (LifeSpan ((P +* (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))),(Initialize (Initialized s)))) + 1 and
A17: (Comput (P2,s2,k)) . a = ((Initialized s) . a) - 1 and
A18: (Comput (P2,s2,k)) . (intloc 0) = 1 and
A19: for b being read-write Int-Location st b <> a holds
(Comput (P2,s2,k)) . b = (IExec (I,P,(Initialized s))) . b and
A20: for f being FinSeq-Location holds (Comput (P2,s2,k)) . f = (IExec (I,P,(Initialized s))) . f and
A21: IC (Comput (P2,s2,k)) = 0 and
A22: for n being Element of NAT st n <= k holds
IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A4, A11, A10, Th89;
A23: now__::_thesis:_for_f_being_FinSeq-Location_holds_(Comput_(P2,s2,k))_._f_=_(IExec_((I_";"_(SubFrom_(a,(intloc_0)))),P,s))_._f
let f be FinSeq-Location ; ::_thesis: (Comput (P2,s2,k)) . f = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . f
thus (Comput (P2,s2,k)) . f = (IExec (I,P,(Initialized s))) . f by A20
.= (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,(Initialized s))))) . f by SCMFSA_2:65
.= (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,(Initialized s))) . f by SCMFSA6C:7
.= (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . f ; ::_thesis: verum
end;
thus A24: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,s)))) . a by SCMFSA6C:6
.= ((IExec (I,P,s)) . a) - ((IExec (I,P,s)) . (intloc 0)) by SCMFSA_2:65
.= ((IExec (I,P,s)) . a) - 1 by A2, Th63
.= ((Initialized s) . a) - 1 by A4, Th62
.= (s . a) - 1 by SCMFSA_M:37 ; ::_thesis: DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))
now__::_thesis:_for_b_being_Int-Location_holds_(Comput_(P2,s2,k))_._b_=_(IExec_((I_";"_(SubFrom_(a,(intloc_0)))),P,s))_._b
let b be Int-Location; ::_thesis: (Comput (P2,s2,k)) . b1 = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b1
percases ( b = intloc 0 or b = a or ( b <> a & b <> intloc 0 ) ) ;
suppose b = intloc 0 ; ::_thesis: (Comput (P2,s2,k)) . b1 = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b1
hence (Comput (P2,s2,k)) . b = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b by A18, A7, A3, A6, Th67; ::_thesis: verum
end;
suppose b = a ; ::_thesis: (Comput (P2,s2,k)) . b1 = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b1
hence (Comput (P2,s2,k)) . b = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b by A17, A24, SCMFSA_M:37; ::_thesis: verum
end;
supposeA25: ( b <> a & b <> intloc 0 ) ; ::_thesis: (Comput (P2,s2,k)) . b1 = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b1
then reconsider bb = b as read-write Int-Location by SCMFSA_M:def_2;
thus (Comput (P2,s2,k)) . b = (IExec (I,P,(Initialized s))) . bb by A19, A25
.= (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,(Initialized s))))) . b by A25, SCMFSA_2:65
.= (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,(Initialized s))) . b by SCMFSA6C:6
.= (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b ; ::_thesis: verum
end;
end;
end;
then A26: DataPart (Comput (P2,s2,k)) = DataPart (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) by A23, SCMFSA_M:2;
A27: DataPart (IExec ((Times (a,I)),P,(Initialized s))) = DataPart (IExec (((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)),P,(Initialized s))) by A4, A11, A10, A13, Th40, Th84;
percases ( (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = 0 or (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a <> 0 ) ;
supposeA28: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = 0 ; ::_thesis: DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))
A29: (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5) by Th36;
A30: (card (I ";" (SubFrom (a,(intloc 0))))) + (3 + 2) = ((card (I ";" (SubFrom (a,(intloc 0))))) + 1) + 4
.= ((card (Goto 2)) + (card (I ";" (SubFrom (a,(intloc 0)))))) + 4 by SCMFSA8A:15
.= card (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by SCMFSA8B:11
.= card (dom (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))
.= card (dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) by FUNCT_4:99
.= card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ;
then ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) + 0 < card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by XREAL_1:6;
then A31: (card (I ";" (SubFrom (a,(intloc 0))))) + 3 in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by AFINSQ_1:66;
P2 . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) by A31, A16, FUNCT_4:13
.= (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) ;
then A32: P2 . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) = goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 5) by A29, FUNCT_4:105;
then InsCode (P2 . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) = 6 by SCMFSA_2:23;
then A33: InsCode (P2 . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)) in {0,6,7,8} by ENUMSET1:def_2;
A34: Comput (P2,s2,(k + 1)) = Following (P2,(Comput (P2,s2,k))) by EXTPRO_1:3
.= Exec ((P2 . 0),(Comput (P2,s2,k))) by A21, PBOOLE:143 ;
A35: P2 . 0 = (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) . 0 by A5, A16, FUNCT_4:13
.= (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) . 0 ;
A36: (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) . 0 = a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) by Th26;
A37: P2 . 0 = a =0_goto ((card (I ";" (SubFrom (a,(intloc 0))))) + 3) by A35, A36, FUNCT_4:105;
A38: (Comput (P2,s2,k)) . a = 0 by A17, A24, A28, SCMFSA_M:37;
then A39: IC (Comput (P2,s2,(k + 1))) = (card (I ";" (SubFrom (a,(intloc 0))))) + 3 by A34, A37, SCMFSA_2:70;
A40: now__::_thesis:_for_n_being_Element_of_NAT_st_not_IC_(Comput_(P2,s2,n))_in_dom_(loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))_holds_
k_+_(1_+_1)_<=_n
let n be Element of NAT ; ::_thesis: ( not IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) implies k + (1 + 1) <= n )
assume A41: not IC (Comput (P2,s2,n)) in dom (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ; ::_thesis: k + (1 + 1) <= n
then k < n by A22;
then k + 1 <= n by INT_1:7;
then k + 1 < n by A39, A31, A41, XXREAL_0:1;
then (k + 1) + 1 <= n by INT_1:7;
hence k + (1 + 1) <= n ; ::_thesis: verum
end;
A42: P2 /. (IC (Comput (P2,s2,(k + 1)))) = P2 . (IC (Comput (P2,s2,(k + 1)))) by PBOOLE:143;
A43: Comput (P2,s2,(k + (1 + 1))) = Comput (P2,s2,((k + 1) + 1))
.= Following (P2,(Comput (P2,s2,(k + 1)))) by EXTPRO_1:3
.= Exec ((P2 . ((card (I ";" (SubFrom (a,(intloc 0))))) + 3)),(Comput (P2,s2,(k + 1)))) by A38, A34, A37, A42, SCMFSA_2:70 ;
then IC (Comput (P2,s2,(k + 2))) = card (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) by A30, A32, SCMFSA_2:69;
then A44: k + 2 = pseudo-LifeSpan ((Initialized s),P,(loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) by A15, A12, A40, A16, SCMFSA8A:def_4;
InsCode (P2 . 0) = 7 by A37, SCMFSA_2:24;
then InsCode (P2 . 0) in {0,6,7,8} by ENUMSET1:def_2;
then DataPart (Comput (P2,s2,k)) = DataPart (Comput (P2,s2,(k + 1))) by A34, Th12;
then A45: DataPart (Comput (P2,s2,k)) = DataPart (Comput (P2,s2,(k + 2))) by A43, A33, Th12;
thus DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(Initialized s)))
.= DataPart (IExec (((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)),P,s)) by A27
.= DataPart (Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)))) by MEMSTR_0:44
.= DataPart (Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s))))
.= DataPart (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) by A4, A11, A10, A15, A13, A26, A44, A45, Th30, Th84, A16
.= DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) by A8, A28, Th90 ; ::_thesis: verum
end;
supposeA46: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a <> 0 ; ::_thesis: DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))
s . a >= 0 + 1 by A9, INT_1:7;
then A47: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a > 0 by A24, A46, XREAL_1:19;
A48: DataPart (Initialized s) = DataPart (Initialize (Initialized s)) by MEMSTR_0:79;
A49: k < pseudo-LifeSpan ((Initialized s),P,(loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))))) by A4, A11, A10, A15, A22, Th1, Th84, A16;
then A50: DataPart (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) = DataPart (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) by A15, A13, A14, A26, Th29, A16;
A51: now__::_thesis:_(_(_for_a_being_Int-Location_holds_(Comput_((P_+*_((loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))_";"_(Stop_SCM+FSA))),(Initialize_(Initialized_s)),k))_._a_=_(Initialize_(Initialized_(Initialized_(IExec_((I_";"_(SubFrom_(a,(intloc_0)))),P,s)))))_._a_)_&_(_for_f_being_FinSeq-Location_holds_(Comput_((P_+*_((loop_(if=0_(a,(Goto_2),(I_";"_(SubFrom_(a,(intloc_0)))))))_";"_(Stop_SCM+FSA))),(Initialize_(Initialized_s)),k))_._f_=_(Initialize_(Initialized_(Initialized_(IExec_((I_";"_(SubFrom_(a,(intloc_0)))),P,s)))))_._f_)_)
A52: DataPart (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))) = DataPart (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) by MEMSTR_0:79;
hereby ::_thesis: for f being FinSeq-Location holds (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . f = (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . f
let a be Int-Location; ::_thesis: (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . b1 = (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . b1
percases ( a = intloc 0 or a <> intloc 0 ) ;
supposeA53: a = intloc 0 ; ::_thesis: (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . b1 = (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . b1
thus (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . a = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a by A50, SCMFSA_M:2
.= 1 by A53, SCMFSA6B:11
.= (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))) . a by A53, SCMFSA_M:9
.= (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . a by A52, SCMFSA_M:2 ; ::_thesis: verum
end;
suppose a <> intloc 0 ; ::_thesis: (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . b1 = (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . b1
then A54: a is read-write Int-Location by SCMFSA_M:def_2;
thus (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . a = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a by A50, SCMFSA_M:2
.= (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))) . a by A54, SCMFSA_M:37
.= (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . a by A52, SCMFSA_M:2 ; ::_thesis: verum
end;
end;
end;
let f be FinSeq-Location ; ::_thesis: (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . f = (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . f
thus (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) . f = (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . f by A50, SCMFSA_M:2
.= (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))) . f by SCMFSA_M:37
.= (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) . f by A52, SCMFSA_M:2 ; ::_thesis: verum
end;
IC (Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k)) = 0 by A21, A15, A13, A14, A49, Th29, A16
.= IC (Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))) by FUNCT_4:113 ;
then A55: Comput ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)),k) = Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) by A51, SCMFSA_2:61;
Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) = loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0)))))) by SCMFSA6A:22;
then A56: Directed (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) is_pseudo-closed_on Initialize (Initialized s),P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)) by A4, A11, A10, A48, Th23, Th84;
then A57: (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA) is_closed_on Initialize (Initialized s),P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)) by Th29;
A58: (loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA) is_halting_on Initialize (Initialized s),P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)) by A56, Th29;
A59: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . (intloc 0) = 1 by A7, A3, A6, Th67;
A60: Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s))) = Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))))) by A57, A58, A55, Th73, A1;
DataPart (IExec (((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)),P,(Initialized s))) = DataPart (IExec (((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)),P,s))
.= DataPart (Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s)))) by MEMSTR_0:44
.= DataPart (Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized s))))
.= DataPart (Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s))))))) by A60
.= DataPart (Result ((P +* ((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA))),(Initialize (Initialized (Initialized (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))))))
.= DataPart (IExec (((loop (if=0 (a,(Goto 2),(I ";" (SubFrom (a,(intloc 0))))))) ";" (Stop SCM+FSA)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) by MEMSTR_0:44
.= DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) by A4, A13, A59, A47, Th40, Th84 ;
hence DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) by A27; ::_thesis: verum
end;
end;
end;
begin
theorem :: SCMFSA8C:92
for P being Instruction-Sequence of SCM+FSA
for s being State of SCM+FSA
for a, b, c being read-write Int-Location st a <> b & a <> c & b <> c & s . a >= 0 holds
(IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a))
proof
let P be Instruction-Sequence of SCM+FSA; ::_thesis: for s being State of SCM+FSA
for a, b, c being read-write Int-Location st a <> b & a <> c & b <> c & s . a >= 0 holds
(IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a))
let s be State of SCM+FSA; ::_thesis: for a, b, c being read-write Int-Location st a <> b & a <> c & b <> c & s . a >= 0 holds
(IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a))
let a, b, c be read-write Int-Location; ::_thesis: ( a <> b & a <> c & b <> c & s . a >= 0 implies (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a)) )
set I2 = Times (a,(Macro (AddTo (b,c))));
defpred S1[ Nat] means for s being State of SCM+FSA st s . a = $1 holds
(IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a));
reconsider I = Macro (AddTo (b,c)) as good parahalting Program of SCM+FSA by Th70, SCMFSA7B:7;
set D = Data-Locations ;
assume that
A1: a <> b and
A2: a <> c and
A3: b <> c ; ::_thesis: ( not s . a >= 0 or (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a)) )
A4: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A5: S1[k] ; ::_thesis: S1[k + 1]
let s be State of SCM+FSA; ::_thesis: ( s . a = k + 1 implies (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a)) )
assume A6: s . a = k + 1 ; ::_thesis: (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a))
A7: not I destroys a by A1, Th48, SCMFSA7B:7;
then A8: DataPart (IExec ((Times (a,I)),P,s)) = DataPart (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) by A6, Th91;
A9: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . c = (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,s)))) . c by SCMFSA6C:6
.= (IExec (I,P,s)) . c by A2, SCMFSA_2:65
.= (IExec (I,P,s)) . c
.= (Exec ((AddTo (b,c)),(Initialized s))) . c by SCMFSA6C:5
.= (Exec ((AddTo (b,c)),(Initialized s))) . c
.= (Initialized s) . c by A3, SCMFSA_2:64
.= s . c by SCMFSA_M:37 ;
A10: (IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . b = (Exec ((SubFrom (a,(intloc 0))),(IExec (I,P,s)))) . b by SCMFSA6C:6
.= (IExec (I,P,s)) . b by A1, SCMFSA_2:65
.= (IExec (I,P,s)) . b
.= (Exec ((AddTo (b,c)),(Initialized s))) . b by SCMFSA6C:5
.= (Exec ((AddTo (b,c)),(Initialized s))) . b
.= ((Initialized s) . b) + ((Initialized s) . c) by SCMFSA_2:64
.= ((Initialized s) . b) + (s . c) by SCMFSA_M:37
.= (s . b) + (s . c) by SCMFSA_M:37 ;
(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)) . a = (s . a) - 1 by A6, A7, Th91;
then (IExec ((Times (a,I)),P,(IExec ((I ";" (SubFrom (a,(intloc 0)))),P,s)))) . b = ((s . b) + (s . c)) + ((s . c) * ((s . a) - 1)) by A5, A6, A10, A9
.= (s . b) + ((s . c) * (s . a)) ;
hence (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a)) by A8, SCMFSA_M:2; ::_thesis: verum
end;
assume s . a >= 0 ; ::_thesis: (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a))
then reconsider sa = s . a as Element of NAT by INT_1:3;
A11: S1[ 0 ]
proof
let s be State of SCM+FSA; ::_thesis: ( s . a = 0 implies (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a)) )
set s0 = Initialized s;
A12: (Initialized s) . (intloc 0) = 1 by SCMFSA_M:9;
assume A13: s . a = 0 ; ::_thesis: (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a))
then (Initialized s) . a = 0 by SCMFSA_M:37;
then A14: DataPart (IExec ((Times (a,I)),P,(Initialized s))) = DataPart (Initialized s) by A12, Th90;
thus (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (IExec ((Times (a,(Macro (AddTo (b,c))))),P,(Initialized s))) . b
.= (Initialized s) . b by A14, SCMFSA_M:2
.= (s . b) + ((s . c) * (s . a)) by A13, SCMFSA_M:37 ; ::_thesis: verum
end;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A11, A4);
then S1[sa] ;
hence (IExec ((Times (a,(Macro (AddTo (b,c))))),P,s)) . b = (s . b) + ((s . c) * (s . a)) ; ::_thesis: verum
end;