begin
definition
func Trivial-COM -> strict COM-Struct means :
Def1:
( the
Instructions of
it = {[0,{},{}]} & the
haltF of
it = [0,{},{}] );
existence
ex b1 being strict COM-Struct st
( the Instructions of b1 = {[0,{},{}]} & the haltF of b1 = [0,{},{}] )
uniqueness
for b1, b2 being strict COM-Struct st the Instructions of b1 = {[0,{},{}]} & the haltF of b1 = [0,{},{}] & the Instructions of b2 = {[0,{},{}]} & the haltF of b2 = [0,{},{}] holds
b1 = b2
;
end;
:: deftheorem Def1 defines Trivial-COM COMPOS_1:def 1 :
for b1 being strict COM-Struct holds
( b1 = Trivial-COM iff ( the Instructions of b1 = {[0,{},{}]} & the haltF of b1 = [0,{},{}] ) );
:: deftheorem defines halt COMPOS_1:def 2 :
for S being COM-Struct holds halt S = the haltF of S;
:: deftheorem Def7 defines halt-free COMPOS_1:def 3 :
for S being COM-Struct
for I being the Instructions of b1 -valued Function holds
( I is halt-free iff not halt S in rng I );
begin
begin
:: deftheorem Def17 defines standard-ins COMPOS_1:def 4 :
for S being COM-Struct holds
( S is standard-ins iff ex X being non empty set st the Instructions of S c= [:NAT,(NAT *),(X *):] );
:: deftheorem defines InsCodes COMPOS_1:def 5 :
for S being standard-ins COM-Struct holds InsCodes S = proj1 (proj1 the Instructions of S);
begin
theorem Th7:
:: deftheorem Def19 defines halts_at COMPOS_1:def 6 :
for S being COM-Struct
for p being NAT -defined the Instructions of b1 -valued Function
for l being set holds
( p halts_at l iff ( l in dom p & p . l = halt S ) );
:: deftheorem defines halts_at COMPOS_1:def 7 :
for S being COM-Struct
for s being Instruction-Sequence of S
for l being Nat holds
( s halts_at l iff s . l = halt S );
begin
:: deftheorem Def25 defines halt-ending COMPOS_1:def 8 :
for S being COM-Struct
for F being non empty preProgram of S holds
( F is halt-ending iff F . (LastLoc F) = halt S );
:: deftheorem Def26 defines unique-halt COMPOS_1:def 9 :
for S being COM-Struct
for F being non empty preProgram of S holds
( F is unique-halt iff for f being Nat st F . f = halt S & f in dom F holds
f = LastLoc F );
theorem
begin
:: deftheorem defines Stop COMPOS_1:def 10 :
for S being COM-Struct holds Stop S = Load ;
theorem Th3:
theorem
Lm8:
for k being natural number holds - 1 < k
;
Lm9:
for k being natural number
for a, b, c being Element of NAT st 1 <= a & 2 <= b & not k < a - 1 & not ( a <= k & k <= (a + b) - 3 ) & not k = (a + b) - 2 & not (a + b) - 2 < k holds
k = a - 1
begin
:: deftheorem defines JumpParts COMPOS_1:def 11 :
for S being standard-ins COM-Struct
for T being InsType of S holds JumpParts T = { (JumpPart I) where I is Instruction of S : InsCode I = T } ;
:: deftheorem Def33 defines homogeneous COMPOS_1:def 12 :
for S being standard-ins COM-Struct holds
( S is homogeneous iff for I, J being Instruction of S st InsCode I = InsCode J holds
dom (JumpPart I) = dom (JumpPart J) );
theorem Th85:
:: deftheorem defines AddressParts COMPOS_1:def 13 :
for S being standard-ins COM-Struct
for T being InsType of S holds AddressParts T = { (AddressPart I) where I is Instruction of S : InsCode I = T } ;
:: deftheorem Def35 defines regular COMPOS_1:def 14 :
for S being standard-ins COM-Struct holds
( S is regular iff for I being Instruction of S
for k being set st k in dom (JumpPart I) holds
(product" (JumpParts (InsCode I))) . k = NAT );
:: deftheorem Def36 defines J/A-independent COMPOS_1:def 15 :
for S being standard-ins COM-Struct holds
( S is J/A-independent iff for T being InsType of S
for f1, f2 being Function
for p being set st f1 in JumpParts T & f2 in product (product" (JumpParts T)) & [T,f1,p] in the Instructions of S holds
[T,f2,p] in the Instructions of S );
theorem Th86:
Lm10:
for I being Instruction of Trivial-COM holds JumpPart I = 0
Lm11:
for T being InsType of Trivial-COM holds JumpParts T = {0}
theorem
:: deftheorem Def37 defines ins-loc-free COMPOS_1:def 16 :
for S being standard-ins COM-Struct
for I being Instruction of S holds
( I is ins-loc-free iff JumpPart I is empty );
theorem Th89:
Lm13:
for S being COM-Struct holds (card (Stop S)) -' 1 = 0
theorem Th90:
begin
:: deftheorem Def38 defines IncAddr COMPOS_1:def 17 :
for S being standard-ins homogeneous regular J/A-independent COM-Struct
for I being Element of the Instructions of S
for k being natural number
for b4 being Instruction of S holds
( b4 = IncAddr (I,k) iff ( InsCode b4 = InsCode I & AddressPart b4 = AddressPart I & JumpPart b4 = k + (JumpPart I) ) );
theorem Th91:
theorem Th92:
:: deftheorem Def39 defines proper-halt COMPOS_1:def 18 :
for S being standard-ins COM-Struct holds
( S is proper-halt iff halt S is ins-loc-free );
theorem
theorem Th95:
theorem Th96:
theorem Th97:
:: deftheorem Def40 defines IncAddr COMPOS_1:def 19 :
for S being standard-ins homogeneous regular J/A-independent COM-Struct
for p being NAT -defined the Instructions of b1 -valued finite Function
for k being natural number
for b4 being NAT -defined the Instructions of b1 -valued finite Function holds
( b4 = IncAddr (p,k) iff ( dom b4 = dom p & ( for m being natural number st m in dom p holds
b4 . m = IncAddr ((p /. m),k) ) ) );
theorem Th98:
theorem Th99:
:: deftheorem defines Reloc COMPOS_1:def 20 :
for S being standard-ins homogeneous regular J/A-independent COM-Struct
for p being NAT -defined the Instructions of b1 -valued finite Function
for k being Nat holds Reloc (p,k) = IncAddr ((Shift (p,k)),k);
theorem Th100:
theorem Th101:
:: deftheorem defines ';' COMPOS_1:def 21 :
for S being standard-ins homogeneous regular J/A-independent COM-Struct
for F, G being non empty preProgram of S holds F ';' G = (CutLastLoc F) +* (Shift ((IncAddr (G,((card F) -' 1))),((card F) -' 1)));
theorem Th102:
theorem
theorem Th104:
theorem Th105:
theorem
theorem Th107:
theorem Th108:
theorem Th109:
theorem Th110:
theorem
theorem
theorem
theorem
begin
theorem Th117:
theorem Th121:
theorem
begin
:: deftheorem defines stop COMPOS_1:def 22 :
for S being COM-Struct
for I being initial preProgram of S holds stop I = I ^ (Stop S);
theorem
begin
:: deftheorem defines Macro COMPOS_1:def 23 :
for S being COM-Struct
for i being Instruction of S holds Macro i = stop (Load i);
begin
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem Th153:
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem Th53:
theorem Th54:
theorem Th55:
theorem Th56:
theorem
theorem
theorem
theorem Th60:
theorem
theorem
theorem Th63:
theorem
theorem Th18:
theorem
:: deftheorem defines No-StopCode COMPOS_1:def 24 :
for S being COM-Struct
for i being Instruction of S holds
( i is No-StopCode iff i <> halt S );
:: deftheorem Def25 defines halt-free COMPOS_1:def 25 :
for S being COM-Struct
for IT being NAT -defined the Instructions of b1 -valued Function holds
( IT is halt-free iff for x being Nat st x in dom IT holds
IT . x <> halt S );
theorem
theorem Th68: