Article SCMFSA6A, MML version 4.99.1005

:: SCMFSA6A:modenot 1
definition
  mode Macro-Instruction is finite programmed initial Element of sproduct the Object-Kind of SCM+FSA;
end;

:: SCMFSA6A:funcnot 1 => SCMFSA6A:func 1
definition
  let a1 be finite programmed Element of sproduct the Object-Kind of SCM+FSA;
  func Directed A1 -> finite programmed Element of sproduct the Object-Kind of SCM+FSA equals
    a1 * ((id the Instructions of SCM+FSA) +* ((halt SCM+FSA) .--> goto insloc card a1));
end;

:: SCMFSA6A:def 1
theorem
for b1 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
   Directed b1 = b1 * ((id the Instructions of SCM+FSA) +* ((halt SCM+FSA) .--> goto insloc card b1));

:: SCMFSA6A:th 14
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   proj1 Directed b1 = proj1 b1;

:: SCMFSA6A:funcreg 1
registration
  let a1 be finite programmed initial Element of sproduct the Object-Kind of SCM+FSA;
  cluster Directed a1 -> finite programmed initial;
end;

:: SCMFSA6A:funcnot 2 => SCMFSA6A:func 2
definition
  let a1 be Element of the Instructions of SCM+FSA;
  func Macro A1 -> finite programmed initial Element of sproduct the Object-Kind of SCM+FSA equals
    (insloc 0,insloc 1)-->(a1,halt SCM+FSA);
end;

:: SCMFSA6A:def 2
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   Macro b1 = (insloc 0,insloc 1)-->(b1,halt SCM+FSA);

:: SCMFSA6A:funcreg 2
registration
  let a1 be Element of the Instructions of SCM+FSA;
  cluster Macro a1 -> non empty finite programmed initial;
end;

:: SCMFSA6A:th 15
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT holds
      b2 < card b1
   iff
      b2 in proj1 b1;

:: SCMFSA6A:funcreg 3
registration
  let a1 be finite initial Element of sproduct the Object-Kind of SCM+FSA;
  cluster ProgramPart a1 -> finite programmed initial;
end;

:: SCMFSA6A:th 16
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
proj1 b1 misses proj1 ProgramPart Relocated(b2,card b1);

:: SCMFSA6A:th 17
theorem
for b1 being Element of NAT
for b2 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
   card ProgramPart Relocated(b2,b1) = card b2;

:: SCMFSA6A:th 18
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   not halt SCM+FSA in proj2 Directed b1;

:: SCMFSA6A:th 19
theorem
for b1 being Element of NAT
for b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   ProgramPart Relocated(Directed b2,b1) = (ProgramPart Relocated(b2,b1)) * ((id the Instructions of SCM+FSA) +* ((halt SCM+FSA) .--> goto insloc (b1 + card b2)));

:: SCMFSA6A:th 20
theorem
for b1, b2 being finite Element of sproduct the Object-Kind of SCM+FSA holds
ProgramPart (b1 +* b2) = (ProgramPart b1) +* ProgramPart b2;

:: SCMFSA6A:th 21
theorem
for b1 being Element of NAT
for b2, b3 being finite Element of sproduct the Object-Kind of SCM+FSA holds
ProgramPart Relocated(b2 +* b3,b1) = (ProgramPart Relocated(b2,b1)) +* ProgramPart Relocated(b3,b1);

:: SCMFSA6A:th 22
theorem
for b1, b2 being Element of NAT
for b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   ProgramPart Relocated(ProgramPart Relocated(b3,b1),b2) = ProgramPart Relocated(b3,b1 + b2);

:: SCMFSA6A:funcnot 3 => SCMFSA6A:func 3
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  func Initialized A1 -> finite Element of sproduct the Object-Kind of SCM+FSA equals
    (a1 +* ((intloc 0) .--> 1)) +* Start-At insloc 0;
end;

:: SCMFSA6A:def 3
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA holds
   Initialized b1 = (b1 +* ((intloc 0) .--> 1)) +* Start-At insloc 0;

:: SCMFSA6A:th 23
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Element of product the Object-Kind of SCM+FSA
      st not InsCode b1 in {0,6,7,8}
   holds (Exec(b1,b2)) . IC SCM+FSA = Next IC b2;

:: SCMFSA6A:th 24
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   IC SCM+FSA in proj1 Initialized b1;

:: SCMFSA6A:th 25
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   IC Initialized b1 = insloc 0;

:: SCMFSA6A:th 26
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   b1 c= Initialized b1;

:: SCMFSA6A:th 28
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA
      st IC b1 = IC b2 &
         (for b3 being Int-Location holds
            b1 . b3 = b2 . b3) &
         (for b3 being FinSeq-Location holds
            b1 . b3 = b2 . b3)
   holds b1,b2 equal_outside NAT;

:: SCMFSA6A:th 30
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA
   st b1,b2 equal_outside NAT
