reserve i for Nat,
  j for Element of NAT,
  X,Y,x,y,z for set;
reserve C for initialized ConstructorSignature,
  s for SortSymbol of C,
  o for OperSymbol of C,
  c for constructor OperSymbol of C;
reserve a,b for expression of C, an_Adj C;
reserve t, t1,t2 for expression of C, a_Type C;
reserve p for FinSequence of QuasiTerms C;
reserve e for expression of C;
reserve a,a9 for expression of C, an_Adj C;
reserve q for pure expression of C, a_Type C,
  A for finite Subset of QuasiAdjs C;
reserve T for quasi-type of C;

theorem
  for S being non void Signature
  for X,Y being ManySortedSet of the carrier of S
  st X c= Y & X is with_missing_variables
  holds
  Terminals DTConMSA X c= Terminals DTConMSA Y &
  the Rules of DTConMSA X c= the Rules of DTConMSA Y &
  TS DTConMSA X c= TS DTConMSA Y
proof
  let S be non void Signature;
  let X,Y be ManySortedSet of the carrier of S such that
A1: X c= Y and
A2: X is with_missing_variables;
A3: Y is with_missing_variables by A1,A2,Th117;
  set G = DTConMSA X, G9 = DTConMSA Y;
A4: the carrier of G c= the carrier of G9 by A1,Th118,XBOOLE_1:9;
A5: Terminals G = Union coprod X by A2,Th120;
A6: Terminals G9 = Union coprod Y by A3,Th120;
  hence
  Terminals G c= Terminals G9 by A1,A5,Th118;
A7: (the carrier of G)* c= (the carrier of G9)* by A4,FINSEQ_1:62;
  thus the Rules of G c= the Rules of G9
  proof
    let a,b be object;
    assume
A8: [a,b] in the Rules of G;
    then
A9: a in [:the carrier' of S,{the carrier of S}:] by MSAFREE1:2;
    reconsider a as Element of [:the carrier' of S,{the carrier of S}:]
    \/ Union coprod X by A9,XBOOLE_0:def 3;
    reconsider a9 = a as
    Element of [:the carrier' of S,{the carrier of S}:]
    \/ Union coprod Y by A9,XBOOLE_0:def 3;
    reconsider b as Element of
    ([:the carrier' of S,{the carrier of S}:] \/ Union coprod X)* by A8,
MSAFREE1:2;
    reconsider b9 = b as Element of
    ([:the carrier' of S,{the carrier of S}:] \/ Union coprod Y)*
    by A7;
    now
      let o be OperSymbol of S;
      assume
A10:  [o,the carrier of S] = a9;
      hence
A11:  len b9 = len (the_arity_of o) by A8,MSAFREE:def 7;
      let x be set;
      assume
A12:  x in dom b9;
      hence b9.x in [:the carrier' of S,{the carrier of S}:] implies
      for o1 be OperSymbol of S st [o1,the carrier of S] = b.x
      holds the_result_sort_of o1 = (the_arity_of o).x
      by A8,A10,MSAFREE:def 7;
A13:  Union coprod Y misses [:the carrier' of S,{the carrier of S}:] by
MSAFREE:4;
A14:  b.x in [:the carrier' of S,{the carrier of S}:] \/ Union coprod X
      by A12,DTCONSTR:2;
A15:  dom b9 = Seg len b9 by FINSEQ_1:def 3;
      dom the_arity_of o = Seg len b9 by A11,FINSEQ_1:def 3;
      then
A16:  (the_arity_of o).x in the carrier of S by A12,A15,DTCONSTR:2;
      assume
A17:  b9.x in Union coprod Y;
      b.x in [:the carrier' of S,{the carrier of S}:] or b.x in Union coprod
      X by A14,XBOOLE_0:def 3;
      then b.x in coprod((the_arity_of o).x,X) by A8,A10,A12,A13,A17,
MSAFREE:def 7,XBOOLE_0:3;
      then
A18:  ex a being set st ( a in X.((the_arity_of o).x))&( b.x = [a
      , (the_arity_of o).x]) by A16,MSAFREE:def 2;
      X.((the_arity_of o).x) c= Y.((the_arity_of o).x) by A1,A16;
      hence b9.x in coprod((the_arity_of o).x,Y) by A16,A18,MSAFREE:def 2;
    end;
    hence thesis by A9,MSAFREE:def 7;
  end;
  hence thesis by A1,A5,A6,Th116,Th118;
end;
