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;

theorem Th11:
 for q be non halt-free finite
  (the InstructionsF of S)-valued NAT-defined Function
  for p being non empty FinPartState of S st IC S in dom p
  for k being Nat holds
   p is q-autonomic iff IncIC(p,k) is Reloc(q,k)-autonomic
proof
 let q be non halt-free finite
  (the InstructionsF of S)-valued NAT-defined Function;
  let p be non empty FinPartState of S such that
A1: IC S in dom p;
  let k be Nat;
  hereby
    assume
A2: p is q-autonomic;
    thus IncIC(p,k) is Reloc(q,k)-autonomic
    proof
     let P,Q be Instruction-Sequence of S such that
A3:   Reloc(q,k) c= P and
A4:   Reloc(q,k) c= Q;
      let s1,s2 be State of S such that
A5:    IncIC(p,k) c= s1 and
A6:    IncIC(p,k) c= s2;
      let i be Nat;
A7:   dom (Start-At ((IC Comput(Q+*q,s2+* p,i))+k,S)) = {IC S};
A8:   dom(DataPart p) misses
       dom (Start-At (IC Comput(Q+*q,s2+* p,i) +k,S))
      by MEMSTR_0:4;
A9:  dom (Start-At ((IC Comput(P+*q,s1+* p,i))+k,S)) = {IC S};
A10:  dom(DataPart p) misses
       dom (Start-At (IC Comput(P+*q,s1+* p,i) +k,S))
      by MEMSTR_0:4;
A11:   q c= P+*q & q c= Q+*q
              by FUNCT_4:25;
       p c= s1 +*  p &  p c= s2 +*  p by FUNCT_4:25;
    then
A12:  Comput(P+*q,s1+* p,i)|dom  p
    = Comput(Q+*q,s2+* p,i) |dom  p
     by A2,A11;
A13:  DataPart p c=  p by MEMSTR_0:12;
A14:  Comput(P,s1,i)|dom (DataPart p)
        = IncIC(Comput(P+*q,s1+* p,i),k) | dom DataPart p by A1,A2,A5,Th9,A3
       .= ( Comput(P+*q,s1+* p,i)) | dom (DataPart p)
         by A10,FUNCT_4:72
        .= ( Comput(Q+*q,s2+* p,i)) | dom (DataPart p)
         by A12,A13,RELAT_1:11,153
        .= ( IncIC(Comput(Q+*q,s2+* p,i),k))|dom DataPart p by A8,FUNCT_4:72
        .= Comput(Q,s2,i)|dom DataPart p by A1,A2,A6,Th9,A4;
A15:  {IC S} c= dom  p by A1,ZFMISC_1:31;
A16:  Start-At (IC Comput(P+*q,s1+* p,i),S)
      = Comput(P+*q,s1+* p,i)|{IC S} by MEMSTR_0:18
        .= Comput(Q+*q,s2+* p,i)|{IC S}
        by A12,A15,RELAT_1:153
        .= Start-At (IC Comput(Q+*q,s2+* p,i),S) by MEMSTR_0:18;
A18:  Comput(P,s1,i)|dom (Start-At((IC p)+k,S))
        = IncIC(Comput(P+*q,s1+* p,i),k)|
              dom (Start-At((IC p)+k,S)) by A1,A2,A5,Th9,A3
       .= Start-At (IC Comput(P+*q,s1+* p,i) +k,S)
         by A9
        .= Start-At (IC Comput(Q+*q,s2+* p,i) +k,S)
              by A16,MEMSTR_0:21
        .= ( IncIC(Comput(Q+*q,s2+* p,i),k))|
                dom (Start-At((IC p)+k,S)) by A7
        .= Comput(Q,s2,i)|dom (Start-At((IC p)+k,S)) by A1,A2,A6,Th9,A4;
A20:  dom  p = {IC S} \/ dom DataPart p by A1,MEMSTR_0:24;
A21: Comput(P,s1,i)|dom  p
       = Comput(P,s1,i)|{IC S}
          \/ Comput(P,s1,i)|dom DataPart p by A20,RELAT_1:78
       .= Comput(Q,s2,i)|dom  p
       by A20,A14,A18,RELAT_1:78;
A22:  dom IncIC( p,k)
     = dom  p \/ dom Start-At((IC p)+k,S) by FUNCT_4:def 1;
A23: Comput(P,s1,i)|dom IncIC( p,k)
     = Comput(P,s1,i)|dom  p
        \/ Comput(P,s1,i)|dom Start-At((IC p)+k,S) by A22,RELAT_1:78
    .= Comput(Q,s2,i)|dom IncIC( p,k)
         by A22,A18,A21,RELAT_1:78;
     thus Comput(P,s1,i)|dom  IncIC(p,k)
       = Comput(Q,s2,i)|dom  IncIC(p,k) by A23;

    end;
  end;
  assume
