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

theorem LemP:
  for p,q being FinSequence st i <= len p holds (p^q)|Seg i = p|Seg i
  proof
    let p,q be FinSequence;
    set D = (rng p)\/(rng q)\/{0};
    rng p c= (rng p)\/rng q & rng q c= (rng p)\/rng q by XBOOLE_1:7;
    then p is FinSequence of D & q is FinSequence of D & (p^q)|i = (p^q)|Seg i
    & p|Seg i = p|i by FINSEQ_1:def 4,XBOOLE_1:10;
    hence thesis by FINSEQ_5:22;
  end;
