reserve S for non void non empty ManySortedSign,
  V for non-empty ManySortedSet of the carrier of S;
reserve A for MSAlgebra over S,
  t for Term of S,V;
reserve S for non void non empty ManySortedSign,
  A for non-empty MSAlgebra over S,
  V for Variables of A,
  t for c-Term of A,V,
  f for ManySortedFunction of V, the Sorts of A;

theorem Th36:
  ex vt being finite DecoratedTree st vt is_an_evaluation_of t,f
proof
  defpred P[set] means ex t being c-Term of A,V, vt being finite DecoratedTree
  st t = $1 & vt is_an_evaluation_of t,f;
A1: for o being OperSymbol of S, p being ArgumentSeq of o,A,V st for t being
  c-Term of A,V st t in rng p holds P[t] holds P[Sym(o,(the Sorts of A) (\/) V)
  -tree p]
  proof
    let o be OperSymbol of S, p be ArgumentSeq of o,A,V such that
A2: for t being c-Term of A,V st t in rng p ex u being c-Term of A,V,
    vt being finite DecoratedTree st u = t & vt is_an_evaluation_of u,f;
    defpred Q[object,object] means
     ex t being c-Term of A,V, vt being finite
    DecoratedTree st $2 = vt & t = p.$1 & vt is_an_evaluation_of t,f;
A3: for e be object st e in dom p ex u be object st Q[e,u]
    proof
      let x be object;
      assume x in dom p;
      then
A4:   p.x in rng p by FUNCT_1:def 3;
      rng p c= S-Terms ((the Sorts of A) (\/) V) by FINSEQ_1:def 4;
      then reconsider t = p.x as c-Term of A,V by A4;
      ex u being c-Term of A,V, vt being finite DecoratedTree st u = t &
      vt is_an_evaluation_of u,f by A2,A4;
      hence thesis;
    end;
    consider q being Function such that
A5: dom q = dom p & for x being object st x in dom p holds Q[x,q.x] from
    CLASSES1:sch 1(A3);
    dom p = Seg len p by FINSEQ_1:def 3;
    then reconsider q as FinSequence by A5,FINSEQ_1:def 2;
A6: len p = len q by A5,FINSEQ_3:29;
    now
      let x be object;
      assume x in dom q;
      then
      ex t being c-Term of A,V, vt being finite DecoratedTree st q.x = vt
      & t = p.x & vt is_an_evaluation_of t,f by A5;
      hence q.x is DecoratedTree;
    end;
    then reconsider q as DTree-yielding FinSequence by TREES_3:24;
    now
      let i be Nat, t be c-Term of A,V;
      assume i in dom p;
      then
      ex t being c-Term of A,V, vt being finite DecoratedTree st q.i = vt
      & t = p.i & vt is_an_evaluation_of t,f by A5;
      hence t = p.i implies ex vt being finite DecoratedTree st vt = q.i & vt
      is_an_evaluation_of t,f;
    end;
    then ex vt being finite DecoratedTree st vt = (Den(o,A).roots q)-tree q &
     vt is_an_evaluation_of
     (Sym(o,(the Sorts of A) (\/) V)-tree p qua c-Term of A,V),
    f by A6,Th33;
    hence thesis;
  end;
A7: for s being SortSymbol of S, v being Element of V.s holds P[root-tree [v
  ,s]]
  proof
    let s be SortSymbol of S, x be Element of V.s;
    reconsider t = root-tree [x,s] as c-Term of A,V by Th8;
    take t, root-tree (f.s.x);
    thus t = root-tree [x,s];
    thus thesis by Th32;
  end;
A8: for s being SortSymbol of S, x being Element of (the Sorts of A).s holds
  P[root-tree [x,s]]
  proof
    let s be SortSymbol of S, x be Element of (the Sorts of A).s;
    reconsider t = root-tree [x,s] as c-Term of A,V by Th6;
    take t, root-tree x;
    thus t = root-tree [x,s];
    thus thesis by Th31;
  end;
  for t being c-Term of A,V holds P[t] from CTermInd(A8,A7,A1);
  then ex u being c-Term of A,V, vt being finite DecoratedTree st u = t & vt
  is_an_evaluation_of u,f;
  hence thesis;
end;
