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 Th11:
  for x being set holds x in InputVertices (X-CircuitStr) iff x in Subtrees X &
  ex s being SortSymbol of S, v being Element of V.s st x = root-tree [v,s]
proof
  set G = X-CircuitStr;
  let x be set;
  hereby
    assume
A1: x in InputVertices (X-CircuitStr);
    then
A2: not x in the carrier' of G by XBOOLE_0:def 5;
    thus x in Subtrees X by A1;
    reconsider t = x as Term of S,V by A1,Th4;
    (ex s being SortSymbol of S, v being Element of V.s st t.{} = [v,s])
    or t.{} in [:the carrier' of S,{the carrier of S}:] by MSATERM:2;
    then (ex s being SortSymbol of S, v being Element of V.s st t.{} = [v,s])
    or t is CompoundTerm of S,V by MSATERM:def 6;
    then consider s being SortSymbol of S, v being Element of V.s such that
A3: t.{} = [v,s] by A1,A2,Th5;
    take s;
    reconsider v as Element of V.s;
    take v;
    thus x = root-tree [v,s] by A3,MSATERM:5;
  end;
  assume
A4: x in Subtrees X;
  given s being SortSymbol of S, v being Element of V.s such that
A5: x = root-tree [v,s];
  assume not thesis;
  then x in the carrier' of G by A4,XBOOLE_0:def 5;
  then reconsider t = x as CompoundTerm of S,V by Th4;
  t.{} = [v,s] by A5,TREES_4:3;
  then [v,s] in [:the carrier' of S,{the carrier of S}:] by MSATERM:def 6;
  then s = the carrier of S by ZFMISC_1:106;
  then s in s;
  hence contradiction;
end;
