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));

theorem Th107:
       L is subst-correct implies
  \for(x,A\impB)\imp(\for(x,A)\impB) in G
  proof set Y = X extended_by ({},the carrier of S1);
    consider a being object such that
A1: a in dom X & x in X.a by CARD_5:2;
    J is Subsignature of S1 by Def2;
    then
A2: the carrier of J c= the carrier of S1 & dom Y = the carrier of S1 &
    dom X = the carrier of J by PARTFUN1:def 2,INSTALG1:10;
    reconsider a as SortSymbol of J by A1;
A3: x in Y.a by A1,A2,Th1;
A4: X.a is Subset of (the Sorts of T).a by Th13;
A5: Y is ManySortedSubset of the Sorts of L by Th23;
    then x in Union X = Union Y c= Union the Sorts of L
    by Th24,MSAFREE4:1,PBOOLE:def 18; then
    reconsider t = x as Element of Union the Sorts of L;
A6: (the Sorts of T).a = (the Sorts of L).a by Th16;
    reconsider x0 = x as Element of Union Y by Th24;
    assume L is subst-correct; then
    A/(x0,x0) = A & (A\impB)/(x0,x0) = A\impB by A1,A2,A3;
    then A/(x0,t) = A & (A\impB)/(x0,t) = A\impB
    by A5,A1,A2,A3,Th14;
    then \for(x,A\impB)\imp(A\impB) in G & \for(x,A)\impA in G
    by A6,A1,A4,A3,Def39;
    hence \for(x,A\impB)\imp(\for(x,A)\impB) in G by Th96;
  end;
