begin
set A = NAT ;
set D = Data-Locations SCM+FSA;
set SA0 = Start-At (0,SCM+FSA);
set T = (intloc 0) .--> 1;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th4:
theorem Th5:
theorem Th6:
theorem Th7:
theorem
canceled;
theorem
canceled;
theorem Th10:
theorem
canceled;
theorem
canceled;
theorem Th13:
theorem
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
theorem Th22:
theorem Th23:
theorem Th24:
theorem Th25:
theorem Th26:
theorem Th27:
Lm1:
for l being Element of NAT holds
( dom (0 .--> (goto l)) = {0} & 0 in dom (0 .--> (goto l)) & (0 .--> (goto l)) . 0 = goto l & card (0 .--> (goto l)) = 1 & not halt SCM+FSA in rng (0 .--> (goto l)) )
:: deftheorem SCMFSA8A:def 1 :
canceled;
:: deftheorem defines Goto SCMFSA8A:def 2 :
for l being Element of NAT holds Goto l = 0 .--> (goto l);
:: deftheorem Def3 defines is_pseudo-closed_on SCMFSA8A:def 3 :
for s being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for I being initial Program of SCM+FSA holds
( I is_pseudo-closed_on s,P iff ex k being Element of NAT st
( IC (Comput ((P +* (ProgramPart I)),(Initialize s),k)) = card (ProgramPart I) & ( for n being Element of NAT st n < k holds
IC (Comput ((P +* (ProgramPart I)),(Initialize s),n)) in dom I ) ) );
:: deftheorem defines pseudo-paraclosed SCMFSA8A:def 4 :
for I being initial Program of SCM+FSA holds
( I is pseudo-paraclosed iff for s being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT holds I is_pseudo-closed_on s,P );
definition
let s be
State of
SCM+FSA;
let P be the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT ;
let I be
initial Program of
SCM+FSA;
assume A1:
I is_pseudo-closed_on s,
P
;
func pseudo-LifeSpan (
s,
P,
I)
-> Element of
NAT means :
Def5:
(
IC (Comput ((P +* (ProgramPart I)),(Initialize s),it)) = card (ProgramPart I) & ( for
n being
Element of
NAT st not
IC (Comput ((P +* (ProgramPart I)),(Initialize s),n)) in dom I holds
it <= n ) );
existence
ex b1 being Element of NAT st
( IC (Comput ((P +* (ProgramPart I)),(Initialize s),b1)) = card (ProgramPart I) & ( for n being Element of NAT st not IC (Comput ((P +* (ProgramPart I)),(Initialize s),n)) in dom I holds
b1 <= n ) )
uniqueness
for b1, b2 being Element of NAT st IC (Comput ((P +* (ProgramPart I)),(Initialize s),b1)) = card (ProgramPart I) & ( for n being Element of NAT st not IC (Comput ((P +* (ProgramPart I)),(Initialize s),n)) in dom I holds
b1 <= n ) & IC (Comput ((P +* (ProgramPart I)),(Initialize s),b2)) = card (ProgramPart I) & ( for n being Element of NAT st not IC (Comput ((P +* (ProgramPart I)),(Initialize s),n)) in dom I holds
b2 <= n ) holds
b1 = b2
end;
:: deftheorem Def5 defines pseudo-LifeSpan SCMFSA8A:def 5 :
for s being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for I being initial Program of SCM+FSA st I is_pseudo-closed_on s,P holds
for b4 being Element of NAT holds
( b4 = pseudo-LifeSpan (s,P,I) iff ( IC (Comput ((P +* (ProgramPart I)),(Initialize s),b4)) = card (ProgramPart I) & ( for n being Element of NAT st not IC (Comput ((P +* (ProgramPart I)),(Initialize s),n)) in dom I holds
b4 <= n ) ) );
theorem Th28:
theorem
theorem
theorem Th31:
theorem Th32:
theorem Th33:
theorem
theorem Th35:
for
s being
State of
SCM+FSA for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA st
I is_closed_on s,
P &
I is_halting_on s,
P holds
for
k being
Element of
NAT st
k <= LifeSpan (
(P +* I),
(Initialize s)) holds
(
NPP (Comput ((P +* I),(Initialize s),k)) = NPP (Comput ((P +* (Directed I)),(Initialize s),k)) &
CurInstr (
(P +* (Directed I)),
(Comput ((P +* (Directed I)),(Initialize s),k)))
<> halt SCM+FSA )
theorem Th36:
for
s being
State of
SCM+FSA for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA st
I is_closed_on s,
P &
I is_halting_on s,
P holds
(
IC (Comput ((P +* (Directed I)),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) = card I &
DataPart (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s))))) = DataPart (Comput ((P +* (Directed I)),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) )
Lm2:
for s being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for I being Program of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
( Directed I is_pseudo-closed_on s,P & pseudo-LifeSpan (s,P,(Directed I)) = (LifeSpan ((P +* I),(Initialize s))) + 1 )
theorem
theorem
theorem
canceled;
theorem
canceled;
theorem Th41:
theorem Th42:
for
s being
State of
SCM+FSA for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I,
J being
Program of
SCM+FSA st
I is_closed_on s,
P &
I is_halting_on s,
P holds
( ( for
k being
Element of
NAT st
k <= LifeSpan (
(P +* I),
(Initialize s)) holds
(
IC (Comput ((P +* (Directed I)),(Initialize s),k)) = IC (Comput ((P +* (I ';' J)),(Initialize s),k)) &
CurInstr (
(P +* (Directed I)),
(Comput ((P +* (Directed I)),(Initialize s),k)))
= CurInstr (
(P +* (I ';' J)),
(Comput ((P +* (I ';' J)),(Initialize s),k))) ) ) &
DataPart (Comput ((P +* (Directed I)),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) = DataPart (Comput ((P +* (I ';' J)),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) &
IC (Comput ((P +* (Directed I)),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) = IC (Comput ((P +* (I ';' J)),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) )
theorem Th43:
for
s being
State of
SCM+FSA for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I,
J being
Program of
SCM+FSA st
I is_closed_on Initialized s,
P &
I is_halting_on Initialized s,
P holds
( ( for
k being
Element of
NAT st
k <= LifeSpan (
(P +* I),
(s +* (Initialize ((intloc 0) .--> 1)))) holds
(
IC (Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),k)) = IC (Comput ((P +* (I ';' J)),(s +* (Initialize ((intloc 0) .--> 1))),k)) &
CurInstr (
(P +* (Directed I)),
(Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),k)))
= CurInstr (
(P +* (I ';' J)),
(Comput ((P +* (I ';' J)),(s +* (Initialize ((intloc 0) .--> 1))),k))) ) ) &
DataPart (Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) = DataPart (Comput ((P +* (I ';' J)),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) &
IC (Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) = IC (Comput ((P +* (I ';' J)),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) )
theorem Th44:
for
s being
State of
SCM+FSA for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA st
I is_closed_on Initialized s,
P &
I is_halting_on Initialized s,
P holds
for
k being
Element of
NAT st
k <= LifeSpan (
(P +* I),
(s +* (Initialize ((intloc 0) .--> 1)))) holds
(
NPP (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),k)) = NPP (Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),k)) &
CurInstr (
(P +* (Directed I)),
(Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),k)))
<> halt SCM+FSA )
theorem Th45:
for
s being
State of
SCM+FSA for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA st
I is_closed_on Initialized s,
P &
I is_halting_on Initialized s,
P holds
(
IC (Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) = card I &
DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) = DataPart (Comput ((P +* (Directed I)),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) )
Lm3:
for I being Program of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for s being State of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
( IC (Comput ((P +* (I ';' (Stop SCM+FSA))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) = card I & DataPart (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s))))) = DataPart (Comput ((P +* (I ';' (Stop SCM+FSA))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) & P +* (I ';' (Stop SCM+FSA)) halts_on Initialize s & LifeSpan ((P +* (I ';' (Stop SCM+FSA))),(Initialize s)) = (LifeSpan ((P +* I),(Initialize s))) + 1 & I ';' (Stop SCM+FSA) is_closed_on s,P & I ';' (Stop SCM+FSA) is_halting_on s,P )
theorem
theorem
Lm4:
for I being Program of SCM+FSA
for s being State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P holds
( IC (Comput ((P +* (I ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) = card I & DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) = DataPart (Comput ((P +* (I ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) & P +* (I ';' (Stop SCM+FSA)) halts_on s +* (Initialize ((intloc 0) .--> 1)) & LifeSpan ((P +* (I ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1)))) = (LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1 )
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
theorem
theorem
theorem
theorem
Lm5:
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for I, J being Program of SCM+FSA
for s being State of SCM+FSA st I is_closed_on s,P & I is_halting_on s,P holds
( IC (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 2))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s))))) = DataPart (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 2))) & ( for k being Element of NAT st k < (LifeSpan ((P +* I),(Initialize s))) + 2 holds
CurInstr ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Initialize s),k))) <> halt SCM+FSA ) & ( for k being Element of NAT st k <= LifeSpan ((P +* I),(Initialize s)) holds
IC (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Initialize s),k)) = IC (Comput ((P +* I),(Initialize s),k)) ) & IC (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 1))) = card I & P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA)) halts_on Initialize s & LifeSpan ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Initialize s)) = (LifeSpan ((P +* I),(Initialize s))) + 2 )
theorem
theorem
Lm6:
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for I, J being Program of SCM+FSA
for s being State of SCM+FSA st I is_closed_on Initialized s,P & I is_halting_on Initialized s,P holds
( IC (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 2))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),(LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))))) = DataPart (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 2))) & ( for k being Element of NAT st k < (LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 2 holds
CurInstr ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),k))) <> halt SCM+FSA ) & ( for k being Element of NAT st k <= LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1)))) holds
IC (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),k)) = IC (Comput ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))),k)) ) & IC (Comput ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1))),((LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 1))) = card I & P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA)) halts_on s +* (Initialize ((intloc 0) .--> 1)) & LifeSpan ((P +* (((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCM+FSA))),(s +* (Initialize ((intloc 0) .--> 1)))) = (LifeSpan ((P +* I),(s +* (Initialize ((intloc 0) .--> 1))))) + 2 )
theorem
theorem
theorem