:: Normal Computers
:: by Andrzej Trybulec
::
:: Received March 3, 2008
:: Copyright (c) 2008 Association of Mizar Users
:: deftheorem Def1 defines initial SCMNORM:def 1 :
theorem :: SCMNORM:1
:: deftheorem defines Stop SCMNORM:def 2 :
theorem :: SCMNORM:2
theorem :: SCMNORM:3
:: deftheorem defines [ SCMNORM:def 3 :
:: deftheorem Def4 defines CurInstr SCMNORM:def 4 :
:: deftheorem defines Following SCMNORM:def 5 :
definition
let N be non
empty with_non-empty_elements set ;
let S be non
empty IC-Ins-separated AMI-Struct of
NAT ,
N;
let p be
finite PartFunc of
NAT ,the
Instructions of
S;
deffunc H1(
set ,
State of
S)
-> State of
S =
Following p,$2;
let s be
State of
S;
let k be
Nat;
func Comput p,
s,
k -> State of
S means :
Def6:
:: SCMNORM:def 6
ex
f being
Function of
NAT ,
product the
Object-Kind of
S st
(
it = f . k &
f . 0 = s & ( for
i being
Nat holds
f . (i + 1) = Following p,
(f . i) ) );
existence
ex b1 being State of S ex f being Function of NAT , product the Object-Kind of S st
( b1 = f . k & f . 0 = s & ( for i being Nat holds f . (i + 1) = Following p,(f . i) ) )
uniqueness
for b1, b2 being State of S st ex f being Function of NAT , product the Object-Kind of S st
( b1 = f . k & f . 0 = s & ( for i being Nat holds f . (i + 1) = Following p,(f . i) ) ) & ex f being Function of NAT , product the Object-Kind of S st
( b2 = f . k & f . 0 = s & ( for i being Nat holds f . (i + 1) = Following p,(f . i) ) ) holds
b1 = b2
end;
:: deftheorem Def6 defines Comput SCMNORM:def 6 :
definition
let N be non
empty with_non-empty_elements set ;
let S be non
empty IC-Ins-separated AMI-Struct of
NAT ,
N;
let p be
finite PartFunc of
NAT ,the
Instructions of
S;
mode Autonomy of
p -> FinPartState of
S means :
Def7:
:: SCMNORM:def 7
for
s1,
s2 being
State of
S st
it c= s1 &
it c= s2 holds
for
q1,
q2 being
finite PartFunc of
NAT ,the
Instructions of
S st
p c= q1 &
p c= q2 holds
for
i being
Nat holds
(Comput q1,s1,i) | (dom it) = (Comput q2,s2,i) | (dom it);
existence
ex b1 being FinPartState of S st
for s1, s2 being State of S st b1 c= s1 & b1 c= s2 holds
for q1, q2 being finite PartFunc of NAT ,the Instructions of S st p c= q1 & p c= q2 holds
for i being Nat holds (Comput q1,s1,i) | (dom b1) = (Comput q2,s2,i) | (dom b1)
end;
:: deftheorem Def7 defines Autonomy SCMNORM:def 7 :
theorem :: SCMNORM:4
theorem Tx1: :: SCMNORM:5
theorem :: SCMNORM:6
:: deftheorem Def8 defines halts_on SCMNORM:def 8 :
:: deftheorem Def9 defines halting SCMNORM:def 9 :
theorem Th7: :: SCMNORM:7
for
i,
j being
Nat st
i <= j holds
for
N being non
empty with_non-empty_elements set for
S being non
empty halting IC-Ins-separated AMI-Struct of
NAT ,
N for
f being
finite PartFunc of
NAT ,the
Instructions of
S for
s being
State of
S st
CurInstr f,
(Comput f,s,i) = halt S holds
Comput f,
s,
j = Comput f,
s,
i
definition
let N be non
empty with_non-empty_elements set ;
let S be non
empty halting IC-Ins-separated AMI-Struct of
NAT ,
N;
let f be
finite PartFunc of
NAT ,the
Instructions of
S;
let s be
State of
S;
assume A1:
f halts_on s
;
func Result f,
s -> State of
S means :
Def10:
:: SCMNORM:def 10
ex
k being
Element of
NAT st
(
it = Comput f,
s,
k &
CurInstr f,
it = halt S );
uniqueness
for b1, b2 being State of S st ex k being Element of NAT st
( b1 = Comput f,s,k & CurInstr f,b1 = halt S ) & ex k being Element of NAT st
( b2 = Comput f,s,k & CurInstr f,b2 = halt S ) holds
b1 = b2
correctness
existence
ex b1 being State of S ex k being Element of NAT st
( b1 = Comput f,s,k & CurInstr f,b1 = halt S );
end;
:: deftheorem Def10 defines Result SCMNORM:def 10 :
:: deftheorem defines Result SCMNORM:def 11 :
:: deftheorem defines computes SCMNORM:def 12 :
theorem :: SCMNORM:8
theorem :: SCMNORM:9
theorem :: SCMNORM:10
:: deftheorem defines IncrIC SCMNORM:def 13 :
theorem Th11: :: SCMNORM:11
theorem :: SCMNORM:12
:: deftheorem defines DataPart SCMNORM:def 14 :
theorem Th13: :: SCMNORM:13
theorem :: SCMNORM:14
theorem Th15: :: SCMNORM:15
theorem :: SCMNORM:16
theorem Th17: :: SCMNORM:17
theorem :: SCMNORM:18
theorem Th19: :: SCMNORM:19
theorem :: SCMNORM:20
theorem Th21: :: SCMNORM:21
theorem Th22: :: SCMNORM:22
theorem Th23: :: SCMNORM:23
theorem Th24: :: SCMNORM:24
theorem :: SCMNORM:25
theorem :: SCMNORM:26
theorem :: SCMNORM:27