Article SCMFSA_2, MML version 4.99.1005

:: SCMFSA_2:funcnot 1 => SCMFSA_2:func 1
definition
  func SCM+FSA -> strict AMI-Struct over NAT,{INT,INT *} equals
    AMI-Struct(#SCM+FSA-Memory,In(NAT,SCM+FSA-Memory),SCM+FSA-Instr,SCM+FSA-OK,SCM+FSA-Exec#);
end;

:: SCMFSA_2:def 1
theorem
SCM+FSA = AMI-Struct(#SCM+FSA-Memory,In(NAT,SCM+FSA-Memory),SCM+FSA-Instr,SCM+FSA-OK,SCM+FSA-Exec#);

:: SCMFSA_2:funcreg 1
registration
  cluster SCM+FSA -> non empty strict stored-program standard-ins;
end;

:: SCMFSA_2:th 7
theorem
IC SCM+FSA = NAT;

:: SCMFSA_2:funcnot 2 => SCMFSA_2:func 2
definition
  func Int-Locations -> Element of bool the carrier of SCM+FSA equals
    SCM+FSA-Data-Loc;
end;

:: SCMFSA_2:def 2
theorem
Int-Locations = SCM+FSA-Data-Loc;

:: SCMFSA_2:funcnot 3 => SCMFSA_2:func 3
definition
  func FinSeq-Locations -> Element of bool the carrier of SCM+FSA equals
    SCM+FSA-Data*-Loc;
end;

:: SCMFSA_2:def 3
theorem
FinSeq-Locations = SCM+FSA-Data*-Loc;

:: SCMFSA_2:th 8
theorem
the carrier of SCM+FSA = ((Int-Locations \/ FinSeq-Locations) \/ {IC SCM+FSA}) \/ NAT;

:: SCMFSA_2:modenot 1 => SCMFSA_2:mode 1
definition
  mode Int-Location -> Element of the carrier of SCM+FSA means
    it in SCM+FSA-Data-Loc;
end;

:: SCMFSA_2:dfs 4
definiens
  let a1 be Element of the carrier of SCM+FSA;
To prove
     a1 is Int-Location
it is sufficient to prove
  thus a1 in SCM+FSA-Data-Loc;

:: SCMFSA_2:def 4
theorem
for b1 being Element of the carrier of SCM+FSA holds
      b1 is Int-Location
   iff
      b1 in SCM+FSA-Data-Loc;

:: SCMFSA_2:modenot 2 => SCMFSA_2:mode 2
definition
  mode FinSeq-Location -> Element of the carrier of SCM+FSA means
    it in SCM+FSA-Data*-Loc;
end;

:: SCMFSA_2:dfs 5
definiens
  let a1 be Element of the carrier of SCM+FSA;
To prove
     a1 is FinSeq-Location
it is sufficient to prove
  thus a1 in SCM+FSA-Data*-Loc;

:: SCMFSA_2:def 5
theorem
for b1 being Element of the carrier of SCM+FSA holds
      b1 is FinSeq-Location
   iff
      b1 in SCM+FSA-Data*-Loc;

:: SCMFSA_2:th 9
theorem
for b1 being Int-Location holds
   b1 in Int-Locations;

:: SCMFSA_2:th 10
theorem
for b1 being FinSeq-Location holds
   b1 in FinSeq-Locations;

:: SCMFSA_2:th 11
theorem
for b1 being set
      st b1 in Int-Locations
   holds b1 is Int-Location;

:: SCMFSA_2:th 12
theorem
for b1 being set
      st b1 in FinSeq-Locations
   holds b1 is FinSeq-Location;

:: SCMFSA_2:th 13
theorem
Int-Locations misses NAT;

:: SCMFSA_2:th 14
theorem
FinSeq-Locations misses NAT;

:: SCMFSA_2:th 15
theorem
Int-Locations misses FinSeq-Locations;

:: SCMFSA_2:funcnot 4 => SCMFSA_2:func 4
definition
  let a1 be natural set;
  func intloc A1 -> Int-Location equals
    dl. a1;
end;

:: SCMFSA_2:def 6
theorem
for b1 being natural set holds
   intloc b1 = dl. b1;

:: SCMFSA_2:funcnot 5 => SCMFSA_2:func 5
definition
  let a1 be natural set;
  func insloc A1 -> Instruction-Location of SCM+FSA equals
    a1;
end;

:: SCMFSA_2:def 7
theorem
for b1 being natural set holds
   insloc b1 = b1;

:: SCMFSA_2:funcnot 6 => SCMFSA_2:func 6
definition
  let a1 be natural set;
  func fsloc A1 -> FinSeq-Location equals
    - (a1 + 1);
end;

:: SCMFSA_2:def 8
theorem
for b1 being natural set holds
   fsloc b1 = - (b1 + 1);

:: SCMFSA_2:th 17
theorem
for b1, b2 being natural set
      st b1 <> b2
   holds fsloc b1 <> fsloc b2;

:: SCMFSA_2:th 19
theorem
for b1 being Int-Location holds
   ex b2 being Element of NAT st
      b1 = intloc b2;

:: SCMFSA_2:th 20
theorem
for b1 being FinSeq-Location holds
   ex b2 being Element of NAT st
      b1 = fsloc b2;

:: SCMFSA_2:th 23
theorem
FinSeq-Locations is infinite;

:: SCMFSA_2:th 24
theorem
NAT is infinite;

:: SCMFSA_2:th 25
theorem
for b1 being Int-Location holds
   b1 is Data-Location;

:: SCMFSA_2:th 26
theorem
for b1 being Int-Location holds
   ObjectKind b1 = INT;

:: SCMFSA_2:th 27
theorem
for b1 being FinSeq-Location holds
   ObjectKind b1 = INT *;

:: SCMFSA_2:th 28
theorem
for b1 being set
      st b1 in SCM+FSA-Data-Loc
   holds b1 is Int-Location;

:: SCMFSA_2:th 29
theorem
for b1 being set
      st b1 in SCM+FSA-Data*-Loc
   holds b1 is FinSeq-Location;

:: SCMFSA_2:funcreg 2
registration
  let a1 be Element of the Instructions of SCM+FSA;
  cluster a1 `1 -> natural;
end;

:: SCMFSA_2:th 34
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 <= 8
   holds b1 is Element of the Instructions of SCM;

:: SCMFSA_2:th 35
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   InsCode b1 <= 12;

:: SCMFSA_2:th 37
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Element of the Instructions of SCM
      st b1 = b2
   holds InsCode b1 = InsCode b2;

:: SCMFSA_2:th 38
theorem
for b1 being Element of the Instructions of SCM holds
   b1 is Element of the Instructions of SCM+FSA;

:: SCMFSA_2:funcnot 7 => SCMFSA_2:func 7
definition
  let a1, a2 be Int-Location;
  func A1 := A2 -> Element of the Instructions of SCM+FSA means
    ex b1, b2 being Data-Location st
       a1 = b1 & a2 = b2 & it = b1 := b2;
end;

:: SCMFSA_2:def 11
theorem
for b1, b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = b1 := b2
   iff
      ex b4, b5 being Data-Location st
         b1 = b4 & b2 = b5 & b3 = b4 := b5;

:: SCMFSA_2:funcnot 8 => SCMFSA_2:func 8
definition
  let a1, a2 be Int-Location;
  func AddTo(A1,A2) -> Element of the Instructions of SCM+FSA means
    ex b1, b2 being Data-Location st
       a1 = b1 & a2 = b2 & it = AddTo(b1,b2);
end;

:: SCMFSA_2:def 12
theorem
for b1, b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = AddTo(b1,b2)
   iff
      ex b4, b5 being Data-Location st
         b1 = b4 & b2 = b5 & b3 = AddTo(b4,b5);

:: SCMFSA_2:funcnot 9 => SCMFSA_2:func 9
definition
  let a1, a2 be Int-Location;
  func SubFrom(A1,A2) -> Element of the Instructions of SCM+FSA means
    ex b1, b2 being Data-Location st
       a1 = b1 & a2 = b2 & it = SubFrom(b1,b2);
end;

:: SCMFSA_2:def 13
theorem
for b1, b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = SubFrom(b1,b2)
   iff
      ex b4, b5 being Data-Location st
         b1 = b4 & b2 = b5 & b3 = SubFrom(b4,b5);

:: SCMFSA_2:funcnot 10 => SCMFSA_2:func 10
definition
  let a1, a2 be Int-Location;
  func MultBy(A1,A2) -> Element of the Instructions of SCM+FSA means
    ex b1, b2 being Data-Location st
       a1 = b1 & a2 = b2 & it = MultBy(b1,b2);
end;

:: SCMFSA_2:def 14
theorem
for b1, b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = MultBy(b1,b2)
   iff
      ex b4, b5 being Data-Location st
         b1 = b4 & b2 = b5 & b3 = MultBy(b4,b5);

:: SCMFSA_2:funcnot 11 => SCMFSA_2:func 11
definition
  let a1, a2 be Int-Location;
  func Divide(A1,A2) -> Element of the Instructions of SCM+FSA means
    ex b1, b2 being Data-Location st
       a1 = b1 & a2 = b2 & it = Divide(b1,b2);
end;

:: SCMFSA_2:def 15
theorem
for b1, b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = Divide(b1,b2)
   iff
      ex b4, b5 being Data-Location st
         b1 = b4 & b2 = b5 & b3 = Divide(b4,b5);

:: SCMFSA_2:th 39
theorem
NAT = NAT;

:: SCMFSA_2:funcnot 12 => SCMFSA_2:func 12
definition
  let a1 be Instruction-Location of SCM+FSA;
  func goto A1 -> Element of the Instructions of SCM+FSA means
    ex b1 being Instruction-Location of SCM st
       a1 = b1 & it = goto b1;
end;

:: SCMFSA_2:def 16
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Element of the Instructions of SCM+FSA holds
      b2 = goto b1
   iff
      ex b3 being Instruction-Location of SCM st
         b1 = b3 & b2 = goto b3;

:: SCMFSA_2:funcnot 13 => SCMFSA_2:func 13
definition
  let a1 be Instruction-Location of SCM+FSA;
  let a2 be Int-Location;
  func A2 =0_goto A1 -> Element of the Instructions of SCM+FSA means
    ex b1 being Data-Location st
       ex b2 being Instruction-Location of SCM st
          a2 = b1 & a1 = b2 & it = b1 =0_goto b2;
end;

:: SCMFSA_2:def 17
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = b2 =0_goto b1
   iff
      ex b4 being Data-Location st
         ex b5 being Instruction-Location of SCM st
            b2 = b4 & b1 = b5 & b3 = b4 =0_goto b5;

:: SCMFSA_2:funcnot 14 => SCMFSA_2:func 14
definition
  let a1 be Instruction-Location of SCM+FSA;
  let a2 be Int-Location;
  func A2 >0_goto A1 -> Element of the Instructions of SCM+FSA means
    ex b1 being Data-Location st
       ex b2 being Instruction-Location of SCM st
          a2 = b1 & a1 = b2 & it = b1 >0_goto b2;
end;

:: SCMFSA_2:def 18
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location
for b3 being Element of the Instructions of SCM+FSA holds
      b3 = b2 >0_goto b1
   iff
      ex b4 being Data-Location st
         ex b5 being Instruction-Location of SCM st
            b2 = b4 & b1 = b5 & b3 = b4 >0_goto b5;

:: SCMFSA_2:funcnot 15 => SCMFSA_2:func 15
definition
  let a1, a2 be Int-Location;
  let a3 be FinSeq-Location;
  func A1 :=(A3,A2) -> Element of the Instructions of SCM+FSA equals
    [9,<*a1,a3,a2*>];
end;

:: SCMFSA_2:def 19
theorem
for b1, b2 being Int-Location
for b3 being FinSeq-Location holds
   b1 :=(b3,b2) = [9,<*b1,b3,b2*>];

:: SCMFSA_2:funcnot 16 => SCMFSA_2:func 16
definition
  let a1, a2 be Int-Location;
  let a3 be FinSeq-Location;
  func (A3,A2):= A1 -> Element of the Instructions of SCM+FSA equals
    [10,<*a1,a3,a2*>];
end;

:: SCMFSA_2:def 20
theorem
for b1, b2 being Int-Location
for b3 being FinSeq-Location holds
   (b3,b2):= b1 = [10,<*b1,b3,b2*>];

:: SCMFSA_2:funcnot 17 => SCMFSA_2:func 17
definition
  let a1 be Int-Location;
  let a2 be FinSeq-Location;
  func A1 :=len A2 -> Element of the Instructions of SCM+FSA equals
    [11,<*a1,a2*>];
end;

:: SCMFSA_2:def 21
theorem
for b1 being Int-Location
for b2 being FinSeq-Location holds
   b1 :=len b2 = [11,<*b1,b2*>];

:: SCMFSA_2:funcnot 18 => SCMFSA_2:func 18
definition
  let a1 be Int-Location;
  let a2 be FinSeq-Location;
  func A2 :=<0,...,0> A1 -> Element of the Instructions of SCM+FSA equals
    [12,<*a1,a2*>];
end;

:: SCMFSA_2:def 22
theorem
for b1 being Int-Location
for b2 being FinSeq-Location holds
   b2 :=<0,...,0> b1 = [12,<*b1,b2*>];

:: SCMFSA_2:th 42
theorem
for b1, b2 being Int-Location holds
InsCode (b1 := b2) = 1;

:: SCMFSA_2:th 43
theorem
for b1, b2 being Int-Location holds
InsCode AddTo(b1,b2) = 2;

:: SCMFSA_2:th 44
theorem
for b1, b2 being Int-Location holds
InsCode SubFrom(b1,b2) = 3;

:: SCMFSA_2:th 45
theorem
for b1, b2 being Int-Location holds
InsCode MultBy(b1,b2) = 4;

:: SCMFSA_2:th 46
theorem
for b1, b2 being Int-Location holds
InsCode Divide(b1,b2) = 5;

:: SCMFSA_2:th 47
theorem
for b1 being Instruction-Location of SCM+FSA holds
   InsCode goto b1 = 6;

:: SCMFSA_2:th 48
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location holds
   InsCode (b2 =0_goto b1) = 7;

:: SCMFSA_2:th 49
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location holds
   InsCode (b2 >0_goto b1) = 8;

:: SCMFSA_2:th 50
theorem
for b1 being FinSeq-Location
for b2, b3 being Int-Location holds
InsCode (b2 :=(b1,b3)) = 9;

:: SCMFSA_2:th 51
theorem
for b1 being FinSeq-Location
for b2, b3 being Int-Location holds
InsCode ((b1,b2):= b3) = 10;

:: SCMFSA_2:th 52
theorem
for b1 being FinSeq-Location
for b2 being Int-Location holds
   InsCode (b2 :=len b1) = 11;

:: SCMFSA_2:th 53
theorem
for b1 being FinSeq-Location
for b2 being Int-Location holds
   InsCode (b1 :=<0,...,0> b2) = 12;

:: SCMFSA_2:th 54
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 1
   holds ex b2, b3 being Int-Location st
      b1 = b2 := b3;

:: SCMFSA_2:th 55
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 2
   holds ex b2, b3 being Int-Location st
      b1 = AddTo(b2,b3);

:: SCMFSA_2:th 56
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 3
   holds ex b2, b3 being Int-Location st
      b1 = SubFrom(b2,b3);

:: SCMFSA_2:th 57
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 4
   holds ex b2, b3 being Int-Location st
      b1 = MultBy(b2,b3);

:: SCMFSA_2:th 58
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 5
   holds ex b2, b3 being Int-Location st
      b1 = Divide(b2,b3);

:: SCMFSA_2:th 59
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 6
   holds ex b2 being Instruction-Location of SCM+FSA st
      b1 = goto b2;

:: SCMFSA_2:th 60
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 7
   holds ex b2 being Instruction-Location of SCM+FSA st
      ex b3 being Int-Location st
         b1 = b3 =0_goto b2;

:: SCMFSA_2:th 61
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 8
   holds ex b2 being Instruction-Location of SCM+FSA st
      ex b3 being Int-Location st
         b1 = b3 >0_goto b2;

:: SCMFSA_2:th 62
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 9
   holds ex b2, b3 being Int-Location st
      ex b4 being FinSeq-Location st
         b1 = b3 :=(b4,b2);

:: SCMFSA_2:th 63
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 10
   holds ex b2, b3 being Int-Location st
      ex b4 being FinSeq-Location st
         b1 = (b4,b2):= b3;

:: SCMFSA_2:th 64
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 11
   holds ex b2 being Int-Location st
      ex b3 being FinSeq-Location st
         b1 = b2 :=len b3;

:: SCMFSA_2:th 65
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = 12
   holds ex b2 being Int-Location st
      ex b3 being FinSeq-Location st
         b1 = b3 :=<0,...,0> b2;

:: SCMFSA_2:th 66
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being Int-Location holds
   b2 in proj1 b1;

:: SCMFSA_2:th 67
theorem
for b1 being FinSeq-Location
for b2 being Element of product the Object-Kind of SCM+FSA holds
   b1 in proj1 b2;

:: SCMFSA_2:th 68
theorem
for b1 being FinSeq-Location
for b2 being Element of product the Object-Kind of SCM holds
   not b1 in proj1 b2;

:: SCMFSA_2:th 69
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
   Int-Locations c= proj1 b1;

:: SCMFSA_2:th 70
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
   FinSeq-Locations c= proj1 b1;

:: SCMFSA_2:th 71
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
   proj1 (b1 | Int-Locations) = Int-Locations;

:: SCMFSA_2:th 72
theorem
for b1 being Element of product the Object-Kind of SCM+FSA holds
   proj1 (b1 | FinSeq-Locations) = FinSeq-Locations;

:: SCMFSA_2:th 73
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being Element of the Instructions of SCM holds
   (b1 | SCM-Memory) +* (NAT --> b2) is Element of product the Object-Kind of SCM;

:: SCMFSA_2:th 74
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being Element of product the Object-Kind of SCM holds
   (b1 +* b2) +* (b1 | NAT) is Element of product the Object-Kind of SCM+FSA;

:: SCMFSA_2:th 75
theorem
for b1 being Element of the Instructions of SCM
for b2 being Element of the Instructions of SCM+FSA
for b3 being Element of product the Object-Kind of SCM
for b4 being Element of product the Object-Kind of SCM+FSA
      st b1 = b2 &
         b3 = (b4 | SCM-Memory) +* (NAT --> b1)
   holds Exec(b2,b4) = (b4 +* Exec(b1,b3)) +* (b4 | NAT);

:: SCMFSA_2:funcnot 19 => SCMFSA_2:func 19
definition
  let a1 be Element of product the Object-Kind of SCM+FSA;
  let a2 be Int-Location;
  redefine func a1 . a2 -> integer set;
end;

:: SCMFSA_2:funcnot 20 => SCMFSA_2:func 20
definition
  let a1 be Element of product the Object-Kind of SCM+FSA;
  let a2 be FinSeq-Location;
  redefine func a1 . a2 -> FinSequence of INT;
end;

:: SCMFSA_2:th 76
theorem
for b1 being Element of the Instructions of SCM
for b2 being Element of product the Object-Kind of SCM
for b3 being Element of product the Object-Kind of SCM+FSA
      st b2 = (b3 | SCM-Memory) +* (NAT --> b1)
   holds b3 = (b3 +* b2) +* (b3 | NAT);

:: SCMFSA_2:th 78
theorem
for b1 being Element of product the Object-Kind of SCM
for b2, b3 being Element of product the Object-Kind of SCM+FSA
      st b2 = (b3 +* b1) +* (b3 | NAT)
   holds b2 . IC SCM+FSA = b1 . IC SCM;

:: SCMFSA_2:th 79
theorem
for b1 being Data-Location
for b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM
for b4, b5 being Element of product the Object-Kind of SCM+FSA
      st b4 = (b5 +* b3) +* (b5 | NAT) & b1 = b2
   holds b3 . b1 = b4 . b2;

:: SCMFSA_2:th 80
theorem
for b1 being Element of the Instructions of SCM
for b2 being Data-Location
for b3 being Int-Location
for b4 being Element of product the Object-Kind of SCM
for b5 being Element of product the Object-Kind of SCM+FSA
      st b4 = (b5 | SCM-Memory) +* (NAT --> b1) &
         b2 = b3
   holds b4 . b2 = b5 . b3;

:: SCMFSA_2:funcreg 3
registration
  cluster SCM+FSA -> strict IC-Ins-separated steady-programmed definite realistic;
end;

:: SCMFSA_2:th 81
theorem
for b1 being Int-Location holds
   b1 <> IC SCM+FSA;

:: SCMFSA_2:th 82
theorem
for b1 being FinSeq-Location holds
   b1 <> IC SCM+FSA;

:: SCMFSA_2:th 83
theorem
for b1 being Int-Location
for b2 being FinSeq-Location holds
   b1 <> b2;

:: SCMFSA_2:th 84
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location holds
   b1 <> b2;

:: SCMFSA_2:th 85
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being FinSeq-Location holds
   b1 <> b2;

:: SCMFSA_2:th 86
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) &
         (for b3 being Instruction-Location of SCM+FSA holds
            b1 . b3 = b2 . b3)
   holds b1 = b2;

:: SCMFSA_2:th 88
theorem
for b1 being Element of the Instructions of SCM
for b2 being Element of product the Object-Kind of SCM
for b3 being Element of product the Object-Kind of SCM+FSA
      st b2 = (b3 | SCM-Memory) +* (NAT --> b1)
   holds IC b3 = IC b2;

:: SCMFSA_2:th 89
theorem
for b1, b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(b1 := b2,b3)) . IC SCM+FSA = succ IC b3 &
    (Exec(b1 := b2,b3)) . b1 = b3 . b2 &
    (for b4 being Int-Location
          st b4 <> b1
       holds (Exec(b1 := b2,b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(b1 := b2,b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 90
theorem
for b1, b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(AddTo(b1,b2),b3)) . IC SCM+FSA = succ IC b3 &
    (Exec(AddTo(b1,b2),b3)) . b1 = (b3 . b1) + (b3 . b2) &
    (for b4 being Int-Location
          st b4 <> b1
       holds (Exec(AddTo(b1,b2),b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(AddTo(b1,b2),b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 91
theorem
for b1, b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(SubFrom(b1,b2),b3)) . IC SCM+FSA = succ IC b3 &
    (Exec(SubFrom(b1,b2),b3)) . b1 = (b3 . b1) - (b3 . b2) &
    (for b4 being Int-Location
          st b4 <> b1
       holds (Exec(SubFrom(b1,b2),b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(SubFrom(b1,b2),b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 92
theorem
for b1, b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(MultBy(b1,b2),b3)) . IC SCM+FSA = succ IC b3 &
    (Exec(MultBy(b1,b2),b3)) . b1 = (b3 . b1) * (b3 . b2) &
    (for b4 being Int-Location
          st b4 <> b1
       holds (Exec(MultBy(b1,b2),b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(MultBy(b1,b2),b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 93
theorem
for b1, b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(Divide(b1,b2),b3)) . IC SCM+FSA = succ IC b3 &
    (b1 = b2 or (Exec(Divide(b1,b2),b3)) . b1 = (b3 . b1) div (b3 . b2)) &
    (Exec(Divide(b1,b2),b3)) . b2 = (b3 . b1) mod (b3 . b2) &
    (for b4 being Int-Location
          st b4 <> b1 & b4 <> b2
       holds (Exec(Divide(b1,b2),b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(Divide(b1,b2),b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 94
theorem
for b1 being Int-Location
for b2 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(Divide(b1,b1),b2)) . IC SCM+FSA = succ IC b2 &
    (Exec(Divide(b1,b1),b2)) . b1 = (b2 . b1) mod (b2 . b1) &
    (for b3 being Int-Location
          st b3 <> b1
       holds (Exec(Divide(b1,b1),b2)) . b3 = b2 . b3) &
    (for b3 being FinSeq-Location holds
       (Exec(Divide(b1,b1),b2)) . b3 = b2 . b3);

:: SCMFSA_2:th 95
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(goto b1,b2)) . IC SCM+FSA = b1 &
    (for b3 being Int-Location holds
       (Exec(goto b1,b2)) . b3 = b2 . b3) &
    (for b3 being FinSeq-Location holds
       (Exec(goto b1,b2)) . b3 = b2 . b3);

:: SCMFSA_2:th 96
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (b3 . b2 = {} implies (Exec(b2 =0_goto b1,b3)) . IC SCM+FSA = b1) &
    (b3 . b2 = {} or (Exec(b2 =0_goto b1,b3)) . IC SCM+FSA = succ IC b3) &
    (for b4 being Int-Location holds
       (Exec(b2 =0_goto b1,b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(b2 =0_goto b1,b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 97
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (b3 . b2 <= {} or (Exec(b2 >0_goto b1,b3)) . IC SCM+FSA = b1) &
    (b3 . b2 <= {} implies (Exec(b2 >0_goto b1,b3)) . IC SCM+FSA = succ IC b3) &
    (for b4 being Int-Location holds
       (Exec(b2 >0_goto b1,b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(b2 >0_goto b1,b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 98
theorem
for b1 being FinSeq-Location
for b2, b3 being Int-Location
for b4 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(b2 :=(b1,b3),b4)) . IC SCM+FSA = succ IC b4 &
    (ex b5 being Element of NAT st
       b5 = abs (b4 . b3) &
        (Exec(b2 :=(b1,b3),b4)) . b2 = (b4 . b1) /. b5) &
    (for b5 being Int-Location
          st b5 <> b2
       holds (Exec(b2 :=(b1,b3),b4)) . b5 = b4 . b5) &
    (for b5 being FinSeq-Location holds
       (Exec(b2 :=(b1,b3),b4)) . b5 = b4 . b5);

:: SCMFSA_2:th 99
theorem
for b1 being FinSeq-Location
for b2, b3 being Int-Location
for b4 being Element of product the Object-Kind of SCM+FSA holds
   (Exec((b1,b2):= b3,b4)) . IC SCM+FSA = succ IC b4 &
    (ex b5 being Element of NAT st
       b5 = abs (b4 . b2) &
        (Exec((b1,b2):= b3,b4)) . b1 = (b4 . b1) +*(b5,b4 . b3)) &
    (for b5 being Int-Location holds
       (Exec((b1,b2):= b3,b4)) . b5 = b4 . b5) &
    (for b5 being FinSeq-Location
          st b5 <> b1
       holds (Exec((b1,b2):= b3,b4)) . b5 = b4 . b5);

:: SCMFSA_2:th 100
theorem
for b1 being FinSeq-Location
for b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(b2 :=len b1,b3)) . IC SCM+FSA = succ IC b3 &
    (Exec(b2 :=len b1,b3)) . b2 = len (b3 . b1) &
    (for b4 being Int-Location
          st b4 <> b2
       holds (Exec(b2 :=len b1,b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location holds
       (Exec(b2 :=len b1,b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 101
theorem
for b1 being FinSeq-Location
for b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA holds
   (Exec(b1 :=<0,...,0> b2,b3)) . IC SCM+FSA = succ IC b3 &
    (ex b4 being Element of NAT st
       b4 = abs (b3 . b2) &
        (Exec(b1 :=<0,...,0> b2,b3)) . b1 = b4 |-> {}) &
    (for b4 being Int-Location holds
       (Exec(b1 :=<0,...,0> b2,b3)) . b4 = b3 . b4) &
    (for b4 being FinSeq-Location
          st b4 <> b1
       holds (Exec(b1 :=<0,...,0> b2,b3)) . b4 = b3 . b4);

:: SCMFSA_2:th 102
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being Element of product SCM+FSA-OK
      st b2 = b1
   holds IC b1 = IC b2;

:: SCMFSA_2:th 103
theorem
for b1 being Element of the Instructions of SCM
for b2 being Element of the Instructions of SCM+FSA
      st b1 = b2 & b1 is halting(NAT, {INT}, SCM)
   holds b2 is halting(NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 104
theorem
for b1 being Element of the Instructions of SCM+FSA
      st ex b2 being Element of product the Object-Kind of SCM+FSA st
           (Exec(b1,b2)) . IC SCM+FSA = succ IC b2
   holds b1 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 105
theorem
for b1, b2 being Int-Location holds
b1 := b2 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 106
theorem
for b1, b2 being Int-Location holds
AddTo(b1,b2) is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 107
theorem
for b1, b2 being Int-Location holds
SubFrom(b1,b2) is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 108
theorem
for b1, b2 being Int-Location holds
MultBy(b1,b2) is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 109
theorem
for b1, b2 being Int-Location holds
Divide(b1,b2) is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 110
theorem
for b1 being Instruction-Location of SCM+FSA holds
   goto b1 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 111
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location holds
   b2 =0_goto b1 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 112
theorem
for b1 being Instruction-Location of SCM+FSA
for b2 being Int-Location holds
   b2 >0_goto b1 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 113
theorem
for b1 being FinSeq-Location
for b2, b3 being Int-Location holds
b2 :=(b1,b3) is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 114
theorem
for b1 being FinSeq-Location
for b2, b3 being Int-Location holds
(b1,b2):= b3 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 115
theorem
for b1 being FinSeq-Location
for b2 being Int-Location holds
   b2 :=len b1 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 116
theorem
for b1 being FinSeq-Location
for b2 being Int-Location holds
   b1 :=<0,...,0> b2 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 118
theorem
for b1 being Element of the Instructions of SCM+FSA
      st b1 = [{},{}]
   holds b1 is halting(NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 119
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = {}
   holds b1 = [{},{}];

:: SCMFSA_2:th 120
theorem
for b1 being set holds
      b1 is Element of the Instructions of SCM+FSA
   iff
      (b1 <> [{},{}] &
       (for b2, b3 being Int-Location holds
       b1 <> b2 := b3) &
       (for b2, b3 being Int-Location holds
       b1 <> AddTo(b2,b3)) &
       (for b2, b3 being Int-Location holds
       b1 <> SubFrom(b2,b3)) &
       (for b2, b3 being Int-Location holds
       b1 <> MultBy(b2,b3)) &
       (for b2, b3 being Int-Location holds
       b1 <> Divide(b2,b3)) &
       (for b2 being Instruction-Location of SCM+FSA holds
          b1 <> goto b2) &
       (for b2 being Instruction-Location of SCM+FSA
       for b3 being Int-Location holds
          b1 <> b3 =0_goto b2) &
       (for b2 being Instruction-Location of SCM+FSA
       for b3 being Int-Location holds
          b1 <> b3 >0_goto b2) &
       (for b2, b3 being Int-Location
       for b4 being FinSeq-Location holds
          b1 <> b3 :=(b4,b2)) &
       (for b2, b3 being Int-Location
       for b4 being FinSeq-Location holds
          b1 <> (b4,b2):= b3) &
       (for b2 being Int-Location
       for b3 being FinSeq-Location holds
          b1 <> b2 :=len b3) implies ex b2 being Int-Location st
         ex b3 being FinSeq-Location st
            b1 = b3 :=<0,...,0> b2);

:: SCMFSA_2:funcreg 4
registration
  cluster SCM+FSA -> strict halting;
end;

:: SCMFSA_2:th 121
theorem
for b1 being Element of the Instructions of SCM+FSA
      st b1 is halting(NAT, {INT,INT *}, SCM+FSA)
   holds b1 = halt SCM+FSA;

:: SCMFSA_2:th 122
theorem
for b1 being Element of the Instructions of SCM+FSA
      st InsCode b1 = {}
   holds b1 = halt SCM+FSA;

:: SCMFSA_2:th 123
theorem
halt SCM = halt SCM+FSA;

:: SCMFSA_2:th 124
theorem
InsCode halt SCM+FSA = {};

:: SCMFSA_2:th 125
theorem
for b1 being Element of the Instructions of SCM
for b2 being Element of the Instructions of SCM+FSA
      st b1 = b2 & b1 is halting(not NAT, {INT}, SCM)
   holds b2 is halting(not NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA_2:th 126
theorem
for b1, b2 being natural set holds
fsloc b1 <> intloc b2;