Article SCMFSA7B, MML version 4.99.1005

:: SCMFSA7B:th 1
theorem
for b1 being FinSequence of the Instructions of SCM+FSA holds
   proj1 Load b1 = {b2 where b2 is Element of NAT: b2 < len b1};

:: SCMFSA7B:th 2
theorem
for b1 being FinSequence of the Instructions of SCM+FSA holds
   proj2 Load b1 = proj2 b1;

:: SCMFSA7B:funcreg 1
registration
  let a1 be FinSequence of the Instructions of SCM+FSA;
  cluster Load a1 -> finite programmed initial;
end;

:: SCMFSA7B:th 3
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   Load <*b1*> = (insloc 0) .--> b1;

:: SCMFSA7B:th 4
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   proj1 Macro b1 = {insloc 0,insloc 1};

:: SCMFSA7B:th 5
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   Macro b1 = Load <*b1,halt SCM+FSA*>;

:: SCMFSA7B:th 6
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   card Macro b1 = 2;

:: SCMFSA7B:th 7
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   (b1 = halt SCM+FSA implies (Directed Macro b1) . insloc 0 = goto insloc 2) &
    (b1 = halt SCM+FSA or (Directed Macro b1) . insloc 0 = b1);

:: SCMFSA7B:th 8
theorem
for b1 being Element of the Instructions of SCM+FSA holds
   (Directed Macro b1) . insloc 1 = goto insloc 2;

:: SCMFSA7B:funcreg 2
registration
  let a1 be Int-Location;
  let a2 be integer set;
  cluster a1 := a2 -> finite programmed initial;
end;

:: SCMFSA7B:funcreg 3
registration
  let a1 be Int-Location;
  let a2 be integer set;
  cluster a1 := a2 -> finite parahalting;
end;

:: SCMFSA7B:th 9
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being read-write Int-Location
for b3 being integer set holds
   (IExec(b2 := b3,b1)) . b2 = b3 &
    (for b4 being read-write Int-Location
          st b4 <> b2
       holds (IExec(b2 := b3,b1)) . b4 = b1 . b4) &
    (for b4 being FinSeq-Location holds
       (IExec(b2 := b3,b1)) . b4 = b1 . b4);

:: SCMFSA7B:funcreg 4
registration
  let a1 be FinSeq-Location;
  let a2 be FinSequence of INT;
  cluster a1 := a2 -> finite programmed initial;
end;

:: SCMFSA7B:funcreg 5
registration
  let a1 be FinSeq-Location;
  let a2 be FinSequence of INT;
  cluster a1 := a2 -> finite parahalting;
end;

:: SCMFSA7B:th 10
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being FinSeq-Location
for b3 being FinSequence of INT holds
   (IExec(b2 := b3,b1)) . b2 = b3 &
    (for b4 being read-write Int-Location
          st b4 <> intloc 1 & b4 <> intloc 2
       holds (IExec(b2 := b3,b1)) . b4 = b1 . b4) &
    (for b4 being FinSeq-Location
          st b4 <> b2
       holds (IExec(b2 := b3,b1)) . b4 = b1 . b4);

:: SCMFSA7B:prednot 1 => SCMFSA7B:pred 1
definition
  let a1 be Element of the Instructions of SCM+FSA;
  let a2 be Int-Location;
  pred A1 does_not_refer A2 means
    for b1 being Int-Location
    for b2 being Instruction-Location of SCM+FSA
    for b3 being FinSeq-Location holds
       b1 := a2 <> a1 & AddTo(b1,a2) <> a1 & SubFrom(b1,a2) <> a1 & MultBy(b1,a2) <> a1 & Divide(b1,a2) <> a1 & Divide(a2,b1) <> a1 & a2 =0_goto b2 <> a1 & a2 >0_goto b2 <> a1 & b1 :=(b3,a2) <> a1 & (b3,b1):= a2 <> a1 & (b3,a2):= b1 <> a1 & b3 :=<0,...,0> a2 <> a1;
end;

:: SCMFSA7B:dfs 1
definiens
  let a1 be Element of the Instructions of SCM+FSA;
  let a2 be Int-Location;
To prove
     a1 does_not_refer a2
