reserve X,Y for set, x,y,z for object, i,j,n for natural number;

theorem Th14:
  for J being non empty non void Signature
  for X being non empty-yielding ManySortedSet of the carrier of J
  for Q being SubstMSAlgebra over J,X
  st X is ManySortedSubset of the Sorts of Q
  for a being SortSymbol of J st (the Sorts of Q).a <> {}
  for A being Element of Q,a
  for x,y being Element of Union X
  for t being Element of Union the Sorts of Q st y = t
  for j being SortSymbol of J st x in X.j & y in X.j
  holds A/(x,y) = A/(x,t)
  proof
    let J be non empty non void Signature;
    let X be non empty-yielding ManySortedSet of the carrier of J;
    let Q be SubstMSAlgebra over J,X;
    assume A1: X is ManySortedSubset of the Sorts of Q;
    let a be SortSymbol of J;
    assume A2: (the Sorts of Q).a <> {};
    let A be Element of Q,a;
    let x,y be Element of Union X;
    let t be Element of Union the Sorts of Q;
    assume A3: y = t;
    let j be SortSymbol of J;
    assume A4: x in X.j;
    assume A5: y in X.j;
A6: X.j is Subset of (the Sorts of Q).j by A1,Th13;
    thus A/(x,y) = (the subst-op of Q).[A,[x,y]] by A1,A2,A4,A5,Def12
    .= A/(x,t) by A6,A5,A3,A4,A2,Def13;
  end;
