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

theorem
  for s being State of SCM+FSA, I,J being MacroInstruction of SCM+FSA,
      a being
  read-write Int-Location st s.intloc 0 = 1 & s.a = 0 & Directed I
  is_pseudo-closed_on s,P holds DataPart IExec(if=0(a,I,J),P,s)
   = DataPart IExec(I ";" Stop SCM+FSA,P,s)
proof
  let ss be State of SCM+FSA;
  set D = Data-Locations SCM+FSA;
  let I,J be MacroInstruction of SCM+FSA;
  let a be read-write Int-Location;
  set I0 = Directed I;
  set s = Initialized ss;
  set I1 = I ";" Stop SCM+FSA;
  set s00 = Initialize s,
      P00 = P+*I0;
  set s3 = Initialize s,
      P3 = P +* if=0(a,I,J);
A1: if=0(a,I,J) c= P3 by FUNCT_4:25;
  set s4 = Comput(P3, s3,1);
  set i = a =0_goto  (card J + 3);
A2: I0 c= P00 by FUNCT_4:25;
  assume
A3: ss.intloc 0 = 1;
  set s1 = Initialize s,
      P1 = P +* I1;
  assume ss.a = 0;
  then
A4: s.a = 0 by SCMFSA_M:37;
A5: IC SCM+FSA in dom Start-At(0,SCM+FSA) by MEMSTR_0:15;
A6: IC s3 = IC(Initialize s)
      .= IC Start-At(0,SCM+FSA) by A5,FUNCT_4:13
      .=  0 by FUNCOP_1:72;
A7:  0 in dom if=0(a,I,J) by AFINSQ_1:65;
A8: P3. 0 = if=0(a,I,J). 0 by A7,FUNCT_4:13
    .= i by Th18;
A9: Comput(P3, s3,0+1) = Following(P3,Comput(P3,s3,0)) by EXTPRO_1:3
    .= Following(P3,s3)
    .= Exec(i,s3) by A6,A8,PBOOLE:143;
A10:  a <> IC SCM+FSA by SCMFSA_2:56;
    not a in dom Start-At(0,SCM+FSA) by A10,TARSKI:def 1;
   then
A11: not a in dom Start-At(0,SCM+FSA);
  s3.a = 0 by A11,A4,FUNCT_4:11;
  then
A12: IC Comput(P3,s3,1) =  (card J + 3) by A9,SCMFSA_2:70;
  assume I0 is_pseudo-closed_on ss,P;
  then
A13: I0 is_pseudo-closed_on s,P by A3,Th16;
  then
A14: LifeSpan(P1,s1) = pseudo-LifeSpan(s,P,I0) by Th21;
A15: I0 is_pseudo-closed_on s00,P00 by A13;
A16: for f being FinSeq-Location holds s00.f = s4.f by A9,SCMFSA_2:70;
  for a being Int-Location holds s00.a = s4.a by A9,SCMFSA_2:70;
  then
A17: DataPart s00 = DataPart s4 by A16,SCMFSA_M:2;
  card if=0(a,I,J) = card I + card J + (3 + 1) by SCMFSA8B:11
    .= card I + card J + 3 + 1;
  then card I + card J + 3 < card if=0(a,I,J) by NAT_1:13;
  then
A18:  (card I + card J + 3) in dom if=0(a,I,J) by AFINSQ_1:66;
A19: 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);
A20:  s +*Initialize((intloc 0).-->1)
 = Initialize Initialized s
  by MEMSTR_0:44;
A21: if=0(a,I,J) c= P3 by FUNCT_4:25;
  if=0(a,I,J) = i ";" J ";" Goto  (card I + 1) ";" I1 by SCMFSA6A:25;
  then
  Reloc(I1,card J + 3) c= if=0(a,I,J) by A19,SCMFSA6A:38;
  then
A22: Reloc(I1,card J + 3) c= P3 by A21,XBOOLE_1:1;
 Reloc(I0,card J + 3) c= Reloc(I1,card J+ 3) by COMPOS_1:44,SCMFSA6A:16;
  then
A23: Reloc(I0,card J + 3) c= P3 by A22,XBOOLE_1:1;
  IC Comput(P3, s3,pseudo-LifeSpan(s00,P00,I0) + 1)
   = IC Comput(P3, s4,pseudo-LifeSpan(s00,P00,I0)) by EXTPRO_1:4
    .= IC Comput(P00, s00,pseudo-LifeSpan(s00,P00,I0)) + (card J + 3)
by A15,A23,A12,A17,Th14,A2
    .= IC Comput(P00, s00,pseudo-LifeSpan(s,P,I0)
) + (card J + 3)
by A13,Th13
    .=  card I0 + (card J + 3) by A13,SCMFSA8A:def 4
    .=  (card I + (card J + 3)) by SCMFSA6A:36
    .=  (card I + card J + 3);
  then
A24: CurInstr(P3,
   Comput(P3, s3,pseudo-LifeSpan(s00,P00,I0) + 1))
     = P3. (card I + card J + 3) by PBOOLE:143
    .= if=0(a,I,J). (card I + card J + 3) by A18,A1,GRFUNC_1:2
    .= halt SCM+FSA by Th24;
  then
A25: P3 halts_on s3 by EXTPRO_1:29;
  now
    set J1 = a =0_goto  (card J + 3) ";" J ";" Goto  (card I + 1)
    ";" I;
    let k be Nat;
    assume
