reserve S for non empty non void ManySortedSign,
  V for non-empty ManySortedSet of the carrier of S,
  A for non-empty MSAlgebra over S,
  X for non empty Subset of S-Terms V,
  t for Element of X;

theorem Th9:
  for X1,X2 being constituted-DTrees non empty set st
  (for t being Element of X1 holds t is finite) &
  (for t being Element of X2 holds t is finite) for C be set holds
  C-ImmediateSubtrees (X1 \/ X2)
  = (C-ImmediateSubtrees X1)+*(C-ImmediateSubtrees X2)
proof
  let X1,X2 be constituted-DTrees non empty set such that
A1: for t being Element of X1 holds t is finite and
A2: for t being Element of X2 holds t is finite;
A3: now
    let t be Element of X1 \/ X2;
    t in X1 or t in X2 by XBOOLE_0:def 3;
    hence t is finite by A1,A2;
  end;
  let C be set;
  set X = X1 \/ X2;
  set f = C-ImmediateSubtrees (X1 \/ X2);
  set f1 = C-ImmediateSubtrees X1;
  set f2 = C-ImmediateSubtrees X2;
A4: dom f = C-Subtrees X by FUNCT_2:def 1;
A5: dom f1 = C-Subtrees X1 by FUNCT_2:def 1;
A6: dom f2 = C-Subtrees X2 by FUNCT_2:def 1;
A7: C-Subtrees X = (C-Subtrees X1) \/ (C-Subtrees X2) by Th8;
  now
    let x be object;
    assume
A8: x in dom f1 \/ dom f2;
    then reconsider t = x as Element of Subtrees X by A5,A6,A7;
    f.x in (Subtrees X)* by A5,A6,A7,A8,FUNCT_2:5;
    then reconsider p = f.x as FinSequence of Subtrees X by FINSEQ_1:def 11;
    hereby
      assume
A9:   x in dom f2;
      then f2.x in (Subtrees X2)* by A6,FUNCT_2:5;
      then reconsider p2 = f2.x as FinSequence of Subtrees X2 by
FINSEQ_1:def 11;
A10:  t = (t.{})-tree p by A3,A5,A6,A7,A8,TREES_9:def 13;
      t = (t.{})-tree p2 by A2,A6,A9,TREES_9:def 13;
      hence f.x = f2.x by A10,TREES_4:15;
    end;
    assume not x in dom f2;
    then
A11: x in dom f1 by A8,XBOOLE_0:def 3;
    then f1.x in (Subtrees X1)* by A5,FUNCT_2:5;
    then reconsider p1 = f1.x as FinSequence of Subtrees X1 by FINSEQ_1:def 11;
A12: t = (t.{})-tree p by A3,A5,A6,A7,A8,TREES_9:def 13;
    t = (t.{})-tree p1 by A1,A5,A11,TREES_9:def 13;
    hence f.x = f1.x by A12,TREES_4:15;
  end;
  hence thesis by A4,A5,A6,A7,FUNCT_4:def 1;
end;
