reserve i,j,x,y for object,
  f,g for Function;
reserve T,T1 for finite Tree,
  t,p for Element of T,
  t1 for Element of T1;

theorem Th10:
  for f being FinSequence of NAT st f in T with-replacement (p,T1)
  & p is_a_prefix_of f ex t1 st f = p^t1
proof
  let f be FinSequence of NAT such that
A1: f in T with-replacement (p,T1) and
A2: p is_a_prefix_of f;
A3: not f in { t : not p is_a_prefix_of t }
  proof
    assume f in { t : not p is_a_prefix_of t };
    then ex t st f = t & not p is_a_prefix_of t;
    hence contradiction by A2;
  end;
  T with-replacement (p,T1) = { t : not p is_a_prefix_of t } \/ the set of all
 p^t1  by Th9;
  then f in the set of all  p^t1  by A1,A3,XBOOLE_0:def 3;
  hence thesis;
end;
