begin
set A = NAT ;
set D = Data-Locations SCM+FSA;
set SA0 = Start-At (0,SCM+FSA);
Lm1:
for I, J being Program of SCM+FSA holds Reloc (J,(card I)) c= I ';' J
by FUNCT_4:26;
theorem
canceled;
theorem
canceled;
theorem Th3:
theorem
canceled;
theorem
theorem Th6:
theorem Th7:
theorem Th8:
theorem Th9:
theorem Th10:
theorem Th11:
for
P1,
P2 being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s1,
s2 being
State of
SCM+FSA for
I being
Program of
SCM+FSA st
Start-At (
0,
SCM+FSA)
c= s1 &
I is_closed_on s1,
P1 &
I c= P1 holds
for
n being
Element of
NAT st
IC s2 = n &
DataPart s1 = DataPart s2 &
Reloc (
I,
n)
c= P2 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)) )
LmX:
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for s1, s2 being State of SCM+FSA
for J being parahalting Program of SCM+FSA st NPP s1 = NPP s2 holds
NPP (IExec (J,P,s1)) = NPP (IExec (J,P,s2))
theorem Th12:
theorem Th13:
:: deftheorem defines if=0 SCMFSA8B:def 1 :
for a being Int-Location
for I, J being Program of SCM+FSA holds if=0 (a,I,J) = ((((a =0_goto ((card J) + 3)) ';' J) ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA);
:: deftheorem defines if>0 SCMFSA8B:def 2 :
for a being Int-Location
for I, J being Program of SCM+FSA holds if>0 (a,I,J) = ((((a >0_goto ((card J) + 3)) ';' J) ';' (Goto ((card I) + 1))) ';' I) ';' (Stop SCM+FSA);
definition
let a be
Int-Location ;
let I,
J be
Program of
SCM+FSA;
func if<0 (
a,
I,
J)
-> Program of
SCM+FSA equals
if=0 (
a,
J,
(if>0 (a,J,I)));
coherence
if=0 (a,J,(if>0 (a,J,I))) is Program of SCM+FSA
;
end;
:: deftheorem defines if<0 SCMFSA8B:def 3 :
for a being Int-Location
for I, J being Program of SCM+FSA holds if<0 (a,I,J) = if=0 (a,J,(if>0 (a,J,I)));
Lm2:
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)) )
Lm3:
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 )
theorem Th14:
theorem Th15:
theorem Th16:
theorem Th17:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT 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 &
I is_closed_on Initialized s,
P &
I is_halting_on Initialized s,
P holds
IExec (
(if=0 (a,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA))
theorem Th18:
theorem Th19:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I,
J being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st
s . a <> 0 &
J is_closed_on Initialized s,
P &
J is_halting_on Initialized s,
P holds
IExec (
(if=0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA))
theorem Th20:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location holds
(
if=0 (
a,
I,
J) is
parahalting & (
s . a = 0 implies
IExec (
(if=0 (a,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA)) ) & (
s . a <> 0 implies
IExec (
(if=0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA)) ) )
theorem Th21:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location holds
(
IC (IExec ((if=0 (a,I,J)),P,s)) = ((card I) + (card J)) + 3 & (
s . a = 0 implies ( ( for
d being
Int-Location holds
(IExec ((if=0 (a,I,J)),P,s)) . d = (IExec (I,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if=0 (a,I,J)),P,s)) . f = (IExec (I,P,s)) . f ) ) ) & (
s . a <> 0 implies ( ( for
d being
Int-Location holds
(IExec ((if=0 (a,I,J)),P,s)) . d = (IExec (J,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if=0 (a,I,J)),P,s)) . f = (IExec (J,P,s)) . f ) ) ) )
theorem Th22:
theorem Th23:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I,
J being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st
s . a > 0 &
I is_closed_on Initialized s,
P &
I is_halting_on Initialized s,
P holds
IExec (
(if>0 (a,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA))
theorem Th24:
theorem Th25:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I,
J being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st
s . a <= 0 &
J is_closed_on Initialized s,
P &
J is_halting_on Initialized s,
P holds
IExec (
(if>0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA))
theorem Th26:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location holds
(
if>0 (
a,
I,
J) is
parahalting & (
s . a > 0 implies
IExec (
(if>0 (a,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA)) ) & (
s . a <= 0 implies
IExec (
(if>0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 3),SCM+FSA)) ) )
theorem Th27:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location holds
(
IC (IExec ((if>0 (a,I,J)),P,s)) = ((card I) + (card J)) + 3 & (
s . a > 0 implies ( ( for
d being
Int-Location holds
(IExec ((if>0 (a,I,J)),P,s)) . d = (IExec (I,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if>0 (a,I,J)),P,s)) . f = (IExec (I,P,s)) . f ) ) ) & (
s . a <= 0 implies ( ( for
d being
Int-Location holds
(IExec ((if>0 (a,I,J)),P,s)) . d = (IExec (J,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if>0 (a,I,J)),P,s)) . f = (IExec (J,P,s)) . f ) ) ) )
theorem
theorem Th29:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT 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 &
I is_closed_on Initialized s,
P &
I is_halting_on Initialized s,
P holds
IExec (
(if<0 (a,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((((card I) + (card J)) + (card J)) + 7),SCM+FSA))
theorem
theorem Th31:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT 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 &
J is_closed_on Initialized s,
P &
J is_halting_on Initialized s,
P holds
IExec (
(if<0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At (((((card I) + (card J)) + (card J)) + 7),SCM+FSA))
theorem
theorem Th33:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT 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 &
J is_closed_on Initialized s,
P &
J is_halting_on Initialized s,
P holds
IExec (
(if<0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At (((((card I) + (card J)) + (card J)) + 7),SCM+FSA))
theorem
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location holds
(
if<0 (
a,
I,
J) is
parahalting & (
s . a < 0 implies
IExec (
(if<0 (a,I,J)),
P,
s)
= (IExec (I,P,s)) +* (Start-At (((((card I) + (card J)) + (card J)) + 7),SCM+FSA)) ) & (
s . a >= 0 implies
IExec (
(if<0 (a,I,J)),
P,
s)
= (IExec (J,P,s)) +* (Start-At (((((card I) + (card J)) + (card J)) + 7),SCM+FSA)) ) )
definition
let a,
b be
Int-Location ;
let I,
J be
Program of
SCM+FSA;
func if=0 (
a,
b,
I,
J)
-> Program of
SCM+FSA equals
(SubFrom (a,b)) ';' (if=0 (a,I,J));
coherence
(SubFrom (a,b)) ';' (if=0 (a,I,J)) is Program of SCM+FSA
;
func if>0 (
a,
b,
I,
J)
-> Program of
SCM+FSA equals
(SubFrom (a,b)) ';' (if>0 (a,I,J));
coherence
(SubFrom (a,b)) ';' (if>0 (a,I,J)) is Program of SCM+FSA
;
end;
:: deftheorem defines if=0 SCMFSA8B:def 4 :
for a, b being Int-Location
for I, J being Program of SCM+FSA holds if=0 (a,b,I,J) = (SubFrom (a,b)) ';' (if=0 (a,I,J));
:: deftheorem defines if>0 SCMFSA8B:def 5 :
for a, b being Int-Location
for I, J being Program of SCM+FSA holds if>0 (a,b,I,J) = (SubFrom (a,b)) ';' (if>0 (a,I,J));
registration
let a be
Int-Location ;
let I,
J be
Program of
SCM+FSA;
cluster if=0 (
a,
I,
J)
-> non
halt-free ;
coherence
not if=0 (a,I,J) is halt-free
;
cluster if>0 (
a,
I,
J)
-> non
halt-free ;
coherence
not if>0 (a,I,J) is halt-free
;
cluster if<0 (
a,
I,
J)
-> non
halt-free ;
coherence
not if<0 (a,I,J) is halt-free
;
end;
registration
let a,
b be
Int-Location ;
let I,
J be
Program of
SCM+FSA;
cluster if=0 (
a,
b,
I,
J)
-> non
halt-free ;
coherence
not if=0 (a,b,I,J) is halt-free
;
cluster if>0 (
a,
b,
I,
J)
-> non
halt-free ;
coherence
not if>0 (a,b,I,J) is halt-free
;
end;
registration
let I,
J be
parahalting Program of
SCM+FSA;
let a,
b be
read-write Int-Location ;
cluster if=0 (
a,
b,
I,
J)
-> parahalting ;
correctness
coherence
if=0 (a,b,I,J) is parahalting ;
;
cluster if>0 (
a,
b,
I,
J)
-> parahalting ;
correctness
coherence
if>0 (a,b,I,J) is parahalting ;
;
end;
theorem Th35:
theorem Th36:
theorem Th37:
theorem Th38:
for
P1,
P2 being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s1,
s2 being
State of
SCM+FSA for
I being
Program of
SCM+FSA for
a being
Int-Location st not
I refers a & ( for
b being
Int-Location st
a <> b holds
s1 . b = s2 . b ) & ( for
f being
FinSeq-Location holds
s1 . f = s2 . f ) &
I is_closed_on s1,
P1 holds
for
k being
Element of
NAT holds
( ( for
b being
Int-Location st
a <> b holds
(Comput ((P1 +* I),(Initialize s1),k)) . b = (Comput ((P2 +* I),(Initialize s2),k)) . b ) & ( for
f being
FinSeq-Location holds
(Comput ((P1 +* I),(Initialize s1),k)) . f = (Comput ((P2 +* I),(Initialize s2),k)) . f ) &
IC (Comput ((P1 +* I),(Initialize s1),k)) = IC (Comput ((P2 +* I),(Initialize s2),k)) &
CurInstr (
(P1 +* I),
(Comput ((P1 +* I),(Initialize s1),k)))
= CurInstr (
(P2 +* I),
(Comput ((P2 +* I),(Initialize s2),k))) )
theorem
theorem Th40:
theorem Th41:
for
P1,
P2 being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s1,
s2 being
State of
SCM+FSA for
I being
Program of
SCM+FSA for
a being
Int-Location st ( for
d being
read-write Int-Location st
a <> d holds
s1 . d = s2 . d ) & ( for
f being
FinSeq-Location holds
s1 . f = s2 . f ) & not
I refers a &
I is_closed_on Initialized s1,
P1 &
I is_halting_on Initialized s1,
P1 holds
( ( for
d being
Int-Location st
a <> d holds
(IExec (I,P1,s1)) . d = (IExec (I,P2,s2)) . d ) & ( for
f being
FinSeq-Location holds
(IExec (I,P1,s1)) . f = (IExec (I,P2,s2)) . f ) &
IC (IExec (I,P1,s1)) = IC (IExec (I,P2,s2)) )
theorem
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a,
b being
read-write Int-Location st not
I refers a & not
J refers a holds
(
IC (IExec ((if=0 (a,b,I,J)),P,s)) = ((card I) + (card J)) + 5 & (
s . a = s . b implies ( ( for
d being
Int-Location st
a <> d holds
(IExec ((if=0 (a,b,I,J)),P,s)) . d = (IExec (I,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if=0 (a,b,I,J)),P,s)) . f = (IExec (I,P,s)) . f ) ) ) & (
s . a <> s . b implies ( ( for
d being
Int-Location st
a <> d holds
(IExec ((if=0 (a,b,I,J)),P,s)) . d = (IExec (J,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if=0 (a,b,I,J)),P,s)) . f = (IExec (J,P,s)) . f ) ) ) )
theorem
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I,
J being
parahalting Program of
SCM+FSA for
a,
b being
read-write Int-Location st not
I refers a & not
J refers a holds
(
IC (IExec ((if>0 (a,b,I,J)),P,s)) = ((card I) + (card J)) + 5 & (
s . a > s . b implies ( ( for
d being
Int-Location st
a <> d holds
(IExec ((if>0 (a,b,I,J)),P,s)) . d = (IExec (I,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if>0 (a,b,I,J)),P,s)) . f = (IExec (I,P,s)) . f ) ) ) & (
s . a <= s . b implies ( ( for
d being
Int-Location st
a <> d holds
(IExec ((if>0 (a,b,I,J)),P,s)) . d = (IExec (J,P,s)) . d ) & ( for
f being
FinSeq-Location holds
(IExec ((if>0 (a,b,I,J)),P,s)) . f = (IExec (J,P,s)) . f ) ) ) )
theorem
theorem