reserve G for Graph,
  k, m, n for Nat;
reserve G for non void Graph;

theorem
  for S being non void non empty ManySortedSign, A being non-empty
  MSAlgebra over S, v be SortSymbol of S st S is finitely_operated holds
  Constants(A, v) is finite
proof
  let S be non void non empty ManySortedSign, A be non-empty MSAlgebra over S,
  v be SortSymbol of S such that
A1: S is finitely_operated;
  set Ov = {o where o is OperSymbol of S: the_result_sort_of o = v};
  consider Av being non empty set such that
  Av =(the Sorts of A).v and
A2: Constants(A,v) = { a where a is Element of Av : ex o be OperSymbol
of S st (the Arity of S).o = {} & (the ResultSort of S).o = v & a in rng Den(o,
  A)} by MSUALG_2:def 3;
A3: Ov is finite by A1;
A4: now
    assume Ov is non empty;
    then reconsider Ov as non empty set;
    deffunc G(Element of the carrier' of S)=Den($1,A).{};
    defpred P[Element of Ov] means (the Arity of S).$1 = {};
    set COv = {o where o is Element of Ov: P[o]};
    set aCOv = {G(o) where o is Element of the carrier' of S : o in COv };
A5: Constants(A,v) c= aCOv
    proof
      let c be object;
      assume c in Constants(A,v);
      then consider a being Element of Av such that
A6:   a = c and
A7:   ex o be OperSymbol of S st (the Arity of S).o = {} & (the
      ResultSort of S).o = v & a in rng Den(o,A) by A2;
      consider o being OperSymbol of S such that
A8:   (the Arity of S).o = {} and
A9:   (the ResultSort of S).o = v and
A10:  a in rng Den(o,A) by A7;
      the_result_sort_of o = (the ResultSort of S).o by MSUALG_1:def 2;
      then o in Ov by A9;
      then reconsider o9 = o as Element of Ov;
A11:  o9 in COv by A8;
      set f = Den(o,A);
      consider x being object such that
A12:  x in dom f and
A13:  a = f.x by A10,FUNCT_1:def 3;
      dom f = {{}} by A8,Th23;
      then x = {} by A12,TARSKI:def 1;
      hence thesis by A6,A11,A13;
    end;
    COv is Subset of Ov from DOMAIN_1:sch 7;
    then
A14: COv is finite by A3;
    aCOv is finite from FRAENKEL:sch 21(A14);
    hence thesis by A5;
  end;
  now
    assume
A15: Ov is empty;
    now
      assume Constants(A, v) is non empty;
      then consider c being object such that
A16:  c in Constants(A,v) by XBOOLE_0:def 1;
      consider a being Element of Av such that
      a = c and
A17:  ex o be OperSymbol of S st (the Arity of S).o = {} & (the
      ResultSort of S).o = v & a in rng Den(o,A) by A2,A16;
      consider o being OperSymbol of S such that
      (the Arity of S).o = {} and
A18:  (the ResultSort of S).o = v and
      a in rng Den(o,A) by A17;
      the_result_sort_of o = (the ResultSort of S).o by MSUALG_1:def 2;
      then o in Ov by A18;
      hence contradiction by A15;
    end;
    hence thesis;
  end;
  hence thesis by A4;
end;