A24: IncIC(p,k) is Reloc(q,k)-autonomic;
A25: DataPart p c= IncIC(p,k) by MEMSTR_0:62;
    let P,Q be Instruction-Sequence of S such that
A26: q c= P and
A27: q c= Q;
A28: Reloc(q,k) c= P +* Reloc(q,k) &
    Reloc(q,k) c= Q +* Reloc(q,k)
         by FUNCT_4:25;
    let s1,s2 be State of S such that
A29:  p c= s1 and
A30:  p c= s2;
    let i be Nat;
     IncIC(p,k) c= s1 +*  IncIC(p,k) &
     IncIC(p,k) c= s2 +*  IncIC(p,k) by FUNCT_4:25;
    then
A31: Comput(P +* Reloc(q,k),s1+*IncIC(p,k),i)|dom  IncIC(p,k)
     = Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i)|dom  IncIC(p,k)
           by A24,A28;
A32: dom (Start-At ((IC Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i)) -'k,S))
       = {IC S};
A33: dom(DataPart p) misses
 dom(Start-At (IC Comput(Q+*Reloc(q,k),s2+*IncIC(p,k),i) -'k,S))
         by MEMSTR_0:4;
A34: dom (Start-At ((IC Comput(P +* Reloc(q,k),s1+*IncIC(p,k),i)) -'k,S))
      = {IC S};
A35: dom(DataPart p) misses
     dom(Start-At (IC Comput(P+*Reloc(q,k),s1+*IncIC(p,k),i) -'k,S))
           by MEMSTR_0:4;
A36: Comput(P,s1,i)|dom (DataPart p)
    = ( DecIC(Comput(P+*Reloc(q,k),s1+*IncIC(p,k)
    ,i),k)) | dom(DataPart p) by A1,A24,A29,Th10,A26
      .= ( Comput(P +* Reloc(q,k),s1+*IncIC(p,k),i)) | dom
(DataPart p) by A35,FUNCT_4:72
      .= ( Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i)) | dom
(DataPart p) by A31,A25,RELAT_1:11,153
      .= DecIC(Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i),k)
     | dom(DataPart p) by A33,FUNCT_4:72
      .= Comput(Q,s2,i)|dom (DataPart p) by A1,A24,A30,Th10,A27;
    IC S in dom  IncIC(p,k) by MEMSTR_0:52;
    then
A37: {IC S} c= dom IncIC(p,k) by ZFMISC_1:31;
A38: Start-At (IC Comput(P +* Reloc(q,k),s1+*IncIC(p,k),i),
S) = Comput(P+*Reloc(q,k),s1+*
    IncIC(p,k),i)|{IC S} by MEMSTR_0:18
      .= Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i)|{IC S}
        by A31,A37,RELAT_1:153
      .= Start-At (IC Comput(Q +* Reloc(q,k),s2+*IncIC(p,k)
,i),S) by MEMSTR_0:18;
A40: Comput(P,s1,i)|dom (Start-At(IC p,S))
     = ( DecIC(Comput(P+*Reloc(q,k),s1+*IncIC(p,k),i),k))
         |dom (Start-At(IC p,S)) by A1,A24,A29,Th10,A26
      .= Start-At (IC Comput(P +* Reloc(q,k),s1+*IncIC(p,k)
,i) -'k,S) by A34
      .= Start-At (IC Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i) -'k,S)
       by A38,MEMSTR_0:22
      .= DecIC(Comput(Q +* Reloc(q,k),s2+*IncIC(p,k),i),k)
     |dom (Start-At(IC p,S))
     by A32
      .= Comput(Q,s2,i)|dom Start-At(IC p,S) by A1,A24,A30,Th10,A27;
    thus Comput(P,s1,i)|dom  p
     = Comput(P,s1,i)|dom(Start-At(IC p,S) +*
          DataPart p ) by A1,MEMSTR_0:19
      .= Comput(P,s1,i)|(dom (Start-At(IC p,S)) \/ dom (DataPart p))
          by FUNCT_4:def 1
      .= Comput(Q,s2,i)|dom (Start-At(IC p,S)) \/
            Comput(Q,s2,i)|dom (DataPart p) by A36,A40,RELAT_1:78
      .= Comput(Q,s2,i)|(dom (Start-At(IC p,S)) \/ dom DataPart p)
           by RELAT_1:78
      .= Comput(Q,s2,i)|dom (Start-At(IC p,S) +* DataPart p) by FUNCT_4:def 1
      .= Comput(Q,s2,i)|dom  p by A1,MEMSTR_0:19;
end;