for b3 being Int-Location holds
   b1 . b3 = b2 . b3;

:: SCMFSA6A:th 31
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA
   st b1,b2 equal_outside NAT
for b3 being FinSeq-Location holds
   b1 . b3 = b2 . b3;

:: SCMFSA6A:th 32
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2, b3 being Element of product the Object-Kind of SCM+FSA
      st b2,b3 equal_outside NAT
   holds Exec(b1,b2),Exec(b1,b3) equal_outside NAT;

:: SCMFSA6A:th 33
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   (Initialized b1) | NAT = b1;

:: SCMFSA6A:sch 1
scheme SCMFSA6A:sch 1
{F1 -> Element of the Instructions of SCM+FSA,
  F2 -> integer set,
  F3 -> FinSequence of INT,
  F4 -> Instruction-Location of SCM+FSA}:
ex b1 being Element of product the Object-Kind of SCM+FSA st
   IC b1 = F4() &
    (for b2 being Element of NAT holds
       b1 . insloc b2 = F1(b2) & b1 . intloc b2 = F2(b2) & b1 . fsloc b2 = F3(b2))


:: SCMFSA6A:th 34
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
   proj1 b1 = ((Int-Locations \/ FinSeq-Locations) \/ {IC SCM+FSA}) \/ NAT;

:: SCMFSA6A:th 35
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being set
      st b2 in proj1 b1 & b2 is not Int-Location & b2 is not FinSeq-Location & b2 <> IC SCM+FSA
   holds b2 is Instruction-Location of SCM+FSA;

:: SCMFSA6A:th 36
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA holds
   for b3 being Instruction-Location of SCM+FSA holds
      b1 . b3 = b2 . b3
iff
   b1 | NAT = b2 | NAT;

:: SCMFSA6A:th 37
theorem
for b1 being Instruction-Location of SCM+FSA holds
   not b1 in Int-Locations \/ FinSeq-Locations &
    not IC SCM+FSA in Int-Locations \/ FinSeq-Locations;

:: SCMFSA6A:th 38
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA holds
   (for b3 being Int-Location holds
       b1 . b3 = b2 . b3) &
    (for b3 being FinSeq-Location holds
       b1 . b3 = b2 . b3)
iff
   b1 | (Int-Locations \/ FinSeq-Locations) = b2 | (Int-Locations \/ FinSeq-Locations);

:: SCMFSA6A:th 39
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA
      st b1,b2 equal_outside NAT
   holds b1 | (Int-Locations \/ FinSeq-Locations) = b2 | (Int-Locations \/ FinSeq-Locations);

:: SCMFSA6A:th 40
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA
for b3 being set holds
   (b2 +* (b1 | b3)) | b3 = b1 | b3;

:: SCMFSA6A:th 41
theorem
for b1, b2 being Element of product the Object-Kind of SCM+FSA
for b3 being Element of NAT
for b4 being Element of the Instructions of SCM+FSA
      st (IC b1) + b3 = IC b2 &
         b1 | (Int-Locations \/ FinSeq-Locations) = b2 | (Int-Locations \/ FinSeq-Locations)
   holds (IC Exec(b4,b1)) + b3 = IC Exec(IncAddr(b4,b3),b2) &
    (Exec(b4,b1)) | (Int-Locations \/ FinSeq-Locations) = (Exec(IncAddr(b4,b3),b2)) | (Int-Locations \/ FinSeq-Locations);

:: SCMFSA6A:th 42
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
b1,b2 equal_outside NAT;

:: SCMFSA6A:th 43
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   proj1 Initialized b1 = ((proj1 b1) \/ {intloc 0}) \/ {IC SCM+FSA};

:: SCMFSA6A:th 44
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b2 being set
      st b2 in proj1 Initialized b1 & not b2 in proj1 b1 & b2 <> intloc 0
   holds b2 = IC SCM+FSA;

:: SCMFSA6A:th 45
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   intloc 0 in proj1 Initialized b1;

:: SCMFSA6A:th 46
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   (Initialized b1) . intloc 0 = 1 &
    (Initialized b1) . IC SCM+FSA = insloc 0;

:: SCMFSA6A:th 47
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   not intloc 0 in proj1 b1 & not IC SCM+FSA in proj1 b1;

:: SCMFSA6A:th 48
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b2 being Int-Location
      st b2 <> intloc 0
   holds not b2 in proj1 Initialized b1;

:: SCMFSA6A:th 49
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b2 being FinSeq-Location holds
   not b2 in proj1 Initialized b1;

:: SCMFSA6A:th 50
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b2 being set
      st b2 in proj1 b1
   holds b1 . b2 = (Initialized b1) . b2;

:: SCMFSA6A:th 51
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b3 being Element of product the Object-Kind of SCM+FSA
      st Initialized b2 c= b3
   holds b3 +* Initialized b1 = b3 +* b1;

