reserve x,y,z for object, X,Y for set,
  i,k,n for Nat,
  p,q,r,s for FinSequence,
  w for FinSequence of NAT,
  f for Function;

theorem
  for T,T9 being DecoratedTree, p being Element of dom T,
  q being Element of dom T9 holds (T with-replacement (p,T9)).(p^q) = T9.q
proof
  let T,T9 be DecoratedTree;
  let p be Element of dom T, q be Element of dom T9;
A1: p is_a_prefix_of p^q by TREES_1:1;
  p^q in dom T with-replacement(p,dom T9) by TREES_1:def 9;
  then ex r being FinSequence of NAT st ( r in dom T9)&( p^q = p^r
  )&( (T with-replacement (p,T9)).(p^q) = T9.r) by A1,TREES_2:def 11;
  hence thesis by FINSEQ_1:33;
end;
