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 Th13:
  p in dom T implies for q st q in dom (T with-replacement (p,T1)) &
  q in {t1 where t1 is Element of dom T : not p is_a_prefix_of t1}
  holds T with-replacement (p,T1).q = T.q
proof
  assume
A1: p in dom T;
  let q;
  assume that
A2: q in dom (T with-replacement (p,T1)) and
A3: q in {t1 where t1 is Element of dom T : not p is_a_prefix_of t1};
  per cases by A1,A2,Th11;
  suppose
 not p is_a_prefix_of q & T with-replacement (p,T1).q = T.q;
    hence thesis;
  end;
  suppose
    A4: ex r st r in dom T1 & q = p^r & T with-replacement (p,T1).q = T1.r;
 ex t9 being Element of dom T st q = t9 & not p is_a_prefix_of t9 by A3;
    hence thesis by A4,TREES_1:1;
  end;
end;
