Article SCMRING2, MML version 4.99.1005

:: SCMRING2:funcnot 1 => SCMRING2:func 1
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  func SCM A1 -> strict AMI-Struct over NAT,{the carrier of a1} means
    the carrier of it = SCM-Memory & the Instruction-Counter of it = NAT & the Instructions of it = SCM-Instr a1 & the Object-Kind of it = SCM-OK a1 & the Execution of it = SCM-Exec a1;
end;

:: SCMRING2:def 1
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being strict AMI-Struct over NAT,{the carrier of b1} holds
      b2 = SCM b1
   iff
      the carrier of b2 = SCM-Memory & the Instruction-Counter of b2 = NAT & the Instructions of b2 = SCM-Instr b1 & the Object-Kind of b2 = SCM-OK b1 & the Execution of b2 = SCM-Exec b1;

:: SCMRING2:funcreg 1
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  cluster SCM a1 -> non empty strict stored-program standard-ins;
end;

:: SCMRING2:funcnot 2 => SCMRING2:func 2
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Element of product the Object-Kind of SCM a1;
  let a3 be Element of SCM-Data-Loc;
  redefine func a2 . a3 -> Element of the carrier of a1;
end;

:: SCMRING2:modenot 1 => SCMRING2:mode 1
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  mode Data-Location of A1 -> Element of the carrier of SCM a1 means
    it in (the carrier of SCM a1) \ (NAT \/ {NAT});
end;

:: SCMRING2:dfs 2
definiens
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Element of the carrier of SCM a1;
To prove
     a2 is Data-Location of a1
it is sufficient to prove
  thus a2 in (the carrier of SCM a1) \ (NAT \/ {NAT});

:: SCMRING2:def 2
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of the carrier of SCM b1 holds
      b2 is Data-Location of b1
   iff
      b2 in (the carrier of SCM b1) \ (NAT \/ {NAT});

:: SCMRING2:th 1
theorem
for b1 being set
for b2 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr holds
      b1 is Data-Location of b2
   iff
      b1 in SCM-Data-Loc;

:: SCMRING2:funcnot 3 => SCMRING2:func 3
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Element of product the Object-Kind of SCM a1;
  let a3 be Data-Location of a1;
  redefine func a2 . a3 -> Element of the carrier of a1;
end;

:: SCMRING2:th 2
theorem
for b1 being non empty 1-sorted holds
   [{},{}] in SCM-Instr b1;

:: SCMRING2:th 3
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr holds
   [{},{}] is Element of the Instructions of SCM b1;

:: SCMRING2:th 4
theorem
for b1 being non empty 1-sorted
for b2 being set
for b3 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b4, b5 being Data-Location of b3
      st b2 in {1,2,3,4}
   holds [b2,<*b4,b5*>] in SCM-Instr b1;

:: SCMRING2:th 5
theorem
for b1 being non empty 1-sorted
for b2 being Element of the carrier of b1
for b3 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b4 being Data-Location of b3 holds
   [5,<*b4,b2*>] in SCM-Instr b1;

:: SCMRING2:th 6
theorem
for b1 being non empty 1-sorted
for b2 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b3 being Instruction-Location of SCM b2 holds
   [6,<*b3*>] in SCM-Instr b1;

:: SCMRING2:th 7
theorem
for b1 being non empty 1-sorted
for b2 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b3 being Data-Location of b2
for b4 being Instruction-Location of SCM b2 holds
   [7,<*b4,b3*>] in SCM-Instr b1;

:: SCMRING2:funcnot 4 => SCMRING2:func 4
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  func A2 := A3 -> Element of the Instructions of SCM a1 equals
    [1,<*a2,a3*>];
end;

:: SCMRING2:def 3
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1 holds
b2 := b3 = [1,<*b2,b3*>];

:: SCMRING2:funcnot 5 => SCMRING2:func 5
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  func AddTo(A2,A3) -> Element of the Instructions of SCM a1 equals
    [2,<*a2,a3*>];
end;

:: SCMRING2:def 4
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1 holds
AddTo(b2,b3) = [2,<*b2,b3*>];

:: SCMRING2:funcnot 6 => SCMRING2:func 6
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  func SubFrom(A2,A3) -> Element of the Instructions of SCM a1 equals
    [3,<*a2,a3*>];