it is sufficient to prove
  thus for b1 being Int-Location
    for b2 being Instruction-Location of SCM+FSA
    for b3 being FinSeq-Location holds
       b1 := a2 <> a1 & AddTo(b1,a2) <> a1 & SubFrom(b1,a2) <> a1 & MultBy(b1,a2) <> a1 & Divide(b1,a2) <> a1 & Divide(a2,b1) <> a1 & a2 =0_goto b2 <> a1 & a2 >0_goto b2 <> a1 & b1 :=(b3,a2) <> a1 & (b3,b1):= a2 <> a1 & (b3,a2):= b1 <> a1 & b3 :=<0,...,0> a2 <> a1;

:: SCMFSA7B:def 1
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Int-Location holds
      b1 does_not_refer b2
   iff
      for b3 being Int-Location
      for b4 being Instruction-Location of SCM+FSA
      for b5 being FinSeq-Location holds
         b3 := b2 <> b1 & AddTo(b3,b2) <> b1 & SubFrom(b3,b2) <> b1 & MultBy(b3,b2) <> b1 & Divide(b3,b2) <> b1 & Divide(b2,b3) <> b1 & b2 =0_goto b4 <> b1 & b2 >0_goto b4 <> b1 & b3 :=(b5,b2) <> b1 & (b5,b3):= b2 <> b1 & (b5,b2):= b3 <> b1 & b5 :=<0,...,0> b2 <> b1;

:: SCMFSA7B:prednot 2 => SCMFSA7B:pred 2
definition
  let a1 be finite programmed Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Int-Location;
  pred A1 does_not_refer A2 means
    for b1 being Element of the Instructions of SCM+FSA
          st b1 in proj2 a1
       holds b1 does_not_refer a2;
end;

:: SCMFSA7B:dfs 2
definiens
  let a1 be finite programmed Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Int-Location;
To prove
     a1 does_not_refer a2
it is sufficient to prove
  thus for b1 being Element of the Instructions of SCM+FSA
          st b1 in proj2 a1
       holds b1 does_not_refer a2;

:: SCMFSA7B:def 2
theorem
for b1 being finite programmed Element of sproduct the Object-Kind of SCM+FSA
for b2 being Int-Location holds
      b1 does_not_refer b2
   iff
      for b3 being Element of the Instructions of SCM+FSA
            st b3 in proj2 b1
         holds b3 does_not_refer b2;

:: SCMFSA7B:prednot 3 => SCMFSA7B:pred 3
definition
  let a1 be Element of the Instructions of SCM+FSA;
  let a2 be Int-Location;
  pred A1 does_not_destroy A2 means
    for b1 being Int-Location
    for b2 being FinSeq-Location holds
       a2 := b1 <> a1 & AddTo(a2,b1) <> a1 & SubFrom(a2,b1) <> a1 & MultBy(a2,b1) <> a1 & Divide(a2,b1) <> a1 & Divide(b1,a2) <> a1 & a2 :=(b2,b1) <> a1 & a2 :=len b2 <> a1;
end;

:: SCMFSA7B:dfs 3
definiens
  let a1 be Element of the Instructions of SCM+FSA;
  let a2 be Int-Location;
To prove
     a1 does_not_destroy a2
it is sufficient to prove
  thus for b1 being Int-Location
    for b2 being FinSeq-Location holds
       a2 := b1 <> a1 & AddTo(a2,b1) <> a1 & SubFrom(a2,b1) <> a1 & MultBy(a2,b1) <> a1 & Divide(a2,b1) <> a1 & Divide(b1,a2) <> a1 & a2 :=(b2,b1) <> a1 & a2 :=len b2 <> a1;

:: SCMFSA7B:def 3
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Int-Location holds
      b1 does_not_destroy b2
   iff
      for b3 being Int-Location
      for b4 being FinSeq-Location holds
         b2 := b3 <> b1 & AddTo(b2,b3) <> b1 & SubFrom(b2,b3) <> b1 & MultBy(b2,b3) <> b1 & Divide(b2,b3) <> b1 & Divide(b3,b2) <> b1 & b2 :=(b4,b3) <> b1 & b2 :=len b4 <> b1;

:: SCMFSA7B:prednot 4 => SCMFSA7B:pred 4
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Int-Location;
  pred A1 does_not_destroy A2 means
    for b1 being Element of the Instructions of SCM+FSA
          st b1 in proj2 a1
       holds b1 does_not_destroy a2;
end;

:: SCMFSA7B:dfs 4
definiens
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Int-Location;
To prove
     a1 does_not_destroy a2
it is sufficient to prove
  thus for b1 being Element of the Instructions of SCM+FSA
          st b1 in proj2 a1
       holds b1 does_not_destroy a2;

