reserve x,y,z,a,b,c,X,X1,X2,Y,Z for set,
  W,W1,W2 for Tree,
  w,w9 for Element of W,
  f for Function,
  D,D9 for non empty set,
  i,k,k1,k2,l,m,n for Nat,
  v,v1,v2 for FinSequence,
  p,q,r,r1,r2 for FinSequence of NAT;

theorem
  p in W & q in W & not p,q are_c=-comparable implies
  (W with-replacement (p,W1)) with-replacement (q,W2) =
  (W with-replacement (q,W2)) with-replacement (p,W1)
proof
  assume that
A1: p in W and
A2: q in W and
A3: not p,q are_c=-comparable;
A4: not p is_a_prefix_of q by A3;
 not q is_a_prefix_of p by A3;
then A5: p in W with-replacement (q,W2) by A1,A2,Th7;
A6: q in W with-replacement (p,W1) by A1,A2,A4,Th7;
  let r;
  thus r in (W with-replacement (p,W1)) with-replacement (q,W2) implies
  r in (W with-replacement (q,W2)) with-replacement (p,W1)
  proof
    assume r in (W with-replacement (p,W1)) with-replacement (q,W2);
then  r in W with-replacement (p,W1) & not q is_a_proper_prefix_of r or
    ex r1 st r1 in W2 & r = q^r1 by A6,TREES_1:def 9;
then
 r in W & not p is_a_proper_prefix_of r & not q is_a_proper_prefix_of r or
    (ex r2 st r2 in W1 & r = p^r2) & not q is_a_proper_prefix_of r or
    q is_a_prefix_of r & ex r1 st r1 in W2 & r = q^r1 by A1,TREES_1:1,def 9;
then  r in W with-replacement (q,W2) & not p is_a_proper_prefix_of r or
    ex r1 st r1 in W1 & r = p^r1 by A2,A3,Th2,TREES_1:def 9;
    hence thesis by A5,TREES_1:def 9;
  end;
  assume r in (W with-replacement (q,W2)) with-replacement (p,W1);
then  r in W with-replacement (q,W2) & not p is_a_proper_prefix_of r or
  ex r1 st r1 in W1 & r = p^r1 by A5,TREES_1:def 9;
then
 r in W & not q is_a_proper_prefix_of r & not p is_a_proper_prefix_of r or
  (ex r2 st r2 in W2 & r = q^r2) & not p is_a_proper_prefix_of r or
  p is_a_prefix_of r & ex r1 st r1 in W1 & r = p^r1 by A2,TREES_1:1,def 9;
then  r in W with-replacement (p,W1) & not q is_a_proper_prefix_of r or
  ex r1 st r1 in W2 & r = q^r1 by A1,A3,Th2,TREES_1:def 9;
  hence thesis by A6,TREES_1:def 9;
end;