end;

:: SCMRING2:def 5
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1 holds
SubFrom(b2,b3) = [3,<*b2,b3*>];

:: SCMRING2:funcnot 7 => SCMRING2:func 7
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  func MultBy(A2,A3) -> Element of the Instructions of SCM a1 equals
    [4,<*a2,a3*>];
end;

:: SCMRING2:def 6
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1 holds
MultBy(b2,b3) = [4,<*b2,b3*>];

:: SCMRING2:funcnot 8 => SCMRING2:func 8
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Data-Location of a1;
  let a3 be Element of the carrier of a1;
  func A2 := A3 -> Element of the Instructions of SCM a1 equals
    [5,<*a2,a3*>];
end;

:: SCMRING2:def 7
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Data-Location of b1
for b3 being Element of the carrier of b1 holds
   b2 := b3 = [5,<*b2,b3*>];

:: SCMRING2:funcnot 9 => SCMRING2:func 9
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Instruction-Location of SCM a1;
  func goto A2 -> Element of the Instructions of SCM a1 equals
    [6,<*a2*>];
end;

:: SCMRING2:def 8
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Instruction-Location of SCM b1 holds
   goto b2 = [6,<*b2*>];

:: SCMRING2:funcnot 10 => SCMRING2:func 10
definition
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Instruction-Location of SCM a1;
  let a3 be Data-Location of a1;
  func A3 =0_goto A2 -> Element of the Instructions of SCM a1 equals
    [7,<*a2,a3*>];
end;

:: SCMRING2:def 9
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Instruction-Location of SCM b1
for b3 being Data-Location of b1 holds
   b3 =0_goto b2 = [7,<*b2,b3*>];

:: SCMRING2:th 8
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being set holds
      b2 is Element of the Instructions of SCM b1
   iff
      (b2 <> [{},{}] &
       (for b3, b4 being Data-Location of b1 holds
       b2 <> b3 := b4) &
       (for b3, b4 being Data-Location of b1 holds
       b2 <> AddTo(b3,b4)) &
       (for b3, b4 being Data-Location of b1 holds
       b2 <> SubFrom(b3,b4)) &
       (for b3, b4 being Data-Location of b1 holds
       b2 <> MultBy(b3,b4)) &
       (for b3 being Instruction-Location of SCM b1 holds
          b2 <> goto b3) &
       (for b3 being Data-Location of b1
       for b4 being Instruction-Location of SCM b1 holds
          b2 <> b3 =0_goto b4) implies ex b3 being Data-Location of b1 st
         ex b4 being Element of the carrier of b1 st
            b2 = b3 := b4);

:: SCMRING2:funcreg 2
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  cluster SCM a1 -> strict IC-Ins-separated;
end;

:: SCMRING2:th 9
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr holds
   IC SCM b1 = NAT;

:: SCMRING2:th 10
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of product the Object-Kind of SCM b1
for b3 being Element of product SCM-OK b1
      st b3 = b2
   holds IC b2 = IC b3;

:: SCMRING2:th 12
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of product the Object-Kind of SCM b1
for b3 being Element of the Instructions of SCM b1
for b4 being Element of SCM-Instr b1
   st b4 = b3
for b5 being Element of product SCM-OK b1
      st b5 = b2
   holds Exec(b3,b2) = SCM-Exec-Res(b4,b5);

:: SCMRING2:th 13
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1
for b4 being Element of product the Object-Kind of SCM b1 holds
   (Exec(b2 := b3,b4)) . IC SCM b1 = succ IC b4 &
    (Exec(b2 := b3,b4)) . b2 = b4 . b3 &
    (for b5 being Data-Location of b1
          st b5 <> b2
       holds (Exec(b2 := b3,b4)) . b5 = b4 . b5);

:: SCMRING2:th 14
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1
for b4 being Element of product the Object-Kind of SCM b1 holds
   (Exec(AddTo(b2,b3),b4)) . IC SCM b1 = succ IC b4 &
    (Exec(AddTo(b2,b3),b4)) . b2 = (b4 . b2) + (b4 . b3) &
    (for b5 being Data-Location of b1
          st b5 <> b2
       holds (Exec(AddTo(b2,b3),b4)) . b5 = b4 . b5);

