reserve
  a,b for object, I,J for set, f for Function, R for Relation,
  i,j,n for Nat, m for (Element of NAT),
  S for non empty non void ManySortedSign,
  s,s1,s2 for SortSymbol of S,
  o for OperSymbol of S,
  X for non-empty ManySortedSet of the carrier of S,
  x,x1,x2 for (Element of X.s), x11 for (Element of X.s1),
  T for all_vars_including inheriting_operations free_in_itself
  (X,S)-terms MSAlgebra over S,
  g for Translation of Free(S,X),s1,s2,
  h for Endomorphism of Free(S,X);
reserve
  r,r1,r2 for (Element of T),
  t,t1,t2 for (Element of Free(S,X));
reserve
  Y for infinite-yielding ManySortedSet of the carrier of S,
  y,y1 for (Element of Y.s), y11 for (Element of Y.s1),
  Q for all_vars_including inheriting_operations free_in_itself
  (Y,S)-terms MSAlgebra over S,
  q,q1 for (Element of Args(o,Free(S,Y))),
  u,u1,u2 for (Element of Q),
  v,v1,v2 for (Element of Free(S,Y)),
  Z for non-trivial ManySortedSet of the carrier of S,
  z,z1 for (Element of Z.s),
  l,l1 for (Element of Free(S,Z)),
  R for all_vars_including inheriting_operations free_in_itself
  (Z,S)-terms MSAlgebra over S,
  k,k1 for Element of Args(o,Free(S,Z));
reserve c,c1,c2 for set, d,d1 for DecoratedTree;
reserve
  w for (Element of Args(o,T)),
  p,p1 for Element of Args(o,Free(S,X));
reserve C for (context of x), C1 for (context of y), C9 for (context of z),
  C11 for (context of x11), C12 for (context of y11), D for context of s,X;
reserve
  S9 for sufficiently_rich non empty non void ManySortedSign,
  s9 for SortSymbol of S9,
  o9 for s9-dependent OperSymbol of S9,
  X9 for non-trivial ManySortedSet of the carrier of S9,
  x9 for (Element of X9.s9);
reserve h1 for x-constant Homomorphism of Free(S,X), T,
  h2 for y-constant Homomorphism of Free(S,Y), Q;
reserve
  s2 for s1-reachable SortSymbol of S,
  g1 for Translation of Free(S,Y),s1,s2,
  g for Translation of Free(S,X),s1,s2;

theorem Lem9:
  for xi1,xi2 being FinSequence st xi1 <> xi2 & xi1 in dom t & xi2 in dom t
  for s1,s2 being SortSymbol of S, x1 being Element of X.s1
  for x2 being Element of X.s2 st t.xi1 = [x1,s1]
  holds not xi1 is_a_prefix_of xi2
  proof
    let xi1,xi2 be FinSequence;
    assume Z0: xi1 <> xi2;
    assume xi1 in dom t;
    then reconsider nu1 = xi1 as Element of dom t;
    assume Z2: xi2 in dom t;
    let s1,s2 be SortSymbol of S;
    let x1 be Element of X.s1;
    let x2 be Element of X.s2;
    assume Z3: t.xi1 = [x1,s1];
    assume xi1 is_a_prefix_of xi2;
    then consider r being FinSequence such that
A1: xi2 = xi1^r by TREES_1:1;
    reconsider t1 = t|nu1 as Element of Free(S,X) by MSAFREE4:44;
    <*>NAT in (dom t qua Tree)|(nu1 qua FinSequence of NAT) by TREES_1:22;
    then
A2: t1.{} = t.(nu1^{}) by TREES_2:def 10;
    xi2 is Element of dom t by Z2;
    then reconsider r as FinSequence of NAT by A1,FINSEQ_1:36;
    per cases by Th16;
    suppose ex s,x st t1 = x-term;
      then consider s,x such that
A4:   t1 = x-term;
      dom t1 = (dom t)|nu1 by TREES_2:def 10;
      then r in dom t1 by Z2,A1,TREES_1:def 6;
      then r in {{}} by A4,TREES_1:29;
      then r = {};
      hence thesis by Z0,A1;
    end;
    suppose ex o,p st t1 = o-term p;
      then consider o,p such that
A3:   t1 = o-term p;
      t1.{} = [o,the carrier of S] by A3,TREES_4:def 4;
      then s1 in the carrier of S = s1 by A2,Z3,XTUPLE_0:1;
      hence thesis;
    end;
  end;