:: SCMFSA6A:th 52
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b3 being Element of product the Object-Kind of SCM+FSA
      st Initialized b2 c= b3
   holds Initialized b1 c= b3 +* b1;

:: SCMFSA6A:th 53
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b3 being Element of product the Object-Kind of SCM+FSA holds
   b3 +* Initialized b1,b3 +* Initialized b2 equal_outside NAT;

:: SCMFSA6A:funcnot 4 => SCMFSA6A:func 4
definition
  let a1, a2 be finite programmed initial Element of sproduct the Object-Kind of SCM+FSA;
  func A1 ';' A2 -> finite programmed initial Element of sproduct the Object-Kind of SCM+FSA equals
    (Directed a1) +* ProgramPart Relocated(a2,card a1);
end;

:: SCMFSA6A:def 4
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
b1 ';' b2 = (Directed b1) +* ProgramPart Relocated(b2,card b1);

:: SCMFSA6A:th 54
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b3 being Instruction-Location of SCM+FSA
      st b3 in proj1 b1 & b1 . b3 <> halt SCM+FSA
   holds (b1 ';' b2) . b3 = b1 . b3;

:: SCMFSA6A:th 55
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
Directed b1 c= b1 ';' b2;

:: SCMFSA6A:th 56
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
proj1 b1 c= proj1 (b1 ';' b2);

:: SCMFSA6A:th 57
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
b1 +* (b1 ';' b2) = b1 ';' b2;

:: SCMFSA6A:th 58
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
(Initialized b1) +* (b1 ';' b2) = Initialized (b1 ';' b2);

:: SCMFSA6A:funcnot 5 => SCMFSA6A:func 5
definition
  let a1 be Element of the Instructions of SCM+FSA;
  let a2 be finite programmed initial Element of sproduct the Object-Kind of SCM+FSA;
  func A1 ';' A2 -> finite programmed initial Element of sproduct the Object-Kind of SCM+FSA equals
    (Macro a1) ';' a2;
end;

:: SCMFSA6A:def 5
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   b1 ';' b2 = (Macro b1) ';' b2;

:: SCMFSA6A:funcnot 6 => SCMFSA6A:func 6
definition
  let a1 be finite programmed initial Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of the Instructions of SCM+FSA;
  func A1 ';' A2 -> finite programmed initial Element of sproduct the Object-Kind of SCM+FSA equals
    a1 ';' Macro a2;
end;

:: SCMFSA6A:def 6
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of the Instructions of SCM+FSA holds
   b1 ';' b2 = b1 ';' Macro b2;

:: SCMFSA6A:funcnot 7 => SCMFSA6A:func 7
definition
  let a1, a2 be Element of the Instructions of SCM+FSA;
  func A1 ';' A2 -> finite programmed initial Element of sproduct the Object-Kind of SCM+FSA equals
    (Macro a1) ';' Macro a2;
end;

:: SCMFSA6A:def 7
theorem
for b1, b2 being Element of the Instructions of SCM+FSA holds
b1 ';' b2 = (Macro b1) ';' Macro b2;

:: SCMFSA6A:th 59
theorem
for b1, b2 being Element of the Instructions of SCM+FSA holds
b1 ';' b2 = (Macro b1) ';' b2;

:: SCMFSA6A:th 60
theorem
for b1, b2 being Element of the Instructions of SCM+FSA holds
b1 ';' b2 = b1 ';' Macro b2;

:: SCMFSA6A:th 61
theorem
for b1, b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
card (b1 ';' b2) = (card b1) + card b2;

:: SCMFSA6A:th 62
theorem
for b1, b2, b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
(b1 ';' b2) ';' b3 = b1 ';' (b2 ';' b3);

:: SCMFSA6A:th 63
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2, b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
(b2 ';' b3) ';' b1 = b2 ';' (b3 ';' b1);

:: SCMFSA6A:th 64
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2, b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
(b2 ';' b1) ';' b3 = b2 ';' (b1 ';' b3);

:: SCMFSA6A:th 65
theorem
for b1, b2 being Element of the Instructions of SCM+FSA
for b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   (b3 ';' b1) ';' b2 = b3 ';' (b1 ';' b2);

:: SCMFSA6A:th 66
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2, b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
(b1 ';' b2) ';' b3 = b1 ';' (b2 ';' b3);

:: SCMFSA6A:th 67
theorem
for b1, b2 being Element of the Instructions of SCM+FSA
for b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   (b1 ';' b3) ';' b2 = b1 ';' (b3 ';' b2);

:: SCMFSA6A:th 68
theorem
for b1, b2 being Element of the Instructions of SCM+FSA
for b3 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
   (b1 ';' b2) ';' b3 = b1 ';' (b2 ';' b3);

:: SCMFSA6A:th 69
theorem
for b1, b2, b3 being Element of the Instructions of SCM+FSA holds
(b1 ';' b2) ';' b3 = b1 ';' (b2 ';' b3);