:: The Properties of Instructions of { \bf SCM } over Ring
:: by Artur Korni{\l}owicz
::
:: Received April 14, 2000
:: Copyright (c) 2000-2011 Association of Mizar Users


begin

registration
cluster INT.Ring -> infinite good ;
coherence
( not INT.Ring is finite & INT.Ring is good )
proof end;
end;

registration
cluster non empty infinite V65() strict unital V91() V95() V96() V97() V98() V99() V100() V108() V109() V110() good L11();
existence
ex b1 being Ring st
( b1 is strict & not b1 is finite & b1 is good )
proof end;
end;

theorem Th1: :: SCMRING3:1
for R being good Ring
for a being Data-Location of R holds ObjectKind a = the carrier of R
proof end;

definition
let R be good Ring;
let la, lb be Data-Location of R;
let a, b be Element of R;
:: original: -->
redefine func (la,lb) --> (a,b) -> FinPartState of (SCM R);
coherence
(la,lb) --> (a,b) is FinPartState of (SCM R)
proof end;
end;

theorem Th2: :: SCMRING3:2
for R being good Ring
for a being Data-Location of R holds not a in NAT
proof end;

theorem Th3: :: SCMRING3:3
for R being good Ring
for a being Data-Location of R holds a <> IC
proof end;

theorem :: SCMRING3:4
Data-Locations SCM <> NAT by AMI_2:12, AMI_3:72;

theorem Th5: :: SCMRING3:5
for R being good Ring
for o being Object of (SCM R) holds
( o = IC or o in NAT or o is Data-Location of R )
proof end;

theorem :: SCMRING3:6
canceled;

theorem Th7: :: SCMRING3:7
for R being good Ring
for a being Data-Location of R
for s1, s2 being State of (SCM R) st NPP s1 = NPP s2 holds
s1 . a = s2 . a
proof end;

theorem Th8: :: SCMRING3:8
for R being good Ring holds InsCode (halt (SCM R)) = 0
proof end;

theorem :: SCMRING3:9
for R being good Ring
for a, b being Data-Location of R holds InsCode (a := b) = 1 by RECDEF_2:def 1;

theorem :: SCMRING3:10
for R being good Ring
for a, b being Data-Location of R holds InsCode (AddTo (a,b)) = 2 by RECDEF_2:def 1;

theorem :: SCMRING3:11
for R being good Ring
for a, b being Data-Location of R holds InsCode (SubFrom (a,b)) = 3 by RECDEF_2:def 1;

theorem :: SCMRING3:12
for R being good Ring
for a, b being Data-Location of R holds InsCode (MultBy (a,b)) = 4 by RECDEF_2:def 1;

theorem :: SCMRING3:13
for R being good Ring
for r being Element of R
for a being Data-Location of R holds InsCode (a := r) = 5 by RECDEF_2:def 1;

theorem Th14: :: SCMRING3:14
for R being good Ring
for i1 being Element of NAT holds InsCode (goto (i1,R)) = 6 by RECDEF_2:def 1;

theorem Th15: :: SCMRING3:15
for R being good Ring
for a being Data-Location of R
for i1 being Element of NAT holds InsCode (a =0_goto i1) = 7 by RECDEF_2:def 1;

theorem Th16: :: SCMRING3:16
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 0 holds
I = halt (SCM R)
proof end;

theorem Th17: :: SCMRING3:17
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 1 holds
ex a, b being Data-Location of R st I = a := b
proof end;

theorem Th18: :: SCMRING3:18
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 2 holds
ex a, b being Data-Location of R st I = AddTo (a,b)
proof end;

theorem Th19: :: SCMRING3:19
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 3 holds
ex a, b being Data-Location of R st I = SubFrom (a,b)
proof end;

theorem Th20: :: SCMRING3:20
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 4 holds
ex a, b being Data-Location of R st I = MultBy (a,b)
proof end;

theorem Th21: :: SCMRING3:21
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 5 holds
ex a being Data-Location of R ex r being Element of R st I = a := r
proof end;

theorem Th22: :: SCMRING3:22
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 6 holds
ex i2 being Element of NAT st I = goto (i2,R)
proof end;

theorem Th23: :: SCMRING3:23
for R being good Ring
for I being Instruction of (SCM R) st InsCode I = 7 holds
ex a being Data-Location of R ex i1 being Element of NAT st I = a =0_goto i1
proof end;

