begin
set A = NAT ;
set D = SCM-Data-Loc ;
Lm1:
(Stop SCMPDS) . 0 = halt SCMPDS
by AFINSQ_1:38;
Lm2:
0 in dom (Stop SCMPDS)
by COMPOS_1:45;
theorem
canceled;
theorem Th2:
theorem Th3:
theorem Th4:
theorem
canceled;
theorem
canceled;
theorem Th7:
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th12:
theorem
canceled;
theorem
canceled;
theorem Th15:
theorem Th16:
theorem
canceled;
theorem Th18:
theorem Th19:
theorem Th20:
theorem
canceled;
theorem Th22:
theorem Th23:
theorem Th24:
theorem Th25:
theorem Th26:
theorem Th27:
theorem
theorem
theorem
theorem
:: deftheorem defines Goto SCMPDS_6:def 1 :
for k1 being Integer holds Goto k1 = Load (goto k1);
theorem
canceled;
theorem Th33:
begin
:: deftheorem Def2 defines is_closed_on SCMPDS_6:def 2 :
for I being Program of SCMPDS
for s being State of SCMPDS
for P being the Instructions of SCMPDS -valued ManySortedSet of NAT holds
( I is_closed_on s,P iff for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom (stop I) );
:: deftheorem Def3 defines is_halting_on SCMPDS_6:def 3 :
for I being Program of SCMPDS
for s being State of SCMPDS
for P being the Instructions of SCMPDS -valued ManySortedSet of NAT holds
( I is_halting_on s,P iff P +* (stop I) halts_on Initialize s );
theorem Th34:
theorem Th35:
theorem Th36:
theorem
theorem Th38:
theorem Th39:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
I,
J being
Program of
SCMPDS for
s being
State of
SCMPDS st
I is_closed_on s,
P &
I is_halting_on s,
P holds
( ( for
k being
Element of
NAT st
k <= LifeSpan (
(P +* (stop I)),
(Initialize s)) holds
IC (Comput ((P +* (stop I)),(Initialize s),k)) = IC (Comput ((P +* (stop (I ';' J))),(Initialize s),k)) ) &
DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = DataPart (Comput ((P +* (stop (I ';' J))),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) )
theorem Th40:
theorem Th41:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
I,
J being
Program of
SCMPDS for
s being
State of
SCMPDS for
k being
Element of
NAT st
I is_closed_on s,
P &
I is_halting_on s,
P &
k < LifeSpan (
(P +* (stop I)),
(Initialize s)) holds
CurInstr (
(P +* (stop I)),
(Comput ((P +* (stop I)),(Initialize s),k)))
= CurInstr (
(P +* (stop (I ';' J))),
(Comput ((P +* (stop (I ';' J))),(Initialize s),k)))
theorem Th42:
theorem Th43:
Lm3:
for P being the Instructions of SCMPDS -valued ManySortedSet of NAT
for I being halt-free Program of SCMPDS
for J being Program of SCMPDS
for s being State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds
( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),(Initialize s)) holds
CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s),k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on Initialize s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 )
theorem Th44:
theorem Th45:
for
s1,
s2 being
State of
SCMPDS for
P1,
P2 being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
I being
shiftable Program of
SCMPDS st
Start-At (
0,
SCMPDS)
c= s1 &
stop I c= P1 &
I is_closed_on s1,
P1 holds
for
n being
Element of
NAT st
Shift (
(stop 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)) &
CurInstr (
P1,
(Comput (P1,s1,i)))
= CurInstr (
P2,
(Comput (P2,s2,i))) &
DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) )
theorem Th46:
theorem Th47:
theorem Th48:
begin
definition
let a be
Int_position ;
let k be
Integer;
let I,
J be
Program of
SCMPDS;
func if=0 (
a,
k,
I,
J)
-> Program of
SCMPDS equals
((((a,k) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J;
coherence
((((a,k) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J is Program of SCMPDS
;
func if>0 (
a,
k,
I,
J)
-> Program of
SCMPDS equals
((((a,k) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J;
coherence
((((a,k) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J is Program of SCMPDS
;
func if<0 (
a,
k,
I,
J)
-> Program of
SCMPDS equals
((((a,k) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J;
coherence
((((a,k) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J is Program of SCMPDS
;
end;
:: deftheorem defines if=0 SCMPDS_6:def 4 :
for a being Int_position
for k being Integer
for I, J being Program of SCMPDS holds if=0 (a,k,I,J) = ((((a,k) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J;
:: deftheorem defines if>0 SCMPDS_6:def 5 :
for a being Int_position
for k being Integer
for I, J being Program of SCMPDS holds if>0 (a,k,I,J) = ((((a,k) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J;
:: deftheorem defines if<0 SCMPDS_6:def 6 :
for a being Int_position
for k being Integer
for I, J being Program of SCMPDS holds if<0 (a,k,I,J) = ((((a,k) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J;
definition
let a be
Int_position ;
let k be
Integer;
let I be
Program of
SCMPDS;
func if=0 (
a,
k,
I)
-> Program of
SCMPDS equals
((a,k) <>0_goto ((card I) + 1)) ';' I;
coherence
((a,k) <>0_goto ((card I) + 1)) ';' I is Program of SCMPDS
;
func if<>0 (
a,
k,
I)
-> Program of
SCMPDS equals
(((a,k) <>0_goto 2) ';' (goto ((card I) + 1))) ';' I;
coherence
(((a,k) <>0_goto 2) ';' (goto ((card I) + 1))) ';' I is Program of SCMPDS
;
func if>0 (
a,
k,
I)
-> Program of
SCMPDS equals
((a,k) <=0_goto ((card I) + 1)) ';' I;
coherence
((a,k) <=0_goto ((card I) + 1)) ';' I is Program of SCMPDS
;
func if<=0 (
a,
k,
I)
-> Program of
SCMPDS equals
(((a,k) <=0_goto 2) ';' (goto ((card I) + 1))) ';' I;
coherence
(((a,k) <=0_goto 2) ';' (goto ((card I) + 1))) ';' I is Program of SCMPDS
;
func if<0 (
a,
k,
I)
-> Program of
SCMPDS equals
((a,k) >=0_goto ((card I) + 1)) ';' I;
coherence
((a,k) >=0_goto ((card I) + 1)) ';' I is Program of SCMPDS
;
func if>=0 (
a,
k,
I)
-> Program of
SCMPDS equals
(((a,k) >=0_goto 2) ';' (goto ((card I) + 1))) ';' I;
coherence
(((a,k) >=0_goto 2) ';' (goto ((card I) + 1))) ';' I is Program of SCMPDS
;
end;
:: deftheorem defines if=0 SCMPDS_6:def 7 :
for a being Int_position
for k being Integer
for I being Program of SCMPDS holds if=0 (a,k,I) = ((a,k) <>0_goto ((card I) + 1)) ';' I;
:: deftheorem defines if<>0 SCMPDS_6:def 8 :
for a being Int_position
for k being Integer
for I being Program of SCMPDS holds if<>0 (a,k,I) = (((a,k) <>0_goto 2) ';' (goto ((card I) + 1))) ';' I;
:: deftheorem defines if>0 SCMPDS_6:def 9 :
for a being Int_position
for k being Integer
for I being Program of SCMPDS holds if>0 (a,k,I) = ((a,k) <=0_goto ((card I) + 1)) ';' I;
:: deftheorem defines if<=0 SCMPDS_6:def 10 :
for a being Int_position
for k being Integer
for I being Program of SCMPDS holds if<=0 (a,k,I) = (((a,k) <=0_goto 2) ';' (goto ((card I) + 1))) ';' I;
:: deftheorem defines if<0 SCMPDS_6:def 11 :
for a being Int_position
for k being Integer
for I being Program of SCMPDS holds if<0 (a,k,I) = ((a,k) >=0_goto ((card I) + 1)) ';' I;
:: deftheorem defines if>=0 SCMPDS_6:def 12 :
for a being Int_position
for k being Integer
for I being Program of SCMPDS holds if>=0 (a,k,I) = (((a,k) >=0_goto 2) ';' (goto ((card I) + 1))) ';' I;
Lm4:
for n being Element of NAT
for i being Instruction of SCMPDS
for I, J being Program of SCMPDS holds card (((i ';' I) ';' (Goto n)) ';' J) = ((card I) + (card J)) + 2
begin
theorem
theorem
Lm5:
for i being Instruction of SCMPDS
for I, J, K being Program of SCMPDS holds (((i ';' I) ';' J) ';' K) . 0 = i
theorem
Lm6:
for i being Instruction of SCMPDS
for I being Program of SCMPDS
for P being the Instructions of SCMPDS -valued ManySortedSet of NAT holds Shift ((stop I),1) c= P +* (stop (i ';' I))
Lm7:
for i, j being Instruction of SCMPDS
for I being Program of SCMPDS
for P being the Instructions of SCMPDS -valued ManySortedSet of NAT holds Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I))
theorem Th52:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I,
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) = 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
(
if=0 (
a,
k1,
I,
J)
is_closed_on s,
P &
if=0 (
a,
k1,
I,
J)
is_halting_on s,
P )
theorem Th53:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
Program of
SCMPDS for
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) <> 0 &
J is_closed_on s,
P &
J is_halting_on s,
P holds
(
if=0 (
a,
k1,
I,
J)
is_closed_on s,
P &
if=0 (
a,
k1,
I,
J)
is_halting_on s,
P )
theorem Th54:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) = 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if=0 (a,k1,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
theorem Th55:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
Program of
SCMPDS for
J being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) <> 0 &
J is_closed_on s,
P &
J is_halting_on s,
P holds
IExec (
(if=0 (a,k1,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
registration
let I,
J be
parahalting shiftable Program of
SCMPDS;
let a be
Int_position ;
let k1 be
Integer;
cluster if=0 (
a,
k1,
I,
J)
-> parahalting shiftable ;
correctness
coherence
( if=0 (a,k1,I,J) is shiftable & if=0 (a,k1,I,J) is parahalting );
end;
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th62:
theorem Th63:
theorem Th64:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) = 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if=0 (a,k1,I)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((card I) + 1),SCMPDS))
theorem Th65:
theorem
theorem
theorem
Lm8:
for i, j being Instruction of SCMPDS
for I being Program of SCMPDS holds card ((i ';' j) ';' I) = (card I) + 2
begin
theorem
Lm9:
for i, j being Instruction of SCMPDS
for I being Program of SCMPDS holds
( 0 in dom ((i ';' j) ';' I) & 1 in dom ((i ';' j) ';' I) )
theorem
Lm10:
for i, j being Instruction of SCMPDS
for I being Program of SCMPDS holds
( ((i ';' j) ';' I) . 0 = i & ((i ';' j) ';' I) . 1 = j )
theorem
theorem Th72:
theorem Th73:
theorem Th74:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) <> 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if<>0 (a,k1,I)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((card I) + 2),SCMPDS))
theorem Th75:
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th82:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I,
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) > 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
(
if>0 (
a,
k1,
I,
J)
is_closed_on s,
P &
if>0 (
a,
k1,
I,
J)
is_halting_on s,
P )
theorem Th83:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
Program of
SCMPDS for
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) <= 0 &
J is_closed_on s,
P &
J is_halting_on s,
P holds
(
if>0 (
a,
k1,
I,
J)
is_closed_on s,
P &
if>0 (
a,
k1,
I,
J)
is_halting_on s,
P )
theorem Th84:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) > 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if>0 (a,k1,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
theorem Th85:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
Program of
SCMPDS for
J being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) <= 0 &
J is_closed_on s,
P &
J is_halting_on s,
P holds
IExec (
(if>0 (a,k1,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
registration
let I,
J be
parahalting shiftable Program of
SCMPDS;
let a be
Int_position ;
let k1 be
Integer;
cluster if>0 (
a,
k1,
I,
J)
-> parahalting shiftable ;
correctness
coherence
( if>0 (a,k1,I,J) is shiftable & if>0 (a,k1,I,J) is parahalting );
end;
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th92:
theorem Th93:
theorem Th94:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) > 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if>0 (a,k1,I)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((card I) + 1),SCMPDS))
theorem Th95:
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th102:
theorem Th103:
theorem Th104:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) <= 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if<=0 (a,k1,I)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((card I) + 2),SCMPDS))
theorem Th105:
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th112:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I,
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) < 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
(
if<0 (
a,
k1,
I,
J)
is_closed_on s,
P &
if<0 (
a,
k1,
I,
J)
is_halting_on s,
P )
theorem Th113:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
Program of
SCMPDS for
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) >= 0 &
J is_closed_on s,
P &
J is_halting_on s,
P holds
(
if<0 (
a,
k1,
I,
J)
is_closed_on s,
P &
if<0 (
a,
k1,
I,
J)
is_halting_on s,
P )
theorem Th114:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
J being
shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) < 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if<0 (a,k1,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
theorem Th115:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
Program of
SCMPDS for
J being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) >= 0 &
J is_closed_on s,
P &
J is_halting_on s,
P holds
IExec (
(if<0 (a,k1,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))
registration
let I,
J be
parahalting shiftable Program of
SCMPDS;
let a be
Int_position ;
let k1 be
Integer;
cluster if<0 (
a,
k1,
I,
J)
-> parahalting shiftable ;
correctness
coherence
( if<0 (a,k1,I,J) is shiftable & if<0 (a,k1,I,J) is parahalting );
end;
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th122:
theorem Th123:
theorem Th124:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) < 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if<0 (a,k1,I)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((card I) + 1),SCMPDS))
theorem Th125:
theorem
theorem
theorem
begin
theorem
theorem
theorem
theorem Th132:
theorem Th133:
theorem Th134:
for
P being the
Instructions of
SCMPDS -valued ManySortedSet of
NAT for
s being
State of
SCMPDS for
I being
halt-free shiftable Program of
SCMPDS for
a being
Int_position for
k1 being
Integer st
s . (DataLoc ((s . a),k1)) >= 0 &
I is_closed_on s,
P &
I is_halting_on s,
P holds
IExec (
(if>=0 (a,k1,I)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((card I) + 2),SCMPDS))
theorem Th135:
theorem
theorem
theorem
theorem
theorem