Article SCMFSA_4, MML version 4.99.1005

:: SCMFSA_4:th 6
theorem
for b1, b2 being Instruction-Location of SCM+FSA
for b3 being Element of NAT holds
      Start-At (b1 + b3) = Start-At (b2 + b3)
   iff
      Start-At b1 = Start-At b2;

:: SCMFSA_4:th 7
theorem
for b1, b2 being Instruction-Location of SCM+FSA
for b3 being Element of NAT
      st Start-At b1 = Start-At b2
   holds Start-At (b1 -' b3) = Start-At (b2 -' b3);

:: SCMFSA_4:funcnot 1 => SCMFSA_4:func 1
definition
  let a1 be Element of the Instructions of SCM+FSA;
  let a2 be Element of NAT;
  func IncAddr(A1,A2) -> Element of the Instructions of SCM+FSA means
    ex b1 being Element of the Instructions of SCM st
       b1 = a1 & it = IncAddr(b1,a2)
    if InsCode a1 in {6,7,8}
    otherwise it = a1;
end;

:: SCMFSA_4:def 3
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Element of NAT
for b3 being Element of the Instructions of SCM+FSA holds
   (InsCode b1 in {6,7,8} implies    (b3 = IncAddr(b1,b2)
    iff
       ex b4 being Element of the Instructions of SCM st
          b4 = b1 & b3 = IncAddr(b4,b2))) &
    (InsCode b1 in {6,7,8} or    (b3 = IncAddr(b1,b2)
    iff
       b3 = b1));

:: SCMFSA_4:th 8
theorem
for b1 being Element of NAT holds
   IncAddr(halt SCM+FSA,b1) = halt SCM+FSA;

:: SCMFSA_4:th 9
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location holds
IncAddr(b2 := b3,b1) = b2 := b3;

:: SCMFSA_4:th 10
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location holds
IncAddr(AddTo(b2,b3),b1) = AddTo(b2,b3);

:: SCMFSA_4:th 11
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location holds
IncAddr(SubFrom(b2,b3),b1) = SubFrom(b2,b3);

:: SCMFSA_4:th 12
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location holds
IncAddr(MultBy(b2,b3),b1) = MultBy(b2,b3);

:: SCMFSA_4:th 13
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location holds
IncAddr(Divide(b2,b3),b1) = Divide(b2,b3);

:: SCMFSA_4:th 14
theorem
for b1 being Element of NAT
for b2 being Instruction-Location of SCM+FSA holds
   IncAddr(goto b2,b1) = goto (b2 + b1);

:: SCMFSA_4:th 15
theorem
for b1 being Element of NAT
for b2 being Instruction-Location of SCM+FSA
for b3 being Int-Location holds
   IncAddr(b3 =0_goto b2,b1) = b3 =0_goto (b2 + b1);

:: SCMFSA_4:th 16
theorem
for b1 being Element of NAT
for b2 being Instruction-Location of SCM+FSA
for b3 being Int-Location holds
   IncAddr(b3 >0_goto b2,b1) = b3 >0_goto (b2 + b1);

:: SCMFSA_4:th 17
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location
for b4 being FinSeq-Location holds
   IncAddr(b3 :=(b4,b2),b1) = b3 :=(b4,b2);

:: SCMFSA_4:th 18
theorem
for b1 being Element of NAT
for b2, b3 being Int-Location
for b4 being FinSeq-Location holds
   IncAddr((b4,b2):= b3,b1) = (b4,b2):= b3;

:: SCMFSA_4:th 19
theorem
for b1 being Element of NAT
for b2 being Int-Location
for b3 being FinSeq-Location holds
   IncAddr(b2 :=len b3,b1) = b2 :=len b3;

:: SCMFSA_4:th 20
theorem
for b1 being Element of NAT
for b2 being Int-Location
for b3 being FinSeq-Location holds
   IncAddr(b3 :=<0,...,0> b2,b1) = b3 :=<0,...,0> b2;

:: SCMFSA_4:th 21
theorem
for b1 being Element of NAT
for b2 being Element of the Instructions of SCM+FSA
for b3 being Element of the Instructions of SCM
      st b2 = b3
   holds IncAddr(b2,b1) = IncAddr(b3,b1);

:: SCMFSA_4:th 22
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Element of NAT holds
   InsCode IncAddr(b1,b2) = InsCode b1;

:: SCMFSA_4:attrnot 1 => SCMFSA_4:attr 1
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  attr a1 is initial means
    for b1, b2 being Element of NAT
          st b2 in proj1 a1 & b1 < b2
       holds b1 in proj1 a1;
end;

