Article SCMFSA_5, MML version 4.99.1005

:: SCMFSA_5:funcnot 1 => SCMFSA_5:func 1
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of NAT;
  func Relocated(A1,A2) -> finite Element of sproduct the Object-Kind of SCM+FSA equals
    ((Start-At ((IC a1) + a2)) +* IncAddr(Shift(ProgramPart a1,a2),a2)) +* DataPart a1;
end;

:: SCMFSA_5:def 1
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
   Relocated(b1,b2) = ((Start-At ((IC b1) + b2)) +* IncAddr(Shift(ProgramPart b1,b2),b2)) +* DataPart b1;

:: SCMFSA_5:th 1
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
   DataPart Relocated(b1,b2) = DataPart b1;

:: SCMFSA_5:th 2
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
   ProgramPart Relocated(b1,b2) = IncAddr(Shift(ProgramPart b1,b2),b2);

:: SCMFSA_5:th 3
theorem
for b1 being Element of NAT
for b2 being finite Element of sproduct the Object-Kind of SCM+FSA holds
   proj1 ProgramPart Relocated(b2,b1) = {b3 + b1 where b3 is Element of NAT: b3 in proj1 ProgramPart b2};

:: SCMFSA_5:th 4
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT
for b3 being Instruction-Location of SCM+FSA holds
      b3 in proj1 b1
   iff
      b3 + b2 in proj1 Relocated(b1,b2);

:: SCMFSA_5:th 5
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
   IC SCM+FSA in proj1 Relocated(b1,b2);

:: SCMFSA_5:th 6
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
   IC Relocated(b1,b2) = (IC b1) + b2;

:: SCMFSA_5:th 7
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2, b3 being Element of NAT
for b4 being Element of the Instructions of SCM+FSA
      st b3 in proj1 ProgramPart b1 & b4 = b1 . b3
   holds IncAddr(b4,b2) = (Relocated(b1,b2)) . (b3 + b2);

:: SCMFSA_5:th 8
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
   Start-At ((IC b1) + b2) c= Relocated(b1,b2);

:: SCMFSA_5:th 9
theorem
for b1 being finite data-only Element of sproduct the Object-Kind of SCM+FSA
for b2 being finite Element of sproduct the Object-Kind of SCM+FSA
for b3 being Element of NAT
      st IC SCM+FSA in proj1 b2
   holds Relocated(b2 +* b1,b3) = (Relocated(b2,b3)) +* b1;

:: SCMFSA_5:th 10
theorem
for b1 being Element of NAT
for b2 being finite autonomic Element of sproduct the Object-Kind of SCM+FSA
for b3, b4 being Element of product the Object-Kind of SCM+FSA
      st b2 c= b3 & Relocated(b2,b1) c= b4
   holds b2 c= b3 +* (b4 | (Int-Locations \/ FinSeq-Locations));

:: SCMFSA_5:th 11
theorem
for b1 being Element of NAT
for b2 being finite autonomic Element of sproduct the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b2
for b3 being Element of product the Object-Kind of SCM+FSA
   st b2 c= b3
for b4 being Element of NAT holds
   Computation(b3 +* Relocated(b2,b1),b4) = ((Computation(b3,b4)) +* Start-At ((IC Computation(b3,b4)) + b1)) +* ProgramPart Relocated(b2,b1);

:: SCMFSA_5:th 12
theorem
for b1 being Element of NAT
for b2 being finite autonomic Element of sproduct the Object-Kind of SCM+FSA
for b3, b4, b5 being Element of product the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b2 &
      b2 c= b3 &
      Relocated(b2,b1) c= b4 &
      b5 = b3 +* (b4 | (Int-Locations \/ FinSeq-Locations))
for b6 being Element of NAT holds
   (IC Computation(b3,b6)) + b1 = IC Computation(b4,b6) &
    IncAddr(CurInstr Computation(b3,b6),b1) = CurInstr Computation(b4,b6) &
    (Computation(b3,b6)) | proj1 DataPart b2 = (Computation(b4,b6)) | proj1 DataPart Relocated(b2,b1) &
    (Computation(b5,b6)) | (Int-Locations \/ FinSeq-Locations) = (Computation(b4,b6)) | (Int-Locations \/ FinSeq-Locations);

:: SCMFSA_5:th 13
theorem
for b1 being finite autonomic Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT
      st IC SCM+FSA in proj1 b1
   holds    b1 is halting(NAT, {INT,INT *}, SCM+FSA)
   iff
      Relocated(b1,b2) is halting(NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_5:th 14
theorem
for b1 being Element of NAT
for b2 being finite autonomic Element of sproduct the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b2
for b3 being Element of product the Object-Kind of SCM+FSA
   st Relocated(b2,b1) c= b3
for b4 being Element of NAT holds
   Computation(b3,b4) = (((Computation(b3 +* b2,b4)) +* Start-At ((IC Computation(b3 +* b2,b4)) + b1)) +* (b3 | proj1 ProgramPart b2)) +* ProgramPart Relocated(b2,b1);

:: SCMFSA_5:th 15
theorem
for b1 being Element of NAT
for b2 being finite Element of sproduct the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b2
for b3 being Element of product the Object-Kind of SCM+FSA
   st b2 c= b3 &
      Relocated(b2,b1) is autonomic(NAT, {INT,INT *}, SCM+FSA)
for b4 being Element of NAT holds
   Computation(b3,b4) = (((Computation(b3 +* Relocated(b2,b1),b4)) +* Start-At ((IC Computation(b3 +* Relocated(b2,b1),b4)) -' b1)) +* (b3 | proj1 ProgramPart Relocated(b2,b1))) +* ProgramPart b2;

:: SCMFSA_5:th 16
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b1
for b2 being Element of NAT holds
      b1 is autonomic(NAT, {INT,INT *}, SCM+FSA)
   iff
      Relocated(b1,b2) is autonomic(NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_5:th 17
theorem
for b1 being finite autonomic halting Element of sproduct the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b1
for b2 being Element of NAT holds
   DataPart Result b1 = DataPart Result Relocated(b1,b2);

:: SCMFSA_5:th 18
theorem
for b1 being Function-like Relation of FinPartSt SCM+FSA,FinPartSt SCM+FSA
for b2 being finite Element of sproduct the Object-Kind of SCM+FSA
   st IC SCM+FSA in proj1 b2 &
      b1 is data-only(NAT, {INT,INT *}, SCM+FSA)
for b3 being Element of NAT holds
      b2 computes b1
   iff
      Relocated(b2,b3) computes b1;