reserve k for Nat;
reserve N for with_zero set,
   S for IC-recognized
    halting IC-Ins-separated
  non empty with_non-empty_values AMI-Struct over N;
reserve
   S for IC-recognized CurIns-recognized
    halting IC-Ins-separated
  non empty with_non-empty_values AMI-Struct over N;
reserve S for relocable IC-recognized CurIns-recognized
     halting IC-Ins-separated
  non empty with_non-empty_values AMI-Struct over N;
reserve m,j for Nat;
reserve S for relocable1 relocable2
  relocable IC-recognized CurIns-recognized halting IC-Ins-separated
  non empty with_non-empty_values AMI-Struct over N;

theorem Th12:
 for q be non halt-free finite
  (the InstructionsF of S)-valued NAT-defined Function
  for p being q-autonomic non empty FinPartState of S,
      k being Nat st IC S in dom p
   holds p is q-halted iff IncIC(p,k) is Reloc(q,k)-halted
proof
 let q be non halt-free finite
  (the InstructionsF of S)-valued NAT-defined Function;
  let p be q-autonomic non empty FinPartState of S,
      k be Nat;
  assume
 IC S in dom p;
  hereby
    assume
A1: p is q-halted;
    thus IncIC(p,k) is Reloc(q,k)-halted
    proof
      let t be State of S;
      assume
A2:    IncIC(p,k) c= t;
      let P be Instruction-Sequence of S such that
A3:   Reloc(q,k) c= P;
      reconsider Q = P +* q
       as Instruction-Sequence of S;
      set s = t +* p;
A4:   q c= Q by FUNCT_4:25;
A5:   p c= t +* p by FUNCT_4:25;
      then Q halts_on s by A1,A4;
      then consider u being Nat such that
A6:   CurInstr(Q,Comput(Q,s,u)) = halt S;
      take u;
     dom P = NAT by PARTFUN1:def 2;
    hence IC Comput(P,t,u) in dom P;
      CurInstr(P,Comput(P,t,u))
       = IncAddr(halt S, k) by A2,A6,Def5,A3,A4,A5
        .= halt S by COMPOS_0:4;
      hence thesis;
    end;
  end;
  assume
A7: IncIC(p,k) is Reloc(q,k)-halted;
  let t be State of S;
  assume
A8:  p c= t;
  let P be Instruction-Sequence of S such that
A9: q c= P;
  reconsider Q = P +* Reloc(q, k)
   as Instruction-Sequence of S;
  set s = t +*  IncIC(p,k);
A10: Reloc(q,k) c= Q by FUNCT_4:25;
A11:  IncIC(p,k) c= t +*  IncIC(p,k) by FUNCT_4:25;
  then Q halts_on s by A7,A10;
  then consider u being Nat such that
A12: CurInstr(Q,Comput(Q,s,u)) = halt S;
  take u;
   dom P = NAT by PARTFUN1:def 2;
  hence IC Comput(P,t,u) in dom P;
  IncAddr(CurInstr(P,Comput(P,t,u)), k)
   = halt S by A8,A12,Def5,A11,A9,A10
  .= IncAddr(halt S,k) by COMPOS_0:4;
 hence CurInstr(P,Comput(P,t,u)) = halt S by COMPOS_0:6;
end;
