:: A Tree of Execution of a Macroinstruction
:: by Artur Korni{\l}owicz
::
:: Received December 10, 2003
:: Copyright (c) 2003-2011 Association of Mizar Users


begin

theorem :: AMISTD_3:1
canceled;

theorem :: AMISTD_3:2
canceled;

theorem :: AMISTD_3:3
canceled;

theorem :: AMISTD_3:4
canceled;

theorem :: AMISTD_3:5
canceled;

theorem :: AMISTD_3:6
canceled;

theorem :: AMISTD_3:7
canceled;

theorem :: AMISTD_3:8
canceled;

theorem :: AMISTD_3:9
canceled;

theorem :: AMISTD_3:10
canceled;

theorem :: AMISTD_3:11
canceled;

theorem :: AMISTD_3:12
canceled;

theorem :: AMISTD_3:13
canceled;

theorem :: AMISTD_3:14
canceled;

theorem :: AMISTD_3:15
canceled;

theorem :: AMISTD_3:16
canceled;

theorem :: AMISTD_3:17
canceled;

theorem :: AMISTD_3:18
canceled;

theorem :: AMISTD_3:19
canceled;

theorem :: AMISTD_3:20
canceled;

theorem :: AMISTD_3:21
canceled;

theorem :: AMISTD_3:22
canceled;

theorem :: AMISTD_3:23
canceled;

theorem :: AMISTD_3:24
canceled;

definition
canceled;
canceled;
let N be non empty with_non-empty_elements set ;
let S be non empty stored-program IC-Ins-separated definite standard AMI-Struct of N;
let M be Subset of NAT;
deffunc H1( set ) -> set = (canonical_isomorphism_of ((RelIncl (order_type_of (RelIncl M))),(RelIncl M))) . $1;
func LocSeq (M,S) -> T-Sequence of NAT means :Def3: :: AMISTD_3:def 3
( dom it = card M & ( for m being set st m in card M holds
it . m = (canonical_isomorphism_of ((RelIncl (order_type_of (RelIncl M))),(RelIncl M))) . m ) );
existence
ex b1 being T-Sequence of NAT st
( dom b1 = card M & ( for m being set st m in card M holds
b1 . m = (canonical_isomorphism_of ((RelIncl (order_type_of (RelIncl M))),(RelIncl M))) . m ) )
proof end;
uniqueness
for b1, b2 being T-Sequence of NAT st dom b1 = card M & ( for m being set st m in card M holds
b1 . m = (canonical_isomorphism_of ((RelIncl (order_type_of (RelIncl M))),(RelIncl M))) . m ) & dom b2 = card M & ( for m being set st m in card M holds
b2 . m = (canonical_isomorphism_of ((RelIncl (order_type_of (RelIncl M))),(RelIncl M))) . m ) holds
b1 = b2
proof end;
end;

:: deftheorem AMISTD_3:def 1 :
canceled;

:: deftheorem AMISTD_3:def 2 :
canceled;

:: deftheorem Def3 defines LocSeq AMISTD_3:def 3 :
for N being non empty with_non-empty_elements set
for S being non empty stored-program IC-Ins-separated definite standard AMI-Struct of N
for M being Subset of NAT
for b4 being T-Sequence of NAT holds
( b4 = LocSeq (M,S) iff ( dom b4 = card M & ( for m being set st m in card M holds
b4 . m = (canonical_isomorphism_of ((RelIncl (order_type_of (RelIncl M))),(RelIncl M))) . m ) ) );

theorem :: AMISTD_3:25
canceled;

theorem :: AMISTD_3:26
canceled;

theorem :: AMISTD_3:27
canceled;

theorem :: AMISTD_3:28
canceled;

theorem :: AMISTD_3:29
canceled;

theorem :: AMISTD_3:30
canceled;

