begin
set A = NAT ;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
theorem
Lm1:
for s being State of SCM+FSA st IC s = 0 holds
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for a being Int-Location
for k being Integer st a := k c= P holds
P halts_on s
theorem
Lm2:
for p1, p2, p3, p4 being XFinSequence holds ((p1 ^ p2) ^ p3) ^ p4 = p1 ^ ((p2 ^ p3) ^ p4)
Lm3:
for c0 being Element of NAT
for s being b1 -started State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for a being Int-Location
for k being Integer st ( for c being Element of NAT st c < len (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
for i being Element of NAT st i <= len (aSeq (a,k)) holds
IC (Comput (P,s,i)) = c0 + i
Lm4:
for s being 0 -started State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for a being Int-Location
for k being Integer st aSeq (a,k) c= P holds
for i being Element of NAT st i <= len (aSeq (a,k)) holds
IC (Comput (P,s,i)) = i
Lm5:
for s being 0 -started State of SCM+FSA
for P being the Instructions of SCM+FSA -valued ManySortedSet of NAT
for f being FinSeq-Location
for p being FinSequence of INT st f := p c= P holds
P halts_on s
theorem
definition
let i be
Instruction of
SCM+FSA;
let a be
Int-Location ;
pred i refers a means
not for
b being
Int-Location for
l being
Element of
NAT for
f being
FinSeq-Location holds
(
b := a <> i &
AddTo (
b,
a)
<> i &
SubFrom (
b,
a)
<> i &
MultBy (
b,
a)
<> i &
Divide (
b,
a)
<> i &
Divide (
a,
b)
<> i &
a =0_goto l <> i &
a >0_goto l <> i &
b := (
f,
a)
<> i & (
f,
b)
:= a <> i & (
f,
a)
:= b <> i &
f :=<0,...,0> a <> i );
end;
:: deftheorem defines refers SCMFSA7B:def 1 :
for i being Instruction of SCM+FSA
for a being Int-Location holds
( i refers a iff not for b being Int-Location
for l being Element of NAT
for f being FinSeq-Location holds
( b := a <> i & AddTo (b,a) <> i & SubFrom (b,a) <> i & MultBy (b,a) <> i & Divide (b,a) <> i & Divide (a,b) <> i & a =0_goto l <> i & a >0_goto l <> i & b := (f,a) <> i & (f,b) := a <> i & (f,a) := b <> i & f :=<0,...,0> a <> i ) );
:: deftheorem defines refers SCMFSA7B:def 2 :
for I being preProgram of SCM+FSA
for a being Int-Location holds
( I refers a iff ex i being Instruction of SCM+FSA st
( i in rng I & i refers a ) );
:: deftheorem Def3 defines destroys SCMFSA7B:def 3 :
for i being Instruction of SCM+FSA
for a being Int-Location holds
( i destroys a iff not for b being Int-Location
for f being FinSeq-Location holds
( a := b <> i & AddTo (a,b) <> i & SubFrom (a,b) <> i & MultBy (a,b) <> i & Divide (a,b) <> i & Divide (b,a) <> i & a := (f,b) <> i & a :=len f <> i & a :==1 <> i ) );
:: deftheorem Def4 defines destroys SCMFSA7B:def 4 :
for I being NAT -defined the Instructions of SCM+FSA -valued Function
for a being Int-Location holds
( I destroys a iff ex i being Instruction of SCM+FSA st
( i in rng I & i destroys a ) );
:: deftheorem Def5 defines good SCMFSA7B:def 5 :
for I being NAT -defined the Instructions of SCM+FSA -valued Function holds
( I is good iff not I destroys intloc 0 );
theorem Th11:
theorem Th12:
theorem Th13:
theorem Th14:
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
:: deftheorem SCMFSA7B:def 6 :
canceled;
:: deftheorem Def7 defines is_closed_on SCMFSA7B:def 7 :
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 holds
( I is_closed_on s,P iff for k being Element of NAT holds IC (Comput ((P +* I),(Initialize s),k)) in dom I );
:: deftheorem Def8 defines is_halting_on SCMFSA7B:def 8 :
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 holds
( I is_halting_on s,P iff P +* I halts_on Initialize s );
theorem Th24:
theorem
theorem Th26:
theorem Th27:
theorem
canceled;
theorem Th29:
theorem Th30:
theorem