A26: CurInstr(P3,Comput(P3,s3,k)) = halt SCM+FSA;
    assume not pseudo-LifeSpan(s00,P00,I0) + 1 <= k;
    then
A27: k <= pseudo-LifeSpan(s00,P00,I0) by NAT_1:13;
A28:  0 in dom if=0(a,I,J) by AFINSQ_1:65;
A29:  P3/.IC s3 = P3.IC s3 by PBOOLE:143;
    CurInstr(P3,Comput(P3,s3,0))
      = P3. 0 by A29,MEMSTR_0:16
     .= if=0(a,I,J). 0 by A28,A1,GRFUNC_1:2
      .= a =0_goto  (card J + 3) by Th18;
    then consider k1 being Nat such that
A30: k1 + 1 = k by A26,NAT_1:6;
    reconsider k1 as Element of NAT by ORDINAL1:def 12;
    reconsider n = IC Comput(P00, s00,k1) as Element of NAT;
    k1 < k by A30,XREAL_1:29;
    then
A31: k1 < pseudo-LifeSpan(s00,P00,I0) by A27,XXREAL_0:2;
    then k1 < pseudo-LifeSpan(s,P,I0) by A13,Th13;
    then  n in dom I0 by A13,SCMFSA8A:17;
    then n < card I0 by AFINSQ_1:66;
    then n + (card J + 3) < card I0 + (card J + 3) by XREAL_1:6;
    then
A32: n + (card J + 3) < card I + (card J + 3) by SCMFSA6A:36;
A33: IC Comput(P3, s3,k) = IC Comput(P3, s4,k1) by A30,EXTPRO_1:4
      .= IC Comput(P00, s00,k1) + (card J + 3) by A15,A23,A12,A17,A31,Th14,A2;
    card J1 = card (Macro (a =0_goto  (card J + 3)) ";" J ";" Goto
     (card I + 1)) + card I by SCMFSA6A:21
      .= card (Macro (a =0_goto  (card J + 3)) ";" J) + card Goto
     (card I + 1) + card I by SCMFSA6A:21
      .= card (Macro (a =0_goto  (card J + 3)) ";" J) + 1 + card I by
SCMFSA8A:15
      .= card Macro (a =0_goto  (card J + 3)) + card J + 1 + card I by
SCMFSA6A:21
      .= 2 + card J + 1 + card I by COMPOS_1:56
      .= card I + card J + 3;
    then IC Comput(P3, s3,k) in dom J1 by A33,A32,AFINSQ_1:66;
    then
A34: IC Comput(P3, s3,k) in dom Directed J1 by FUNCT_4:99;
    then
A35: (Directed J1).IC Comput(P3, s3,k) in rng Directed J1 by FUNCT_1:def 3;
    card if=0(a,I,J) = card I + card J + (3 + 1) by SCMFSA8B:11
      .= card I + card J + 3 + 1;
    then card I + card J + 3 < card if=0(a,I,J) by XREAL_1:29;
    then n + (card J + 3) < card if=0(a,I,J) by A32,XXREAL_0:2;
    then
A36: IC Comput(P3, s3,k) in dom if=0(a,I,J) by A33,AFINSQ_1:66;
A37: CurInstr(P3,Comput(P3,s3,k))
 = P3.IC Comput(P3, s3,k) by PBOOLE:143
      .= if=0(a,I,J).IC Comput(P3, s3,k) by A36,A1,GRFUNC_1:2;
    Directed J1 c= if=0(a,I,J) by SCMFSA6A:16;
    then
    if=0(a,I,J).IC Comput(P3, s3,k) = (Directed J1).IC Comput(
P3, s3,
    k) by A34,GRFUNC_1:2;
    hence contradiction by A26,A35,A37,COMPOS_1:def 11;
  end;
  then
A38: LifeSpan(P3,s3) = pseudo-LifeSpan(s00,P00,I0)
+ 1 by A24,A25,EXTPRO_1:def 15;
A39:s +*Initialize((intloc 0).-->1) = Initialize Initialized s by MEMSTR_0:44;
A40: I0 ";" Stop SCM+FSA = I1;
A41: DataPart Comput(P00, s00,pseudo-LifeSpan(s,P,I0)) = DataPart
Comput(P1, s1,pseudo-LifeSpan(s,P,I0)) by A13,A40,Th21;
  I1 is_halting_on s,P by A13,Th21;
  then
A42: P1 halts_on s1;
  thus DataPart IExec(if=0(a,I,J),P,ss)
   = DataPart IExec(if=0(a,I,J),P,s)
    .= DataPart Result(P3,s3) by A20
    .= DataPart Comput(P3, s3,LifeSpan(P3,s3)) by A25,EXTPRO_1:23
    .= DataPart Comput(P3, s4,pseudo-LifeSpan(s00,P00,I0)) by A38,EXTPRO_1:4
    .= DataPart Comput(P00, s00,pseudo-LifeSpan(s00,P00,I0))
     by A15,A23,A12,A17,Th14,A2
    .= DataPart Comput(P1, s1,LifeSpan(P1,s1)) by A13,A14,A41,Th13
    .= DataPart Result(P1,s1) by A42,EXTPRO_1:23
    .= DataPart IExec(I1,P,s) by A39
    .= DataPart IExec(I1,P,ss);
end;
