reserve X,Y for set, x,y,z for object, i,j,n for natural number;
reserve
  n for non empty Nat,
  S for non empty non void n PC-correct PCLangSignature,
  L for language MSAlgebra over S,
  F for PC-theory of L,
  A,B,C,D for Formula of L;
reserve
  J for non empty non void Signature,
  T for non-empty MSAlgebra over J,
  X for non empty-yielding GeneratorSet of T,
  S1 for J-extension non empty non void n PC-correct QC-correct
  QCLangSignature over Union X,
  L for non-empty Language of X extended_by ({},the carrier of S1), S1,
  G for QC-theory of L,
  A,B,C,D for Formula of L;
reserve x,y,z for Element of Union X;
reserve x0,y0,z0 for Element of Union (X extended_by ({},the carrier of S1));
reserve a for SortSymbol of J;
reserve
  L for
    non-empty T-extension Language of X extended_by ({},the carrier of S1), S1,
  G for QC-theory of L,
  G1 for QC-theory_with_equality of L,
  A,B,C,D for Formula of L,
  s,s1 for SortSymbol of S1,
  t,t9 for Element of L,s,
  t1,t2,t3 for Element of L,s1;

theorem
  L is subst-eq-correct & x0 in X.s & t1 '=' (t2,L) in G1
  implies (t1/(x0,t) '=' (t2/(x0,t),L)) in G1
  proof
    assume A1: L is subst-eq-correct;
    set Y = X extended_by({}, the carrier of S1);
    assume A2: x0 in X.s;
    then
A3: s in dom X = the carrier of J & dom Y = the carrier of S1
    by FUNCT_1:def 2,PARTFUN1:def 2;
    then reconsider x = x0 as Element of Union X by A2,CARD_5:2;
A4: Y.s = X.s by A3,Th1;
    assume t1 '=' (t2,L) in G1;
    then \for(x,t1 '=' (t2,L)) in G1 &
    \for(x,t1 '='(t2,L))\imp((t1 '=' (t2,L))/(x0,t)) in G1 by A3,A4,A2,Def39;
    then (t1 '=' (t2,L))/(x0,t) in G1 by Def38;
    hence (t1/(x0,t) '=' (t2/(x0,t),L)) in G1 by A1,A2;
  end;
