reserve Al for QC-alphabet;
reserve a,b,c,d for object,
  i,j,k,m,n for Nat,
  p,q,r for Element of CQC-WFF(Al),
  x,y,y0 for bound_QC-variable of Al,
  X for Subset of CQC-WFF(Al),
  A for non empty set,
  J for interpretation of Al,A,
  v,w for Element of Valuations_in(Al,A),
  Sub for CQC_Substitution of Al,
  f,f1,g,h,h1 for FinSequence of CQC-WFF(Al);
reserve fin,fin1 for FinSequence;
reserve PR,PR1 for FinSequence of [:set_of_CQC-WFF-seq(Al),Proof_Step_Kinds:];
reserve a for Element of A;

theorem Th36:
  Ant(f) is_Subsequence_of Ant(g) & Suc(f) = Suc(g) & |- f implies |- g
proof
  assume that
A1: Ant(f) is_Subsequence_of Ant(g) & Suc(f) = Suc(g) and
A2: |- f;
  consider PR such that
A3: PR is a_proof and
A4: (PR.(len PR))`1 = f by A2;
A5: g in set_of_CQC-WFF-seq(Al) by Def6;
  now
    let a be object;
    assume a in rng <*[g,2]*>;
    then a in {[g,2]} by FINSEQ_1:38;
    then a = [g,2] by TARSKI:def 1;
    hence a in [:set_of_CQC-WFF-seq(Al),Proof_Step_Kinds:] by A5,CQC_THE1:21
,ZFMISC_1:87;
  end;
  then rng <*[g,2]*> c= [:set_of_CQC-WFF-seq(Al),Proof_Step_Kinds:];
  then reconsider PR1 = <*[g,2]*> as FinSequence of [:set_of_CQC-WFF-seq(Al),
  Proof_Step_Kinds:] by FINSEQ_1:def 4;
  1 in Seg 1 by FINSEQ_1:2,TARSKI:def 1;
  then
A6: 1 in dom PR1 by FINSEQ_1:38;
  set PR2 = PR^PR1;
  reconsider PR2 as FinSequence of [:set_of_CQC-WFF-seq(Al),Proof_Step_Kinds:];
A7: PR <> {} by A3;
  now
    let n be Nat;
    assume 1 <= n & n <= len PR2;
    then
A8: n in dom PR2 by FINSEQ_3:25;
A9: now
A10:  1 <= len PR by A7,Th6;
      then len PR in dom PR by FINSEQ_3:25;
      then
A11:  f = (PR2.(len PR))`1 by A4,FINSEQ_1:def 7;
      given k being Nat such that
A12:  k in dom PR1 and
A13:  n = len PR + k;
      k in Seg 1 by A12,FINSEQ_1:38;
      then
A14:  k = 1 by FINSEQ_1:2,TARSKI:def 1;
      then
A15:  PR1.k = [g,2];
      then (PR1.k)`1 = g;
      then
A16:  (PR2.n)`1 = g by A12,A13,FINSEQ_1:def 7;
      (PR1.k)`2 = 2 by A15;
      then
A17:  (PR2.n)`2 = 2 by A12,A13,FINSEQ_1:def 7;
      len PR < n by A13,A14,NAT_1:13;
      hence PR2,n is_a_correct_step by A1,A16,A17,A10,A11,Def7;
    end;
    now
      assume n in dom PR;
      then
A18:  1 <= n & n <= len PR by FINSEQ_3:25;
      then PR,n is_a_correct_step by A3;
      hence PR2,n is_a_correct_step by A18,Th34;
    end;
    hence PR2,n is_a_correct_step by A8,A9,FINSEQ_1:25;
  end;
  then
A19: PR2 is a_proof;
  PR2.(len PR2) = PR2.(len PR + len PR1) by FINSEQ_1:22;
  then PR2.(len PR2) = PR2.(len PR + 1) by FINSEQ_1:39;
  then PR2.(len PR2) = PR1.1 by A6,FINSEQ_1:def 7;
  then PR2.(len PR2) = [g,2];
  then (PR2.(len PR2))`1 = g;
  hence thesis by A19;
end;