Lm1: for x, y being set st x in dom <*y*> holds
x = 1
proof end;

Lm2: for R being good Ring
for T being InsType of (SCM R) holds
( T = 0 or T = 1 or T = 2 or T = 3 or T = 4 or T = 5 or T = 6 or T = 7 )
proof end;

theorem :: SCMRING3:24
canceled;

theorem :: SCMRING3:25
canceled;

theorem :: SCMRING3:26
canceled;

theorem :: SCMRING3:27
canceled;

theorem :: SCMRING3:28
canceled;

theorem :: SCMRING3:29
canceled;

theorem :: SCMRING3:30
canceled;

theorem :: SCMRING3:31
canceled;

theorem Th32: :: SCMRING3:32
for R being good Ring
for T being InsType of (SCM R) st T = 0 holds
JumpParts T = {0}
proof end;

theorem Th33: :: SCMRING3:33
for R being good Ring
for T being InsType of (SCM R) st T = 1 holds
JumpParts T = {{}}
proof end;

theorem Th34: :: SCMRING3:34
for R being good Ring
for T being InsType of (SCM R) st T = 2 holds
JumpParts T = {{}}
proof end;

theorem Th35: :: SCMRING3:35
for R being good Ring
for T being InsType of (SCM R) st T = 3 holds
JumpParts T = {{}}
proof end;

theorem Th36: :: SCMRING3:36
for R being good Ring
for T being InsType of (SCM R) st T = 4 holds
JumpParts T = {{}}
proof end;

theorem Th37: :: SCMRING3:37
for R being good Ring
for T being InsType of (SCM R) st T = 5 holds
JumpParts T = {{}}
proof end;

