reserve x,y,x1,x2,z for set,
  n,m,k for Nat,
  t1 for (DecoratedTree of [: NAT,NAT :]),
  w,s,t,u for FinSequence of NAT,
  D for non empty set;

theorem Th9:
  for Z1,Z2 being Tree,p being FinSequence of NAT st p in Z1 holds
for v being Element of Z1 with-replacement (p,Z2),w being Element of Z1 st v =
  w & not p,w are_c=-comparable holds succ v = succ w
proof
  let Z1,Z2 be Tree,p be FinSequence of NAT;
  assume
A1: p in Z1;
  set Z = Z1 with-replacement (p,Z2);
  let v be Element of Z,w be Element of Z1;
  assume that
A2: v = w and
A3: not p,w are_c=-comparable;
A4: not p is_a_prefix_of w by A3;
  now
    let x be object;
    thus x in succ v implies x in succ w
    proof
      assume x in succ v;
      then x in { v^<*n*> : v^<*n*> in Z} by TREES_2:def 5;
      then consider n such that
A5:   x = v^<*n*> and
A6:   v^<*n*> in Z;
      reconsider n as Element of NAT by ORDINAL1:def 12;
      x = v^<*n*> by A5;
      then reconsider x9 = x as FinSequence of NAT;
      v^<*n*> in Z1
      proof
        assume
A7:     not v^<*n*> in Z1;
        then ex t st t in Z2 & x9 = p^t by A1,A5,A6,TREES_1:def 9;
        then
A8:     p is_a_prefix_of v^<*n*> by A5,TREES_1:1;
        per cases by A8;
        suppose
          p is_a_proper_prefix_of v^<*n*>;
          hence contradiction by A2,A4,TREES_1:9;
        end;
        suppose
          p = v^<*n*>;
          hence contradiction by A1,A7;
        end;
      end;
      then x in { w^<*m*> : w^<*m*> in Z1} by A2,A5;
      hence thesis by TREES_2:def 5;
    end;
    assume x in succ w;
    then x in { w^<*n*> : w^<*n*> in Z1} by TREES_2:def 5;
    then consider n such that
A9: x = w^<*n*> and
A10: w^<*n*> in Z1;
      reconsider n as Element of NAT by ORDINAL1:def 12;
    not p is_a_proper_prefix_of w^<*n*> by A4,TREES_1:9;
    then v^<*n*> in Z by A1,A2,A10,TREES_1:def 9;
    then x in { v^<*m*> : v^<*m*> in Z} by A2,A9;
    hence x in succ v by TREES_2:def 5;
  end;
  hence thesis by TARSKI:2;
end;