:: SCMFSA7B:def 4
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Int-Location holds
      b1 does_not_destroy b2
   iff
      for b3 being Element of the Instructions of SCM+FSA
            st b3 in proj2 b1
         holds b3 does_not_destroy b2;

:: SCMFSA7B:attrnot 1 => SCMFSA7B:attr 1
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  attr a1 is good means
    a1 does_not_destroy intloc 0;
end;

:: SCMFSA7B:dfs 5
definiens
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
To prove
     a1 is good
it is sufficient to prove
  thus a1 does_not_destroy intloc 0;

:: SCMFSA7B:def 5
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA holds
      b1 is good
   iff
      b1 does_not_destroy intloc 0;

:: SCMFSA7B:attrnot 2 => SCMFSA7B:attr 2
definition
  let a1 be non empty set;
  let a2 be with_non-empty_elements set;
  let a3 be halting AMI-Struct over a1,a2;
  let a4 be finite Element of sproduct the Object-Kind of a3;
  attr a4 is halt-free means
    not halt a3 in proj2 a4;
end;

:: SCMFSA7B:dfs 6
definiens
  let a1 be non empty set;
  let a2 be with_non-empty_elements set;
  let a3 be halting AMI-Struct over a1,a2;
  let a4 be finite Element of sproduct the Object-Kind of a3;
To prove
     a4 is halt-free
it is sufficient to prove
  thus not halt a3 in proj2 a4;

:: SCMFSA7B:def 6
theorem
for b1 being non empty set
for b2 being with_non-empty_elements set
for b3 being halting AMI-Struct over b1,b2
for b4 being finite Element of sproduct the Object-Kind of b3 holds
      b4 is halt-free(b1, b2, b3)
   iff
      not halt b3 in proj2 b4;

:: SCMFSA7B:exreg 1
registration
  cluster Relation-like Function-like finite programmed initial good halt-free Element of sproduct the Object-Kind of SCM+FSA;
end;

:: SCMFSA7B:th 11
theorem
for b1 being Int-Location holds
   halt SCM+FSA does_not_destroy b1;

:: SCMFSA7B:th 12
theorem
for b1, b2, b3 being Int-Location
      st b1 <> b2
   holds b2 := b3 does_not_destroy b1;

:: SCMFSA7B:th 13
theorem
for b1, b2, b3 being Int-Location
      st b1 <> b2
   holds AddTo(b2,b3) does_not_destroy b1;

:: SCMFSA7B:th 14
theorem
for b1, b2, b3 being Int-Location
      st b1 <> b2
   holds SubFrom(b2,b3) does_not_destroy b1;

:: SCMFSA7B:th 15
theorem
for b1, b2, b3 being Int-Location
      st b1 <> b2
   holds MultBy(b2,b3) does_not_destroy b1;

:: SCMFSA7B:th 16
theorem
for b1, b2, b3 being Int-Location
      st b1 <> b2 & b1 <> b3
   holds Divide(b2,b3) does_not_destroy b1;

:: SCMFSA7B:th 17
theorem
for b1 being Int-Location
for b2 being Instruction-Location of SCM+FSA holds
   goto b2 does_not_destroy b1;

:: SCMFSA7B:th 18
theorem
for b1, b2 being Int-Location
for b3 being Instruction-Location of SCM+FSA holds
   b2 =0_goto b3 does_not_destroy b1;

:: SCMFSA7B:th 19
theorem
for b1, b2 being Int-Location
for b3 being Instruction-Location of SCM+FSA holds
   b2 >0_goto b3 does_not_destroy b1;

:: SCMFSA7B:th 20
theorem
for b1, b2, b3 being Int-Location
for b4 being FinSeq-Location
      st b1 <> b2
   holds b2 :=(b4,b3) does_not_destroy b1;

:: SCMFSA7B:th 21
theorem
for b1, b2, b3 being Int-Location
for b4 being FinSeq-Location holds
   (b4,b3):= b2 does_not_destroy b1;

:: SCMFSA7B:th 22
theorem
for b1, b2 being Int-Location
for b3 being FinSeq-Location
      st b1 <> b2
   holds b2 :=len b3 does_not_destroy b1;

:: SCMFSA7B:th 23
theorem
for b1, b2 being Int-Location
for b3 being FinSeq-Location holds
   b3 :=<0,...,0> b2 does_not_destroy b1;

