reserve S for non void non empty ManySortedSign,
  U0 for MSAlgebra over S;
reserve S for non void non empty ManySortedSign,
  X for ManySortedSet of the carrier of S,
  o for OperSymbol of S,
  b for Element of ([:the carrier' of S,{the
  carrier of S}:] \/ Union (coprod X))*;
reserve x for set;

theorem Th12:
  for S be non void non empty ManySortedSign, X be non-empty
ManySortedSet of the carrier of S, s1,s2 be SortSymbol of S st s1 <> s2 holds (
  FreeSort X).s1 misses (FreeSort X).s2
proof
  let S be non void non empty ManySortedSign, X be non-empty ManySortedSet of
  the carrier of S, s1,s2 be SortSymbol of S;
  assume that
A1: s1 <> s2 and
A2: (FreeSort X).s1 /\ (FreeSort X).s2 <> {};
  consider x being object such that
A3: x in (FreeSort X).s1 /\ (FreeSort X).s2 by A2,XBOOLE_0:def 1;
  set D = DTConMSA(X);
A4: (FreeSort X).s1 = FreeSort(X,s1) by Def11;
A5: (FreeSort X).s2 = FreeSort(X,s2) by Def11;
  x in (FreeSort X).s2 by A3,XBOOLE_0:def 4;
  then consider b be Element of TS D such that
A6: b = x and
A7: (ex x2 be set st x2 in X.s2 & b = root-tree [x2,s2]) or ex o2 be
  OperSymbol of S st [o2,the carrier of S]=b.{} & the_result_sort_of o2 = s2
by A5;
  x in (FreeSort X).s1 by A3,XBOOLE_0:def 4;
  then consider a be Element of TS D such that
A8: a = x and
A9: (ex x1 be set st x1 in X.s1 & a = root-tree [x1,s1]) or ex o1 be
OperSymbol of S st [o1,the carrier of S] = a.{} & the_result_sort_of o1 = s1
by A4;
  per cases by A9;
  suppose
    ex x1 be set st x1 in X.s1 & a = root-tree [x1,s1];
    then consider x1 be set such that
    x1 in X.s1 and
A10: a = root-tree [x1,s1];
    now
      per cases by A7;
      case
        ex x2 be set st x2 in X.s2 & b = root-tree [x2,s2];
        then consider x2 be set such that
        x2 in X.s2 and
A11:    b = root-tree [x2,s2];
        [x1,s1] = [x2,s2] by A8,A6,A10,A11,TREES_4:4;
        hence contradiction by A1,XTUPLE_0:1;
      end;
      case
        ex o2 be OperSymbol of S st [o2,the carrier of S]=b.{} &
        the_result_sort_of o2 = s2;
        then consider o2 be OperSymbol of S such that
A12:    [o2,the carrier of S] = b.{} and
        the_result_sort_of o2 = s2;
        [o2,the carrier of S] = [x1,s1] by A8,A6,A10,A12,TREES_4:3;
        then
A13:    the carrier of S = s1 by XTUPLE_0:1;
        for X be set holds not X in X;
        hence contradiction by A13;
      end;
    end;
    hence contradiction;
  end;
  suppose
    ex o1 be OperSymbol of S st [o1,the carrier of S] = a.{} &
    the_result_sort_of o1 = s1;
    then consider o1 be OperSymbol of S such that
A14: [o1,the carrier of S] = a.{} and
A15: the_result_sort_of o1 = s1;
    now
      per cases by A7;
      case
        ex x2 be set st x2 in X.s2 & b = root-tree [x2,s2];
        then consider x2 be set such that
        x2 in X.s2 and
A16:    b = root-tree [x2,s2];
        [o1,the carrier of S] = [x2,s2] by A8,A6,A14,A16,TREES_4:3;
        then
A17:    the carrier of S = s2 by XTUPLE_0:1;
        for X be set holds not X in X;
        hence contradiction by A17;
      end;
      case
        ex o2 be OperSymbol of S st [o2,the carrier of S]=b.{} &
        the_result_sort_of o2 = s2;
        hence contradiction by A1,A8,A6,A14,A15,XTUPLE_0:1;
      end;
    end;
    hence contradiction;
  end;
end;
