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

theorem Th14:
  for I,J being really-closed MacroInstruction of SCM+FSA,
      a being read-write
  Int-Location holds for s being State of SCM+FSA st s.a > 0 &
:::   I is_closed_on Initialized s,P &
I is_halting_on Initialized s,P
holds IExec(if>0(a,I,J),P,s)
 = IExec(I,P,s) +* Start-At((card I+card J+3),SCM+FSA)
proof
  let I,J be really-closed MacroInstruction of SCM+FSA;
  let a be read-write Int-Location;
  let s be State of SCM+FSA;
  set I1 = I ";" Stop SCM+FSA;
  set s1 = Initialized s, P1 = P +* I1;
  set P3 = P +* if>0(a,I,J);
  set s4 = Comput(P3, s1,1);
  set i = a >0_goto  (card J + 3);
A1: I1 c= P1 by FUNCT_4:25;
A2: if>0(a,I,J) = i ";" J ";" Goto  (card I + 1) ";" I1 by SCMFSA6A:25;
A3:  0 in dom if>0(a,I,J) by AFINSQ_1:65;
A4: P3. 0 = if>0(a,I,J). 0 by A3,FUNCT_4:13
    .= i by Lm2;
A5: dom Initialize ((intloc 0) .--> 1) = {intloc 0,IC SCM+FSA} by SCMFSA_M:11;
    a <> intloc 0 & a <> IC SCM+FSA by SCMFSA_2:56;
    then
A6: not a in dom Initialize((intloc 0).-->1) by A5,TARSKI:def 2;
IC SCM+FSA in dom Initialize((intloc 0).-->1) by MEMSTR_0:48;
  then
A7: IC s1 = IC Initialize((intloc 0).-->1) by FUNCT_4:13
    .=  0 by MEMSTR_0:def 11;
A8: Comput(P3, s1,0 + 1) = Following(P3,
Comput(P3,s1,0)) by EXTPRO_1:3
    .= Following(P3,s1)
    .= Exec(i,s1) by A7,A4,PBOOLE:143;
A9: if>0(a,I,J) c= P3 by FUNCT_4:25;
  assume s.a > 0;
  then s1.a > 0 by A6,FUNCT_4:11;
  then
A10: IC Comput(P3,s1,1) =  (card J + 3) by A8,SCMFSA_2:71;
A11: for f being FinSeq-Location holds s1.f = s4.f by A8,SCMFSA_2:71;
  for a being Int-Location holds s1.a = s4.a by A8,SCMFSA_2:71;
  then
A12: DataPart s1 = DataPart s4 by A11,SCMFSA_M:2;
  card (i ";" J ";" Goto  (card I + 1))
     = card (Macro i ";" J) + card Goto  (card I + 1) by SCMFSA6A:21
    .= card (Macro i ";" J) + 1 by SCMFSA8A:15
    .= card Macro i + card J + 1 by SCMFSA6A:21
    .= card J + 2 + 1 by COMPOS_1:56
    .= card J + (2 + 1);
  then
A13: Reloc(I1,card J + 3) c= if>0(a,I,J) by A2,SCMFSA6A:38;
A14: Reloc(I1,card J + 3) c= P3 by A13,A9,XBOOLE_1:1;
  assume
A15: I is_halting_on Initialized s,P;
  then
A16: P1 halts_on s1 by SCMFSA8A:34;
A17: CurInstr(P3,
Comput(P3,s1,LifeSpan(P1,s1)+1))
 = CurInstr(P3,
 Comput(P3,s4,LifeSpan(P1,s1)))
  by EXTPRO_1:4
    .= IncAddr(CurInstr(P1,
    Comput(P1,s1,LifeSpan(P1,s1))),(card J + 3)) by A10,A12,Th2,A14,A1
    .= IncAddr(halt SCM+FSA,(card J + 3)) by A16,EXTPRO_1:def 15
    .= halt SCM+FSA by COMPOS_0:4;
  then
A18: P3 halts_on s1 by EXTPRO_1:29;
  now
    let l be Nat;
    assume
A19: l < LifeSpan(P1,s1) + 1;
    per cases;
    suppose
      l = 0;
      hence CurInstr(P3,Comput(P3,s1,l)) <>
       halt SCM+FSA by A7,A4,PBOOLE:143;
    end;
    suppose
      l <> 0;
      then consider n being Nat such that
A20:  l = n + 1 by NAT_1:6;
      assume
A21:  CurInstr(P3,Comput(P3,s1,l)) = halt SCM+FSA;
      reconsider n as Element of NAT by ORDINAL1:def 12;
A22:    InsCode halt SCM+FSA = 0 by COMPOS_1:70;
      InsCode CurInstr(P1,Comput(P1,s1,n))
       = InsCode IncAddr(CurInstr(P1,
       Comput(P1,s1,n)),(card J + 3))
        by COMPOS_0:def 9
        .= InsCode CurInstr(P3,Comput(P3,s4,n)) by A10,A12,Th2,A14,A1
        .= 0 by A20,A21,A22,EXTPRO_1:4;
      then
