theorem Th01:
  for t,t1 being Tree, p,q being FinSequence of NAT st p in t &
  q in t with-replacement(p,t1) holds (not p is_a_prefix_of q implies q in t) &
  for r being FinSequence of NAT st q = p^r holds r in t1
  proof
    let t,t1 be Tree;
    let p,q be FinSequence of NAT;
    assume Z0: p in t;
    assume Z1: q in t with-replacement(p,t1);
    thus (not p is_a_prefix_of q implies q in t)
    proof
      assume not p is_a_prefix_of q;
      then not ex r being FinSequence of NAT st r in t1 & q = p^r by TREES_1:1;
      hence q in t by Z0,Z1,TREES_1:def 9;
    end;
    let r be FinSequence of NAT;
    assume Z3: q = p^r;
    then p c= q by TREES_1:1;
    then p c< q or p = q & p = p^{} by XBOOLE_0:def 8,FINSEQ_1:34;
    then ex r being FinSequence of NAT st r in t1 & q = p^r
    by Z0,Z1,TREES_1:22,def 9;
    hence r in t1 by Z3,FINSEQ_1:33;
  end;
