:: AMI_3 semantic presentation  Show TPTP formulae Show IDV graph for whole article:: Showing IDV graph ... (Click the Palm Trees again to close it)

definition
func SCM -> strict AMI-Struct of {INT } equals :: AMI_3:def 1
AMI-Struct(# NAT ,0,SCM-Instr-Loc ,(Segm 9),SCM-Instr ,SCM-OK ,SCM-Exec #);
coherence
AMI-Struct(# NAT ,0,SCM-Instr-Loc ,(Segm 9),SCM-Instr ,SCM-OK ,SCM-Exec #) is strict AMI-Struct of {INT }
;
end;

:: deftheorem defines SCM AMI_3:def 1 :
SCM = AMI-Struct(# NAT ,0,SCM-Instr-Loc ,(Segm 9),SCM-Instr ,SCM-OK ,SCM-Exec #);

registration
cluster SCM -> non empty strict non void ;
coherence
( not SCM is empty & not SCM is void )
by AMI_1:def 3, STRUCT_0:def 1;
end;

theorem Th1: :: AMI_3:1  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
SCM is data-oriented
proof end;

theorem Th2: :: AMI_3:2  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
SCM is definite
proof end;

registration
cluster SCM -> non empty strict non void IC-Ins-separated data-oriented definite ;
coherence
( SCM is IC-Ins-separated & SCM is data-oriented & SCM is definite )
proof end;
end;

definition
mode Data-Location -> Object of SCM means :Def2: :: AMI_3:def 2
it in SCM-Data-Loc ;
existence
ex b1 being Object of SCM st b1 in SCM-Data-Loc
proof end;
end;

:: deftheorem Def2 defines Data-Location AMI_3:def 2 :
for b1 being Object of SCM holds
( b1 is Data-Location iff b1 in SCM-Data-Loc );

definition
let s be State of SCM ;
let d be Data-Location ;
:: original: .
redefine func s . d -> Integer;
coherence
s . d is Integer
proof end;
end;

definition
let a, b be Data-Location ;
func a := b -> Instruction of SCM equals :: AMI_3:def 3
[1,<*a,b*>];
correctness
coherence
[1,<*a,b*>] is Instruction of SCM
;
proof end;
func AddTo a,b -> Instruction of SCM equals :: AMI_3:def 4
[2,<*a,b*>];
correctness
coherence
[2,<*a,b*>] is Instruction of SCM
;
proof end;
func SubFrom a,b -> Instruction of SCM equals :: AMI_3:def 5
[3,<*a,b*>];
correctness
coherence
[3,<*a,b*>] is Instruction of SCM
;
proof end;
func MultBy a,b -> Instruction of SCM equals :: AMI_3:def 6
[4,<*a,b*>];
correctness
coherence
[4,<*a,b*>] is Instruction of SCM
;
proof end;
func Divide a,b -> Instruction of SCM equals :: AMI_3:def 7
[5,<*a,b*>];
correctness
coherence
[5,<*a,b*>] is Instruction of SCM
;
proof end;
end;

:: deftheorem defines := AMI_3:def 3 :
for a, b being Data-Location holds a := b = [1,<*a,b*>];

:: deftheorem defines AddTo AMI_3:def 4 :
for a, b being Data-Location holds AddTo a,b = [2,<*a,b*>];

:: deftheorem defines SubFrom AMI_3:def 5 :
for a, b being Data-Location holds SubFrom a,b = [3,<*a,b*>];

:: deftheorem defines MultBy AMI_3:def 6 :
for a, b being Data-Location holds MultBy a,b = [4,<*a,b*>];

:: deftheorem defines Divide AMI_3:def 7 :
for a, b being Data-Location holds Divide a,b = [5,<*a,b*>];

definition
let loc be Instruction-Location of SCM ;
func goto loc -> Instruction of SCM equals :: AMI_3:def 8
[6,<*loc*>];
correctness
coherence
[6,<*loc*>] is Instruction of SCM
;
by AMI_2:3;
let a be Data-Location ;
func a =0_goto loc -> Instruction of SCM equals :: AMI_3:def 9
[7,<*loc,a*>];
correctness
coherence
[7,<*loc,a*>] is Instruction of SCM
;
proof end;
func a >0_goto loc -> Instruction of SCM equals :: AMI_3:def 10
[8,<*loc,a*>];
correctness
coherence
[8,<*loc,a*>] is Instruction of SCM
;
proof end;
end;

:: deftheorem defines goto AMI_3:def 8 :
for loc being Instruction-Location of SCM holds goto loc = [6,<*loc*>];

:: deftheorem defines =0_goto AMI_3:def 9 :
for loc being Instruction-Location of SCM
for a being Data-Location holds a =0_goto loc = [7,<*loc,a*>];

:: deftheorem defines >0_goto AMI_3:def 10 :
for loc being Instruction-Location of SCM
for a being Data-Location holds a >0_goto loc = [8,<*loc,a*>];

theorem :: AMI_3:3  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: AMI_3:4  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
IC SCM = 0 ;

theorem Th5: :: AMI_3:5  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for s being State of SCM
for S being SCM-State st S = s holds
IC s = IC S by AMI_2:def 6;

definition
let loc be Instruction-Location of SCM ;
func Next loc -> Instruction-Location of SCM means :Def11: :: AMI_3:def 11
ex mj being Element of SCM-Instr-Loc st
( mj = loc & it = Next mj );
existence
ex b1 being Instruction-Location of SCM ex mj being Element of SCM-Instr-Loc st
( mj = loc & b1 = Next mj )
proof end;
correctness
uniqueness
for b1, b2 being Instruction-Location of SCM st ex mj being Element of SCM-Instr-Loc st
( mj = loc & b1 = Next mj ) & ex mj being Element of SCM-Instr-Loc st
( mj = loc & b2 = Next mj ) holds
b1 = b2
;
;
end;

:: deftheorem Def11 defines Next AMI_3:def 11 :
for loc, b2 being Instruction-Location of SCM holds
( b2 = Next loc iff ex mj being Element of SCM-Instr-Loc st
( mj = loc & b2 = Next mj ) );

theorem Th6: :: AMI_3:6  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for loc being Instruction-Location of SCM
for mj being Element of SCM-Instr-Loc st mj = loc holds
Next mj = Next loc by Def11;

theorem Th7: :: AMI_3:7  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I being Instruction of SCM
for s being State of SCM
for i being Element of SCM-Instr st i = I holds
for S being SCM-State st S = s holds
Exec I,s = SCM-Exec-Res i,S by AMI_2:def 17;

theorem Th8: :: AMI_3:8  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location
for s being State of SCM holds
( (Exec (a := b),s) . (IC SCM ) = Next (IC s) & (Exec (a := b),s) . a = s . b & ( for c being Data-Location st c <> a holds
(Exec (a := b),s) . c = s . c ) )
proof end;

theorem Th9: :: AMI_3:9  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location
for s being State of SCM holds
( (Exec (AddTo a,b),s) . (IC SCM ) = Next (IC s) & (Exec (AddTo a,b),s) . a = (s . a) + (s . b) & ( for c being Data-Location st c <> a holds
(Exec (AddTo a,b),s) . c = s . c ) )
proof end;

theorem Th10: :: AMI_3:10  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location
for s being State of SCM holds
( (Exec (SubFrom a,b),s) . (IC SCM ) = Next (IC s) & (Exec (SubFrom a,b),s) . a = (s . a) - (s . b) & ( for c being Data-Location st c <> a holds
(Exec (SubFrom a,b),s) . c = s . c ) )
proof end;

theorem Th11: :: AMI_3:11  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location
for s being State of SCM holds
( (Exec (MultBy a,b),s) . (IC SCM ) = Next (IC s) & (Exec (MultBy a,b),s) . a = (s . a) * (s . b) & ( for c being Data-Location st c <> a holds
(Exec (MultBy a,b),s) . c = s . c ) )
proof end;

theorem Th12: :: AMI_3:12  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location
for s being State of SCM holds
( (Exec (Divide a,b),s) . (IC SCM ) = Next (IC s) & ( a <> b implies (Exec (Divide a,b),s) . a = (s . a) div (s . b) ) & (Exec (Divide a,b),s) . b = (s . a) mod (s . b) & ( for c being Data-Location st c <> a & c <> b holds
(Exec (Divide a,b),s) . c = s . c ) )
proof end;

theorem :: AMI_3:13  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for c being Data-Location
for loc being Instruction-Location of SCM
for s being State of SCM holds
( (Exec (goto loc),s) . (IC SCM ) = loc & (Exec (goto loc),s) . c = s . c )
proof end;

theorem Th14: :: AMI_3:14  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, c being Data-Location
for loc being Instruction-Location of SCM
for s being State of SCM holds
( ( s . a = 0 implies (Exec (a =0_goto loc),s) . (IC SCM ) = loc ) & ( s . a <> 0 implies (Exec (a =0_goto loc),s) . (IC SCM ) = Next (IC s) ) & (Exec (a =0_goto loc),s) . c = s . c )
proof end;

theorem Th15: :: AMI_3:15  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, c being Data-Location
for loc being Instruction-Location of SCM
for s being State of SCM holds
( ( s . a > 0 implies (Exec (a >0_goto loc),s) . (IC SCM ) = loc ) & ( s . a <= 0 implies (Exec (a >0_goto loc),s) . (IC SCM ) = Next (IC s) ) & (Exec (a >0_goto loc),s) . c = s . c )
proof end;

Lm1: for I being Instruction of SCM st ex s being State of SCM st (Exec I,s) . (IC SCM ) = Next (IC s) holds
not I is halting
proof end;

Lm2: for I being Instruction of SCM st I = [0,{} ] holds
I is halting
proof end;

Lm3: for a, b being Data-Location holds not a := b is halting
proof end;

Lm4: for a, b being Data-Location holds not AddTo a,b is halting
proof end;

Lm5: for a, b being Data-Location holds not SubFrom a,b is halting
proof end;

Lm6: for a, b being Data-Location holds not MultBy a,b is halting
proof end;

Lm7: for a, b being Data-Location holds not Divide a,b is halting
proof end;

Lm8: for loc being Instruction-Location of SCM holds not goto loc is halting
proof end;

Lm9: for a being Data-Location
for loc being Instruction-Location of SCM holds not a =0_goto loc is halting
proof end;

Lm10: for a being Data-Location
for loc being Instruction-Location of SCM holds not a >0_goto loc is halting
proof end;

Lm11: for I being set holds
( I is Instruction of SCM iff ( I = [0,{} ] or ex a, b being Data-Location st I = a := b or ex a, b being Data-Location st I = AddTo a,b or ex a, b being Data-Location st I = SubFrom a,b or ex a, b being Data-Location st I = MultBy a,b or ex a, b being Data-Location st I = Divide a,b or ex loc being Instruction-Location of SCM st I = goto loc or ex a being Data-Location ex loc being Instruction-Location of SCM st I = a =0_goto loc or ex a being Data-Location ex loc being Instruction-Location of SCM st I = a >0_goto loc ) )
proof end;

registration
cluster SCM -> non empty strict non void halting IC-Ins-separated data-oriented definite ;
coherence
SCM is halting
proof end;
end;

Lm12: for I being Instruction of SCM st I is halting holds
I = halt SCM
proof end;

Lm13: halt SCM = [0,{} ]
proof end;

theorem :: AMI_3:16  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: AMI_3:17  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem Th18: :: AMI_3:18  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for m, j being Integer holds m * j,0 are_congruent_mod m
proof end;

scheme :: AMI_3:sch 1
INDI{ F1() -> Nat, F2() -> Nat, P1[ set ] } :
P1[F2()]
provided
A1: P1[0] and
A2: F1() > 0 and
A3: for i, j being Nat st P1[F1() * i] & j <> 0 & j <= F1() holds
P1[(F1() * i) + j]
proof end;

theorem Th19: :: AMI_3:19  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for X, Y being non empty set
for f, g being PartFunc of X,Y st ( for x being Element of X
for y being Element of Y holds
( [x,y] in f iff [x,y] in g ) ) holds
f = g
proof end;

Lm14: for f, g being Function
for A, B being set st f | A = g | A & f | B = g | B holds
f | (A \/ B) = g | (A \/ B)
by RELAT_1:185;

Lm15: for f being Function
for x being set st x in dom f holds
f | {x} = {[x,(f . x)]}
by GRFUNC_1:89;

Lm16: for f being Function
for X being set st X misses dom f holds
f | X = {}
by RELAT_1:95;

theorem :: AMI_3:20  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: AMI_3:21  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: AMI_3:22  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: AMI_3:23  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem Th24: :: AMI_3:24  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g being Function
for x being set st dom f = dom g & f . x = g . x holds
f | {x} = g | {x}
proof end;

theorem Th25: :: AMI_3:25  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g being Function
for x, y being set st dom f = dom g & f . x = g . x & f . y = g . y holds
f | {x,y} = g | {x,y}
proof end;

theorem :: AMI_3:26  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for f, g being Function
for x, y, z being set st dom f = dom g & f . x = g . x & f . y = g . y & f . z = g . z holds
f | {x,y,z} = g | {x,y,z}
proof end;

theorem Th27: :: AMI_3:27  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being set
for f being Function st a in dom f & f . a = b holds
a .--> b c= f
proof end;

theorem :: AMI_3:28  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem :: AMI_3:29  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b, c, d being set
for f being Function st a in dom f & c in dom f & f . a = b & f . c = d holds
a,c --> b,d c= f
proof end;

theorem :: AMI_3:30  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
canceled;

theorem Th31: :: AMI_3:31  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being set
for S being AMI-Struct of N
for p being FinPartState of S holds p in FinPartSt S
proof end;

registration
let N be set ;
let S be AMI-Struct of N;
cluster FinPartSt S -> non empty ;
coherence
not FinPartSt S is empty
by Th31;
end;

theorem Th32: :: AMI_3:32  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being set
for S being AMI-Struct of N
for p being Element of FinPartSt S holds p is FinPartState of S
proof end;

theorem Th33: :: AMI_3:33  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being set
for S being AMI-Struct of N
for F1, F2 being PartFunc of FinPartSt S, FinPartSt S st ( for p, q being FinPartState of S holds
( [p,q] in F1 iff [p,q] in F2 ) ) holds
F1 = F2
proof end;

scheme :: AMI_3:sch 2
EqFPSFunc{ F1() -> non empty with_non-empty_elements set , F2() -> AMI-Struct of F1(), P1[ set , set ], F3() -> PartFunc of FinPartSt F2(), FinPartSt F2(), F4() -> PartFunc of FinPartSt F2(), FinPartSt F2() } :
F3() = F4()
provided
A1: for p, q being FinPartState of F2() holds
( [p,q] in F3() iff P1[p,q] ) and
A2: for p, q being FinPartState of F2() holds
( [p,q] in F4() iff P1[p,q] )
proof end;

definition
let N be with_non-empty_elements set ;
let S be non empty non void IC-Ins-separated definite AMI-Struct of N;
let l be Instruction-Location of S;
func Start-At l -> FinPartState of S equals :: AMI_3:def 12
(IC S) .--> l;
correctness
coherence
(IC S) .--> l is FinPartState of S
;
proof end;
end;

:: deftheorem defines Start-At AMI_3:def 12 :
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated definite AMI-Struct of N
for l being Instruction-Location of S holds Start-At l = (IC S) .--> l;

theorem :: AMI_3:34  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated definite AMI-Struct of N
for l being Instruction-Location of S holds dom (Start-At l) = {(IC S)}
proof end;

definition
let N be set ;
let S be AMI-Struct of N;
let IT be FinPartState of S;
attr IT is programmed means :Def13: :: AMI_3:def 13
dom IT c= the Instruction-Locations of S;
end;

:: deftheorem Def13 defines programmed AMI_3:def 13 :
for N being set
for S being AMI-Struct of N
for IT being FinPartState of S holds
( IT is programmed iff dom IT c= the Instruction-Locations of S );

registration
let N be set ;
let S be AMI-Struct of N;
cluster programmed FinPartState of S;
existence
ex b1 being FinPartState of S st b1 is programmed
proof end;
end;

theorem :: AMI_3:35  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being set
for S being AMI-Struct of N
for p1, p2 being programmed FinPartState of S holds p1 +* p2 is programmed
proof end;

theorem Th36: :: AMI_3:36  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non void AMI-Struct of N
for s being State of S holds dom s = the carrier of S
proof end;

theorem Th37: :: AMI_3:37  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being AMI-Struct of N
for p being FinPartState of S holds dom p c= the carrier of S
proof end;

theorem :: AMI_3:38  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated steady-programmed definite AMI-Struct of N
for p being programmed FinPartState of S
for s being State of S st p c= s holds
for k being Nat holds p c= (Computation s) . k
proof end;

definition
let N be with_non-empty_elements set ;
let S be non empty non void IC-Ins-separated AMI-Struct of N;
let s be State of S;
let l be Instruction-Location of S;
pred s starts_at l means :: AMI_3:def 14
IC s = l;
end;

:: deftheorem defines starts_at AMI_3:def 14 :
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated AMI-Struct of N
for s being State of S
for l being Instruction-Location of S holds
( s starts_at l iff IC s = l );

definition
let N be with_non-empty_elements set ;
let S be non empty non void halting IC-Ins-separated AMI-Struct of N;
let s be State of S;
let l be Instruction-Location of S;
pred s halts_at l means :Def15: :: AMI_3:def 15
s . l = halt S;
end;

:: deftheorem Def15 defines halts_at AMI_3:def 15 :
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated AMI-Struct of N
for s being State of S
for l being Instruction-Location of S holds
( s halts_at l iff s . l = halt S );

theorem Th39: :: AMI_3:39  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non void AMI-Struct of N
for p being FinPartState of S ex s being State of S st p c= s
proof end;

definition
let N be with_non-empty_elements set ;
let S be non empty non void IC-Ins-separated definite AMI-Struct of N;
let p be FinPartState of S;
assume A1: IC S in dom p ;
func IC p -> Instruction-Location of S equals :Def16: :: AMI_3:def 16
p . (IC S);
coherence
p . (IC S) is Instruction-Location of S
proof end;
end;

:: deftheorem Def16 defines IC AMI_3:def 16 :
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated definite AMI-Struct of N
for p being FinPartState of S st IC S in dom p holds
IC p = p . (IC S);

definition
let N be with_non-empty_elements set ;
let S be non empty non void IC-Ins-separated definite AMI-Struct of N;
let p be FinPartState of S;
let l be Instruction-Location of S;
pred p starts_at l means :: AMI_3:def 17
( IC S in dom p & IC p = l );
end;

:: deftheorem defines starts_at AMI_3:def 17 :
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated definite AMI-Struct of N
for p being FinPartState of S
for l being Instruction-Location of S holds
( p starts_at l iff ( IC S in dom p & IC p = l ) );

definition
let N be with_non-empty_elements set ;
let S be non empty non void halting IC-Ins-separated definite AMI-Struct of N;
let p be FinPartState of S;
let l be Instruction-Location of S;
pred p halts_at l means :: AMI_3:def 18
( l in dom p & p . l = halt S );
end;

:: deftheorem defines halts_at AMI_3:def 18 :
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated definite AMI-Struct of N
for p being FinPartState of S
for l being Instruction-Location of S holds
( p halts_at l iff ( l in dom p & p . l = halt S ) );

theorem Th40: :: AMI_3:40  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S holds
( s is halting iff ex k being Nat st s halts_at IC ((Computation s) . k) )
proof end;

theorem :: AMI_3:41  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S
for p being FinPartState of S
for l being Instruction-Location of S st p c= s & p halts_at l holds
s halts_at l
proof end;

theorem Th42: :: AMI_3:42  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S
for k being Nat st s is halting holds
( Result s = (Computation s) . k iff s halts_at IC ((Computation s) . k) )
proof end;

theorem :: AMI_3:43  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S
for p being programmed FinPartState of S
for k being Nat holds
( p c= s iff p c= (Computation s) . k )
proof end;

theorem Th44: :: AMI_3:44  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S
for k being Nat st s halts_at IC ((Computation s) . k) holds
Result s = (Computation s) . k
proof end;

theorem Th45: :: AMI_3:45  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i, j being Nat
for N being with_non-empty_elements set st i <= j holds
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S st s halts_at IC ((Computation s) . i) holds
s halts_at IC ((Computation s) . j)
proof end;

theorem :: AMI_3:46  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i, j being Nat
for N being with_non-empty_elements set st i <= j holds
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S st s halts_at IC ((Computation s) . i) holds
(Computation s) . j = (Computation s) . i
proof end;

theorem :: AMI_3:47  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S st ex k being Nat st s halts_at IC ((Computation s) . k) holds
for i being Nat holds Result s = Result ((Computation s) . i)
proof end;

theorem :: AMI_3:48  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of N
for s being State of S
for l being Instruction-Location of S
for k being Nat holds
( s halts_at l iff (Computation s) . k halts_at l )
proof end;

theorem :: AMI_3:49  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated definite AMI-Struct of N
for p being FinPartState of S
for l being Instruction-Location of S st p starts_at l holds
for s being State of S st p c= s holds
s starts_at l
proof end;

theorem :: AMI_3:50  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for N being with_non-empty_elements set
for S being non empty non void IC-Ins-separated definite AMI-Struct of N
for l being Instruction-Location of S holds (Start-At l) . (IC S) = l by CQC_LANG:6;

definition
let N be with_non-empty_elements set ;
let S be non empty non void IC-Ins-separated definite AMI-Struct of N;
let l be Instruction-Location of S;
let I be Element of the Instructions of S;
:: original: .-->
redefine func l .--> I -> programmed FinPartState of S;
coherence
l .--> I is programmed FinPartState of S
proof end;
end;

Lm17: for s being State of SCM
for i being Instruction of SCM
for l being Instruction-Location of SCM holds (Exec i,s) . l = s . l
proof end;

theorem :: AMI_3:51  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
SCM is realistic by AMI_1:def 21, AMI_2:6;

registration
cluster SCM -> non empty strict non void halting IC-Ins-separated data-oriented steady-programmed definite realistic ;
coherence
( SCM is steady-programmed & SCM is realistic )
proof end;
end;

definition
let k be natural number ;
func dl. k -> Data-Location equals :: AMI_3:def 19
(2 * k) + 1;
coherence
(2 * k) + 1 is Data-Location
proof end;
func il. k -> Instruction-Location of SCM equals :: AMI_3:def 20
(2 * k) + 2;
coherence
(2 * k) + 2 is Instruction-Location of SCM
proof end;
end;

:: deftheorem defines dl. AMI_3:def 19 :
for k being natural number holds dl. k = (2 * k) + 1;

:: deftheorem defines il. AMI_3:def 20 :
for k being natural number holds il. k = (2 * k) + 2;

theorem :: AMI_3:52  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i, j being natural number st i <> j holds
dl. i <> dl. j
proof end;

theorem :: AMI_3:53  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i, j being natural number st i <> j holds
il. i <> il. j
proof end;

theorem :: AMI_3:54  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for k being natural number holds Next (il. k) = il. (k + 1)
proof end;

theorem Th55: :: AMI_3:55  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for l being Data-Location holds ObjectKind l = INT
proof end;

definition
let la be Data-Location ;
let a be Integer;
:: original: .-->
redefine func la .--> a -> FinPartState of SCM ;
coherence
la .--> a is FinPartState of SCM
proof end;
end;

definition
let la, lb be Data-Location ;
let a, b be Integer;
:: original: -->
redefine func la,lb --> a,b -> FinPartState of SCM ;
coherence
la,lb --> a,b is FinPartState of SCM
proof end;
end;

theorem :: AMI_3:56  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i, j being natural number holds dl. i <> il. j
proof end;

theorem :: AMI_3:57  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for i being natural number holds
( IC SCM <> dl. i & IC SCM <> il. i ) ;

theorem :: AMI_3:58  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I being Instruction of SCM st ex s being State of SCM st (Exec I,s) . (IC SCM ) = Next (IC s) holds
not I is halting by Lm1;

theorem :: AMI_3:59  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I being Instruction of SCM st I = [0,{} ] holds
I is halting by Lm2;

theorem :: AMI_3:60  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location holds not a := b is halting by Lm3;

theorem :: AMI_3:61  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location holds not AddTo a,b is halting by Lm4;

theorem :: AMI_3:62  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location holds not SubFrom a,b is halting by Lm5;

theorem :: AMI_3:63  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location holds not MultBy a,b is halting by Lm6;

theorem :: AMI_3:64  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a, b being Data-Location holds not Divide a,b is halting by Lm7;

theorem :: AMI_3:65  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for loc being Instruction-Location of SCM holds not goto loc is halting by Lm8;

theorem :: AMI_3:66  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a being Data-Location
for loc being Instruction-Location of SCM holds not a =0_goto loc is halting by Lm9;

theorem :: AMI_3:67  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for a being Data-Location
for loc being Instruction-Location of SCM holds not a >0_goto loc is halting by Lm10;

theorem :: AMI_3:68  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
[0,{} ] is Instruction of SCM by AMI_2:2;

theorem :: AMI_3:69  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I being set holds
( I is Instruction of SCM iff ( I = [0,{} ] or ex a, b being Data-Location st I = a := b or ex a, b being Data-Location st I = AddTo a,b or ex a, b being Data-Location st I = SubFrom a,b or ex a, b being Data-Location st I = MultBy a,b or ex a, b being Data-Location st I = Divide a,b or ex loc being Instruction-Location of SCM st I = goto loc or ex a being Data-Location ex loc being Instruction-Location of SCM st I = a =0_goto loc or ex a being Data-Location ex loc being Instruction-Location of SCM st I = a >0_goto loc ) ) by Lm11;

theorem :: AMI_3:70  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
for I being Instruction of SCM st I is halting holds
I = halt SCM by Lm12;

theorem :: AMI_3:71  Show TPTP formulae Show IDV graph:: Showing IDV graph ... (Click the Palm Tree again to close it) Show TPTP problem
halt SCM = [0,{} ] by Lm13;