:: SCMFSA7B:prednot 5 => SCMFSA7B:pred 5
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of product the Object-Kind of SCM+FSA;
  pred A1 is_closed_on A2 means
    for b1 being Element of NAT holds
       IC Computation(a2 +* (a1 +* Start-At insloc 0),b1) in proj1 a1;
end;

:: SCMFSA7B:dfs 7
definiens
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of product the Object-Kind of SCM+FSA;
To prove
     a1 is_closed_on a2
it is sufficient to prove
  thus for b1 being Element of NAT holds
       IC Computation(a2 +* (a1 +* Start-At insloc 0),b1) in proj1 a1;

:: SCMFSA7B:def 7
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of product the Object-Kind of SCM+FSA holds
      b1 is_closed_on b2
   iff
      for b3 being Element of NAT holds
         IC Computation(b2 +* (b1 +* Start-At insloc 0),b3) in proj1 b1;

:: SCMFSA7B:prednot 6 => SCMFSA7B:pred 6
definition
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of product the Object-Kind of SCM+FSA;
  pred A1 is_halting_on A2 means
    a2 +* (a1 +* Start-At insloc 0) is halting(NAT, {INT,INT *}, SCM+FSA);
end;

:: SCMFSA7B:dfs 8
definiens
  let a1 be finite Element of sproduct the Object-Kind of SCM+FSA;
  let a2 be Element of product the Object-Kind of SCM+FSA;
To prove
     a1 is_halting_on a2
it is sufficient to prove
  thus a2 +* (a1 +* Start-At insloc 0) is halting(NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA7B:def 8
theorem
for b1 being finite Element of sproduct the Object-Kind of SCM+FSA
for b2 being Element of product the Object-Kind of SCM+FSA holds
      b1 is_halting_on b2
   iff
      b2 +* (b1 +* Start-At insloc 0) is halting(NAT, {INT,INT *}, SCM+FSA);

:: SCMFSA7B:th 24
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
      b1 is paraclosed
   iff
      for b2 being Element of product the Object-Kind of SCM+FSA holds
         b1 is_closed_on b2;

:: SCMFSA7B:th 25
theorem
for b1 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA holds
      b1 is parahalting
   iff
      for b2 being Element of product the Object-Kind of SCM+FSA holds
         b1 is_halting_on b2;

:: SCMFSA7B:th 26
theorem
for b1 being Element of the Instructions of SCM+FSA
for b2 being Int-Location
for b3 being Element of product the Object-Kind of SCM+FSA
      st b1 does_not_destroy b2
   holds (Exec(b1,b3)) . b2 = b3 . b2;

:: SCMFSA7B:th 27
theorem
for b1 being Element of product the Object-Kind of SCM+FSA
for b2 being finite programmed initial Element of sproduct the Object-Kind of SCM+FSA
for b3 being Int-Location
   st b2 does_not_destroy b3 & b2 is_closed_on b1
for b4 being Element of NAT holds
   (Computation(b1 +* (b2 +* Start-At insloc 0),b4)) . b3 = b1 . b3;

:: SCMFSA7B:th 28
theorem
SCM+FSA-Stop does_not_destroy intloc 0;

:: SCMFSA7B:exreg 2
registration
  cluster Relation-like Function-like finite programmed initial parahalting good Element of sproduct the Object-Kind of SCM+FSA;
end;

:: SCMFSA7B:funcreg 6
registration
  cluster SCM+FSA-Stop -> finite parahalting good;
end;

:: SCMFSA7B:condreg 1
registration
  cluster finite programmed initial paraclosed good -> keeping_0 (Element of sproduct the Object-Kind of SCM+FSA);
end;

:: SCMFSA7B:th 29
theorem
for b1 being Int-Location
for b2 being integer set holds
   proj2 aSeq(b1,b2) c= {b1 := intloc 0,AddTo(b1,intloc 0),SubFrom(b1,intloc 0)};

:: SCMFSA7B:th 30
theorem
for b1 being Int-Location
for b2 being integer set holds
   proj2 (b1 := b2) c= {halt SCM+FSA,b1 := intloc 0,AddTo(b1,intloc 0),SubFrom(b1,intloc 0)};

:: SCMFSA7B:funcreg 7
registration
  let a1 be read-write Int-Location;
  let a2 be integer set;
  cluster a1 := a2 -> finite good;
end;

:: SCMFSA7B:funcreg 8
registration
  let a1 be read-write Int-Location;
  let a2 be integer set;
  cluster a1 := a2 -> finite keeping_0;
end;