Lm1:
now for N being with_zero set
for S being non empty with_non-empty_values IC-Ins-separated AMI-Struct over N
for i being Element of the InstructionsF of S
for l being Nat
for s being State of S
for P being Instruction-Sequence of S holds IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)
let N be
with_zero set ;
for S being non empty with_non-empty_values IC-Ins-separated AMI-Struct over N
for i being Element of the InstructionsF of S
for l being Nat
for s being State of S
for P being Instruction-Sequence of S holds IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)let S be non
empty with_non-empty_values IC-Ins-separated AMI-Struct over
N;
for i being Element of the InstructionsF of S
for l being Nat
for s being State of S
for P being Instruction-Sequence of S holds IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)let i be
Element of the
InstructionsF of
S;
for l being Nat
for s being State of S
for P being Instruction-Sequence of S holds IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)let l be
Nat;
for s being State of S
for P being Instruction-Sequence of S holds IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)let s be
State of
S;
for P being Instruction-Sequence of S holds IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)let P be
Instruction-Sequence of
S;
IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (i,l)reconsider t =
s +* (
(IC ),
l) as
Element of
product (the_Values_of S) by CARD_3:107;
l in NAT
by ORDINAL1:def 12;
then A1:
l in dom P
by PARTFUN1:def 2;
IC in dom s
by MEMSTR_0:2;
then A2:
IC t = l
by FUNCT_7:31;
then CurInstr (
(P +* (l,i)),
t) =
(P +* (l,i)) . l
by PBOOLE:143
.=
i
by A1, FUNCT_7:31
;
hence
IC (Following ((P +* (l,i)),(s +* ((IC ),l)))) in NIC (
i,
l)
by A2;
verum
end;
Lm2:
for k being Nat
for N being with_zero set
for S being non empty with_non-empty_values IC-Ins-separated AMI-Struct over N ex f being non empty FinSequence of NAT st
( f /. 1 = k & f /. (len f) = k & ( for n being Nat st 1 <= n & n < len f holds
f /. (n + 1) in SUCC ((f /. n),S) ) )
set III = {[1,{},{}],[0,{},{}]};
definition
let N be
with_zero set ;
func STC N -> strict AMI-Struct over
N means :
Def7:
( the
carrier of
it = {0} &
IC = 0 & the
InstructionsF of
it = {[0,0,0],[1,0,0]} & the
Object-Kind of
it = 0 .--> 0 & the
ValuesF of
it = N --> NAT & ex
f being
Function of
(product (the_Values_of it)),
(product (the_Values_of it)) st
( ( for
s being
Element of
product (the_Values_of it) holds
f . s = s +* (0 .--> ((In ((s . 0),NAT)) + 1)) ) & the
Execution of
it = ([1,0,0] .--> f) +* ([0,0,0] .--> (id (product (the_Values_of it)))) ) );
existence
ex b1 being strict AMI-Struct over N st
( the carrier of b1 = {0} & IC = 0 & the InstructionsF of b1 = {[0,0,0],[1,0,0]} & the Object-Kind of b1 = 0 .--> 0 & the ValuesF of b1 = N --> NAT & ex f being Function of (product (the_Values_of b1)),(product (the_Values_of b1)) st
( ( for s being Element of product (the_Values_of b1) holds f . s = s +* (0 .--> ((In ((s . 0),NAT)) + 1)) ) & the Execution of b1 = ([1,0,0] .--> f) +* ([0,0,0] .--> (id (product (the_Values_of b1)))) ) )
uniqueness
for b1, b2 being strict AMI-Struct over N st the carrier of b1 = {0} & IC = 0 & the InstructionsF of b1 = {[0,0,0],[1,0,0]} & the Object-Kind of b1 = 0 .--> 0 & the ValuesF of b1 = N --> NAT & ex f being Function of (product (the_Values_of b1)),(product (the_Values_of b1)) st
( ( for s being Element of product (the_Values_of b1) holds f . s = s +* (0 .--> ((In ((s . 0),NAT)) + 1)) ) & the Execution of b1 = ([1,0,0] .--> f) +* ([0,0,0] .--> (id (product (the_Values_of b1)))) ) & the carrier of b2 = {0} & IC = 0 & the InstructionsF of b2 = {[0,0,0],[1,0,0]} & the Object-Kind of b2 = 0 .--> 0 & the ValuesF of b2 = N --> NAT & ex f being Function of (product (the_Values_of b2)),(product (the_Values_of b2)) st
( ( for s being Element of product (the_Values_of b2) holds f . s = s +* (0 .--> ((In ((s . 0),NAT)) + 1)) ) & the Execution of b2 = ([1,0,0] .--> f) +* ([0,0,0] .--> (id (product (the_Values_of b2)))) ) holds
b1 = b2
end;
::
deftheorem Def7 defines
STC AMISTD_1:def 7 :
for N being with_zero set
for b2 being strict AMI-Struct over N holds
( b2 = STC N iff ( the carrier of b2 = {0} & IC = 0 & the InstructionsF of b2 = {[0,0,0],[1,0,0]} & the Object-Kind of b2 = 0 .--> 0 & the ValuesF of b2 = N --> NAT & ex f being Function of (product (the_Values_of b2)),(product (the_Values_of b2)) st
( ( for s being Element of product (the_Values_of b2) holds f . s = s +* (0 .--> ((In ((s . 0),NAT)) + 1)) ) & the Execution of b2 = ([1,0,0] .--> f) +* ([0,0,0] .--> (id (product (the_Values_of b2)))) ) ) );
Lm3:
for N being with_zero set
for i being Instruction of (STC N)
for s being State of (STC N) st InsCode i = 1 holds
(Exec (i,s)) . (IC ) = (IC s) + 1
Lm4:
for z being Nat
for N being with_zero set
for l being Nat
for i being Element of the InstructionsF of (STC N) st l = z & InsCode i = 1 holds
NIC (i,l) = {(z + 1)}
Lm5:
for N being with_zero set
for i being Element of the InstructionsF of (STC N) holds JUMP i is empty
canceled;
Lm6:
for N being with_zero set
for S being non empty with_non-empty_values IC-Ins-separated AMI-Struct over N
for F being preProgram of S holds
( F is really-closed iff for s being State of S st IC s in dom F holds
for P being Instruction-Sequence of S st F c= P holds
for k being Nat holds IC (Comput (P,s,k)) in dom F )