:: SCMRING2:th 15
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1
for b4 being Element of product the Object-Kind of SCM b1 holds
   (Exec(SubFrom(b2,b3),b4)) . IC SCM b1 = succ IC b4 &
    (Exec(SubFrom(b2,b3),b4)) . b2 = (b4 . b2) - (b4 . b3) &
    (for b5 being Data-Location of b1
          st b5 <> b2
       holds (Exec(SubFrom(b2,b3),b4)) . b5 = b4 . b5);

:: SCMRING2:th 16
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1
for b4 being Element of product the Object-Kind of SCM b1 holds
   (Exec(MultBy(b2,b3),b4)) . IC SCM b1 = succ IC b4 &
    (Exec(MultBy(b2,b3),b4)) . b2 = (b4 . b2) * (b4 . b3) &
    (for b5 being Data-Location of b1
          st b5 <> b2
       holds (Exec(MultBy(b2,b3),b4)) . b5 = b4 . b5);

:: SCMRING2:th 17
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Data-Location of b1
for b3 being Instruction-Location of SCM b1
for b4 being Element of product the Object-Kind of SCM b1 holds
   (Exec(goto b3,b4)) . IC SCM b1 = b3 &
    (Exec(goto b3,b4)) . b2 = b4 . b2;

:: SCMRING2:th 18
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2, b3 being Data-Location of b1
for b4 being Instruction-Location of SCM b1
for b5 being Element of product the Object-Kind of SCM b1 holds
   (b5 . b2 = 0. b1 implies (Exec(b2 =0_goto b4,b5)) . IC SCM b1 = b4) &
    (b5 . b2 = 0. b1 or (Exec(b2 =0_goto b4,b5)) . IC SCM b1 = succ IC b5) &
    (Exec(b2 =0_goto b4,b5)) . b3 = b5 . b3;

:: SCMRING2:th 19
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of the carrier of b1
for b3 being Data-Location of b1
for b4 being Element of product the Object-Kind of SCM b1 holds
   (Exec(b3 := b2,b4)) . IC SCM b1 = succ IC b4 &
    (Exec(b3 := b2,b4)) . b3 = b2 &
    (for b5 being Data-Location of b1
          st b5 <> b3
       holds (Exec(b3 := b2,b4)) . b5 = b4 . b5);

:: SCMRING2:th 20
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of the Instructions of SCM b1
      st ex b3 being Element of product the Object-Kind of SCM b1 st
           (Exec(b2,b3)) . IC SCM b1 = succ IC b3
   holds b2 is halting(not NAT, {the carrier of b1}, SCM b1);

:: SCMRING2:th 21
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of the Instructions of SCM b1
      st b2 = [{},{}]
   holds b2 is halting(NAT, {the carrier of b1}, SCM b1);

:: SCMRING2:funcreg 3
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  cluster a2 := a3 -> non halting;
end;

:: SCMRING2:funcreg 4
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  cluster AddTo(a2,a3) -> non halting;
end;

:: SCMRING2:funcreg 5
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  cluster SubFrom(a2,a3) -> non halting;
end;

:: SCMRING2:funcreg 6
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2, a3 be Data-Location of a1;
  cluster MultBy(a2,a3) -> non halting;
end;

:: SCMRING2:funcreg 7
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Instruction-Location of SCM a1;
  cluster goto a2 -> non halting;
end;

:: SCMRING2:funcreg 8
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Data-Location of a1;
  let a3 be Instruction-Location of SCM a1;
  cluster a2 =0_goto a3 -> non halting;
end;

:: SCMRING2:funcreg 9
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  let a2 be Data-Location of a1;
  let a3 be Element of the carrier of a1;
  cluster a2 := a3 -> non halting;
end;

:: SCMRING2:funcreg 10
registration
  let a1 be non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr;
  cluster SCM a1 -> strict halting steady-programmed definite realistic;
end;

:: SCMRING2:th 29
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr
for b2 being Element of the Instructions of SCM b1
      st b2 is halting(NAT, {the carrier of b1}, SCM b1)
   holds b2 = halt SCM b1;

:: SCMRING2:th 30
theorem
for b1 being non empty right_complementable Abelian add-associative right_zeroed associative well-unital distributive good doubleLoopStr holds
   halt SCM b1 = [{},{}];