:: SCMFSA_4:dfs 2
definiens
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
To prove
     a1 is initial
it is sufficient to prove
  thus for b1, b2 being Element of NAT
          st b2 in proj1 a1 & b1 < b2
       holds b1 in proj1 a1;

:: SCMFSA_4:def 4
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA holds
      b1 is initial
   iff
      for b2, b3 being Element of NAT
            st b3 in proj1 b1 & b2 < b3
         holds b2 in proj1 b1;

:: SCMFSA_4:funcnot 2 => SCMFSA_4:func 2
definition
  func SCM+FSA-Stop -> finite Element of sproduct the Object-Kind of SCM+FSA equals
    (insloc 0) .--> halt SCM+FSA;
end;

:: SCMFSA_4:def 5
theorem
SCM+FSA-Stop = (insloc 0) .--> halt SCM+FSA;

:: SCMFSA_4:funcreg 1
registration
  cluster SCM+FSA-Stop -> non empty finite programmed initial;
end;

:: SCMFSA_4:exreg 1
registration
  cluster non empty Relation-like Function-like finite programmed initial Element of sproduct the Object-Kind of SCM+FSA;
end;

:: SCMFSA_4:th 23
theorem
for b1, b2 being Element of NAT
for b3 being Element of the Instructions of SCM+FSA holds
   IncAddr(IncAddr(b3,b1),b2) = IncAddr(b3,b1 + b2);

:: SCMFSA_4:funcnot 3 => SCMFSA_4:func 3
definition
  let a1 be finite programmed Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of NAT;
  func IncAddr(A1,A2) -> finite programmed Element of sproduct the Object-Kind of SCM+FSA means
    proj1 it = proj1 a1 &
     (for b1 being Element of NAT
           st insloc b1 in proj1 a1
        holds it . insloc b1 = IncAddr(pi(a1,b1),a2));
end;

:: SCMFSA_4:def 6
theorem
for b1 being finite programmed Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of NAT
for b3 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
      b3 = IncAddr(b1,b2)
   iff
      proj1 b3 = proj1 b1 &
       (for b4 being Element of NAT
             st insloc b4 in proj1 b1
          holds b3 . insloc b4 = IncAddr(pi(b1,b4),b2));

:: SCMFSA_4:th 24
theorem
for b1 being finite programmed Element of sproduct the Object-Kind of SCM+FSA
for b2, b3 being Element of NAT
      st b3 in proj1 b1
   holds (IncAddr(b1,b2)) . b3 = IncAddr(pi(b1,b3),b2);

:: SCMFSA_4:th 25
theorem
for b1 being Element of NAT
for b2, b3 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
IncAddr(b2 +* b3,b1) = (IncAddr(b2,b1)) +* IncAddr(b3,b1);

:: SCMFSA_4:th 26
theorem
for b1 being Element of NAT
for b2 being Element of the Instructions of SCM+FSA
for b3 being Function-like quasi_total Relation of the Instructions of SCM+FSA,the Instructions of SCM+FSA
   st b3 = (id the Instructions of SCM+FSA) +* ((halt SCM+FSA) .--> b2)
for b4 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
   IncAddr(b3 * b4,b1) = (IncAddr(b4,b1)) * ((id the Instructions of SCM+FSA) +* ((halt SCM+FSA) .--> IncAddr(b2,b1)));

:: SCMFSA_4:th 27
theorem
for b1, b2 being Element of NAT
for b3 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
   IncAddr(IncAddr(b3,b1),b2) = IncAddr(b3,b1 + b2);

:: SCMFSA_4:th 28
theorem
for b1 being Element of NAT
for b2 being Element of product the Object-Kind of SCM+FSA holds
   Exec(IncAddr(CurInstr b2,b1),b2 +* Start-At ((IC b2) + b1)) = (Following b2) +* Start-At ((IC Following b2) + b1);

:: SCMFSA_4:th 29
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Element of product the Object-Kind of SCM+FSA
for b3 being finite Element of sproduct the Object-Kind of SCM+FSA
for b4, b5, b6 being Element of NAT
      st IC b2 = b5 + b6
   holds Exec(b1,b2 +* Start-At ((IC b2) -' b6)) = (Exec(IncAddr(b1,b6),b2)) +* Start-At ((IC Exec(IncAddr(b1,b6),b2)) -' b6);

:: SCMFSA_4:th 35
theorem
for b1, b2 being Element of NAT
for b3 being finite programmed Element of sproduct the Object-Kind of SCM+FSA holds
   Shift(IncAddr(b3,b1),b2) = IncAddr(Shift(b3,b2),b1);