begin
Lm1:
card (Stop SCM+FSA) = 1
by COMPOS_1:46;
Lm2:
(Stop SCM+FSA) . 0 = halt SCM+FSA
by AFINSQ_1:38;
Lm3:
0 in dom (Stop SCM+FSA)
by COMPOS_1:45;
set SA0 = Start-At (0,SCM+FSA);
theorem Th1:
theorem Th2:
definition
let a be
Int-Location ;
let I be
Program of
SCM+FSA;
func while=0 (
a,
I)
-> Program of
SCM+FSA equals
(if=0 (a,(I ';' (Goto 0)),(Stop SCM+FSA))) +* (((card I) + 4) .--> (goto 0));
correctness
coherence
(if=0 (a,(I ';' (Goto 0)),(Stop SCM+FSA))) +* (((card I) + 4) .--> (goto 0)) is Program of SCM+FSA;
func while>0 (
a,
I)
-> Program of
SCM+FSA equals
(if>0 (a,(I ';' (Goto 0)),(Stop SCM+FSA))) +* (((card I) + 4) .--> (goto 0));
correctness
coherence
(if>0 (a,(I ';' (Goto 0)),(Stop SCM+FSA))) +* (((card I) + 4) .--> (goto 0)) is Program of SCM+FSA;
end;
:: deftheorem defines while=0 SCMFSA_9:def 1 :
for a being Int-Location
for I being Program of SCM+FSA holds while=0 (a,I) = (if=0 (a,(I ';' (Goto 0)),(Stop SCM+FSA))) +* (((card I) + 4) .--> (goto 0));
:: deftheorem defines while>0 SCMFSA_9:def 2 :
for a being Int-Location
for I being Program of SCM+FSA holds while>0 (a,I) = (if>0 (a,(I ';' (Goto 0)),(Stop SCM+FSA))) +* (((card I) + 4) .--> (goto 0));
theorem Th3:
:: deftheorem defines while<0 SCMFSA_9:def 3 :
for a being Int-Location
for I being Program of SCM+FSA holds while<0 (a,I) = (if=0 (a,(Stop SCM+FSA),(if>0 (a,(Stop SCM+FSA),(I ';' (Goto 0)))))) +* (((card I) + 4) .--> (goto 0));
theorem Th4:
theorem Th5:
theorem
theorem
theorem
theorem
theorem Th10:
theorem Th11:
theorem Th12:
theorem Th13:
theorem Th14:
theorem Th15:
theorem Th16:
theorem
theorem Th18:
theorem Th19:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
a being
Int-Location for
I being
Program of
SCM+FSA for
s being
State of
SCM+FSA for
k being
Element of
NAT st
I is_closed_on s,
P &
I is_halting_on s,
P &
k < LifeSpan (
(P +* I),
(Initialize s)) &
IC (Comput ((P +* (while=0 (a,I))),(Initialize s),(1 + k))) = (IC (Comput ((P +* I),(Initialize s),k))) + 4 &
DataPart (Comput ((P +* (while=0 (a,I))),(Initialize s),(1 + k))) = DataPart (Comput ((P +* I),(Initialize s),k)) holds
(
IC (Comput ((P +* (while=0 (a,I))),(Initialize s),((1 + k) + 1))) = (IC (Comput ((P +* I),(Initialize s),(k + 1)))) + 4 &
DataPart (Comput ((P +* (while=0 (a,I))),(Initialize s),((1 + k) + 1))) = DataPart (Comput ((P +* I),(Initialize s),(k + 1))) )
theorem Th20:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
a being
Int-Location for
I 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 &
IC (Comput ((P +* (while=0 (a,I))),(Initialize s),(1 + (LifeSpan ((P +* I),(Initialize s)))))) = (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) + 4 holds
CurInstr (
(P +* (while=0 (a,I))),
(Comput ((P +* (while=0 (a,I))),(Initialize s),(1 + (LifeSpan ((P +* I),(Initialize s)))))))
= goto ((card I) + 4)
theorem Th21:
theorem Th22:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I being
Program of
SCM+FSA for
a being
read-write Int-Location st
I is_closed_on s,
P &
I is_halting_on s,
P &
s . a = 0 holds
(
IC (Comput ((P +* (while=0 (a,I))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 3))) = 0 & ( for
k being
Element of
NAT st
k <= (LifeSpan ((P +* I),(Initialize s))) + 3 holds
IC (Comput ((P +* (while=0 (a,I))),(Initialize s),k)) in dom (while=0 (a,I)) ) )
definition
let s be
State of
SCM+FSA;
let I be
Program of
SCM+FSA;
let a be
read-write Int-Location ;
let P be the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT ;
deffunc H1(
Nat,
State of
SCM+FSA)
-> set =
Comput (
(P +* (while=0 (a,I))),
($2 +* (Start-At (0,SCM+FSA))),
((LifeSpan (((P +* (while=0 (a,I))) +* I),($2 +* (Start-At (0,SCM+FSA))))) + 3));
deffunc H2(
Nat,
State of
SCM+FSA)
-> Element of
product the
Object-Kind of
SCM+FSA =
down H1($1,$2);
func StepWhile=0 (
a,
I,
P,
s)
-> Function of
NAT,
(product the Object-Kind of SCM+FSA) means :
Def4:
(
it . 0 = s & ( for
i being
Nat holds
it . (i + 1) = Comput (
(P +* (while=0 (a,I))),
((it . i) +* (Start-At (0,SCM+FSA))),
((LifeSpan (((P +* (while=0 (a,I))) +* I),((it . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) );
existence
ex b1 being Function of NAT,(product the Object-Kind of SCM+FSA) st
( b1 . 0 = s & ( for i being Nat holds b1 . (i + 1) = Comput ((P +* (while=0 (a,I))),((b1 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while=0 (a,I))) +* I),((b1 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) )
uniqueness
for b1, b2 being Function of NAT,(product the Object-Kind of SCM+FSA) st b1 . 0 = s & ( for i being Nat holds b1 . (i + 1) = Comput ((P +* (while=0 (a,I))),((b1 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while=0 (a,I))) +* I),((b1 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) & b2 . 0 = s & ( for i being Nat holds b2 . (i + 1) = Comput ((P +* (while=0 (a,I))),((b2 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while=0 (a,I))) +* I),((b2 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) holds
b1 = b2
end;
:: deftheorem Def4 defines StepWhile=0 SCMFSA_9:def 4 :
for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being read-write Int-Location
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for b5 being Function of NAT,(product the Object-Kind of SCM+FSA) holds
( b5 = StepWhile=0 (a,I,P,s) iff ( b5 . 0 = s & ( for i being Nat holds b5 . (i + 1) = Comput ((P +* (while=0 (a,I))),((b5 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while=0 (a,I))) +* I),((b5 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) ) );
theorem
canceled;
theorem
canceled;
theorem Th25:
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
theorem Th30:
theorem Th31:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA for
k,
n being
Element of
NAT st
IC ((StepWhile=0 (a,I,P,s)) . k) = 0 &
(StepWhile=0 (a,I,P,s)) . k = Comput (
(P +* (while=0 (a,I))),
(Initialize s),
n) holds
(
(StepWhile=0 (a,I,P,s)) . k = Initialize ((StepWhile=0 (a,I,P,s)) . k) &
(StepWhile=0 (a,I,P,s)) . (k + 1) = Comput (
(P +* (while=0 (a,I))),
(Initialize s),
(n + ((LifeSpan (((P +* (while=0 (a,I))) +* I),(Initialize ((StepWhile=0 (a,I,P,s)) . k)))) + 3))) )
theorem Th32:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st ( for
k being
Nat holds
(
I is_closed_on (StepWhile=0 (a,I,P,s)) . k,
P +* (while=0 (a,I)) &
I is_halting_on (StepWhile=0 (a,I,P,s)) . k,
P +* (while=0 (a,I)) ) ) & ex
f being
Function of
(product the Object-Kind of SCM+FSA),
NAT st
for
k being
Nat holds
( (
f . ((StepWhile=0 (a,I,P,s)) . (k + 1)) < f . ((StepWhile=0 (a,I,P,s)) . k) or
f . ((StepWhile=0 (a,I,P,s)) . k) = 0 ) & (
f . ((StepWhile=0 (a,I,P,s)) . k) = 0 implies
((StepWhile=0 (a,I,P,s)) . k) . a <> 0 ) & (
((StepWhile=0 (a,I,P,s)) . k) . a <> 0 implies
f . ((StepWhile=0 (a,I,P,s)) . k) = 0 ) ) holds
(
while=0 (
a,
I)
is_halting_on s,
P &
while=0 (
a,
I)
is_closed_on s,
P )
theorem Th33:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st ex
f being
Function of
(product the Object-Kind of SCM+FSA),
NAT st
for
k being
Nat holds
( (
f . ((StepWhile=0 (a,I,P,s)) . (k + 1)) < f . ((StepWhile=0 (a,I,P,s)) . k) or
f . ((StepWhile=0 (a,I,P,s)) . k) = 0 ) & (
f . ((StepWhile=0 (a,I,P,s)) . k) = 0 implies
((StepWhile=0 (a,I,P,s)) . k) . a <> 0 ) & (
((StepWhile=0 (a,I,P,s)) . k) . a <> 0 implies
f . ((StepWhile=0 (a,I,P,s)) . k) = 0 ) ) holds
(
while=0 (
a,
I)
is_halting_on s,
P &
while=0 (
a,
I)
is_closed_on s,
P )
theorem
theorem Th35:
theorem Th36:
theorem Th37:
theorem Th38:
theorem Th39:
theorem Th40:
theorem Th41:
theorem
theorem Th43:
theorem Th44:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
a being
Int-Location for
I being
Program of
SCM+FSA for
s being
State of
SCM+FSA for
k being
Element of
NAT st
I is_closed_on s,
P &
I is_halting_on s,
P &
k < LifeSpan (
(P +* I),
(Initialize s)) &
IC (Comput ((P +* (while>0 (a,I))),(Initialize s),(1 + k))) = (IC (Comput ((P +* I),(Initialize s),k))) + 4 &
DataPart (Comput ((P +* (while>0 (a,I))),(Initialize s),(1 + k))) = DataPart (Comput ((P +* I),(Initialize s),k)) holds
(
IC (Comput ((P +* (while>0 (a,I))),(Initialize s),((1 + k) + 1))) = (IC (Comput ((P +* I),(Initialize s),(k + 1)))) + 4 &
DataPart (Comput ((P +* (while>0 (a,I))),(Initialize s),((1 + k) + 1))) = DataPart (Comput ((P +* I),(s +* (Start-At (0,SCM+FSA))),(k + 1))) )
theorem Th45:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
a being
Int-Location for
I 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 &
IC (Comput ((P +* (while>0 (a,I))),(Initialize s),(1 + (LifeSpan ((P +* I),(Initialize s)))))) = (IC (Comput ((P +* I),(Initialize s),(LifeSpan ((P +* I),(Initialize s)))))) + 4 holds
CurInstr (
(P +* (while>0 (a,I))),
(Comput ((P +* (while>0 (a,I))),(Initialize s),(1 + (LifeSpan ((P +* I),(Initialize s)))))))
= goto ((card I) + 4)
theorem Th46:
theorem Th47:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
s being
State of
SCM+FSA for
I being
Program of
SCM+FSA for
a being
read-write Int-Location st
I is_closed_on s,
P &
I is_halting_on s,
P &
s . a > 0 holds
(
IC (Comput ((P +* (while>0 (a,I))),(Initialize s),((LifeSpan ((P +* I),(Initialize s))) + 3))) = 0 & ( for
k being
Element of
NAT st
k <= (LifeSpan ((P +* I),(Initialize s))) + 3 holds
IC (Comput ((P +* (while>0 (a,I))),(Initialize s),k)) in dom (while>0 (a,I)) ) )
definition
let s be
State of
SCM+FSA;
let I be
Program of
SCM+FSA;
let a be
read-write Int-Location ;
let P be the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT ;
deffunc H1(
Nat,
State of
SCM+FSA)
-> set =
Comput (
(P +* (while>0 (a,I))),
($2 +* (Start-At (0,SCM+FSA))),
((LifeSpan (((P +* (while>0 (a,I))) +* I),($2 +* (Start-At (0,SCM+FSA))))) + 3));
deffunc H2(
Nat,
State of
SCM+FSA)
-> Element of
product the
Object-Kind of
SCM+FSA =
down H1($1,$2);
func StepWhile>0 (
a,
I,
P,
s)
-> Function of
NAT,
(product the Object-Kind of SCM+FSA) means :
Def5:
(
it . 0 = s & ( for
i being
Nat holds
it . (i + 1) = Comput (
(P +* (while>0 (a,I))),
((it . i) +* (Start-At (0,SCM+FSA))),
((LifeSpan (((P +* (while>0 (a,I))) +* I),((it . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) );
existence
ex b1 being Function of NAT,(product the Object-Kind of SCM+FSA) st
( b1 . 0 = s & ( for i being Nat holds b1 . (i + 1) = Comput ((P +* (while>0 (a,I))),((b1 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while>0 (a,I))) +* I),((b1 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) )
uniqueness
for b1, b2 being Function of NAT,(product the Object-Kind of SCM+FSA) st b1 . 0 = s & ( for i being Nat holds b1 . (i + 1) = Comput ((P +* (while>0 (a,I))),((b1 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while>0 (a,I))) +* I),((b1 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) & b2 . 0 = s & ( for i being Nat holds b2 . (i + 1) = Comput ((P +* (while>0 (a,I))),((b2 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while>0 (a,I))) +* I),((b2 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) holds
b1 = b2
end;
:: deftheorem Def5 defines StepWhile>0 SCMFSA_9:def 5 :
for s being State of SCM+FSA
for I being Program of SCM+FSA
for a being read-write Int-Location
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for b5 being Function of NAT,(product the Object-Kind of SCM+FSA) holds
( b5 = StepWhile>0 (a,I,P,s) iff ( b5 . 0 = s & ( for i being Nat holds b5 . (i + 1) = Comput ((P +* (while>0 (a,I))),((b5 . i) +* (Start-At (0,SCM+FSA))),((LifeSpan (((P +* (while>0 (a,I))) +* I),((b5 . i) +* (Start-At (0,SCM+FSA))))) + 3)) ) ) );
theorem
canceled;
theorem
canceled;
theorem Th50:
theorem Th51:
theorem Th52:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA for
k,
n being
Element of
NAT st
IC ((StepWhile>0 (a,I,P,s)) . k) = 0 &
(StepWhile>0 (a,I,P,s)) . k = Comput (
(P +* (while>0 (a,I))),
(Initialize s),
n) holds
(
(StepWhile>0 (a,I,P,s)) . k = Initialize ((StepWhile>0 (a,I,P,s)) . k) &
(StepWhile>0 (a,I,P,s)) . (k + 1) = Comput (
(P +* (while>0 (a,I))),
(Initialize s),
(n + ((LifeSpan (((P +* (while>0 (a,I))) +* I),(Initialize ((StepWhile>0 (a,I,P,s)) . k)))) + 3))) )
theorem Th53:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st ( for
k being
Nat holds
(
I is_closed_on (StepWhile>0 (a,I,P,s)) . k,
P +* (while>0 (a,I)) &
I is_halting_on (StepWhile>0 (a,I,P,s)) . k,
P +* (while>0 (a,I)) ) ) & ex
f being
Function of
(product the Object-Kind of SCM+FSA),
NAT st
for
k being
Nat holds
( (
f . ((StepWhile>0 (a,I,P,s)) . (k + 1)) < f . ((StepWhile>0 (a,I,P,s)) . k) or
f . ((StepWhile>0 (a,I,P,s)) . k) = 0 ) & (
f . ((StepWhile>0 (a,I,P,s)) . k) = 0 implies
((StepWhile>0 (a,I,P,s)) . k) . a <= 0 ) & (
((StepWhile>0 (a,I,P,s)) . k) . a <= 0 implies
f . ((StepWhile>0 (a,I,P,s)) . k) = 0 ) ) holds
(
while>0 (
a,
I)
is_halting_on s,
P &
while>0 (
a,
I)
is_closed_on s,
P )
theorem Th54:
for
P being the
Instructions of
SCM+FSA -valued ManySortedSet of
NAT for
I being
parahalting Program of
SCM+FSA for
a being
read-write Int-Location for
s being
State of
SCM+FSA st ex
f being
Function of
(product the Object-Kind of SCM+FSA),
NAT st
for
k being
Nat holds
( (
f . ((StepWhile>0 (a,I,P,s)) . (k + 1)) < f . ((StepWhile>0 (a,I,P,s)) . k) or
f . ((StepWhile>0 (a,I,P,s)) . k) = 0 ) & (
f . ((StepWhile>0 (a,I,P,s)) . k) = 0 implies
((StepWhile>0 (a,I,P,s)) . k) . a <= 0 ) & (
((StepWhile>0 (a,I,P,s)) . k) . a <= 0 implies
f . ((StepWhile>0 (a,I,P,s)) . k) = 0 ) ) holds
(
while>0 (
a,
I)
is_halting_on s,
P &
while>0 (
a,
I)
is_closed_on s,
P )
theorem