reserve P,P1,P2 for Instruction-Sequence of SCM+FSA;

theorem
  for s being State of SCM+FSA,
      I,J being parahalting really-closed MacroInstruction of SCM+FSA
, a,b being read-write Int-Location st I does not refer a & J does not refer a
  holds IC IExec(if>0(a,b,I,J),P,s) =  (card I + card J + 5) & (s.a > s.b
  implies (for d being Int-Location st a <> d
   holds IExec(if>0(a,b,I,J),P,s).d =
  IExec(I,P,s).d) & for f being FinSeq-Location
   holds IExec(if>0(a,b,I,J),P,s).f =
  IExec(I,P,s).f) & (s.a <= s.b implies
   (for d being Int-Location st a <> d holds
  IExec(if>0(a,b,I,J),P,s).d = IExec(J,P,s).d) &
  for f being FinSeq-Location holds
  IExec(if>0(a,b,I,J),P,s).f = IExec(J,P,s).f)
proof
  let s be State of SCM+FSA;
  let I,J be parahalting really-closed MacroInstruction of SCM+FSA;
  let a,b be read-write Int-Location;
  assume that
A1: I does not refer a and
A2: J does not refer a;
  reconsider JJ = if>0(a,I,J) as parahalting Program of SCM+FSA;
  reconsider II = Macro SubFrom(a,b) as keeping_0 parahalting Program of
  SCM+FSA;
  set i = SubFrom(a,b);
  set s1 = Exec(i,Initialized s);
A3: now
    let c be read-write Int-Location;
    assume a <> c;
    hence s1.c = (Initialized s).c by SCMFSA_2:65
      .= s.c by SCMFSA_M:37;
  end;
  IExec(if>0(a,b,I,J),P,s) = IncIC(IExec(JJ,P,IExec(II,P,s)),card II)
      by SCMFSA6B:20;
  hence IC IExec(if>0(a,b,I,J),P,s)
   = IC IExec(JJ,P,IExec(II,P,s)) + card II by FUNCT_4:113
    .=  (card I + card J + 3) + card II by Th18
    .=  (card I + card J + 3) + 2 by COMPOS_1:56
    .=  (card I + card J + 5);
A4: now
    let f be FinSeq-Location;
    thus s1.f = (Initialized s).f by SCMFSA_2:65
      .= s.f by SCMFSA_M:37;
  end;
  hereby
A5: Exec(i,Initialized s).a = (Initialized s).a - (Initialized s).b
by SCMFSA_2:65
      .= s.a - (Initialized s).b by SCMFSA_M:37
      .= s.a - s.b by SCMFSA_M:37;
    assume s.a > s.b;
    then
A6: Exec(i,Initialized s).a > 0 by A5,XREAL_1:50;
A7: I is_halting_on Initialized s,P by SCMFSA7B:19;
    hereby
      let d be Int-Location;
      assume
A8:   a <> d;
      thus IExec(if>0(a,b,I,J),P,s).d
       = IExec(JJ,P,Exec(i,Initialized s)).d by Th3
        .= IExec(I,P,Exec(i,Initialized s)).d by A6,Th18
        .= IExec(I,P,s).d by A1,A3,A4,A7,A8,Th25;
    end;
    let f be FinSeq-Location;
    thus IExec(if>0(a,b,I,J),P,s).f
     = IExec(JJ,P,Exec(i,Initialized s)).f by Th4
      .= IExec(I,P,Exec(i,Initialized s)).f by A6,Th18
      .= IExec(I,P,s).f by A1,A3,A4,A7,Th25;
  end;
A9: Exec(i,Initialized s).a = (Initialized s).a - (Initialized s).b by
SCMFSA_2:65
    .= s.a - (Initialized s).b by SCMFSA_M:37
    .= s.a - s.b by SCMFSA_M:37;
A10: J is_halting_on Initialized s,P by SCMFSA7B:19;
  assume s.a <= s.b;
  then
A11: Exec(i,Initialized s).a <= 0 by A9,XREAL_1:47;
  hereby
    let d be Int-Location;
    assume
A12: a <> d;
    thus IExec(if>0(a,b,I,J),P,s).d
     = IExec(JJ,P,Exec(i,Initialized s)).d by Th3
      .= IExec(J,P,Exec(i,Initialized s)).d by A11,Th18
      .= IExec(J,P,s).d by A2,A3,A4,A10,A12,Th25;
  end;
  let f be FinSeq-Location;
  thus IExec(if>0(a,b,I,J),P,s).f
   = IExec(JJ,P,Exec(i,Initialized s)).f by Th4
    .= IExec(J,P,Exec(i,Initialized s)).f by A11,Th18
    .= IExec(J,P,s).f by A2,A3,A4,A10,Th25;
end;
