 reserve i,j,n,k,l for Nat;
 reserve T,S,X,Y,Z for Subset of MC-wff;
 reserve p,q,r,t,F,H,G for Element of MC-wff;
 reserve s,U,V for MC-formula;
reserve f,g for FinSequence of [:MC-wff,Proof_Step_Kinds_IPC:];

theorem Th7:
  1 <= n & n <= len f implies
  (f,n is_a_correct_step_wrt_IPC X iff f^g,n is_a_correct_step_wrt_IPC X)
proof
  assume that
A1: 1 <= n and
A2: n <= len f;
  n in dom f by A1,A2,FINSEQ_3:25;
  then A3: (f^g).n = f.n by FINSEQ_1:def 7;
  len(f^g) = len f + len g by FINSEQ_1:22;
  then len f <= len(f^g) by NAT_1:11;
  then A4: n <= len(f^g) by A2,XXREAL_0:2;
  thus f,n is_a_correct_step_wrt_IPC X implies f^g,n
  is_a_correct_step_wrt_IPC X
  proof
    assume
A5: f,n is_a_correct_step_wrt_IPC X;
    ((f^g).n)`2 = 0 or ... or  ((f^g).n)`2 = 10 by A1,A4,Th3;
    then per cases;
    case ((f^g).n)`2 = 0;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 1;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 2;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 3;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 4;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 5;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 6;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 7;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 8;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 9;
      hence thesis by A3,A5,Def3;
    end;
    case ((f^g).n)`2 = 10;
      then consider i,j,r,t such that
A6:  1 <= i and
A7:  i < n and
A8:  1 <= j and
A9:  j < i and
A10:  r = (f.j)`1 & t = (f.n)`1 & (f.i)`1 = r => t by A3,A5,Def3;
A11:  i <= len f by A2,A7,XXREAL_0:2; then
      j <= len f by A9,XXREAL_0:2; then
A16:  j in dom f by FINSEQ_3:25,A8;
      i in dom f by A6,A11,FINSEQ_3:25; then
A17:  f.i = (f^g).i by FINSEQ_1:def 7;
      f.j = (f^g).j by A16,FINSEQ_1:def 7;
      hence thesis by A3,A6,A7,A8,A9,A10,A17;
    end;
end;
  assume
A24: f^g,n is_a_correct_step_wrt_IPC X;
  (f.n)`2 = 0 or ... or (f.n)`2 = 10 by A1,A2,Th3;
  then per cases;
  case (f.n)`2 = 0;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 1;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 2;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 3;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 4;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 5;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 6;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 7;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 8;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 9;
    hence thesis by A3,A24,Def3;
  end;
  case (f.n)`2 = 10;
    then consider i,j,r,t such that
A25: 1 <= i and
A26: i < n and
A27: 1 <= j and
A28: j < i and
A29: r = ((f^g).j)`1 & t = ((f^g).n)`1 & ((f^g).i)`1 = r => t
      by A3,A24,Def3;
A30: i <= len f by A2,A26,XXREAL_0:2; then
A31: j <= len f by A28,XXREAL_0:2;
    i in dom f by A25,A30,FINSEQ_3:25; then
A36: f.i = (f^g).i by FINSEQ_1:def 7;
    j in dom f by A27,A31,FINSEQ_3:25; then
    f.j = (f^g).j by FINSEQ_1:def 7;
    hence thesis by A3,A25,A26,A27,A28,A29,A36;
  end;
end;