theorem Th38: :: SCMRING3:38
for R being good Ring
for T being InsType of (SCM R) st T = 6 holds
dom (product" (JumpParts T)) = {1}
proof end;

theorem Th39: :: SCMRING3:39
for R being good Ring
for T being InsType of (SCM R) st T = 7 holds
dom (product" (JumpParts T)) = {1}
proof end;

theorem :: SCMRING3:40
canceled;

theorem :: SCMRING3:41
canceled;

theorem :: SCMRING3:42
canceled;

theorem :: SCMRING3:43
canceled;

theorem :: SCMRING3:44
canceled;

theorem :: SCMRING3:45
canceled;

theorem :: SCMRING3:46
canceled;

theorem :: SCMRING3:47
canceled;

theorem :: SCMRING3:48
canceled;

theorem :: SCMRING3:49
canceled;

theorem Th50: :: SCMRING3:50
for R being good Ring
for i1 being Element of NAT holds (product" (JumpParts (InsCode (goto (i1,R))))) . 1 = NAT
proof end;

theorem Th51: :: SCMRING3:51
for R being good Ring
for a being Data-Location of R
for i1 being Element of NAT holds (product" (JumpParts (InsCode (a =0_goto i1)))) . 1 = NAT
proof end;

theorem :: SCMRING3:52
canceled;

Lm4: for R being good Ring
for i being Instruction of (SCM R) st ( for l being Element of NAT holds NIC (i,l) = {(succ l)} ) holds
JUMP i is empty
proof end;

registration
let R be good Ring;
cluster JUMP (halt (SCM R)) -> empty ;
coherence
JUMP (halt (SCM R)) is empty
;
end;

registration
let R be good Ring;
let a, b be Data-Location of R;
cluster a := b -> sequential ;
coherence
a := b is sequential
proof end;
cluster AddTo (a,b) -> sequential ;
coherence
AddTo (a,b) is sequential
proof end;
cluster SubFrom (a,b) -> sequential ;
coherence
SubFrom (a,b) is sequential
proof end;
cluster MultBy (a,b) -> sequential ;
coherence
MultBy (a,b) is sequential
proof end;
end;

registration
let R be good Ring;
let a be Data-Location of R;
let r be Element of R;
cluster a := r -> sequential ;
coherence
a := r is sequential
proof end;
end;

registration
let R be good Ring;
let a, b be Data-Location of R;
cluster JUMP (a := b) -> empty ;
coherence
JUMP (a := b) is empty
proof end;
end;

registration
let R be good Ring;
let a, b be Data-Location of R;
cluster JUMP (AddTo (a,b)) -> empty ;
coherence
JUMP (AddTo (a,b)) is empty
proof end;
end;

registration
let R be good Ring;
let a, b be Data-Location of R;
cluster JUMP (SubFrom (a,b)) -> empty ;
coherence
JUMP (SubFrom (a,b)) is empty
proof end;
end;

registration
let R be good Ring;
let a, b be Data-Location of R;
cluster JUMP (MultBy (a,b)) -> empty ;
coherence
JUMP (MultBy (a,b)) is empty
proof end;
end;

registration
let R be good Ring;
let a be Data-Location of R;
let r be Element of R;
cluster JUMP (a := r) -> empty ;
coherence
JUMP (a := r) is empty
proof end;
end;

theorem :: SCMRING3:53
canceled;

theorem :: SCMRING3:54
canceled;

theorem :: SCMRING3:55
canceled;

theorem :: SCMRING3:56
canceled;

theorem :: SCMRING3:57
canceled;

theorem :: SCMRING3:58
canceled;

theorem Th59: :: SCMRING3:59
for R being good Ring
for i1, il being Element of NAT holds NIC ((goto (i1,R)),il) = {i1}
proof end;

theorem Th60: :: SCMRING3:60
for R being good Ring
for i1 being Element of NAT holds JUMP (goto (i1,R)) = {i1}
proof end;

registration
let R be good Ring;
let i1 be Element of NAT ;
cluster JUMP (goto (i1,R)) -> non empty trivial ;
coherence
( not JUMP (goto (i1,R)) is empty & JUMP (goto (i1,R)) is trivial )
proof end;
end;

theorem Th61: :: SCMRING3:61
for R being good Ring
for a being Data-Location of R
for i1, il being Element of NAT holds
( i1 in NIC ((a =0_goto i1),il) & NIC ((a =0_goto i1),il) c= {i1,(succ il)} )
proof end;

theorem :: SCMRING3:62
for R being non trivial good Ring
for a being Data-Location of R
for il, i1 being Element of NAT holds NIC ((a =0_goto i1),il) = {i1,(succ il)}
proof end;

theorem Th63: :: SCMRING3:63
for R being good Ring
for a being Data-Location of R
for i1 being Element of NAT holds JUMP (a =0_goto i1) = {i1}
proof end;

registration
let R be good Ring;
let a be Data-Location of R;
let i1 be Element of NAT ;
cluster JUMP (a =0_goto i1) -> non empty trivial ;
coherence
( not JUMP (a =0_goto i1) is empty & JUMP (a =0_goto i1) is trivial )
proof end;
end;

theorem Th64: :: SCMRING3:64
for R being good Ring
for il being Element of NAT holds SUCC (il,(SCM R)) = {il,(succ il)}
proof end;

theorem Th65: :: SCMRING3:65
for R being good Ring
for k being Element of NAT holds
( k + 1 in SUCC (k,(SCM R)) & ( for j being Element of NAT st j in SUCC (k,(SCM R)) holds
k <= j ) )
proof end;

registration
let R be good Ring;
cluster SCM R -> standard ;
coherence
SCM R is standard
proof end;
end;

theorem :: SCMRING3:66
canceled;

theorem :: SCMRING3:67
canceled;

theorem :: SCMRING3:68
canceled;

definition
let R be good Ring;
let k be Element of NAT ;
func dl. (R,k) -> Data-Location of R equals :: SCMRING3:def 1
dl. k;
coherence
dl. k is Data-Location of R
proof end;
end;

:: deftheorem defines dl. SCMRING3:def 1 :
for R being good Ring
for k being Element of NAT holds dl. (R,k) = dl. k;

registration
let R be good Ring;
cluster (halt (SCM R)) `1_3 -> jump-only InsType of (SCM R);
coherence
for b1 being InsType of (SCM R) st b1 = InsCode (halt (SCM R)) holds
b1 is jump-only
proof end;
end;

registration
let R be good Ring;
cluster halt (SCM R) -> jump-only ;
coherence
halt (SCM R) is jump-only
proof end;
end;

registration
let R be good Ring;
let i1 be Element of NAT ;
cluster (goto (i1,R)) `1_3 -> jump-only InsType of (SCM R);
coherence
for b1 being InsType of (SCM R) st b1 = InsCode (goto (i1,R)) holds
b1 is jump-only
proof end;
end;

registration
let R be good Ring;
let i1 be Element of NAT ;
cluster goto (i1,R) -> jump-only ;
coherence
goto (i1,R) is jump-only
proof end;
end;

registration
let R be good Ring;
let a be Data-Location of R;
let i1 be Element of NAT ;
cluster (a =0_goto i1) `1_3 -> jump-only InsType of (SCM R);
coherence
for b1 being InsType of (SCM R) st b1 = InsCode (a =0_goto i1) holds
b1 is jump-only
proof end;
end;

registration
let R be good Ring;
let a be Data-Location of R;
let i1 be Element of NAT ;
cluster a =0_goto i1 -> jump-only ;
coherence
a =0_goto i1 is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster (p := q) `1_3 -> non jump-only InsType of (SCM S);
coherence
for b1 being InsType of (SCM S) st b1 = InsCode (p := q) holds
not b1 is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster p := q -> non jump-only ;
coherence
not p := q is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster (AddTo (p,q)) `1_3 -> non jump-only InsType of (SCM S);
coherence
for b1 being InsType of (SCM S) st b1 = InsCode (AddTo (p,q)) holds
not b1 is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster AddTo (p,q) -> non jump-only ;
coherence
not AddTo (p,q) is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster (SubFrom (p,q)) `1_3 -> non jump-only InsType of (SCM S);
coherence
for b1 being InsType of (SCM S) st b1 = InsCode (SubFrom (p,q)) holds
not b1 is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster SubFrom (p,q) -> non jump-only ;
coherence
not SubFrom (p,q) is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster (MultBy (p,q)) `1_3 -> non jump-only InsType of (SCM S);
coherence
for b1 being InsType of (SCM S) st b1 = InsCode (MultBy (p,q)) holds
not b1 is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p, q be Data-Location of S;
cluster MultBy (p,q) -> non jump-only ;
coherence
not MultBy (p,q) is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p be Data-Location of S;
let w be Element of S;
cluster (p := w) `1_3 -> non jump-only InsType of (SCM S);
coherence
for b1 being InsType of (SCM S) st b1 = InsCode (p := w) holds
not b1 is jump-only
proof end;
end;

registration
let S be non trivial good Ring;
let p be Data-Location of S;
let w be Element of S;
cluster p := w -> non jump-only ;
coherence
not p := w is jump-only
proof end;
end;

registration
let R be good Ring;
let i1 be Element of NAT ;
cluster goto (i1,R) -> non sequential ;
coherence
not goto (i1,R) is sequential
proof end;
end;

registration
let R be good Ring;
let a be Data-Location of R;
let i1 be Element of NAT ;
cluster a =0_goto i1 -> non sequential ;
coherence
not a =0_goto i1 is sequential
proof end;
end;

registration
let R be good Ring;
let i1 be Element of NAT ;
cluster goto (i1,R) -> non ins-loc-free ;
coherence
not goto (i1,R) is ins-loc-free
proof end;
end;

registration
let R be good Ring;
let a be Data-Location of R;
let i1 be Element of NAT ;
cluster a =0_goto i1 -> non ins-loc-free ;
coherence
not a =0_goto i1 is ins-loc-free
proof end;
end;

registration
let R be good Ring;
cluster SCM R -> homogeneous with_explicit_jumps ;
coherence
( SCM R is homogeneous & SCM R is with_explicit_jumps )
proof end;
end;

registration
let R be good Ring;
cluster SCM R -> regular ;
coherence
SCM R is regular
proof end;
end;

registration
let R be good Ring;
cluster SCM R -> J/A-independent ;
coherence
SCM R is J/A-independent
proof end;
end;

theorem Th69: :: SCMRING3:69
for R being good Ring
for i1 being Element of NAT
for k being natural number holds IncAddr ((goto (i1,R)),k) = goto ((i1 + k),R)
proof end;

theorem Th70: :: SCMRING3:70
for R being good Ring
for a being Data-Location of R
for i1 being Element of NAT
for k being natural number holds IncAddr ((a =0_goto i1),k) = a =0_goto (i1 + k)
proof end;

registration
let R be good Ring;
cluster SCM R -> IC-relocable Exec-preserving ;
coherence
( SCM R is IC-relocable & SCM R is Exec-preserving )
proof end;
end;

theorem :: SCMRING3:71
for R being good Ring
for I being Instruction of (SCM R) holds InsCode I <= 7
proof end;