A23:  CurInstr(P1,Comput(P1,s1,n))
 = halt SCM+FSA by SCMFSA_2:95;
      n < LifeSpan(P1,s1) by A19,A20,XREAL_1:6;
      hence contradiction by A16,A23,EXTPRO_1:def 15;
    end;
  end;
  then for l be Nat st CurInstr(P3,Comput(P3,s1,l)) = halt SCM+FSA
  holds LifeSpan(P1,s1) + 1 <= l;
  then
A24: LifeSpan(P3,s1) = LifeSpan(P1,s1) + 1 by A17,A18,EXTPRO_1:def 15;
A25: DataPart Result(P1,s1) = DataPart Comput(P1, s1
,LifeSpan(P1,s1)) by A15,EXTPRO_1:23,SCMFSA8A:34
    .= DataPart Comput(P3, s4,LifeSpan(P1,s1)) by A10,A12,Th2,A14,A1
    .= DataPart Comput(P3, s1,LifeSpan(P1,s1) + 1)
by EXTPRO_1:4
    .= DataPart Result(P3,s1) by A18,A24,EXTPRO_1:23;
A26: now
    let x be object;
A28: IExec(if>0(a,I,J),P,s) = (Result(P3,s1)) by SCMFSA6B:def 1;
A29: IExec(I1,P,s) = Result(P1,s1) by SCMFSA6B:def 1;
    assume
A30: x in dom IExec(if>0(a,I,J),P,s);
    per cases by A30,SCMFSA_M:1;
    suppose
A31:  x is Int-Location;
      then x <> IC SCM+FSA by SCMFSA_2:56;
      then
A32:  not x in dom Start-At((card I+card J+3),SCM+FSA)
by TARSKI:def 1;
      thus IExec(if>0(a,I,J),P,s).x = (Result(P3,s1)).x by A28
        .= (Result(P1,s1)).x by A25,A31,SCMFSA_M:2
        .= IExec(I1,P,s).x by A29
        .= (IExec(I1,P,s) +* Start-At((card I+card J+3),SCM+FSA)).x by A32,
FUNCT_4:11;
    end;
    suppose
A33:  x is FinSeq-Location;
      then x <> IC SCM+FSA by SCMFSA_2:57;
      then
A34:  not x in dom Start-At((card I+card J+3),SCM+FSA)
by TARSKI:def 1;
      thus IExec(if>0(a,I,J),P,s).x = (Result(P3,s1)).x by A28
        .= (Result(P1,s1)).x by A25,A33,SCMFSA_M:2
        .= IExec(I1,P,s).x by A29
        .= (IExec(I1,P,s) +* Start-At((card I+card J+3),SCM+FSA)).x by A34,
FUNCT_4:11;
    end;
    suppose
A35:  x = IC SCM+FSA;
      then
A36:  x in dom Start-At((card I+card J+3),SCM+FSA)by TARSKI:def 1;
A37:  IC Result(P1,s1) = IExec(I1,P,s).IC SCM+FSA by A29
        .= IC (IExec(I,P,s) +* Start-At( card I,SCM+FSA)) by A15,SCMFSA8A:36
        .=  card I by FUNCT_4:113;
      thus IExec(if>0(a,I,J),P,s).x = (Result(P3,s1)).x by A28
        .= Comput(P3, s1,LifeSpan(P1,s1) + 1).x by A18,A24,EXTPRO_1:23
        .= IC Comput(P3, s4,LifeSpan(P1,s1)) by A35,EXTPRO_1:4
        .= IC Comput(P1, s1,LifeSpan(P1,s1)) + (card
J + 3) by A10,A12,Th2,A1,A14
        .= IC Result(P1,s1) + (card J + 3)
               by A15,EXTPRO_1:23,SCMFSA8A:34
        .= (Start-At((card I+(card J+3)),SCM+FSA)).IC SCM+FSA by A37,
FUNCOP_1:72
        .= (IExec(I1,P,s) +* Start-At((card I+card J+3),SCM+FSA)).x
         by A35,A36,FUNCT_4:13;
    end;
  end;
  dom IExec(if>0(a,I,J),P,s) = the carrier of SCM+FSA by PARTFUN1:def 2
    .= dom (IExec(I1,P,s) +* Start-At((card I+card J+3),SCM+FSA))
     by PARTFUN1:def 2;
  hence IExec(if>0(a,I,J),P,s) = IExec(I1,P,s) +* Start-At( (card I + card J
  + 3),SCM+FSA) by A26,FUNCT_1:2
    .= IExec(I,P,s) +* Start-At( card I,SCM+FSA) +*
     Start-At( (card I +
  card J + 3),SCM+FSA) by A15,SCMFSA8A:36
    .= IExec(I,P,s) +* Start-At((card I+card J+3),SCM+FSA)by FUNCT_4:114;
end;
