reserve T, T1 for Tree,
  P for AntiChain_of_Prefixes of T,
  p1 for FinSequence,
  p, q, r, s, p9 for FinSequence of NAT,
  x, Z for set,
  t for Element of T,
  k, n for Nat;
reserve T,T1 for DecoratedTree,
  P for AntiChain_of_Prefixes of dom T,
  t for Element of dom T,
  p1, p2, r1, r2 for FinSequence of NAT;

theorem Th15:
  p in dom T implies for q st q in dom (T with-replacement (p,T1)) &
  q in the set of all p^s where s is Element of dom T1
  ex r being Element of dom T1 st
  q = p^r & T with-replacement (p,T1).q = T1.r
proof
  assume
A1: p in dom T;
  let q;
  assume that
A2: q in dom (T with-replacement (p,T1)) and
A3: q in the set of all p^s where s is Element of dom T1;
  per cases by A1,A2,Th11;
  suppose
A4: not p is_a_prefix_of q & T with-replacement (p,T1).q = T.q;
    ex r being Element of dom T1 st q = p^r by A3;
    hence thesis by A4,TREES_1:1;
  end;
  suppose
     ex r st r in dom T1 & q = p^r & T with-replacement (p,T1).q = T1.r;
    hence thesis;
  end;
end;