theorem :: AMISTD_3:31
for n being natural number
for N being non empty with_non-empty_elements set
for S being non empty stored-program IC-Ins-separated definite standard AMI-Struct of N
for F being Subset of NAT st F = {n} holds
LocSeq (F,S) = 0 .--> n
proof end;

registration
let N be non empty with_non-empty_elements set ;
let S be non empty stored-program IC-Ins-separated definite standard AMI-Struct of N;
let M be Subset of NAT;
cluster LocSeq (M,S) -> one-to-one ;
coherence
LocSeq (M,S) is one-to-one
proof end;
end;

definition
let N be non empty with_non-empty_elements set ;
let S be non empty stored-program IC-Ins-separated definite standard AMI-Struct of N;
let M be NAT -defined the Instructions of S -valued non empty FinPartState of ;
func ExecTree M -> DecoratedTree of NAT means :Def4: :: AMISTD_3:def 4
( it . {} = FirstLoc M & ( for t being Element of dom it holds
( succ t = { (t ^ <*k*>) where k is Element of NAT : k in card (NIC ((M /. (it . t)),(it . t))) } & ( for m being Element of NAT st m in card (NIC ((M /. (it . t)),(it . t))) holds
it . (t ^ <*m*>) = (LocSeq ((NIC ((M /. (it . t)),(it . t))),S)) . m ) ) ) );
existence
ex b1 being DecoratedTree of NAT st
( b1 . {} = FirstLoc M & ( for t being Element of dom b1 holds
( succ t = { (t ^ <*k*>) where k is Element of NAT : k in card (NIC ((M /. (b1 . t)),(b1 . t))) } & ( for m being Element of NAT st m in card (NIC ((M /. (b1 . t)),(b1 . t))) holds
b1 . (t ^ <*m*>) = (LocSeq ((NIC ((M /. (b1 . t)),(b1 . t))),S)) . m ) ) ) )
proof end;
uniqueness
for b1, b2 being DecoratedTree of NAT st b1 . {} = FirstLoc M & ( for t being Element of dom b1 holds
( succ t = { (t ^ <*k*>) where k is Element of NAT : k in card (NIC ((M /. (b1 . t)),(b1 . t))) } & ( for m being Element of NAT st m in card (NIC ((M /. (b1 . t)),(b1 . t))) holds
b1 . (t ^ <*m*>) = (LocSeq ((NIC ((M /. (b1 . t)),(b1 . t))),S)) . m ) ) ) & b2 . {} = FirstLoc M & ( for t being Element of dom b2 holds
( succ t = { (t ^ <*k*>) where k is Element of NAT : k in card (NIC ((M /. (b2 . t)),(b2 . t))) } & ( for m being Element of NAT st m in card (NIC ((M /. (b2 . t)),(b2 . t))) holds
b2 . (t ^ <*m*>) = (LocSeq ((NIC ((M /. (b2 . t)),(b2 . t))),S)) . m ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines ExecTree AMISTD_3:def 4 :
for N being non empty with_non-empty_elements set
for S being non empty stored-program IC-Ins-separated definite standard AMI-Struct of N
for M being NAT -defined the Instructions of b2 -valued non empty FinPartState of
for b4 being DecoratedTree of NAT holds
( b4 = ExecTree M iff ( b4 . {} = FirstLoc M & ( for t being Element of dom b4 holds
( succ t = { (t ^ <*k*>) where k is Element of NAT : k in card (NIC ((M /. (b4 . t)),(b4 . t))) } & ( for m being Element of NAT st m in card (NIC ((M /. (b4 . t)),(b4 . t))) holds
b4 . (t ^ <*m*>) = (LocSeq ((NIC ((M /. (b4 . t)),(b4 . t))),S)) . m ) ) ) ) );

theorem :: AMISTD_3:32
for N being non empty with_non-empty_elements set
for S being non empty stored-program IC-Ins-separated definite realistic halting standard AMI-Struct of N holds ExecTree (Stop S) = TrivialInfiniteTree --> 0
proof end;