:: AMI_1 semantic presentation

theorem Th1: :: AMI_1:1
canceled;

theorem Th2: :: AMI_1:2
for b1, b2 being set holds 1 <> [b1,b2] by ZFMISC_1:8, CARD_5:1;

theorem Th3: :: AMI_1:3
for b1, b2 being set holds 2 <> [b1,b2] by ZFMISC_1:10, CARD_5:1;

theorem Th4: :: AMI_1:4
canceled;

theorem Th5: :: AMI_1:5
for b1, b2, b3, b4 being set st b1 <> b2 holds
product (b1,b2 --> {b3},{b4}) = {(b1,b2 --> b3,b4)}
proof end;

definition
let c1 be set ;
attr a2 is strict;
struct AMI-Struct of c1 -> 1-sorted ;
aggr AMI-Struct(# carrier, Instruction-Counter, Instruction-Locations, Instruction-Codes, Instructions, Object-Kind, Execution #) -> AMI-Struct of a1;
sel Instruction-Counter c2 -> Element of the carrier of a2;
sel Instruction-Locations c2 -> Subset of the carrier of a2;
sel Instruction-Codes c2 -> non empty set ;
sel Instructions c2 -> non empty Subset of [:the Instruction-Codes of a2,(((union a1) \/ the carrier of a2) * ):];
sel Object-Kind c2 -> Function of the carrier of a2,a1 \/ {the Instructions of a2,the Instruction-Locations of a2};
sel Execution c2 -> Function of the Instructions of a2, Funcs (product the Object-Kind of a2),(product the Object-Kind of a2);
end;

definition
let c1 be set ;
canceled;
func Trivial-AMI c1 -> strict AMI-Struct of a1 means :Def2: :: AMI_1:def 2
( the carrier of a2 = {0,1} & the Instruction-Counter of a2 = 0 & the Instruction-Locations of a2 = {1} & the Instruction-Codes of a2 = {0} & the Instructions of a2 = {[0,{} ]} & the Object-Kind of a2 = 0,1 --> {1},{[0,{} ]} & the Execution of a2 = [0,{} ] .--> (id (product (0,1 --> {1},{[0,{} ]}))) );
existence
ex b1 being strict AMI-Struct of c1 st
( the carrier of b1 = {0,1} & the Instruction-Counter of b1 = 0 & the Instruction-Locations of b1 = {1} & the Instruction-Codes of b1 = {0} & the Instructions of b1 = {[0,{} ]} & the Object-Kind of b1 = 0,1 --> {1},{[0,{} ]} & the Execution of b1 = [0,{} ] .--> (id (product (0,1 --> {1},{[0,{} ]}))) )
proof end;
uniqueness
for b1, b2 being strict AMI-Struct of c1 st the carrier of b1 = {0,1} & the Instruction-Counter of b1 = 0 & the Instruction-Locations of b1 = {1} & the Instruction-Codes of b1 = {0} & the Instructions of b1 = {[0,{} ]} & the Object-Kind of b1 = 0,1 --> {1},{[0,{} ]} & the Execution of b1 = [0,{} ] .--> (id (product (0,1 --> {1},{[0,{} ]}))) & the carrier of b2 = {0,1} & the Instruction-Counter of b2 = 0 & the Instruction-Locations of b2 = {1} & the Instruction-Codes of b2 = {0} & the Instructions of b2 = {[0,{} ]} & the Object-Kind of b2 = 0,1 --> {1},{[0,{} ]} & the Execution of b2 = [0,{} ] .--> (id (product (0,1 --> {1},{[0,{} ]}))) holds
b1 = b2
;
end;

:: deftheorem Def1 AMI_1:def 1 :
canceled;

:: deftheorem Def2 defines Trivial-AMI AMI_1:def 2 :
for b1 being set
for b2 being strict AMI-Struct of b1 holds
( b2 = Trivial-AMI b1 iff ( the carrier of b2 = {0,1} & the Instruction-Counter of b2 = 0 & the Instruction-Locations of b2 = {1} & the Instruction-Codes of b2 = {0} & the Instructions of b2 = {[0,{} ]} & the Object-Kind of b2 = 0,1 --> {1},{[0,{} ]} & the Execution of b2 = [0,{} ] .--> (id (product (0,1 --> {1},{[0,{} ]}))) ) );

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
attr a2 is void means :Def3: :: AMI_1:def 3
the Instruction-Locations of a2 is empty;
end;

:: deftheorem Def3 defines void AMI_1:def 3 :
for b1 being set
for b2 being AMI-Struct of b1 holds
( b2 is void iff the Instruction-Locations of b2 is empty );

registration
let c1 be set ;
cluster Trivial-AMI a1 -> non empty strict non void ;
coherence
( not Trivial-AMI c1 is empty & not Trivial-AMI c1 is void )
proof end;
end;

registration
let c1 be set ;
cluster non empty non void AMI-Struct of a1;
existence
ex b1 being AMI-Struct of c1 st
( not b1 is empty & not b1 is void )
proof end;
end;

registration
let c1 be set ;
let c2 be non void AMI-Struct of c1;
cluster the Instruction-Locations of a2 -> non empty ;
coherence
not the Instruction-Locations of c2 is empty
by Def3;
end;

definition
let c1 be set ;
let c2 be non empty AMI-Struct of c1;
mode Object of a2 is Element of a2;
end;

definition
let c1 be set ;
let c2 be non empty non void AMI-Struct of c1;
mode Instruction-Location of a2 is Element of the Instruction-Locations of a2;
end;

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
mode Instruction of a2 is Element of the Instructions of a2;
end;

definition
let c1 be set ;
let c2 be non empty AMI-Struct of c1;
canceled;
func IC c2 -> Object of a2 equals :: AMI_1:def 5
the Instruction-Counter of a2;
correctness
coherence
the Instruction-Counter of c2 is Object of c2
;
;
end;

:: deftheorem Def4 AMI_1:def 4 :
canceled;

:: deftheorem Def5 defines IC AMI_1:def 5 :
for b1 being set
for b2 being non empty AMI-Struct of b1 holds IC b2 = the Instruction-Counter of b2;

definition
let c1 be set ;
let c2 be non empty AMI-Struct of c1;
let c3 be Object of c2;
func ObjectKind c3 -> Element of a1 \/ {the Instructions of a2,the Instruction-Locations of a2} equals :: AMI_1:def 6
the Object-Kind of a2 . a3;
correctness
coherence
the Object-Kind of c2 . c3 is Element of c1 \/ {the Instructions of c2,the Instruction-Locations of c2}
;
;
end;

:: deftheorem Def6 defines ObjectKind AMI_1:def 6 :
for b1 being set
for b2 being non empty AMI-Struct of b1
for b3 being Object of b2 holds ObjectKind b3 = the Object-Kind of b2 . b3;

registration
let c1 be Function;
cluster product a1 -> functional ;
coherence
product c1 is functional
proof end;
end;

registration
let c1 be set ;
let c2 be with_non-empty_elements set ;
let c3 be Function of c1,c2;
cluster product a3 -> non empty functional ;
coherence
not product c3 is empty
proof end;
end;

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
mode State of a2 is Element of product the Object-Kind of a2;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non void AMI-Struct of c1;
let c3 be Instruction of c2;
let c4 be State of c2;
func Exec c3,c4 -> State of a2 equals :: AMI_1:def 7
(the Execution of a2 . a3) . a4;
coherence
(the Execution of c2 . c3) . c4 is State of c2
proof end;
end;

:: deftheorem Def7 defines Exec AMI_1:def 7 :
for b1 being with_non-empty_elements set
for b2 being non void AMI-Struct of b1
for b3 being Instruction of b2
for b4 being State of b2 holds Exec b3,b4 = (the Execution of b2 . b3) . b4;

definition
let c1 be with_non-empty_elements set ;
let c2 be non void AMI-Struct of c1;
let c3 be Instruction of c2;
attr a3 is halting means :Def8: :: AMI_1:def 8
for b1 being State of a2 holds Exec a3,b1 = b1;
end;

:: deftheorem Def8 defines halting AMI_1:def 8 :
for b1 being with_non-empty_elements set
for b2 being non void AMI-Struct of b1
for b3 being Instruction of b2 holds
( b3 is halting iff for b4 being State of b2 holds Exec b3,b4 = b4 );

definition
let c1 be with_non-empty_elements set ;
let c2 be non void AMI-Struct of c1;
attr a2 is halting means :Def9: :: AMI_1:def 9
ex b1 being Instruction of a2 st
( b1 is halting & ( for b2 being Instruction of a2 st b2 is halting holds
b1 = b2 ) );
end;

:: deftheorem Def9 defines halting AMI_1:def 9 :
for b1 being with_non-empty_elements set
for b2 being non void AMI-Struct of b1 holds
( b2 is halting iff ex b3 being Instruction of b2 st
( b3 is halting & ( for b4 being Instruction of b2 st b4 is halting holds
b3 = b4 ) ) );

theorem Th6: :: AMI_1:6
for b1 being with_non-empty_elements set holds Trivial-AMI b1 is halting
proof end;

registration
let c1 be with_non-empty_elements set ;
cluster Trivial-AMI a1 -> non empty strict non void halting ;
coherence
Trivial-AMI c1 is halting
by Th6;
end;

registration
let c1 be with_non-empty_elements set ;
cluster non void halting AMI-Struct of a1;
existence
ex b1 being non void AMI-Struct of c1 st b1 is halting
proof end;
end;

registration
let c1 be with_non-empty_elements set ;
let c2 be non void halting AMI-Struct of c1;
cluster halting Element of the Instructions of a2;
existence
ex b1 being Instruction of c2 st b1 is halting
proof end;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non void halting AMI-Struct of c1;
func halt c2 -> Instruction of a2 means :Def10: :: AMI_1:def 10
a3 is halting Instruction of a2;
existence
ex b1 being Instruction of c2 st b1 is halting Instruction of c2
proof end;
uniqueness
for b1, b2 being Instruction of c2 st b1 is halting Instruction of c2 & b2 is halting Instruction of c2 holds
b1 = b2
proof end;
end;

:: deftheorem Def10 defines halt AMI_1:def 10 :
for b1 being with_non-empty_elements set
for b2 being non void halting AMI-Struct of b1
for b3 being Instruction of b2 holds
( b3 = halt b2 iff b3 is halting Instruction of b2 );

registration
let c1 be with_non-empty_elements set ;
let c2 be non void halting AMI-Struct of c1;
cluster halt a2 -> halting ;
coherence
halt c2 is halting
by Def10;
end;

definition
let c1 be set ;
let c2 be non empty AMI-Struct of c1;
attr a2 is IC-Ins-separated means :Def11: :: AMI_1:def 11
ObjectKind (IC a2) = the Instruction-Locations of a2;
end;

:: deftheorem Def11 defines IC-Ins-separated AMI_1:def 11 :
for b1 being set
for b2 being non empty AMI-Struct of b1 holds
( b2 is IC-Ins-separated iff ObjectKind (IC b2) = the Instruction-Locations of b2 );

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
attr a2 is data-oriented means :: AMI_1:def 12
the Object-Kind of a2 " {the Instructions of a2} c= the Instruction-Locations of a2;
end;

:: deftheorem Def12 defines data-oriented AMI_1:def 12 :
for b1 being set
for b2 being AMI-Struct of b1 holds
( b2 is data-oriented iff the Object-Kind of b2 " {the Instructions of b2} c= the Instruction-Locations of b2 );

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void AMI-Struct of c1;
attr a2 is steady-programmed means :Def13: :: AMI_1:def 13
for b1 being State of a2
for b2 being Instruction of a2
for b3 being Instruction-Location of a2 holds (Exec b2,b1) . b3 = b1 . b3;
end;

:: deftheorem Def13 defines steady-programmed AMI_1:def 13 :
for b1 being with_non-empty_elements set
for b2 being non empty non void AMI-Struct of b1 holds
( b2 is steady-programmed iff for b3 being State of b2
for b4 being Instruction of b2
for b5 being Instruction-Location of b2 holds (Exec b4,b3) . b5 = b3 . b5 );

definition
let c1 be set ;
let c2 be non empty non void AMI-Struct of c1;
attr a2 is definite means :Def14: :: AMI_1:def 14
for b1 being Instruction-Location of a2 holds ObjectKind b1 = the Instructions of a2;
end;

:: deftheorem Def14 defines definite AMI_1:def 14 :
for b1 being set
for b2 being non empty non void AMI-Struct of b1 holds
( b2 is definite iff for b3 being Instruction-Location of b2 holds ObjectKind b3 = the Instructions of b2 );

theorem Th7: :: AMI_1:7
for b1 being set holds Trivial-AMI b1 is IC-Ins-separated
proof end;

theorem Th8: :: AMI_1:8
for b1 being set holds Trivial-AMI b1 is data-oriented
proof end;

theorem Th9: :: AMI_1:9
for b1 being set
for b2, b3 being State of (Trivial-AMI b1) holds b2 = b3
proof end;

theorem Th10: :: AMI_1:10
for b1 being with_non-empty_elements set holds Trivial-AMI b1 is steady-programmed
proof end;

theorem Th11: :: AMI_1:11
for b1 being set holds Trivial-AMI b1 is definite
proof end;

registration
let c1 be set ;
cluster Trivial-AMI a1 -> non empty strict non void data-oriented ;
coherence
Trivial-AMI c1 is data-oriented
by Th8;
end;

registration
let c1 be set ;
cluster Trivial-AMI a1 -> non empty strict non void IC-Ins-separated data-oriented definite ;
coherence
( Trivial-AMI c1 is IC-Ins-separated & Trivial-AMI c1 is definite )
by Th7, Th11;
end;

registration
let c1 be with_non-empty_elements set ;
cluster Trivial-AMI a1 -> non empty strict non void halting IC-Ins-separated data-oriented steady-programmed definite ;
coherence
Trivial-AMI c1 is steady-programmed
by Th10;
end;

registration
let c1 be set ;
cluster strict data-oriented AMI-Struct of a1;
existence
ex b1 being AMI-Struct of c1 st
( b1 is data-oriented & b1 is strict )
proof end;
end;

registration
let c1 be set ;
cluster non empty strict non void IC-Ins-separated data-oriented definite AMI-Struct of a1;
existence
ex b1 being non empty non void AMI-Struct of c1 st
( b1 is IC-Ins-separated & b1 is data-oriented & b1 is definite & b1 is strict )
proof end;
end;

registration
let c1 be with_non-empty_elements set ;
cluster non empty strict non void halting IC-Ins-separated data-oriented steady-programmed definite AMI-Struct of a1;
existence
ex b1 being non empty non void AMI-Struct of c1 st
( b1 is IC-Ins-separated & b1 is data-oriented & b1 is halting & b1 is steady-programmed & b1 is definite & b1 is strict )
proof end;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated AMI-Struct of c1;
let c3 be State of c2;
func IC c3 -> Instruction-Location of a2 equals :: AMI_1:def 15
a3 . (IC a2);
coherence
c3 . (IC c2) is Instruction-Location of c2
proof end;
end;

:: deftheorem Def15 defines IC AMI_1:def 15 :
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated AMI-Struct of b1
for b3 being State of b2 holds IC b3 = b3 . (IC b2);

theorem Th12: :: AMI_1:12
canceled;

theorem Th13: :: AMI_1:13
canceled;

theorem Th14: :: AMI_1:14
for b1, b2, b3 being set
for b4, b5 being Function st b4 tolerates b5 & [b1,b2] in b4 & [b1,b3] in b5 holds
b2 = b3
proof end;

theorem Th15: :: AMI_1:15
for b1 being set st ( for b2 being set st b2 in b1 holds
b2 is Function ) & ( for b2, b3 being Function st b2 in b1 & b3 in b1 holds
b2 tolerates b3 ) holds
union b1 is Function
proof end;

theorem Th16: :: AMI_1:16
canceled;

theorem Th17: :: AMI_1:17
canceled;

theorem Th18: :: AMI_1:18
for b1, b2, b3, b4 being set holds b1,b2 --> b3,b4 = (b1 .--> b3) +* (b2 .--> b4) by FUNCT_4:def 4;

theorem Th19: :: AMI_1:19
for b1, b2 being set holds b1 .--> b2 = {[b1,b2]}
proof end;

theorem Th20: :: AMI_1:20
for b1, b2, b3 being set holds b1,b1 --> b2,b3 = b1 .--> b3
proof end;

theorem Th21: :: AMI_1:21
canceled;

theorem Th22: :: AMI_1:22
for b1 being set
for b2 being Function st b1 in product b2 holds
b1 is Function
proof end;

definition
let c1 be Function;
func sproduct c1 -> set means :Def16: :: AMI_1:def 16
for b1 being set holds
( b1 in a2 iff ex b2 being Function st
( b1 = b2 & dom b2 c= dom a1 & ( for b3 being set st b3 in dom b2 holds
b2 . b3 in a1 . b3 ) ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being Function st
( b2 = b3 & dom b3 c= dom c1 & ( for b4 being set st b4 in dom b3 holds
b3 . b4 in c1 . b4 ) ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being Function st
( b3 = b4 & dom b4 c= dom c1 & ( for b5 being set st b5 in dom b4 holds
b4 . b5 in c1 . b5 ) ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being Function st
( b3 = b4 & dom b4 c= dom c1 & ( for b5 being set st b5 in dom b4 holds
b4 . b5 in c1 . b5 ) ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def16 defines sproduct AMI_1:def 16 :
for b1 being Function
for b2 being set holds
( b2 = sproduct b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being Function st
( b3 = b4 & dom b4 c= dom b1 & ( for b5 being set st b5 in dom b4 holds
b4 . b5 in b1 . b5 ) ) ) );

registration
let c1 be Function;
cluster sproduct a1 -> non empty functional ;
coherence
( sproduct c1 is functional & not sproduct c1 is empty )
proof end;
end;

theorem Th23: :: AMI_1:23
canceled;

theorem Th24: :: AMI_1:24
canceled;

theorem Th25: :: AMI_1:25
for b1, b2 being Function st b1 in sproduct b2 holds
( dom b1 c= dom b2 & ( for b3 being set st b3 in dom b1 holds
b1 . b3 in b2 . b3 ) )
proof end;

theorem Th26: :: AMI_1:26
for b1 being Function holds {} in sproduct b1
proof end;

theorem Th27: :: AMI_1:27
for b1 being Function holds product b1 c= sproduct b1
proof end;

theorem Th28: :: AMI_1:28
for b1 being set
for b2 being Function st b1 in sproduct b2 holds
b1 is PartFunc of dom b2, union (rng b2)
proof end;

theorem Th29: :: AMI_1:29
for b1, b2, b3 being Function st b1 in product b2 & b3 in sproduct b2 holds
b1 +* b3 in product b2
proof end;

theorem Th30: :: AMI_1:30
for b1, b2 being Function st product b1 <> {} holds
( b2 in sproduct b1 iff ex b3 being Function st
( b3 in product b1 & b2 <= b3 ) )
proof end;

theorem Th31: :: AMI_1:31
for b1 being Function holds sproduct b1 c= PFuncs (dom b1),(union (rng b1))
proof end;

theorem Th32: :: AMI_1:32
for b1, b2 being Function st b1 c= b2 holds
sproduct b1 c= sproduct b2
proof end;

theorem Th33: :: AMI_1:33
sproduct {} = {{} }
proof end;

theorem Th34: :: AMI_1:34
for b1, b2 being set holds PFuncs b1,b2 = sproduct (b1 --> b2)
proof end;

theorem Th35: :: AMI_1:35
for b1, b2 being non empty set
for b3 being Function of b1,b2 holds sproduct b3 = sproduct (b3 | { b4 where B is Element of b1 : b3 . b4 <> {} } )
proof end;

theorem Th36: :: AMI_1:36
for b1, b2 being set
for b3 being Function st b1 in dom b3 & b2 in b3 . b1 holds
b1 .--> b2 in sproduct b3
proof end;

theorem Th37: :: AMI_1:37
for b1 being Function holds
( sproduct b1 = {{} } iff for b2 being set st b2 in dom b1 holds
b1 . b2 = {} )
proof end;

theorem Th38: :: AMI_1:38
for b1 being set
for b2 being Function st b1 c= sproduct b2 & ( for b3, b4 being Function st b3 in b1 & b4 in b1 holds
b3 tolerates b4 ) holds
union b1 in sproduct b2
proof end;

theorem Th39: :: AMI_1:39
for b1, b2, b3 being Function st b1 tolerates b2 & b1 in sproduct b3 & b2 in sproduct b3 holds
b1 \/ b2 in sproduct b3
proof end;

theorem Th40: :: AMI_1:40
for b1, b2, b3 being Function st b1 c= b2 & b2 in sproduct b3 holds
b1 in sproduct b3
proof end;

theorem Th41: :: AMI_1:41
for b1 being set
for b2, b3 being Function st b2 in sproduct b3 holds
b2 | b1 in sproduct b3
proof end;

theorem Th42: :: AMI_1:42
for b1 being set
for b2, b3 being Function st b2 in sproduct b3 holds
b2 | b1 in sproduct (b3 | b1)
proof end;

theorem Th43: :: AMI_1:43
for b1, b2, b3 being Function st b1 in sproduct (b2 +* b3) holds
ex b4, b5 being Function st
( b4 in sproduct b2 & b5 in sproduct b3 & b1 = b4 +* b5 )
proof end;

theorem Th44: :: AMI_1:44
for b1, b2, b3, b4 being Function st dom b1 misses (dom b3) \ (dom b4) & b3 in sproduct b2 & b4 in sproduct b1 holds
b3 +* b4 in sproduct (b2 +* b1)
proof end;

theorem Th45: :: AMI_1:45
for b1, b2, b3, b4 being Function st dom b3 misses (dom b1) \ (dom b4) & b3 in sproduct b2 & b4 in sproduct b1 holds
b3 +* b4 in sproduct (b2 +* b1)
proof end;

theorem Th46: :: AMI_1:46
for b1, b2, b3 being Function st b1 in sproduct b2 & b3 in sproduct b2 holds
b1 +* b3 in sproduct b2
proof end;

theorem Th47: :: AMI_1:47
for b1 being Function
for b2, b3, b4, b5 being set st b2 in dom b1 & b4 in b1 . b2 & b3 in dom b1 & b5 in b1 . b3 holds
b2,b3 --> b4,b5 in sproduct b1
proof end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
let c3 be State of c2;
func CurInstr c3 -> Instruction of a2 equals :: AMI_1:def 17
a3 . (IC a3);
coherence
c3 . (IC c3) is Instruction of c2
proof end;
end;

:: deftheorem Def17 defines CurInstr AMI_1:def 17 :
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b3 being State of b2 holds CurInstr b3 = b3 . (IC b3);

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
let c3 be State of c2;
func Following c3 -> State of a2 equals :: AMI_1:def 18
Exec (CurInstr a3),a3;
correctness
coherence
Exec (CurInstr c3),c3 is State of c2
;
;
end;

:: deftheorem Def18 defines Following AMI_1:def 18 :
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b3 being State of b2 holds Following b3 = Exec (CurInstr b3),b3;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
let c3 be State of c2;
func Computation c3 -> Function of NAT , product the Object-Kind of a2 means :Def19: :: AMI_1:def 19
( a4 . 0 = a3 & ( for b1 being Nat holds a4 . (b1 + 1) = Following (a4 . b1) ) );
existence
ex b1 being Function of NAT , product the Object-Kind of c2 st
( b1 . 0 = c3 & ( for b2 being Nat holds b1 . (b2 + 1) = Following (b1 . b2) ) )
proof end;
uniqueness
for b1, b2 being Function of NAT , product the Object-Kind of c2 st b1 . 0 = c3 & ( for b3 being Nat holds b1 . (b3 + 1) = Following (b1 . b3) ) & b2 . 0 = c3 & ( for b3 being Nat holds b2 . (b3 + 1) = Following (b2 . b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def19 defines Computation AMI_1:def 19 :
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b3 being State of b2
for b4 being Function of NAT , product the Object-Kind of b2 holds
( b4 = Computation b3 iff ( b4 . 0 = b3 & ( for b5 being Nat holds b4 . (b5 + 1) = Following (b4 . b5) ) ) );

definition
let c1 be with_non-empty_elements set ;
let c2 be non void AMI-Struct of c1;
let c3 be Function of NAT , product the Object-Kind of c2;
let c4 be Nat;
redefine func . as c3 . c4 -> State of a2;
coherence
c3 . c4 is State of c2
by FUNCT_2:7;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite AMI-Struct of c1;
let c3 be State of c2;
attr a3 is halting means :Def20: :: AMI_1:def 20
ex b1 being Nat st CurInstr ((Computation a3) . b1) = halt a2;
end;

:: deftheorem Def20 defines halting AMI_1:def 20 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite AMI-Struct of b1
for b3 being State of b2 holds
( b3 is halting iff ex b4 being Nat st CurInstr ((Computation b3) . b4) = halt b2 );

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
attr a2 is realistic means :Def21: :: AMI_1:def 21
the Instructions of a2 <> the Instruction-Locations of a2;
end;

:: deftheorem Def21 defines realistic AMI_1:def 21 :
for b1 being set
for b2 being AMI-Struct of b1 holds
( b2 is realistic iff the Instructions of b2 <> the Instruction-Locations of b2 );

theorem Th48: :: AMI_1:48
for b1 being set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1 st b2 is realistic holds
for b3 being Instruction-Location of b2 holds not IC b2 = b3
proof end;

theorem Th49: :: AMI_1:49
canceled;

theorem Th50: :: AMI_1:50
canceled;

theorem Th51: :: AMI_1:51
for b1 being with_non-empty_elements set
for b2 being Nat
for b3 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b4 being State of b3
for b5 being Nat holds (Computation b4) . (b2 + b5) = (Computation ((Computation b4) . b2)) . b5
proof end;

theorem Th52: :: AMI_1:52
for b1, b2 being Nat st b1 <= b2 holds
for b3 being with_non-empty_elements set
for b4 being non empty non void halting IC-Ins-separated definite AMI-Struct of b3
for b5 being State of b4 st CurInstr ((Computation b5) . b1) = halt b4 holds
(Computation b5) . b2 = (Computation b5) . b1
proof end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite AMI-Struct of c1;
let c3 be State of c2;
assume E45: c3 is halting ;
func Result c3 -> State of a2 means :Def22: :: AMI_1:def 22
ex b1 being Nat st
( a4 = (Computation a3) . b1 & CurInstr a4 = halt a2 );
uniqueness
for b1, b2 being State of c2 st ex b3 being Nat st
( b1 = (Computation c3) . b3 & CurInstr b1 = halt c2 ) & ex b3 being Nat st
( b2 = (Computation c3) . b3 & CurInstr b2 = halt c2 ) holds
b1 = b2
proof end;
correctness
existence
ex b1 being State of c2ex b2 being Nat st
( b1 = (Computation c3) . b2 & CurInstr b1 = halt c2 )
;
proof end;
end;

:: deftheorem Def22 defines Result AMI_1:def 22 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite AMI-Struct of b1
for b3 being State of b2 st b3 is halting holds
for b4 being State of b2 holds
( b4 = Result b3 iff ex b5 being Nat st
( b4 = (Computation b3) . b5 & CurInstr b4 = halt b2 ) );

theorem Th53: :: AMI_1:53
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated steady-programmed definite AMI-Struct of b1
for b3 being State of b2
for b4 being Instruction-Location of b2 holds b3 . b4 = (Following b3) . b4 by Def13;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void definite AMI-Struct of c1;
let c3 be State of c2;
let c4 be Instruction-Location of c2;
redefine func . as c3 . c4 -> Instruction of a2;
coherence
c3 . c4 is Instruction of c2
proof end;
end;

theorem Th54: :: AMI_1:54
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated steady-programmed definite AMI-Struct of b1
for b3 being State of b2
for b4 being Instruction-Location of b2
for b5 being Nat holds b3 . b4 = ((Computation b3) . b5) . b4
proof end;

theorem Th55: :: AMI_1:55
for b1 being with_non-empty_elements set
for b2 being Nat
for b3 being non empty non void IC-Ins-separated steady-programmed definite AMI-Struct of b1
for b4 being State of b3 holds (Computation b4) . (b2 + 1) = Exec (b4 . (IC ((Computation b4) . b2))),((Computation b4) . b2)
proof end;

theorem Th56: :: AMI_1:56
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of b1
for b3 being State of b2
for b4 being Nat st b3 . (IC ((Computation b3) . b4)) = halt b2 holds
Result b3 = (Computation b3) . b4
proof end;

theorem Th57: :: AMI_1:57
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated steady-programmed definite AMI-Struct of b1
for b3 being State of b2 st ex b4 being Nat st b3 . (IC ((Computation b3) . b4)) = halt b2 holds
for b4 being Nat holds Result b3 = Result ((Computation b3) . b4)
proof end;

registration
let c1 be with_non-empty_elements set ;
let c2 be non empty non void AMI-Struct of c1;
let c3 be Object of c2;
cluster ObjectKind a3 -> non empty ;
coherence
not ObjectKind c3 is empty
;
end;

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
func FinPartSt c2 -> Subset of (sproduct the Object-Kind of a2) equals :: AMI_1:def 23
{ b1 where B is Element of sproduct the Object-Kind of a2 : b1 is finite } ;
coherence
{ b1 where B is Element of sproduct the Object-Kind of c2 : b1 is finite } is Subset of (sproduct the Object-Kind of c2)
proof end;
end;

:: deftheorem Def23 defines FinPartSt AMI_1:def 23 :
for b1 being set
for b2 being AMI-Struct of b1 holds FinPartSt b2 = { b3 where B is Element of sproduct the Object-Kind of b2 : b3 is finite } ;

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
mode FinPartState of c2 -> Element of sproduct the Object-Kind of a2 means :Def24: :: AMI_1:def 24
a3 is finite;
existence
ex b1 being Element of sproduct the Object-Kind of c2 st b1 is finite
proof end;
end;

:: deftheorem Def24 defines FinPartState AMI_1:def 24 :
for b1 being set
for b2 being AMI-Struct of b1
for b3 being Element of sproduct the Object-Kind of b2 holds
( b3 is FinPartState of b2 iff b3 is finite );

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
let c3 be FinPartState of c2;
attr a3 is autonomic means :Def25: :: AMI_1:def 25
for b1, b2 being State of a2 st a3 c= b1 & a3 c= b2 holds
for b3 being Nat holds ((Computation b1) . b3) | (dom a3) = ((Computation b2) . b3) | (dom a3);
end;

:: deftheorem Def25 defines autonomic AMI_1:def 25 :
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b3 being FinPartState of b2 holds
( b3 is autonomic iff for b4, b5 being State of b2 st b3 c= b4 & b3 c= b5 holds
for b6 being Nat holds ((Computation b4) . b6) | (dom b3) = ((Computation b5) . b6) | (dom b3) );

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite AMI-Struct of c1;
let c3 be FinPartState of c2;
attr a3 is halting means :Def26: :: AMI_1:def 26
for b1 being State of a2 st a3 c= b1 holds
b1 is halting;
end;

:: deftheorem Def26 defines halting AMI_1:def 26 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite AMI-Struct of b1
for b3 being FinPartState of b2 holds
( b3 is halting iff for b4 being State of b2 st b3 c= b4 holds
b4 is halting );

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
attr a2 is programmable means :Def27: :: AMI_1:def 27
ex b1 being FinPartState of a2 st
( not b1 is empty & b1 is autonomic );
end;

:: deftheorem Def27 defines programmable AMI_1:def 27 :
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1 holds
( b2 is programmable iff ex b3 being FinPartState of b2 st
( not b3 is empty & b3 is autonomic ) );

theorem Th58: :: AMI_1:58
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b3, b4 being set
for b5, b6 being Object of b2 st ObjectKind b5 = b3 & ObjectKind b6 = b4 holds
for b7 being Element of b3
for b8 being Element of b4 holds b5,b6 --> b7,b8 is FinPartState of b2
proof end;

theorem Th59: :: AMI_1:59
for b1 being with_non-empty_elements set
for b2 being non empty non void IC-Ins-separated definite AMI-Struct of b1
for b3 being set
for b4 being Object of b2 st ObjectKind b4 = b3 holds
for b5 being Element of b3 holds b4 .--> b5 is FinPartState of b2
proof end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
let c3 be Object of c2;
let c4 be Element of ObjectKind c3;
redefine func .--> as c3 .--> c4 -> FinPartState of a2;
coherence
c3 .--> c4 is FinPartState of c2
by Th59;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite AMI-Struct of c1;
let c3, c4 be Object of c2;
let c5 be Element of ObjectKind c3;
let c6 be Element of ObjectKind c4;
redefine func --> as c3,c4 --> c5,c6 -> FinPartState of a2;
coherence
c3,c4 --> c5,c6 is FinPartState of c2
by Th58;
end;

theorem Th60: :: AMI_1:60
for b1 being set holds Trivial-AMI b1 is realistic
proof end;

theorem Th61: :: AMI_1:61
for b1 being with_non-empty_elements set holds Trivial-AMI b1 is programmable
proof end;

registration
let c1 be set ;
cluster Trivial-AMI a1 -> non empty strict non void IC-Ins-separated data-oriented definite realistic ;
coherence
Trivial-AMI c1 is realistic
by Th60;
end;

registration
let c1 be with_non-empty_elements set ;
cluster Trivial-AMI a1 -> non empty strict non void halting IC-Ins-separated data-oriented steady-programmed definite realistic programmable ;
coherence
Trivial-AMI c1 is programmable
by Th61;
end;

registration
let c1 be set ;
cluster strict data-oriented realistic AMI-Struct of a1;
existence
ex b1 being AMI-Struct of c1 st
( b1 is data-oriented & b1 is realistic & b1 is strict )
proof end;
end;

registration
let c1 be set ;
cluster non empty strict non void IC-Ins-separated data-oriented definite realistic AMI-Struct of a1;
existence
ex b1 being non empty non void AMI-Struct of c1 st
( b1 is data-oriented & b1 is realistic & b1 is strict & b1 is IC-Ins-separated & b1 is definite )
proof end;
end;

registration
let c1 be with_non-empty_elements set ;
cluster non empty strict non void halting IC-Ins-separated data-oriented steady-programmed definite realistic programmable AMI-Struct of a1;
existence
ex b1 being non empty non void IC-Ins-separated definite AMI-Struct of c1 st
( b1 is data-oriented & b1 is halting & b1 is steady-programmed & b1 is realistic & b1 is programmable & b1 is strict )
proof end;
end;

theorem Th62: :: AMI_1:62
for b1 being with_non-empty_elements set
for b2 being non void AMI-Struct of b1
for b3 being State of b2
for b4 being FinPartState of b2 holds b3 | (dom b4) is FinPartState of b2
proof end;

theorem Th63: :: AMI_1:63
for b1 being set
for b2 being AMI-Struct of b1 holds {} is FinPartState of b2
proof end;

registration
let c1 be with_non-empty_elements set ;
let c2 be non empty non void IC-Ins-separated definite programmable AMI-Struct of c1;
cluster non empty autonomic FinPartState of a2;
existence
ex b1 being FinPartState of c2 st
( not b1 is empty & b1 is autonomic )
by Def27;
end;

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
let c3, c4 be FinPartState of c2;
redefine func +* as c3 +* c4 -> FinPartState of a2;
coherence
c3 +* c4 is FinPartState of c2
proof end;
end;

theorem Th64: :: AMI_1:64
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being Instruction-Location of b2
for b4 being Element of ObjectKind (IC b2) st b4 = b3 holds
for b5 being Element of ObjectKind b3 st b5 = halt b2 holds
for b6 being State of b2 st (IC b2),b3 --> b4,b5 c= b6 holds
CurInstr b6 = halt b2
proof end;

theorem Th65: :: AMI_1:65
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being Instruction-Location of b2
for b4 being Element of ObjectKind (IC b2) st b4 = b3 holds
for b5 being Element of ObjectKind b3 st b5 = halt b2 holds
(IC b2),b3 --> b4,b5 is halting
proof end;

theorem Th66: :: AMI_1:66
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being Instruction-Location of b2
for b4 being Element of ObjectKind (IC b2) st b4 = b3 holds
for b5 being Element of ObjectKind b3 st b5 = halt b2 holds
for b6 being State of b2 st (IC b2),b3 --> b4,b5 c= b6 holds
for b7 being Nat holds (Computation b6) . b7 = b6
proof end;

theorem Th67: :: AMI_1:67
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being Instruction-Location of b2
for b4 being Element of ObjectKind (IC b2) st b4 = b3 holds
for b5 being Element of ObjectKind b3 st b5 = halt b2 holds
(IC b2),b3 --> b4,b5 is autonomic
proof end;

registration
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
cluster autonomic halting FinPartState of a2;
existence
ex b1 being FinPartState of c2 st
( b1 is autonomic & b1 is halting )
proof end;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
mode pre-program of a2 is autonomic halting FinPartState of a2;
end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
let c3 be FinPartState of c2;
assume E62: c3 is pre-program of c2 ;
func Result c3 -> FinPartState of a2 means :: AMI_1:def 28
for b1 being State of a2 st a3 c= b1 holds
a4 = (Result b1) | (dom a3);
existence
ex b1 being FinPartState of c2 st
for b2 being State of c2 st c3 c= b2 holds
b1 = (Result b2) | (dom c3)
proof end;
correctness
uniqueness
for b1, b2 being FinPartState of c2 st ( for b3 being State of c2 st c3 c= b3 holds
b1 = (Result b3) | (dom c3) ) & ( for b3 being State of c2 st c3 c= b3 holds
b2 = (Result b3) | (dom c3) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def28 defines Result AMI_1:def 28 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being FinPartState of b2 st b3 is pre-program of b2 holds
for b4 being FinPartState of b2 holds
( b4 = Result b3 iff for b5 being State of b2 st b3 c= b5 holds
b4 = (Result b5) | (dom b3) );

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
let c3 be FinPartState of c2;
let c4 be Function;
pred c3 computes c4 means :Def29: :: AMI_1:def 29
for b1 being set st b1 in dom a4 holds
ex b2 being FinPartState of a2 st
( b1 = b2 & a3 +* b2 is pre-program of a2 & a4 . b2 c= Result (a3 +* b2) );
end;

:: deftheorem Def29 defines computes AMI_1:def 29 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being FinPartState of b2
for b4 being Function holds
( b3 computes b4 iff for b5 being set st b5 in dom b4 holds
ex b6 being FinPartState of b2 st
( b5 = b6 & b3 +* b6 is pre-program of b2 & b4 . b6 c= Result (b3 +* b6) ) );

notation
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
let c3 be FinPartState of c2;
let c4 be Function;
antonym c3 does_not_compute c4 for c3 computes c4;
end;

theorem Th68: :: AMI_1:68
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being FinPartState of b2 holds b3 computes {}
proof end;

theorem Th69: :: AMI_1:69
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being FinPartState of b2 holds
( b3 is pre-program of b2 iff b3 computes {} .--> (Result b3) )
proof end;

theorem Th70: :: AMI_1:70
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being FinPartState of b2 holds
( b3 is pre-program of b2 iff b3 computes {} .--> {} )
proof end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
let c3 be PartFunc of FinPartSt c2, FinPartSt c2;
attr a3 is computable means :Def30: :: AMI_1:def 30
ex b1 being FinPartState of a2 st b1 computes a3;
end;

:: deftheorem Def30 defines computable AMI_1:def 30 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being PartFunc of FinPartSt b2, FinPartSt b2 holds
( b3 is computable iff ex b4 being FinPartState of b2 st b4 computes b3 );

theorem Th71: :: AMI_1:71
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being PartFunc of FinPartSt b2, FinPartSt b2 st b3 = {} holds
b3 is computable
proof end;

theorem Th72: :: AMI_1:72
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being PartFunc of FinPartSt b2, FinPartSt b2 st b3 = {} .--> {} holds
b3 is computable
proof end;

theorem Th73: :: AMI_1:73
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being pre-program of b2
for b4 being PartFunc of FinPartSt b2, FinPartSt b2 st b4 = {} .--> (Result b3) holds
b4 is computable
proof end;

definition
let c1 be with_non-empty_elements set ;
let c2 be non empty non void halting IC-Ins-separated definite realistic AMI-Struct of c1;
let c3 be PartFunc of FinPartSt c2, FinPartSt c2;
assume E70: c3 is computable ;
mode Program of c3 -> FinPartState of a2 means :: AMI_1:def 31
a4 computes a3;
existence
ex b1 being FinPartState of c2 st b1 computes c3
by E70, Def30;
end;

:: deftheorem Def31 defines Program AMI_1:def 31 :
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being PartFunc of FinPartSt b2, FinPartSt b2 st b3 is computable holds
for b4 being FinPartState of b2 holds
( b4 is Program of b3 iff b4 computes b3 );

definition
let c1 be set ;
let c2 be AMI-Struct of c1;
mode InsType of a2 is Element of the Instruction-Codes of a2;
end;

theorem Th74: :: AMI_1:74
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being PartFunc of FinPartSt b2, FinPartSt b2 st b3 = {} holds
for b4 being FinPartState of b2 holds b4 is Program of b3
proof end;

theorem Th75: :: AMI_1:75
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being PartFunc of FinPartSt b2, FinPartSt b2 st b3 = {} .--> {} holds
for b4 being pre-program of b2 holds b4 is Program of b3
proof end;

theorem Th76: :: AMI_1:76
for b1 being with_non-empty_elements set
for b2 being non empty non void halting IC-Ins-separated definite realistic AMI-Struct of b1
for b3 being pre-program of b2
for b4 being PartFunc of FinPartSt b2, FinPartSt b2 st b4 = {} .--> (Result b3) holds
b3 is Program of b4
proof end;